Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-08-12 17:40:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ad1b653a4849b94ea81e33898bb7166b7a1d27c7
ad1b653a
1 parent
8e806b7a
优化只读项目的样式显示
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
src/components/IdentityField/index.vue
src/components/NameField/index.vue
src/components/PhoneField/index.vue
src/components/TextareaField/index.vue
src/components/IdentityField/index.vue
View file @
ad1b653
<!--
* @Date: 2022-09-14 14:44:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-
07 18:14:16
* @LastEditTime: 2024-08-
12 17:40:00
* @FilePath: /data-table/src/components/IdentityField/index.vue
* @Description: 身份证输入控件
-->
...
...
@@ -28,7 +28,11 @@
:border="false"
>
</van-field> -->
<div v-if="item.component_props.readonly" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field
v-else
ref="fieldRef"
v-model="item.value"
:id="item.name"
...
...
src/components/NameField/index.vue
View file @
ad1b653
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-
07 18:13:1
3
* @LastEditTime: 2024-08-
12 17:39:4
3
* @FilePath: /data-table/src/components/NameField/index.vue
* @Description: 姓名输入框
-->
...
...
@@ -12,7 +12,11 @@
<span v-if="item.component_props.required" style="color: red"> *</span>
<span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span>
</div>
<div v-if="item.component_props.readonly" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field
v-else
v-model="item.value"
:name="item.name"
:type="item.type"
...
...
src/components/PhoneField/index.vue
View file @
ad1b653
<!--
* @Date: 2022-09-02 10:46:03
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-
07 18:14:46
* @LastEditTime: 2024-08-
12 17:39:00
* @FilePath: /data-table/src/components/PhoneField/index.vue
* @Description: 手机输入框
-->
...
...
@@ -26,7 +26,11 @@
@touchstart.stop="openKeyboard($event)"
:border="false"
> -->
<div v-if="item.component_props.readonly" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field
v-else
:id="item.name"
v-model="item.value"
:name="item.name"
...
...
src/components/TextareaField/index.vue
View file @
ad1b653
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-
07 18:15:23
* @LastEditTime: 2024-08-
12 17:37:58
* @FilePath: /data-table/src/components/TextareaField/index.vue
* @Description: 多行文本输入框
-->
...
...
@@ -17,7 +17,11 @@
v-html="item.component_props.note"
style="font-size: 0.9rem; margin-left: 1rem; color: gray; padding-bottom: 0.5rem; padding-top: 0.25rem; white-space: pre-wrap;"
/>
<div v-if="item.component_props.readonly" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field
v-else
v-model="item.value"
:name="item.name"
:type="item.type"
...
...
Please
register
or
login
to post a comment