|
|
@ -22,7 +22,8 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
<v-icon x-small outlined color="primary" class="mr-2"> |
|
|
|
<v-icon x-small outlined color="primary" class="mr-2"> |
|
|
|
mdi-plus |
|
|
|
mdi-plus |
|
|
|
</v-icon> Add option |
|
|
|
</v-icon> |
|
|
|
|
|
|
|
Add option |
|
|
|
</v-btn> |
|
|
|
</v-btn> |
|
|
|
</v-container> |
|
|
|
</v-container> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -30,6 +31,7 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import colors from '@/components/project/spreadsheet/helpers/colors' |
|
|
|
import colors from '@/components/project/spreadsheet/helpers/colors' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'CustomSelectOptions', |
|
|
|
name: 'CustomSelectOptions', |
|
|
|
props: ['value'], |
|
|
|
props: ['value'], |
|
|
@ -44,7 +46,7 @@ export default { |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
localState: { |
|
|
|
localState: { |
|
|
|
handler(v) { |
|
|
|
handler(v) { |
|
|
|
this.$emit('input', v.map(v => `'${v}'`).join(',')) |
|
|
|
this.$emit('input', v.map(v => `'${v.replace(/'/g, '\\\'')}'`).join(',')) |
|
|
|
}, |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
deep: true |
|
|
|
}, |
|
|
|
}, |
|
|
@ -57,7 +59,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
syncState() { |
|
|
|
syncState() { |
|
|
|
this.localState = (this.value || '').split(',').map(v => v.replace(/^'|'$/g, '')) |
|
|
|
this.localState = (this.value || '').split(',').map(v => v.replace(/\\'/g, '\'').replace(/^'|'$/g, '')) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|