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
2022-12-22 11:36:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa015b0b218c2d910d278bbbebccdff307937a20
fa015b0b
1 parent
79c96c28
单选多选控件新增描述属性显示
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
src/components/CheckboxField/index.vue
src/components/RadioField/index.vue
src/components/CheckboxField/index.vue
View file @
fa015b0
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
1-21 14:42:00
* @LastEditTime: 2022-1
2-22 11:35:38
* @FilePath: /data-table/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
...
...
@@ -14,6 +14,9 @@
(最多可选数: {{ item.component_props.max }})
</span>
</div>
<div v-if="item.component_props.note" class="note">
{{ item.component_props.note }}
</div>
<van-field :name="item.key" :rules="item.rules" :border="false">
<template #input>
<van-checkbox-group
...
...
@@ -24,13 +27,13 @@
>
<van-checkbox
v-for="x in item.component_props.options"
:key="
index
"
:name="x"
:key="
x.value
"
:name="x
.value
"
icon-size="1rem"
shape="square"
:checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem"
>{{ x }}</van-checkbox
>{{ x
.title
}}</van-checkbox
>
</van-checkbox-group>
</template>
...
...
@@ -61,6 +64,12 @@ onMounted(() => {
font-size: 0.9rem;
font-weight: bold;
}
.note {
font-size: 0.9rem;
margin-left: 1rem;
color: gray;
padding-bottom: 0.5rem
}
}
:deep(.van-checkbox) {
...
...
src/components/RadioField/index.vue
View file @
fa015b0
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-
19 10:47:56
* @LastEditTime: 2022-12-
22 11:31:31
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
...
...
@@ -11,10 +11,7 @@
{{ item.component_props.label
}}<span v-if="item.component_props.required"> *</span>
</div>
<div
v-if="item.component_props.note"
style="font-size: 0.9rem; margin-left: 1rem; color: gray; margin-top: 0.25rem;"
>
<div v-if="item.component_props.note" class="note">
{{ item.component_props.note }}
</div>
<van-field :name="item.key" :rules="item.rules">
...
...
@@ -62,6 +59,12 @@ const themeVars = {
color: red;
}
}
.note {
font-size: 0.9rem;
margin-left: 1rem;
color: gray;
padding-bottom: 0.5rem
}
}
:deep(.van-radio) {
...
...
Please
register
or
login
to post a comment