Compare commits
2 commits
34d6e014ae
...
71f2cd8f59
Author | SHA1 | Date | |
---|---|---|---|
|
71f2cd8f59 | ||
|
c27bbfd21c |
1 changed files with 2 additions and 11 deletions
|
@ -133,15 +133,10 @@ 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,.]+/, ''))
|
||||||
console.log('CSS', emojiSizeValue)
|
const fontSize = css.getPropertyValue('font-size').replace(/[^0-9,.]+/, '')
|
||||||
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')) {
|
||||||
|
@ -290,7 +285,7 @@ const EmojiPicker = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
minItemSize () {
|
minItemSize () {
|
||||||
return this.emojiHeight
|
return this.emojiSize
|
||||||
},
|
},
|
||||||
// used to watch it
|
// used to watch it
|
||||||
fontSize () {
|
fontSize () {
|
||||||
|
@ -302,12 +297,8 @@ 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