浏览代码

设置-密钥设置清除空格

dujingxian 4 年之前
父节点
当前提交
959f42cfac
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/pages/subPages/view.vue

+ 3 - 3
src/pages/subPages/view.vue

@@ -24,8 +24,8 @@
             <h3 style="margin-bottom:20px">开发者设置:</h3>
             <el-form label-width="120px" :model="formKey" :rules="ruleKey" ref="keyForm">
                 <el-form-item label="密钥设置:" :prop="useKey == '1' ? 'ReSecurityKey' : 'securityKey'"  class="keySet">
-                    <el-input v-if="useKey == '1'" v-model="formKey.ReSecurityKey" autocomplete="off" style="width: 300px;margin-right:10px"></el-input>
-                    <el-input v-else v-model="formKey.securityKey" autocomplete="off" style="width: 300px;margin-right:10px"></el-input>
+                    <el-input v-if="useKey == '1'" v-model.trim="formKey.ReSecurityKey" autocomplete="off" style="width: 300px;margin-right:10px"></el-input>
+                    <el-input v-else v-model.trim="formKey.securityKey" autocomplete="off" style="width: 300px;margin-right:10px"></el-input>
                     <el-button type="primary" size="small" @click="updateKey">{{useKey == '1' ? '重设' : '设置'}}</el-button>
                     <!-- <el-alert
                         title="请输入32位字符串,用于接口生成签名"
@@ -199,7 +199,7 @@ export default {
             },
             repeatIp: false,
             // 密钥校验,只能是数字和字母
-            formKey: {
+            formKey: { 
                 securityKey: '',
                 ReSecurityKey: ''
             },