fix textarea options

This commit is contained in:
Nitwel
2020-09-04 11:10:44 +02:00
parent 882bfda164
commit b9d152a26c
2 changed files with 31 additions and 17 deletions

View File

@@ -11,27 +11,41 @@ export default defineInterface(({ i18n }) => ({
{
field: 'placeholder',
name: i18n.t('placeholder'),
width: 'half',
interface: 'text-input',
type: 'string',
meta: {
width: 'half',
interface: 'text-input',
},
},
{
field: 'trim',
name: i18n.t('trim'),
width: 'half',
interface: 'switch',
name: i18n.t('trimed'),
type: 'boolean',
meta: {
width: 'half',
interface: 'toggle',
},
schema: {
default_value: false,
},
},
{
field: 'font',
name: i18n.t('font'),
width: 'half',
interface: 'dropdown',
default: 'sans-serif',
options: {
choices: [
{ text: i18n.t('sans_serif'), value: 'sans-serif' },
{ text: i18n.t('monospace'), value: 'monospace' },
{ text: i18n.t('serif'), value: 'serif' },
],
type: 'string',
meta: {
width: 'half',
interface: 'dropdown',
options: {
choices: [
{ text: i18n.t('sans_serif'), value: 'sans-serif' },
{ text: i18n.t('monospace'), value: 'monospace' },
{ text: i18n.t('serif'), value: 'serif' },
],
},
},
schema: {
default_value: 'sans-serif',
},
},
],

View File

@@ -40,15 +40,15 @@ export default defineComponent({
<style lang="scss" scoped>
.v-textarea {
&.monospace {
--v-input-font-family: var(--family-monospace);
--v-textarea-font-family: var(--family-monospace);
}
&.serif {
--v-input-font-family: var(--family-serif);
--v-textarea-font-family: var(--family-serif);
}
&.sans-serif {
--v-input-font-family: var(--family-sans-serif);
--v-textarea-font-family: var(--family-sans-serif);
}
}
</style>