hookehuyr

单行多行默认值适配显示

...@@ -41,6 +41,10 @@ const isGroup = computed(() => { ...@@ -41,6 +41,10 @@ const isGroup = computed(() => {
41 return props.item.component_props.is_field_group 41 return props.item.component_props.is_field_group
42 }); 42 });
43 43
44 +onMounted(() => {
45 + props.item.value = props.item.component_props.default;
46 +});
47 +
44 const $route = useRoute(); 48 const $route = useRoute();
45 // 默认识别类型 49 // 默认识别类型
46 const scan_type_code = ref('ALL_CODE'); 50 const scan_type_code = ref('ALL_CODE');
......
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: 2023-03-21 18:36:51 4 + * @LastEditTime: 2024-06-06 13:58:02
5 * @FilePath: /data-table/src/components/TextareaField/index.vue 5 * @FilePath: /data-table/src/components/TextareaField/index.vue
6 * @Description: 多行文本输入框 6 * @Description: 多行文本输入框
7 --> 7 -->
...@@ -36,9 +36,14 @@ ...@@ -36,9 +36,14 @@
36 const props = defineProps({ 36 const props = defineProps({
37 item: Object, 37 item: Object,
38 }); 38 });
39 +
39 // 隐藏显示 40 // 隐藏显示
40 const HideShow = computed(() => { 41 const HideShow = computed(() => {
41 return !props.item.component_props.disabled 42 return !props.item.component_props.disabled
43 +});
44 +
45 +onMounted(() => {
46 + props.item.value = props.item.component_props.default;
42 }) 47 })
43 </script> 48 </script>
44 49
......