Browse Source

refactor: some placeholders

Casper Dai 3 years ago
parent
commit
c9d900c49a

+ 4 - 4
src/views/bigscreen/ProgramDesigner.vue

@@ -69,9 +69,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="program.name"
-          placeholder="请填写节目名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">分辨率:</span>
         <schema-select
@@ -90,9 +90,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="copyProgram.name"
-          placeholder="请填写节目名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
       </div>
     </confirm-dialog>

+ 2 - 1
src/views/device/detail/components/DeviceInfo.vue

@@ -64,8 +64,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="info.name"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">地址:</span>
         <el-input

+ 3 - 2
src/views/device/detail/components/external/ReceivingCard/ReceivingCardInfoEdit.vue

@@ -144,8 +144,9 @@
           <span class="c-grid-form__label required">设备型号:</span>
           <el-input
             v-model.trim="receivingCard.screen"
+            placeholder="最多50个字符"
             maxlength="50"
-            show-word-limit
+            clearable
           />
           <span class="c-grid-form__label">异步盒:</span>
           <div class="l-flex--row c-grid-form__option">
@@ -175,7 +176,7 @@
             v-model.trim="receivingCard.ip"
             placeholder="192.168.0.1"
             maxlength="15"
-            show-word-limit
+            clearable
           />
         </div>
       </confirm-dialog>

+ 2 - 1
src/views/device/group/index.vue

@@ -18,8 +18,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="currObj.name"
-          placeholder="请填写分组名称"
+          placeholder="最多50个字符"
           maxlength="50"
+          clearable
         />
         <span class="c-grid-form__label">备注:</span>
         <el-input

+ 22 - 25
src/views/external/camera/index.vue

@@ -86,9 +86,10 @@
         >
           <el-input
             v-model.trim="camera.name"
-            class="c-form__item limit"
+            class="c-form__item"
+            placeholder="最多50个字符"
             maxlength="50"
-            show-word-limit
+            clearable
           />
         </el-form-item>
         <el-form-item
@@ -97,10 +98,11 @@
         >
           <el-input
             v-model.trim="camera.identifier"
-            class="c-form__item limit"
-            maxlength="50"
+            class="c-form__item"
             :disabled="isEdit"
-            show-word-limit
+            placeholder="最多50个字符"
+            maxlength="50"
+            clearable
           />
         </el-form-item>
         <el-form-item
@@ -109,10 +111,10 @@
         >
           <el-input
             v-model.trim="camera.username"
-            class="c-form__item limit"
-            maxlength="50"
+            class="c-form__item"
             :disabled="isEdit"
-            show-word-limit
+            placeholder="最多50个字符"
+            maxlength="50"
           />
         </el-form-item>
         <el-form-item
@@ -124,6 +126,7 @@
             v-model.trim="camera.password"
             class="c-form__item"
             type="password"
+            placeholder="最多50个字符"
             maxlength="50"
             autocomplete="off"
           />
@@ -133,7 +136,7 @@
           prop="remark"
         >
           <el-input
-            v-model.trim="camera.remark"
+            v-model="camera.remark"
             class="c-form__item"
             type="textarea"
             maxlength="100"
@@ -396,6 +399,16 @@ export default {
     font-size: 18px;
   }
 }
+
+.c-form {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+
+  &__item {
+    width: 400px;
+  }
+}
 </style>
 <style lang="scss">
 .c-dialog--full {
@@ -408,20 +421,4 @@ export default {
     height: 100%;
   }
 }
-
-.c-form {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-
-  &__item {
-    width: 400px;
-
-    &.limit {
-      .el-input__inner {
-        padding-right: 48px;
-      }
-    }
-  }
-}
 </style>

+ 4 - 4
src/views/external/transmitter/index.vue

@@ -24,16 +24,16 @@
         <span class="c-grid-form__label required">设备名称:</span>
         <el-input
           v-model.trim="transmitter.name"
-          placeholder="请填写设备名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">设备型号:</span>
         <el-input
           v-model.trim="transmitter.type"
-          placeholder="请填写设备型号"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label">异步盒:</span>
         <div class="l-flex--row c-grid-form__option">

+ 5 - 5
src/views/realm/device/Device.vue

@@ -14,9 +14,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="currObj.name"
-          placeholder="请填写设备名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">产品:</span>
         <schema-select
@@ -28,21 +28,21 @@
         <span class="c-grid-form__label required">序列号:</span>
         <el-input
           v-model.trim="currObj.serialNumber"
-          placeholder="请填写设备序列号"
+          placeholder="最多50个字符"
           maxlength="50"
+          clearable
         />
         <span class="c-grid-form__label required">MAC:</span>
         <el-input
           v-model.trim="currObj.mac"
           placeholder="ff:ff:ff:ff:ff:ff"
           maxlength="17"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">地址:</span>
         <el-input
           v-model="currObj.remark"
           type="textarea"
-          placeholder="请填写设备地址"
           maxlength="100"
           :rows="3"
           show-word-limit

+ 2 - 2
src/views/realm/device/Product.vue

@@ -12,9 +12,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="currObj.name"
-          placeholder="请填写产品名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">类型:</span>
         <schema-select

+ 2 - 1
src/views/realm/device/ProductType.vue

@@ -12,8 +12,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="currObj.name"
-          placeholder="请填写产品类型名称"
+          placeholder="最多50个字符"
           maxlength="50"
+          clearable
         />
         <span class="c-grid-form__label">备注:</span>
         <el-input

+ 4 - 4
src/views/realm/tenant/Group.vue

@@ -23,18 +23,18 @@
           >
             <el-input
               v-model.trim="group.name"
-              placeholder="请填写部门标识"
+              placeholder="最多50个字符"
               maxlength="50"
-              show-word-limit
+              clearable
             />
           </div>
         </template>
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="group.remark"
-          placeholder="请填写部门名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
       </div>
     </confirm-dialog>

+ 4 - 4
src/views/realm/tenant/Tenant.vue

@@ -26,18 +26,18 @@
           >
             <el-input
               v-model.trim="group.name"
-              placeholder="请填写标识"
+              placeholder="最多50个字符"
               maxlength="50"
-              show-word-limit
+              clearable
             />
           </div>
         </template>
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="group.remark"
-          placeholder="请填写名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <template v-if="isTenant">
           <span class="c-grid-form__label">AI机审:</span>

+ 3 - 2
src/views/realm/upgrade/deploy/index.vue

@@ -18,9 +18,9 @@
         <span class="c-grid-form__label required">升级名称:</span>
         <el-input
           v-model.trim="version.name"
-          placeholder="请填写升级名称"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">目标版本:</span>
         <input
@@ -47,6 +47,7 @@
           v-model="version.remark"
           type="textarea"
           maxlength="100"
+          :rows="3"
           show-word-limit
         />
       </div>

+ 4 - 2
src/views/realm/upgrade/index.vue

@@ -39,8 +39,9 @@
         <span class="c-grid-form__label required">文件名:</span>
         <el-input
           v-model.trim="apk.name"
+          placeholder="最多100个字符"
           maxlength="100"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">版本名称:</span>
         <div
@@ -50,8 +51,9 @@
           <el-input
             v-model.trim="apk.versionName"
             :disabled="!manual"
+            placeholder="最多50个字符"
             maxlength="50"
-            show-word-limit
+            clearable
           />
         </div>
         <span class="c-grid-form__label">版本号:</span>

+ 3 - 3
src/views/realm/user/Account.vue

@@ -16,13 +16,13 @@
         <span class="c-grid-form__label required">账号:</span>
         <div
           class="c-grid-form__info"
-          data-info="仅可包含数字、字母,至少4位"
+          data-info="仅可包含数字、字母"
         >
           <el-input
             v-model.trim="account.username"
-            placeholder="请填写用户账号"
+            placeholder="4~20个字符"
             maxlength="20"
-            show-word-limit
+            clearable
           />
         </div>
         <span class="c-grid-form__label c-grid-form__auto">分组:</span>

+ 0 - 1
src/views/realm/user/index.vue

@@ -101,7 +101,6 @@ export default {
       }
     },
     onGroupChanged (group) {
-      console.log(group)
       if (this.group.parentGroup && this.group.id !== group.id) {
         this.group = group
         this.expandTree()

+ 7 - 7
src/views/schedule/ScheduleDesigner.vue

@@ -36,16 +36,16 @@
     />
     <confirm-dialog
       ref="addDialog"
-      title="新增"
+      :title="dialogTitle"
       @confirm="onConfirmAdd"
     >
       <div class="c-grid-form u-align-self--center">
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="schedule.name"
-          :placeholder="placeholder"
+          placeholder="最多50个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
         <span class="c-grid-form__label required">分辨率:</span>
         <schema-select
@@ -64,9 +64,9 @@
         <span class="c-grid-form__label required">名称:</span>
         <el-input
           v-model.trim="copySchedule.name"
-          :placeholder="placeholder"
+          placeholder="最多500个字符"
           maxlength="50"
-          show-word-limit
+          clearable
         />
       </div>
     </confirm-dialog>
@@ -112,8 +112,8 @@ export default {
     }
   },
   computed: {
-    placeholder () {
-      return `请填写${[null, '日程', '轮播', '排期'][this.type]}名称`
+    dialogTitle () {
+      return `新增${[null, '日程', '轮播', '排期'][this.type]}`
     }
   },
   activated () {