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-07 18:15:28 4 + * @LastEditTime: 2024-08-12 17:23:34
5 * @FilePath: /data-table/src/components/TextField/index.vue 5 * @FilePath: /data-table/src/components/TextField/index.vue
6 * @Description: 单行文本输入框(微信扫描功能) 6 * @Description: 单行文本输入框(微信扫描功能)
7 --> 7 -->
...@@ -13,7 +13,10 @@ ...@@ -13,7 +13,10 @@
13 <span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span> 13 <span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span>
14 </div> 14 </div>
15 <div class="note-wrapper" v-if="item.component_props.note" v-html="item.component_props.note" /> 15 <div class="note-wrapper" v-if="item.component_props.note" v-html="item.component_props.note" />
16 - <van-field v-model="item.value" :name="item.name" :type="item.type" 16 + <div v-if="item.component_props.readonly || (item.component_props.is_camera_scan && !item.component_props.is_edit_camera_scan_result)" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
17 + {{ item.value }}
18 + </div>
19 + <van-field v-else v-model="item.value" :name="item.name" :type="item.type"
17 :placeholder="item.component_props.placeholder ? item.component_props.placeholder : '请输入'" :rules="item.rules" 20 :placeholder="item.component_props.placeholder ? item.component_props.placeholder : '请输入'" :rules="item.rules"
18 :required="item.required" 21 :required="item.required"
19 :readonly="item.component_props.readonly || (item.component_props.is_camera_scan && !item.component_props.is_edit_camera_scan_result)" 22 :readonly="item.component_props.readonly || (item.component_props.is_camera_scan && !item.component_props.is_edit_camera_scan_result)"
......