lint
This commit is contained in:
parent
2fb4447c5c
commit
c5d273eb01
2 changed files with 18 additions and 19 deletions
|
|
@ -20,7 +20,9 @@
|
|||
:show-ratio="true"
|
||||
:contrast="contrast[key]"
|
||||
/>
|
||||
<div v-else>{{ ' ' }}</div>
|
||||
<div v-else>
|
||||
{{ ' ' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
|
@ -59,10 +61,12 @@ import { computed } from 'vue'
|
|||
import ColorInput from 'src/components/color_input/color_input.vue'
|
||||
import ContrastRatio from 'src/components/contrast_ratio/contrast_ratio.vue'
|
||||
|
||||
import { getContrastRatio, hex2rgb } from 'src/services/color_convert/color_convert.js'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import {
|
||||
getContrastRatio,
|
||||
hex2rgb,
|
||||
} from 'src/services/color_convert/color_convert.js'
|
||||
import {
|
||||
newExporter,
|
||||
newImporter,
|
||||
|
|
|
|||
|
|
@ -334,9 +334,11 @@ export default {
|
|||
'mfm',
|
||||
this.pauseMfm ? '-pause' : '',
|
||||
this.scaleMfm ? '-scale' : '',
|
||||
].filter(x => x).join(' ')
|
||||
]
|
||||
.filter((x) => x)
|
||||
.join(' ')
|
||||
newAttrs['data-mfm-operator'] = mfmOperator
|
||||
switch(mfmOperator) {
|
||||
switch (mfmOperator) {
|
||||
case 'position': {
|
||||
const x = Number.parseFloat(fullAttrs['data-mfm-x']) || 0
|
||||
const y = Number.parseFloat(fullAttrs['data-mfm-y']) || 0
|
||||
|
|
@ -350,10 +352,7 @@ export default {
|
|||
case 'scale': {
|
||||
const x = Number.parseFloat(fullAttrs['data-mfm-x']) || 1
|
||||
const y = Number.parseFloat(fullAttrs['data-mfm-y']) || 1
|
||||
newAttrs.style = [
|
||||
'transform:',
|
||||
`scale(${x}, ${y})`,
|
||||
].join(' ')
|
||||
newAttrs.style = ['transform:', `scale(${x}, ${y})`].join(' ')
|
||||
break
|
||||
}
|
||||
case 'rotate': {
|
||||
|
|
@ -366,16 +365,12 @@ export default {
|
|||
}
|
||||
case 'bg': {
|
||||
const color = fullAttrs['data-mfm-color'] || 0
|
||||
newAttrs.style = [
|
||||
`background-color: #${color}`,
|
||||
].join(' ')
|
||||
newAttrs.style = [`background-color: #${color}`].join(' ')
|
||||
break
|
||||
}
|
||||
case 'fg': {
|
||||
const color = fullAttrs['data-mfm-color'] || 0
|
||||
newAttrs.style = [
|
||||
`color: #${color}`,
|
||||
].join(';')
|
||||
newAttrs.style = [`color: #${color}`].join(';')
|
||||
break
|
||||
}
|
||||
case 'spin': {
|
||||
|
|
@ -389,14 +384,14 @@ export default {
|
|||
const anim = [
|
||||
x ? 'mfm-spinX' : null,
|
||||
y ? 'mfm-spinY' : null,
|
||||
'mfm-spin'
|
||||
].filter(a => a)[0]
|
||||
'mfm-spin',
|
||||
].filter((a) => a)[0]
|
||||
|
||||
const direction = [
|
||||
alternate ? 'alternate' : null,
|
||||
left ? 'reverse' : null,
|
||||
'normal',
|
||||
].filter(a => a)[0]
|
||||
].filter((a) => a)[0]
|
||||
|
||||
newAttrs.style = [
|
||||
`animation-name: ${anim}`,
|
||||
|
|
@ -423,7 +418,7 @@ export default {
|
|||
newAttrs.style = [
|
||||
`border: ${width} ${style} ${color}`,
|
||||
`border-radius: ${radius}`,
|
||||
`overflow: ${noclip ? 'visible' : 'clip'}`
|
||||
`overflow: ${noclip ? 'visible' : 'clip'}`,
|
||||
].join(';')
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue