Pārlūkot izejas kodu

修改组件显示

zs 1 gadu atpakaļ
vecāks
revīzija
f8c1a1115b
2 mainītis faili ar 34 papildinājumiem un 40 dzēšanām
  1. 32 28
      src/components/custom/custom-form.vue
  2. 2 12
      src/views/match/info/index.vue

+ 32 - 28
src/components/custom/custom-form.vue

@@ -32,36 +32,40 @@
               </el-checkbox-group>
             </template>
             <template v-else-if="item.type === 'select'">
-              <el-select
-                clearable
-                filterable
-                allow-create
-                default-first-option
-                v-model="form[item.model]"
-                :type="item.type"
-                :placeholder="getField('selectplaceholder', item)"
-                v-bind="item.options"
-                @change="dataChange(item.model)"
-                style="width: 100%"
-              >
-                <slot :name="item.model" v-bind="{ item }"></slot>
-              </el-select>
+              <el-tooltip effect="dark" content="可输入文本搜索选项" placement="top-start">
+                <el-select
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                  v-model="form[item.model]"
+                  :type="item.type"
+                  :placeholder="getField('selectplaceholder', item)"
+                  v-bind="item.options"
+                  @change="dataChange(item.model)"
+                  style="width: 100%"
+                >
+                  <slot :name="item.model" v-bind="{ item }"></slot>
+                </el-select>
+              </el-tooltip>
             </template>
             <template v-else-if="item.type === 'selectMany'">
-              <el-select
-                filterable
-                clearable
-                multiple
-                collapse-tags
-                v-model="form[item.model]"
-                :type="item.type"
-                :placeholder="getField('selectplaceholder', item)"
-                v-bind="item.options"
-                @change="dataChange(item.model)"
-                style="width: 100%"
-              >
-                <slot :name="item.model" v-bind="{ item }"></slot>
-              </el-select>
+              <el-tooltip effect="dark" content="可输入文本搜索选项" placement="top-start">
+                <el-select
+                  filterable
+                  clearable
+                  multiple
+                  collapse-tags
+                  v-model="form[item.model]"
+                  :type="item.type"
+                  :placeholder="getField('selectplaceholder', item)"
+                  v-bind="item.options"
+                  @change="dataChange(item.model)"
+                  style="width: 100%"
+                >
+                  <slot :name="item.model" v-bind="{ item }"></slot>
+                </el-select>
+              </el-tooltip>
             </template>
             <template v-else-if="item.type === `year` || item.type == 'month' || item.type == 'date' || item.type == 'daterange' || item.type == 'datetime' || item.type == 'datetimerange'">
               <el-date-picker

+ 2 - 12
src/views/match/info/index.vue

@@ -72,19 +72,9 @@
           </custom-form>
         </el-col>
         <el-col :span="24" v-if="dialog.type == '2'">
-          <custom-form
-            v-model="examForm"
-            :fields="examFormFields"
-            :rules="examRules"
-            @save="toExamSave"
-          >
+          <custom-form v-model="examForm" :fields="examFormFields" :rules="examRules" @save="toExamSave">
             <template #status>
-              <el-option
-                v-for="i in statusList"
-                :key="i._id"
-                :label="i.label"
-                :value="i.value"
-              ></el-option>
+              <el-option v-for="i in statusList" :key="i._id" :label="i.label" :value="i.value"></el-option>
             </template>
           </custom-form>
         </el-col>