Skip to content

Commit be915ad

Browse files
committed
feat(lib): 配置 format color,默认使用 el-color-picker 组件
feat: 更新schema生成器color配置
1 parent 388454e commit be915ad

File tree

2 files changed

+2
-2
lines changed
  • packages
    • demo/src/schema-generator/views/editor/viewComponents/Color
    • lib/src/JsonSchemaForm/config

2 files changed

+2
-2
lines changed

packages/demo/src/schema-generator/views/editor/viewComponents/Color/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import genSchema from '../genSchema.js';
77
const viewSchema = {
88
title: '颜色选择器',
99
type: 'string',
10-
format: 'color',
11-
'ui:widget': 'el-color-picker'
10+
format: 'color'
1211
};
1312
export default {
1413
viewSchema,

packages/lib/src/JsonSchemaForm/config/WIDGET_MAP.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default {
2424
// array: '',
2525
},
2626
formats: {
27+
color: 'el-color-picker',
2728
time: TimePickerWidget, // 20:20:39+00:00
2829
date: DatePickerWidget, // 2018-11-13
2930
'date-time': DateTimePickerWidget, // 2018-11-13T20:20:39+00:00

0 commit comments

Comments
 (0)