Compare commits
10 commits
71f2cd8f59
...
34d6e014ae
Author | SHA1 | Date | |
---|---|---|---|
|
34d6e014ae | ||
|
ba50661840 | ||
|
f25dafb049 | ||
|
868119679f | ||
|
4faca7d3ca | ||
|
e5fa8b357b | ||
|
6c5a34e491 | ||
|
6ffaa8edc9 | ||
|
7a8511f86c | ||
|
e72552e75c |
1 changed files with 11 additions and 2 deletions
|
@ -133,10 +133,15 @@ const EmojiPicker = {
|
||||||
methods: {
|
methods: {
|
||||||
updateEmojiSize () {
|
updateEmojiSize () {
|
||||||
const css = window.getComputedStyle(this.$refs.popover.$el)
|
const css = window.getComputedStyle(this.$refs.popover.$el)
|
||||||
|
console.log('CSS', css)
|
||||||
const emojiSize = css.getPropertyValue('--emojiSize')
|
const emojiSize = css.getPropertyValue('--emojiSize')
|
||||||
|
console.log('CSS', emojiSize)
|
||||||
const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '')
|
const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '')
|
||||||
|
console.log('CSS', emojiSizeUnit)
|
||||||
const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, ''))
|
const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, ''))
|
||||||
const fontSize = css.getPropertyValue('font-size').replace(/[^0-9,.]+/, '')
|
console.log('CSS', emojiSizeValue)
|
||||||
|
const fontSize = Number(emojiSize.replace(css.getPropertyValue('font-size').replace(/[^0-9,.]+/, '')))
|
||||||
|
console.log('CSS', fontSize)
|
||||||
|
|
||||||
let emojiSizeReal
|
let emojiSizeReal
|
||||||
if (emojiSizeUnit.endsWith('em')) {
|
if (emojiSizeUnit.endsWith('em')) {
|
||||||
|
@ -285,7 +290,7 @@ const EmojiPicker = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
minItemSize () {
|
minItemSize () {
|
||||||
return this.emojiSize
|
return this.emojiHeight
|
||||||
},
|
},
|
||||||
// used to watch it
|
// used to watch it
|
||||||
fontSize () {
|
fontSize () {
|
||||||
|
@ -297,8 +302,12 @@ const EmojiPicker = {
|
||||||
emojiHeight () {
|
emojiHeight () {
|
||||||
return this.emojiSize
|
return this.emojiSize
|
||||||
},
|
},
|
||||||
|
emojiWidth () {
|
||||||
|
return this.emojiSize
|
||||||
|
},
|
||||||
itemPerRow () {
|
itemPerRow () {
|
||||||
console.log(
|
console.log(
|
||||||
|
this.emojiWidth,
|
||||||
this.emojiSize,
|
this.emojiSize,
|
||||||
this.width
|
this.width
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue