Parcourir la source

fix: 展示类型

lvkun996 il y a 1 an
Parent
commit
0a0274cbde
1 fichiers modifiés avec 14 ajouts et 4 suppressions
  1. 14 4
      src/pages/Iot/model/components/modelDefine.vue

+ 14 - 4
src/pages/Iot/model/components/modelDefine.vue

@@ -100,9 +100,9 @@
           <a-select-option :value="item.value" v-for="item in dataTypes" :key="item.value" >{{item.label}}</a-select-option>
         </a-select>
       </a-form-item>
-      <a-form-item label="命令类型" v-bind="validateInfos.cmdType" >
-        <a-select allowClear v-model:value="attrRef.cmdType" >
-          <a-select-option :value="item.value" v-for="item in dataTypes" :key="item.value" >{{item.label}}</a-select-option>
+      <a-form-item label="展示方式" v-bind="validateInfos.showType" >
+        <a-select allowClear v-model:value="attrRef.showType" >
+          <a-select-option :value="item.key" v-for="item in showTypes" :key="item.key" >{{item.label}}</a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item label="访问权限" v-bind="validateInfos.scope" >
@@ -386,6 +386,15 @@ const state = reactive<{
   }
 })
 
+const showTypes = [
+  { key: 'DEFAULT', label: '默认' },
+  { key: 'IMAGE', label: ' 图片' },
+  { key: 'VIDEO', label: ' 视频' },
+  { key: 'SWITCH', label: ' 开关' },
+  { key: 'PROGRESS', label: '进度条' },
+  { key: 'BUTTON', label: ' 按钮' }
+]
+
 const attrRef = reactive({
   attributeLabel: '',
   dataType: '',
@@ -394,7 +403,8 @@ const attrRef = reactive({
   key: 'tem',
   expr: '',
   attributeKey: '',
-  modelId: ''
+  modelId: '',
+  showType: 'DEFAULT'
 })
 
 const cmdRef = reactive({