hookehuyr

✨ feat(身份证组件): 加密身份证功能调整

现在只需要在详情页进行身份证的修改操作
1 <!-- 1 <!--
2 * @Date: 2022-09-14 14:44:30 2 * @Date: 2022-09-14 14:44:30
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-08-23 14:07:29 4 + * @LastEditTime: 2024-10-28 09:55:37
5 * @FilePath: /data-table/src/components/IdentityField/index.vue 5 * @FilePath: /data-table/src/components/IdentityField/index.vue
6 * @Description: 身份证输入控件 6 * @Description: 身份证输入控件
7 --> 7 -->
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 :border="false" 44 :border="false"
45 > 45 >
46 <template #button> 46 <template #button>
47 - <van-button size="small" type="primary" v-if="data_type === 'encrypt_mode'" @click="clickEdit()">编辑</van-button> 47 + <van-button size="small" type="primary" v-if="IdEditShow" @click="clickEdit()">编辑</van-button>
48 </template> 48 </template>
49 </van-field> 49 </van-field>
50 <!-- <div v-if="gender" class="gender"><span>性别:</span>{{ gender }}</div> --> 50 <!-- <div v-if="gender" class="gender"><span>性别:</span>{{ gender }}</div> -->
...@@ -81,6 +81,10 @@ const HideShow = computed(() => { ...@@ -81,6 +81,10 @@ const HideShow = computed(() => {
81 const ReadonlyShow = computed(() => { 81 const ReadonlyShow = computed(() => {
82 return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly; 82 return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
83 }); 83 });
84 +// 是否显示编辑按钮
85 +const IdEditShow = computed(() => {
86 + return ($route.query.page_type === 'edit') && data_type === 'encrypt_mode';
87 +});
84 onMounted(() => { 88 onMounted(() => {
85 props.item.value = props.item.component_props.default; 89 props.item.value = props.item.component_props.default;
86 }) 90 })
......