From 6f3ff9eeafc40021cf139b374b56eef5052e876a Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 23 十二月 2022 10:26:41 +0800 Subject: [PATCH] # --- components/t-test/t-test.vue | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/t-test/t-test.vue b/components/t-test/t-test.vue index 1151edb..b37448d 100644 --- a/components/t-test/t-test.vue +++ b/components/t-test/t-test.vue @@ -1,7 +1,7 @@ <template> <view> <slot> - <input style="background-color: azure;" v-model="val" @input="change(val)"> + <input style="background-color: azure;" v-model="val" @input="input"> </slot> </view> </template> @@ -29,10 +29,8 @@ }; }, methods: { - change(val) { - this.val = val - console.log(this.val); - this.$emit('input',val); + input() { + this.$emit('input',this.val); } } } -- Gitblit v1.9.1