zpj před 1 rokem
rodič
revize
a9fdf6d03b
1 změnil soubory, kde provedl 10 přidání a 2 odebrání
  1. 10 2
      pages/index/index.vue

+ 10 - 2
pages/index/index.vue

@@ -9,6 +9,12 @@
   <view class="">
     {{text}}
   </view>
+  <view class="">
+    --------------------分割线-----------------------------
+  </view>
+  <view class="">
+    {{aaa}}
+  </view>
 </view>
 </template>
 
@@ -19,17 +25,19 @@ export default {
       inputString: '',
       inputCache: '',
 	  text:'',
+	  aaa:'',
     };
   },
   methods: {
     onConfirm(text) {
-      alert(JSON.stringify(text))
+      // alert(JSON.stringify(text))
       console.log('拿到的text', text);
       // 此处写我们自己的逻辑
       this.text = text;
     },
     keypress(e) {
-      alert(JSON.stringify(e))
+		this.aaa = JSON.stringify(e);
+      // alert(JSON.stringify(e))
       if (e.keyCode === 66 || e.key === 'Enter') {
         this.inputString = this.inputCache;
         this.onConfirm(this.inputString);