From 4d7364d9a619502bbbc6abba4e7cd4755a98f86d Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 06 十月 2023 08:18:06 +0800 Subject: [PATCH] # --- pages/component/demo.vue | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 41 insertions(+), 3 deletions(-) diff --git a/pages/component/demo.vue b/pages/component/demo.vue index ae8e039..b4106ff 100644 --- a/pages/component/demo.vue +++ b/pages/component/demo.vue @@ -1,10 +1,18 @@ <template> <view> - <z-input v-for="it in zInputList" :desc="it.desc" :btn="it.btn" :btn-name="it.btnName" v-model="it.val" :lenCheck="it.lenCheck"></z-input> + <z-input v-for="it in zInputList" + :desc="it.desc" :btn="it.btn" :btn-name="it.btnName" v-model="it.val" + :lenCheck="it.lenCheck" :focus="it.focus" @clickBtn='entry(it.name)'> + </z-input> <view>杈撳叆妗�1</view> <view>{{zInputList[0].val}}</view> <view>杈撳叆妗�2</view> <view>{{zInputList[1].val}}</view> + <view>杈撳叆妗�2</view> + <view>{{zInputList[2].val}}</view> + <button @click="focus">focus</button> + <hr> + <z-data-list></z-data-list> </view> </template> @@ -13,12 +21,42 @@ data() { return { zInputList: [ - {name: 'yyy',desc: '鎵樼洏鐮�',val: '2',lenCheck: 8}, - {name: 'yyy',desc: '鐗╂枡鐮�',btn: true,btnName: '鎻愬彇',placeholder: '',val: '1'} + {name: 'ccc',desc: '璁㈠崟鍙�',btn: true,btnName: '闃挎柉椤�',val: 'orderNo',focus: true}, + {name: 'yyy',desc: '鎵樼洏鐮�',val: '2',lenCheck: 8,focus: false}, + {name: 'aaa',desc: '鐗╂枡鐮�',btn: true,btnName: '鎻愬彇',placeholder: '',val: '1',focus: false} ], + zDataList: [ + {name: 'asd',orderNo: 'CK123',barcode: 'bar321'} + ] + + } + }, + methods: { + entry(e) { + }, + ccc() { + }, + aaa() { + + }, + focus() { + if (this.zInputList[0].focus) { + this.zInputList[0].focus = false + this.zInputList[1].focus = true + this.zInputList[2].focus = false + } else if (this.zInputList[1].focus){ + this.zInputList[0].focus = false + this.zInputList[1].focus = false + this.zInputList[2].focus = true + } else { + this.zInputList[0].focus = true + this.zInputList[1].focus = false + this.zInputList[2].focus = false + } } } + } </script> -- Gitblit v1.9.1