Pages: ボタンを色付き表示できるように

This commit is contained in:
syuilo 2019-07-06 23:11:16 +09:00
parent 067e9ec6f4
commit e97dd13e81
3 changed files with 4 additions and 1 deletions

View file

@ -2024,6 +2024,7 @@ pages:
_button:
text: "タイトル"
colored: "色付き"
action: "ボタンを押したときの動作"
_action:
dialog: "ダイアログを表示する"

View file

@ -4,6 +4,7 @@
<section class="xfhsjczc">
<ui-input v-model="value.text"><span>{{ $t('blocks._button.text') }}</span></ui-input>
<ui-switch v-model="value.primary"><span>{{ $t('blocks._button.colored') }}</span></ui-switch>
<ui-select v-model="value.action">
<template #label>{{ $t('blocks._button.action') }}</template>
<option value="dialog">{{ $t('blocks._button._action.dialog') }}</option>
@ -52,6 +53,7 @@ export default Vue.extend({
if (this.value.content == null) Vue.set(this.value, 'content', null);
if (this.value.event == null) Vue.set(this.value, 'event', null);
if (this.value.message == null) Vue.set(this.value, 'message', null);
if (this.value.message == null) Vue.set(this.value, 'primary', false);
},
});
</script>

View file

@ -1,6 +1,6 @@
<template>
<div>
<ui-button class="kudkigyw" @click="click()">{{ script.interpolate(value.text) }}</ui-button>
<ui-button class="kudkigyw" @click="click()" :primary="value.primary">{{ script.interpolate(value.text) }}</ui-button>
</div>
</template>