1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 22:38:30 +09:00

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: _button:
text: "タイトル" text: "タイトル"
colored: "色付き"
action: "ボタンを押したときの動作" action: "ボタンを押したときの動作"
_action: _action:
dialog: "ダイアログを表示する" dialog: "ダイアログを表示する"

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <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> </div>
</template> </template>