Showing
1 changed file
with
5 additions
and
2 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-02 10:46:03 | 2 | * @Date: 2022-09-02 10:46:03 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-03-17 11:06:49 | 4 | + * @LastEditTime: 2024-06-06 16:58:14 |
| 5 | * @FilePath: /data-table/src/components/PhoneField/index.vue | 5 | * @FilePath: /data-table/src/components/PhoneField/index.vue |
| 6 | * @Description: 手机输入框 | 6 | * @Description: 手机输入框 |
| 7 | --> | 7 | --> |
| ... | @@ -34,7 +34,7 @@ | ... | @@ -34,7 +34,7 @@ |
| 34 | :placeholder="item.component_props.placeholder ? item.component_props.placeholder : '请输入手机号码'" | 34 | :placeholder="item.component_props.placeholder ? item.component_props.placeholder : '请输入手机号码'" |
| 35 | :rules="rules" | 35 | :rules="rules" |
| 36 | :required="item.component_props.required" | 36 | :required="item.component_props.required" |
| 37 | - :disabled="item.component_props.readonly" | 37 | + :readonly="item.component_props.readonly" |
| 38 | :border="false" | 38 | :border="false" |
| 39 | > | 39 | > |
| 40 | </van-field> | 40 | </van-field> |
| ... | @@ -73,6 +73,9 @@ const props = defineProps({ | ... | @@ -73,6 +73,9 @@ const props = defineProps({ |
| 73 | // 隐藏显示 | 73 | // 隐藏显示 |
| 74 | const HideShow = computed(() => { | 74 | const HideShow = computed(() => { |
| 75 | return !props.item.component_props.disabled | 75 | return !props.item.component_props.disabled |
| 76 | +}); | ||
| 77 | +onMounted(() => { | ||
| 78 | + props.item.value = props.item.component_props.default; | ||
| 76 | }) | 79 | }) |
| 77 | // web端判断 | 80 | // web端判断 |
| 78 | const readonly = computed(() => wxInfo().isMobile); | 81 | const readonly = computed(() => wxInfo().isMobile); | ... | ... |
-
Please register or login to post a comment