Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2021-01-02 16:23:31 +08:00
7 changed files with 91 additions and 3 deletions
+17
View File
@@ -14,6 +14,9 @@
<van-cell is-link @touchstart.stop="keyboard = 'multiExtraKey'">
{{ t('button5') }}
</van-cell>
<van-cell is-link @touchstart.stop="keyboard = 'randomKeyOrder'">
{{ t('button6') }}
</van-cell>
<van-field
v-model="value"
readonly
@@ -69,6 +72,15 @@
@delete="onDelete"
/>
<van-number-keyboard
v-if="!isTest"
:show="keyboard === 'randomKeyOrder'"
random-key-order
@blur="keyboard = ''"
@input="onInput"
@delete="onDelete"
/>
<van-number-keyboard
v-model="value"
:show="keyboard === 'bindValue'"
@@ -92,10 +104,12 @@ const i18n = {
button3: '弹出身份证号键盘',
button4: '弹出带标题的键盘',
button5: '弹出配置多个按键的键盘',
button6: '弹出配置随机数字的键盘',
bindValue: '双向绑定',
clickToInput: '点此输入',
extraKey: '左下角按键内容',
multiExtraKey: '配置多个按键',
randomKeyOrder: '随机数字键盘',
},
'en-US': {
close: 'Close',
@@ -106,10 +120,12 @@ const i18n = {
button3: 'Show IdNumber Keyboard',
button4: 'Show Keyboard With Title',
button5: 'Show Keyboard With Multiple ExtraKey',
button6: 'Show Keyboard With Random Key Order',
bindValue: 'Bind Value',
clickToInput: 'Click To Input',
extraKey: 'IdNumber Keyboard',
multiExtraKey: 'Multiple ExtraKey',
randomKeyOrder: 'Random Key Order',
},
};
@@ -132,6 +148,7 @@ export default {
return {
...toRefs(state),
t,
isTest: process.env.NODE_ENV === 'test',
onInput,
onDelete,
};