Showing
1 changed file
with
8 additions
and
7 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-31 16:16:49 | 2 | * @Date: 2022-08-31 16:16:49 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-07-29 14:10:48 | 4 | + * @LastEditTime: 2024-08-12 18:12:00 |
| 5 | * @FilePath: /data-table/src/components/FileUploaderField/index.vue | 5 | * @FilePath: /data-table/src/components/FileUploaderField/index.vue |
| 6 | * @Description: 文件上传控件 | 6 | * @Description: 文件上传控件 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div v-if="HideShow" class="file-uploader-field"> | 9 | <div v-if="HideShow" class="file-uploader-field"> |
| 10 | <div class="label"> | 10 | <div class="label"> |
| 11 | - <span v-if="item.component_props.required"> *</span> | 11 | + <span v-if="item.component_props.disabled_show"><van-icon name="closed-eye" /></span> |
| 12 | - {{ item.component_props.label }} | 12 | + <span v-if="item.component_props.required" style="color: red"> *</span> |
| 13 | + <span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span> | ||
| 13 | </div> | 14 | </div> |
| 14 | <div | 15 | <div |
| 15 | v-if="item.component_props.note" | 16 | v-if="item.component_props.note" |
| ... | @@ -105,6 +106,10 @@ const props = defineProps({ | ... | @@ -105,6 +106,10 @@ const props = defineProps({ |
| 105 | const HideShow = computed(() => { | 106 | const HideShow = computed(() => { |
| 106 | return !props.item.component_props.disabled | 107 | return !props.item.component_props.disabled |
| 107 | }) | 108 | }) |
| 109 | +// 只读显示-流程模式 | ||
| 110 | +const ReadonlyShow = computed(() => { | ||
| 111 | + return $route.query.page_type === 'flow' && !props.item.component_props.readonly; | ||
| 112 | +}); | ||
| 108 | const emit = defineEmits(["active"]); | 113 | const emit = defineEmits(["active"]); |
| 109 | const show_empty = ref(false); | 114 | const show_empty = ref(false); |
| 110 | const default_file = ref(props.item.component_props.default); | 115 | const default_file = ref(props.item.component_props.default); |
| ... | @@ -435,10 +440,6 @@ defineExpose({ validFileUploader }); | ... | @@ -435,10 +440,6 @@ defineExpose({ validFileUploader }); |
| 435 | padding: 1rem 1rem 0 1rem; | 440 | padding: 1rem 1rem 0 1rem; |
| 436 | font-size: 0.9rem; | 441 | font-size: 0.9rem; |
| 437 | font-weight: bold; | 442 | font-weight: bold; |
| 438 | - | ||
| 439 | - span { | ||
| 440 | - color: red; | ||
| 441 | - } | ||
| 442 | } | 443 | } |
| 443 | 444 | ||
| 444 | .type-text { | 445 | .type-text { | ... | ... |
-
Please register or login to post a comment