fix preset

This commit is contained in:
FloatingGhost 2021-07-01 16:47:16 +01:00
parent d49434a799
commit 9cea1bc08c
3 changed files with 6 additions and 2 deletions

View file

@ -21,6 +21,7 @@ module.exports = {
'generator-star-spacing': 0, 'generator-star-spacing': 0,
// allow debugger during development // allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'vue/require-prop-types': 0 'vue/require-prop-types': 0,
'vue/no-unused-vars': 0
} }
} }

View file

@ -746,6 +746,9 @@ export default {
}, },
selected () { selected () {
this.dismissWarning() this.dismissWarning()
if (Object.prototype.toString.call(this.selected) === '[object String]') {
this.selected = JSON.parse(this.selected)
}
if (this.selectedVersion === 1) { if (this.selectedVersion === 1) {
if (!this.keepRoundness) { if (!this.keepRoundness) {
this.clearRoundness() this.clearRoundness()

View file

@ -63,7 +63,7 @@
<option <option
v-for="style in availableStyles" v-for="style in availableStyles"
:key="style.name" :key="style.name"
:value="style" :value="JSON.stringify(style)"
:style="{ :style="{
backgroundColor: style[1] || (style.theme || style.source).colors.bg, backgroundColor: style[1] || (style.theme || style.source).colors.bg,
color: style[3] || (style.theme || style.source).colors.text color: style[3] || (style.theme || style.source).colors.text