hookehuyr

适配自动填写字段

1 <!-- 1 <!--
2 * @Date: 2022-08-29 14:31:20 2 * @Date: 2022-08-29 14:31:20
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-08-14 15:25:59 4 + * @LastEditTime: 2024-08-19 18:29:33
5 * @FilePath: /data-table/src/components/TextField/index.vue 5 * @FilePath: /data-table/src/components/TextField/index.vue
6 * @Description: 单行文本输入框(微信扫描功能) 6 * @Description: 单行文本输入框(微信扫描功能)
7 --> 7 -->
...@@ -55,6 +55,16 @@ onMounted(() => { ...@@ -55,6 +55,16 @@ onMounted(() => {
55 props.item.value = props.item.component_props.default; 55 props.item.value = props.item.component_props.default;
56 }); 56 });
57 57
58 +// 监听默认值变化
59 +watch(
60 + () => props.item.component_props.default,
61 + (v) => {
62 + if (v) {
63 + props.item.value = v;
64 + }
65 + }
66 +);
67 +
58 // 默认识别类型 68 // 默认识别类型
59 const scan_type_code = ref('ALL_CODE'); 69 const scan_type_code = ref('ALL_CODE');
60 // 微信二维码扫描功能判断 70 // 微信二维码扫描功能判断
......