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-09-08 11:43:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
68f12d25faf34af36c2d257586af2bff36b1ca8a
68f12d25
1 parent
02bd527d
✨ feat: 单选控件新增排列方向属性控制
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
src/components/RadioField/index.vue
src/views/index.vue
src/components/RadioField/index.vue
View file @
68f12d2
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-0
8-30 13:54:06
* @LastEditTime: 2022-0
9-08 11:37:01
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 文件描述
-->
...
...
@@ -10,7 +10,7 @@
<div class="label">{{ item.label }}<span v-if="item.required"> *</span></div>
<van-field :name="item.key">
<template #input>
<van-radio-group v-model="item.value">
<van-radio-group v-model="item.value"
:direction="item.component_props.direction"
>
<van-radio v-for="x in item.options" :key="index" :name="x.key" icon-size="1rem"
style="margin-bottom: 0.25rem;">{{ x.value }}</van-radio>
</van-radio-group>
...
...
src/views/index.vue
View file @
68f12d2
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-08 1
0:17:43
* @LastEditTime: 2022-09-08 1
1:35:17
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -79,23 +79,24 @@ onMounted(() => {
// },
// required: false,
// },
// {
// key: 'gender',
// value: '',
// label: '性别',
// placeholder: '',
// component: '',
// component_props: {
// name: 'radio'
// },
// options: [{
// key: '男',
// value: '男'
// }, {
// key: '女',
// value: '女'
// }]
// },
{
key: 'gender',
value: '',
label: '性别',
placeholder: '',
component: '',
component_props: {
name: 'radio',
direction: 'horizontal'
},
options: [{
key: '男',
value: '男'
}, {
key: '女',
value: '女'
}]
},
// {
// key: 'hobby',
// value: [],
...
...
@@ -172,18 +173,18 @@ onMounted(() => {
// columns_type: ['year', 'month']
// },
// },
{
key: 'time',
value: '',
label: '时间选择',
placeholder: '请选择时间',
component_props: {
name: 'time_picker',
title: '请选择',
columns_type: ['hour', 'minute']
},
required: true,
},
//
{
//
key: 'time',
//
value: '',
//
label: '时间选择',
//
placeholder: '请选择时间',
//
component_props: {
//
name: 'time_picker',
//
title: '请选择',
//
columns_type: ['hour', 'minute']
//
},
//
required: true,
//
},
// {
// key: 'image_src',
// value: '',
...
...
Please
register
or
login
to post a comment