alternatively
This commit is contained in:
parent
38c0856c20
commit
984dfd06c2
|
@ -140,14 +140,14 @@ const EmojiPicker = {
|
||||||
},
|
},
|
||||||
updateEmojiSize () {
|
updateEmojiSize () {
|
||||||
const css = window.getComputedStyle(this.$refs.popover.$el)
|
const css = window.getComputedStyle(this.$refs.popover.$el)
|
||||||
const fontSize = css.getPropertyValue('font-size')
|
const fontSize = css.getPropertyValue('font-size') || '14px'
|
||||||
const emojiSize = css.getPropertyValue('--emojiSize')
|
const emojiSize = css.getPropertyValue('--emojiSize') || '2.2rem'
|
||||||
|
|
||||||
const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '') || 'px'
|
const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '')
|
||||||
const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, '')) || 14
|
const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, ''))
|
||||||
|
|
||||||
const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') || 'rem'
|
const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '')
|
||||||
const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) || 2.2
|
const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, ''))
|
||||||
|
|
||||||
let fontSizeMultiplier
|
let fontSizeMultiplier
|
||||||
if (fontSizeUnit.endsWith('em')) {
|
if (fontSizeUnit.endsWith('em')) {
|
||||||
|
|
Loading…
Reference in a new issue