Skip to content

Commit 5f6275b

Browse files
author
liukai154
committed
feat: 新增列表属性
1 parent 7ba4c17 commit 5f6275b

File tree

8 files changed

+10651
-3371
lines changed

8 files changed

+10651
-3371
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<template>
2+
<el-form size="small" label-position="left" label-width="90px" class="select-side">
3+
<schema-form
4+
:model="model"
5+
:schema="schema"
6+
:options="options"
7+
>
8+
</schema-form>
9+
</el-form>
10+
</template>
11+
12+
<script>
13+
export default {
14+
data () {
15+
return {
16+
model: {
17+
age: ''
18+
},
19+
schema: [
20+
[
21+
{
22+
type: 'select',
23+
prop: 'age',
24+
attrs: {
25+
optionSides: ['label', 'desc'],
26+
popperClass: 'attr-side'
27+
},
28+
formItem: { label: '年龄' }
29+
}
30+
]
31+
],
32+
options: {
33+
age: [
34+
{ label: '18', value: 18, desc: '描述A' },
35+
{ label: '19', value: 19, desc: '描述B' },
36+
{ label: '20', value: 20, desc: '描述C' }
37+
]
38+
}
39+
}
40+
}
41+
}
42+
</script>
43+
44+
<style lang="less">
45+
.attr-side {
46+
.side-1 {
47+
margin-left: 5px;
48+
color: #b7b4b4;
49+
}
50+
}
51+
</style>

