ccj il y a 3 ans
Parent
commit
8795b006c3
2 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 1 1
      .eslintrc.js
  2. 5 5
      src/views/home/index.vue

+ 1 - 1
.eslintrc.js

@@ -28,7 +28,7 @@ module.exports = {
     //空行最多不能超过100行
     'no-multiple-empty-lines': [0, { max: 50 }],
     'no-alert': 0, //禁止使用alert confirm prompt
-    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    // 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
   },
   parserOptions: {

+ 5 - 5
src/views/home/index.vue

@@ -8,10 +8,10 @@
         <Panel :data-list="panelList"
                @click="gotoNewRw"></Panel>
         <div v-show="true">
-          <el-button @click="test">test</el-button>
-          <el-button @click="test1">test1</el-button>
-          <el-button @click="openPort">openPort</el-button>
-          <el-button @click="closePort">closePort</el-button>
+          <el-button @click="test()">test</el-button>
+          <el-button @click="test1()">test1</el-button>
+          <el-button @click="openPort()">openPort</el-button>
+          <el-button @click="closePort()">closePort</el-button>
           <div>{{text}}</div>
         </div>
        <!-- <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt=""> -->
@@ -543,7 +543,7 @@ export default {
       console.log('testtesttesttest111111');
     },
     async openPort(){
-      console.log('openPort');
+      console.log('openPort',navigator);
       if ('serial' in navigator) {
         // The Web Serial API is supported.
         console.log('the Web Serial API is supported.');