Browse Source

feat:数据触发器-valueChange

ananzhusen 1 year ago
parent
commit
faf5fdae10
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/views/components/PenDatas.vue

+ 6 - 1
src/views/components/PenDatas.vue

@@ -549,6 +549,7 @@
                       </t-select>
                       <template v-if="!c.valueType">
                         <t-input
+                          @change="valueChange($event,c)"
                           v-model="c.value"
                           class="shrink-0"
                           style="width: 320px"
@@ -672,7 +673,7 @@ import { useRoute, useRouter } from 'vue-router';
 import { MessagePlugin } from 'tdesign-vue-next';
 import axios from 'axios';
 import { debounce } from '@/services/debouce';
-import { getPenTree, typeOptions } from '@/services/common';
+import { getPenTree, typeOptions, changeType } from '@/services/common';
 import { searchPinyin } from '@/services/pinyin';
 import { updatePen } from './pen';
 import { getter, setter, queryURLParams, deepClone } from '@meta2d/core';
@@ -1321,6 +1322,10 @@ const codeChange = (e:any,a:any)=>{
   a.fn = null;
 }
 
+const valueChange = (e,c:any)=>{
+  c.value= changeType(e);
+}
+
 onUnmounted(() => {
   clearInterval(timer);
 });