docs/.vuepress/components/code-contain.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import CustomInput from './custom-input'
3636
import DynamicInput from './dynamic-input'
3737
// 拓展组件
3838
import ExpandCodeMirror from './expand-code-mirror'
39+
// 拓展属性
40+
import AttrsSelectSide from './attrs/select-side.vue'
3941
4042
export default {
4143
props: {
@@ -60,7 +62,8 @@ export default {
6062
ExpandCodeMirror,
6163
SlotTool,
6264
SlotTooltip,
63-
SlotLabel
65+
SlotLabel,
66+
AttrsSelectSide
6467
},
6568
data () {
6669
return {

docs/.vuepress/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ module.exports = {
4444
['/guide/component/slot', 'slot 插槽'],
4545
['/guide/component/dynamic', 'dynamicAttrs 动态属性'],
4646
['/guide/component/custom', '自定义组件'],
47-
['/guide/component/expand', '第三方拓展']
47+
['/guide/component/expand', '第三方拓展'],
48+
['/guide/component/attr', '拓展属性']
4849
]
4950
}
5051
]

docs/guide/component/attr.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### 拓展属性
2+
3+
### select 拓展
4+
5+
新增 `optionSides` 属性,用于适应下拉框中展示多种属性
6+
7+
<code-contain compName="AttrsSelectSide" >
8+
<<< @/docs/.vuepress/components/attrs/select-side.vue
9+
</code-contain>

docs/guide/更新日志.md

+33-50
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,68 @@
11
---
2-
{
3-
"title": "更新日志",
4-
}
2+
{ "title": "更新日志" }
53
---
64

5+
## 0.1.8 (2021-10-25)
6+
7+
- select 选择器拓展 `optionSides`, 丰富下拉展示
8+
79
## 0.1.7 (2021-02-20)
810

9-
* 增加新属性 labelTooltip, 用于自定义标题的说明
10-
* 增加标签插槽 labelSlot
11+
- 增加新属性 labelTooltip, 用于自定义标题的说明
12+
- 增加标签插槽 labelSlot
1113

1214
## 0.1.6 (2021-01-22)
1315

14-
1516
### feat
1617

17-
* 增加属性rearHtml、frontHtml ([89b9aa8](https://github.com/vueblocks/element-schema-form/commit/89b9aa8b7cefbd81da8d08e6ae9d857d69809b6b))
18+
- 增加属性 rearHtml、frontHtml ([89b9aa8](https://github.com/vueblocks/element-schema-form/commit/89b9aa8b7cefbd81da8d08e6ae9d857d69809b6b))
1819

1920
## [0.1.4](https://github.com/vueblocks/element-schema-form/compare/v0.1.3...v0.1.4) (2019-12-03)
2021

21-
2222
### feat
2323

24-
* 增加timepicker 任意时间点选择 ([fcf5a3f](https://github.com/vueblocks/element-schema-form/commit/fcf5a3f3c1c275d7d1e02b0e25e2a7ac06638e6b))
24+
- 增加 timepicker 任意时间点选择 ([fcf5a3f](https://github.com/vueblocks/element-schema-form/commit/fcf5a3f3c1c275d7d1e02b0e25e2a7ac06638e6b))
2525

2626
## [0.1.3](https://github.com/vueblocks/element-schema-form/compare/v0.1.2...v0.1.3) (2019-11-01)
2727

28-
2928
### Bug Fixes
3029

31-
* schema-form插槽错误 ([fe43fbb](https://github.com/vueblocks/element-schema-form/commit/fe43fbb4c47984f092254536eff93c800617e6e7))
32-
33-
30+
- schema-form 插槽错误 ([fe43fbb](https://github.com/vueblocks/element-schema-form/commit/fe43fbb4c47984f092254536eff93c800617e6e7))
3431

3532
## [0.1.2](https://github.com/vueblocks/element-schema-form/compare/v0.1.1...v0.1.2) (2019-10-30)
3633

37-
38-
3934
## [0.1.1](https://github.com/vueblocks/element-schema-form/compare/v0.1.0...v0.1.1) (2019-10-29)
4035

41-
4236
### Features
4337

44-
* 新增【重置表单】功能 ([9da36a3](https://github.com/vueblocks/element-schema-form/commit/9da36a37cadf06bedabf4bbdb9994ac620fa13e3))
45-
46-
38+
- 新增【重置表单】功能 ([9da36a3](https://github.com/vueblocks/element-schema-form/commit/9da36a37cadf06bedabf4bbdb9994ac620fa13e3))
4739

4840
## [0.1.0](https://github.com/vueblocks/element-schema-form/compare/9c615890fe925a11c33f3b3534381332b9867cf7...v0.1.0) (2019-10-28)
4941

50-
5142
### Bug Fixes
5243

53-
* copy 激活行数调整,api将module修改为model ([d3682be](https://github.com/vueblocks/element-schema-form/commit/d3682be362dec1c3f96ee120fcebaf27664a75e4))
54-
44+
- copy 激活行数调整,api 将 module 修改为 model ([d3682be](https://github.com/vueblocks/element-schema-form/commit/d3682be362dec1c3f96ee120fcebaf27664a75e4))
5545

5646
### Features
5747

58-
* 🌈完成生成 Vue 代码功能 ([215dac0](https://github.com/vueblocks/element-schema-form/commit/215dac0ce0987f5e59b3507a51f5431da59af09e))
59-
* 💥引入 vuex-persistedstate 数据持久化插件 ([e825350](https://github.com/vueblocks/element-schema-form/commit/e825350561a37de53ecb78fa4d789bc7875ada5e))
60-
* 📋添加复制代码到剪切板功能 ([8e069b3](https://github.com/vueblocks/element-schema-form/commit/8e069b36113d7357705d30acf77b208b4a8d70b9))
61-
* 修改布局算法 ([0d38a49](https://github.com/vueblocks/element-schema-form/commit/0d38a493503b80369276d6756de037571ea9847d))
62-
* 基础组件 ([9c61589](https://github.com/vueblocks/element-schema-form/commit/9c615890fe925a11c33f3b3534381332b9867cf7))
63-
* 增加json编辑器 ([3887414](https://github.com/vueblocks/element-schema-form/commit/38874147675504d40a670bacd4373dd109bc5f45))
64-
* 增加列跨度配置 ([b6d72c6](https://github.com/vueblocks/element-schema-form/commit/b6d72c60720645b02076466f3bbd67e215934b3e))
65-
* 增加拓展组件 ([d635fdd](https://github.com/vueblocks/element-schema-form/commit/d635fdd40349e93eecda0f52a9c249d2b87b0a6a))
66-
* 增加组件个性化属性(1) ([2ca9dc7](https://github.com/vueblocks/element-schema-form/commit/2ca9dc74b296f6d0de97d6493245cde3aeca5afe))
67-
* 增加组件基础属性编辑 ([30d335e](https://github.com/vueblocks/element-schema-form/commit/30d335ebede61056ca1c5c941d673a638c14429c))
68-
* 增加表单预览 ([a70c222](https://github.com/vueblocks/element-schema-form/commit/a70c2222bc5358cd2e440299d0acd78032649599))
69-
* 处理左侧布局删除列逻辑 ([c047010](https://github.com/vueblocks/element-schema-form/commit/c04701062e7eb8fbc2b59f66b8675cb15c172c5e))
70-
* 完成生成 Schema 功能 ([dcbe5c5](https://github.com/vueblocks/element-schema-form/commit/dcbe5c51500a3f6b63985597b275d954a464ac3c))
71-
* 搭建表单生成器页面 ([62d3085](https://github.com/vueblocks/element-schema-form/commit/62d30855341080e3de09b4291263fca3228cd5e5))
72-
* 新增/删除行 ([f99ad57](https://github.com/vueblocks/element-schema-form/commit/f99ad57357db78ba3fc4f31aaee6a61e17d1a49b))
73-
* 新增tag等基本组件 ([3e8c38d](https://github.com/vueblocks/element-schema-form/commit/3e8c38d56962faeb4e9f13a28f9af1fa9b8b863e))
74-
* 新增列排序功能 ([0a74c03](https://github.com/vueblocks/element-schema-form/commit/0a74c03c62e4ada86d98127566a8cb5449cc324e))
75-
* 新增行复制 ([6698e11](https://github.com/vueblocks/element-schema-form/commit/6698e11a3505fa884026ccfe981d543b82086cb4))
76-
* 新增表单列删除功能 ([c08c8c0](https://github.com/vueblocks/element-schema-form/commit/c08c8c0c44bdb3ed76d9fce333992069cfb972d6))
77-
* 新增表单配置面板 ([ecdbee5](https://github.com/vueblocks/element-schema-form/commit/ecdbee5557f6cddfe28617939f189d4f9de61992))
78-
* 私有属性调整 ([cf61919](https://github.com/vueblocks/element-schema-form/commit/cf6191953e5117db4138d255dfd438022c03ddf5))
79-
80-
81-
82-
83-
84-
85-
48+
- 🌈 完成生成 Vue 代码功能 ([215dac0](https://github.com/vueblocks/element-schema-form/commit/215dac0ce0987f5e59b3507a51f5431da59af09e))
49+
- 💥 引入 vuex-persistedstate 数据持久化插件 ([e825350](https://github.com/vueblocks/element-schema-form/commit/e825350561a37de53ecb78fa4d789bc7875ada5e))
50+
- 📋 添加复制代码到剪切板功能 ([8e069b3](https://github.com/vueblocks/element-schema-form/commit/8e069b36113d7357705d30acf77b208b4a8d70b9))
51+
- 修改布局算法 ([0d38a49](https://github.com/vueblocks/element-schema-form/commit/0d38a493503b80369276d6756de037571ea9847d))
52+
- 基础组件 ([9c61589](https://github.com/vueblocks/element-schema-form/commit/9c615890fe925a11c33f3b3534381332b9867cf7))
53+
- 增加 json 编辑器 ([3887414](https://github.com/vueblocks/element-schema-form/commit/38874147675504d40a670bacd4373dd109bc5f45))
54+
- 增加列跨度配置 ([b6d72c6](https://github.com/vueblocks/element-schema-form/commit/b6d72c60720645b02076466f3bbd67e215934b3e))
55+
- 增加拓展组件 ([d635fdd](https://github.com/vueblocks/element-schema-form/commit/d635fdd40349e93eecda0f52a9c249d2b87b0a6a))
56+
- 增加组件个性化属性(1) ([2ca9dc7](https://github.com/vueblocks/element-schema-form/commit/2ca9dc74b296f6d0de97d6493245cde3aeca5afe))
57+
- 增加组件基础属性编辑 ([30d335e](https://github.com/vueblocks/element-schema-form/commit/30d335ebede61056ca1c5c941d673a638c14429c))
58+
- 增加表单预览 ([a70c222](https://github.com/vueblocks/element-schema-form/commit/a70c2222bc5358cd2e440299d0acd78032649599))
59+
- 处理左侧布局删除列逻辑 ([c047010](https://github.com/vueblocks/element-schema-form/commit/c04701062e7eb8fbc2b59f66b8675cb15c172c5e))
60+
- 完成生成 Schema 功能 ([dcbe5c5](https://github.com/vueblocks/element-schema-form/commit/dcbe5c51500a3f6b63985597b275d954a464ac3c))
61+
- 搭建表单生成器页面 ([62d3085](https://github.com/vueblocks/element-schema-form/commit/62d30855341080e3de09b4291263fca3228cd5e5))
62+
- 新增/删除行 ([f99ad57](https://github.com/vueblocks/element-schema-form/commit/f99ad57357db78ba3fc4f31aaee6a61e17d1a49b))
63+
- 新增 tag 等基本组件 ([3e8c38d](https://github.com/vueblocks/element-schema-form/commit/3e8c38d56962faeb4e9f13a28f9af1fa9b8b863e))
64+
- 新增列排序功能 ([0a74c03](https://github.com/vueblocks/element-schema-form/commit/0a74c03c62e4ada86d98127566a8cb5449cc324e))
65+
- 新增行复制 ([6698e11](https://github.com/vueblocks/element-schema-form/commit/6698e11a3505fa884026ccfe981d543b82086cb4))
66+
- 新增表单列删除功能 ([c08c8c0](https://github.com/vueblocks/element-schema-form/commit/c08c8c0c44bdb3ed76d9fce333992069cfb972d6))
67+
- 新增表单配置面板 ([ecdbee5](https://github.com/vueblocks/element-schema-form/commit/ecdbee5557f6cddfe28617939f189d4f9de61992))
68+
- 私有属性调整 ([cf61919](https://github.com/vueblocks/element-schema-form/commit/cf6191953e5117db4138d255dfd438022c03ddf5))

0 commit comments

Comments
 (0)