yujinwen 3 hónapja
szülő
commit
f933c24b87
1 módosított fájl, 12 hozzáadás és 2 törlés
  1. 12 2
      src/views/etaChart/components/ClassifyWrap.vue

+ 12 - 2
src/views/etaChart/components/ClassifyWrap.vue

@@ -50,7 +50,7 @@ async function handleLoadMoreChart() {
 }
 function handleSelectChart(value, context) {
   if (value) {
-    emits('change', context.option)
+    emits('change', {ChartInfoId:value})
   }
 }
 
@@ -137,7 +137,17 @@ function handleClassifyActiveChange({ node }) {
       <template #prefixIcon>
         <search-icon />
       </template>
-      <t-option v-for="item in searchOpts" :key="item.ChartInfoId">
+
+      <template #valueDisplay="{ value,label }">
+        <div style="max-width:180px" class="t-input__inner" v-html="label" v-if="value"></div>
+      </template>
+        
+      <t-option 
+        v-for="item in searchOpts" 
+        :key="item.ChartInfoId" 
+        :value="item.ChartInfoId"
+        :label="item.ChartName"
+      >
         <span v-html="item.ChartName"></span>
       </t-option>
     </t-select>