@meethive/components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AutoComplete/AutoComplete.js +84 -0
- package/es/AutoComplete/index.js +7 -0
- package/es/BadgeStatus/Badge.js +51 -0
- package/es/BadgeStatus/color.js +14 -0
- package/es/BadgeStatus/index.js +8 -0
- package/es/CardSelect/CardSelect.js +141 -0
- package/es/CardSelect/index.js +7 -0
- package/es/CardSelect/style/index.js +29 -0
- package/es/CheckButton/CheckButton.js +122 -0
- package/es/CheckButton/index.js +7 -0
- package/es/CheckButton/style/index.js +44 -0
- package/es/ConfigProvider/ConfigProvider.js +73 -0
- package/es/ConfigProvider/context.js +26 -0
- package/es/ConfigProvider/index.js +9 -0
- package/es/DragModal/DragModal.js +212 -0
- package/es/DragModal/index.js +7 -0
- package/es/DragModal/style/index.js +86 -0
- package/es/EditTable/Body.js +189 -0
- package/es/EditTable/CellRender.js +12 -0
- package/es/EditTable/EditTable.js +434 -0
- package/es/EditTable/FormItem.js +169 -0
- package/es/EditTable/Group.js +204 -0
- package/es/EditTable/Header.js +63 -0
- package/es/EditTable/HeaderRender.js +12 -0
- package/es/EditTable/components/ContextMenu/Menu.js +86 -0
- package/es/EditTable/components/ContextMenu/index.js +96 -0
- package/es/EditTable/components/Search/Search.js +163 -0
- package/es/EditTable/components/Search/Sort.js +119 -0
- package/es/EditTable/components/Search/index.js +2 -0
- package/es/EditTable/consts.js +13 -0
- package/es/EditTable/context.js +88 -0
- package/es/EditTable/hooks/index.js +19 -0
- package/es/EditTable/hooks/useGroup.js +48 -0
- package/es/EditTable/hooks/useResizeObserver.js +27 -0
- package/es/EditTable/hooks/useValidate.js +112 -0
- package/es/EditTable/index.js +25 -0
- package/es/EditTable/props.js +60 -0
- package/es/EditTable/style/body.js +63 -0
- package/es/EditTable/style/form.js +33 -0
- package/es/EditTable/style/group.js +33 -0
- package/es/EditTable/style/header.js +72 -0
- package/es/EditTable/style/index.js +52 -0
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +110 -0
- package/es/Ellipsis/Ellipsis.js +148 -0
- package/es/Ellipsis/index.js +7 -0
- package/es/Ellipsis/style/index.js +26 -0
- package/es/Empty/Empty.js +63 -0
- package/es/Empty/image.js +3 -0
- package/es/Empty/index.js +7 -0
- package/es/FullPage/FullPage.js +19 -0
- package/es/FullPage/index.js +7 -0
- package/es/Icon/Icon.js +49 -0
- package/es/Icon/index.js +7 -0
- package/es/LocaleProvider/LocaleProvider.js +31 -0
- package/es/LocaleProvider/index.js +7 -0
- package/es/LocaleReciver/index.js +24 -0
- package/es/Markdown/Markdown.js +118 -0
- package/es/Markdown/index.js +7 -0
- package/es/PermissionButton/PermissionButton.js +118 -0
- package/es/PermissionButton/confirm.js +94 -0
- package/es/PermissionButton/index.js +9 -0
- package/es/PermissionButton/shared.js +1 -0
- package/es/ProLayout/Basic/BasicLayout.js +422 -0
- package/es/ProLayout/Basic/BasicLayoutStyle.js +51 -0
- package/es/ProLayout/Basic/Header.js +111 -0
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +354 -0
- package/es/ProLayout/PageContainer/style.js +85 -0
- package/es/ProLayout/RouteContext.js +28 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +241 -0
- package/es/ProLayout/SiderMenu/SiderMenu.js +274 -0
- package/es/ProLayout/SiderMenu/index.js +2 -0
- package/es/ProLayout/SiderMenu/style.js +204 -0
- package/es/ProLayout/TopHeader/index.js +170 -0
- package/es/ProLayout/TopHeader/style.js +154 -0
- package/es/ProLayout/defaultSettings.js +113 -0
- package/es/ProLayout/index.js +10 -0
- package/es/ProLayout/style/index.js +14 -0
- package/es/ProLayout/util.js +58 -0
- package/es/ProTable/Alert.js +40 -0
- package/es/ProTable/Content.js +97 -0
- package/es/ProTable/Header.js +33 -0
- package/es/ProTable/Pagination.js +55 -0
- package/es/ProTable/ProTable.js +279 -0
- package/es/ProTable/hooks/index.js +2 -0
- package/es/ProTable/hooks/useTableInject.js +6 -0
- package/es/ProTable/hooks/useTableSelection.js +115 -0
- package/es/ProTable/index.js +8 -0
- package/es/ProTable/setting.js +138 -0
- package/es/ProTable/style/index.js +113 -0
- package/es/RadioButton/RadioButton.js +53 -0
- package/es/RadioButton/index.js +8 -0
- package/es/RadioButton/style/index.js +25 -0
- package/es/Scrollbar/Bar.js +76 -0
- package/es/Scrollbar/Scrollbar.js +161 -0
- package/es/Scrollbar/Thumb.js +150 -0
- package/es/Scrollbar/constants.js +1 -0
- package/es/Scrollbar/index.js +7 -0
- package/es/Scrollbar/scrollbarProps.js +100 -0
- package/es/Scrollbar/style/index.js +85 -0
- package/es/Scrollbar/thumbProps.js +10 -0
- package/es/Scrollbar/util.js +39 -0
- package/es/Search/Item.js +239 -0
- package/es/Search/Search.js +90 -0
- package/es/Search/hooks/index.js +117 -0
- package/es/Search/hooks/useRouteQuery.js +86 -0
- package/es/Search/hooks/useSearchItems.js +50 -0
- package/es/Search/hooks/useTermOptions.js +29 -0
- package/es/Search/index.js +10 -0
- package/es/Search/setting.js +245 -0
- package/es/Search/style/index.js +5 -0
- package/es/Search/style/item.js +40 -0
- package/es/Search/style/search.js +177 -0
- package/es/Search/util.js +270 -0
- package/es/Skeleton/Skeleton.js +27 -0
- package/es/Skeleton/components/DashBoardCard.js +27 -0
- package/es/Skeleton/components/DashBoardChart.js +27 -0
- package/es/Skeleton/components/Detail.js +27 -0
- package/es/Skeleton/components/Drawer.js +27 -0
- package/es/Skeleton/components/Item.js +54 -0
- package/es/Skeleton/components/List.js +27 -0
- package/es/Skeleton/components/ListCard.js +28 -0
- package/es/Skeleton/components/ListCardItem.js +20 -0
- package/es/Skeleton/components/ListTable.js +27 -0
- package/es/Skeleton/components/Page.js +26 -0
- package/es/Skeleton/components/Search.js +16 -0
- package/es/Skeleton/components/Tree.js +27 -0
- package/es/Skeleton/index.js +28 -0
- package/es/Skeleton/style/index.js +195 -0
- package/es/TimeFormat/TimeFormat.js +36 -0
- package/es/TimeFormat/index.js +7 -0
- package/es/Title/Title.js +26 -0
- package/es/Title/index.js +7 -0
- package/es/Title/style/index.js +34 -0
- package/es/ValueItem/ValueItem.js +113 -0
- package/es/ValueItem/index.js +7 -0
- package/es/ValueItem/util.js +17 -0
- package/es/VirtualTable/VirtualTable.js +271 -0
- package/es/VirtualTable/data.js +60 -0
- package/es/VirtualTable/index.js +7 -0
- package/es/VirtualTable/style/index.js +34 -0
- package/es/components.js +21 -0
- package/es/index.js +17 -0
- package/es/locale/en-US.js +120 -0
- package/es/locale/zh-CN.js +120 -0
- package/es/style/styleRegister.js +19 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +1 -0
- package/es/utils/constants.js +10 -0
- package/lib/AutoComplete/AutoComplete.js +84 -0
- package/lib/AutoComplete/index.js +7 -0
- package/lib/BadgeStatus/Badge.js +51 -0
- package/lib/BadgeStatus/color.js +14 -0
- package/lib/BadgeStatus/index.js +8 -0
- package/lib/CardSelect/CardSelect.js +141 -0
- package/lib/CardSelect/index.js +7 -0
- package/lib/CardSelect/style/index.js +29 -0
- package/lib/CheckButton/CheckButton.js +122 -0
- package/lib/CheckButton/index.js +7 -0
- package/lib/CheckButton/style/index.js +44 -0
- package/lib/ConfigProvider/ConfigProvider.js +73 -0
- package/lib/ConfigProvider/context.js +26 -0
- package/lib/ConfigProvider/index.js +9 -0
- package/lib/DragModal/DragModal.js +212 -0
- package/lib/DragModal/index.js +7 -0
- package/lib/DragModal/style/index.js +86 -0
- package/lib/EditTable/Body.js +189 -0
- package/lib/EditTable/CellRender.js +12 -0
- package/lib/EditTable/EditTable.js +434 -0
- package/lib/EditTable/FormItem.js +169 -0
- package/lib/EditTable/Group.js +204 -0
- package/lib/EditTable/Header.js +63 -0
- package/lib/EditTable/HeaderRender.js +12 -0
- package/lib/EditTable/components/ContextMenu/Menu.js +86 -0
- package/lib/EditTable/components/ContextMenu/index.js +96 -0
- package/lib/EditTable/components/Search/Search.js +163 -0
- package/lib/EditTable/components/Search/Sort.js +119 -0
- package/lib/EditTable/components/Search/index.js +2 -0
- package/lib/EditTable/consts.js +13 -0
- package/lib/EditTable/context.js +88 -0
- package/lib/EditTable/hooks/index.js +19 -0
- package/lib/EditTable/hooks/useGroup.js +48 -0
- package/lib/EditTable/hooks/useResizeObserver.js +27 -0
- package/lib/EditTable/hooks/useValidate.js +112 -0
- package/lib/EditTable/index.js +25 -0
- package/lib/EditTable/props.js +60 -0
- package/lib/EditTable/style/body.js +63 -0
- package/lib/EditTable/style/form.js +33 -0
- package/lib/EditTable/style/group.js +33 -0
- package/lib/EditTable/style/header.js +72 -0
- package/lib/EditTable/style/index.js +52 -0
- package/lib/EditTable/style/menu.js +27 -0
- package/lib/EditTable/style/table.js +46 -0
- package/lib/EditTable/utils.js +110 -0
- package/lib/Ellipsis/Ellipsis.js +148 -0
- package/lib/Ellipsis/index.js +7 -0
- package/lib/Ellipsis/style/index.js +26 -0
- package/lib/Empty/Empty.js +63 -0
- package/lib/Empty/image.js +3 -0
- package/lib/Empty/index.js +7 -0
- package/lib/FullPage/FullPage.js +19 -0
- package/lib/FullPage/index.js +7 -0
- package/lib/Icon/Icon.js +49 -0
- package/lib/Icon/index.js +7 -0
- package/lib/LocaleProvider/LocaleProvider.js +31 -0
- package/lib/LocaleProvider/index.js +7 -0
- package/lib/LocaleReciver/index.js +24 -0
- package/lib/Markdown/Markdown.js +118 -0
- package/lib/Markdown/index.js +7 -0
- package/lib/PermissionButton/PermissionButton.js +118 -0
- package/lib/PermissionButton/confirm.js +94 -0
- package/lib/PermissionButton/index.js +9 -0
- package/lib/PermissionButton/shared.js +1 -0
- package/lib/ProLayout/Basic/BasicLayout.js +422 -0
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +51 -0
- package/lib/ProLayout/Basic/Header.js +111 -0
- package/lib/ProLayout/Basic/HeaderStyle.js +10 -0
- package/lib/ProLayout/PageContainer/index.js +354 -0
- package/lib/ProLayout/PageContainer/style.js +85 -0
- package/lib/ProLayout/RouteContext.js +28 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +241 -0
- package/lib/ProLayout/SiderMenu/SiderMenu.js +274 -0
- package/lib/ProLayout/SiderMenu/index.js +2 -0
- package/lib/ProLayout/SiderMenu/style.js +204 -0
- package/lib/ProLayout/TopHeader/index.js +170 -0
- package/lib/ProLayout/TopHeader/style.js +154 -0
- package/lib/ProLayout/defaultSettings.js +113 -0
- package/lib/ProLayout/index.js +10 -0
- package/lib/ProLayout/style/index.js +14 -0
- package/lib/ProLayout/util.js +58 -0
- package/lib/ProTable/Alert.js +40 -0
- package/lib/ProTable/Content.js +97 -0
- package/lib/ProTable/Header.js +33 -0
- package/lib/ProTable/Pagination.js +55 -0
- package/lib/ProTable/ProTable.js +279 -0
- package/lib/ProTable/hooks/index.js +2 -0
- package/lib/ProTable/hooks/useTableInject.js +6 -0
- package/lib/ProTable/hooks/useTableSelection.js +115 -0
- package/lib/ProTable/index.js +8 -0
- package/lib/ProTable/setting.js +138 -0
- package/lib/ProTable/style/index.js +113 -0
- package/lib/RadioButton/RadioButton.js +53 -0
- package/lib/RadioButton/index.js +8 -0
- package/lib/RadioButton/style/index.js +25 -0
- package/lib/Scrollbar/Bar.js +76 -0
- package/lib/Scrollbar/Scrollbar.js +161 -0
- package/lib/Scrollbar/Thumb.js +150 -0
- package/lib/Scrollbar/constants.js +1 -0
- package/lib/Scrollbar/index.js +7 -0
- package/lib/Scrollbar/scrollbarProps.js +100 -0
- package/lib/Scrollbar/style/index.js +85 -0
- package/lib/Scrollbar/thumbProps.js +10 -0
- package/lib/Scrollbar/util.js +39 -0
- package/lib/Search/Item.js +239 -0
- package/lib/Search/Search.js +90 -0
- package/lib/Search/hooks/index.js +117 -0
- package/lib/Search/hooks/useRouteQuery.js +86 -0
- package/lib/Search/hooks/useSearchItems.js +50 -0
- package/lib/Search/hooks/useTermOptions.js +29 -0
- package/lib/Search/index.js +10 -0
- package/lib/Search/setting.js +245 -0
- package/lib/Search/style/index.js +5 -0
- package/lib/Search/style/item.js +40 -0
- package/lib/Search/style/search.js +177 -0
- package/lib/Search/util.js +270 -0
- package/lib/Skeleton/Skeleton.js +27 -0
- package/lib/Skeleton/components/DashBoardCard.js +27 -0
- package/lib/Skeleton/components/DashBoardChart.js +27 -0
- package/lib/Skeleton/components/Detail.js +27 -0
- package/lib/Skeleton/components/Drawer.js +27 -0
- package/lib/Skeleton/components/Item.js +54 -0
- package/lib/Skeleton/components/List.js +27 -0
- package/lib/Skeleton/components/ListCard.js +28 -0
- package/lib/Skeleton/components/ListCardItem.js +20 -0
- package/lib/Skeleton/components/ListTable.js +27 -0
- package/lib/Skeleton/components/Page.js +26 -0
- package/lib/Skeleton/components/Search.js +16 -0
- package/lib/Skeleton/components/Tree.js +27 -0
- package/lib/Skeleton/index.js +28 -0
- package/lib/Skeleton/style/index.js +195 -0
- package/lib/TimeFormat/TimeFormat.js +36 -0
- package/lib/TimeFormat/index.js +7 -0
- package/lib/Title/Title.js +26 -0
- package/lib/Title/index.js +7 -0
- package/lib/Title/style/index.js +34 -0
- package/lib/ValueItem/ValueItem.js +113 -0
- package/lib/ValueItem/index.js +7 -0
- package/lib/ValueItem/util.js +17 -0
- package/lib/VirtualTable/VirtualTable.js +271 -0
- package/lib/VirtualTable/data.js +60 -0
- package/lib/VirtualTable/index.js +7 -0
- package/lib/VirtualTable/style/index.js +34 -0
- package/lib/components.js +21 -0
- package/lib/index.js +17 -0
- package/lib/locale/en-US.js +120 -0
- package/lib/locale/zh-CN.js +120 -0
- package/lib/style/styleRegister.js +19 -0
- package/lib/style/variable.js +4 -0
- package/lib/style.js +1 -0
- package/lib/utils/constants.js +10 -0
- package/package.json +164 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }import {
|
|
2
|
+
TreeSelect,
|
|
3
|
+
Select,
|
|
4
|
+
Input,
|
|
5
|
+
InputNumber,
|
|
6
|
+
DatePicker,
|
|
7
|
+
TimePicker,
|
|
8
|
+
InputPassword,
|
|
9
|
+
RangePicker,
|
|
10
|
+
TimeRangePicker
|
|
11
|
+
} from 'ant-design-vue'
|
|
12
|
+
import { filterSelectNode, filterTreeSelectNode } from './util'
|
|
13
|
+
|
|
14
|
+
export const optionsMapKey = Symbol('searchOptionsMap')
|
|
15
|
+
|
|
16
|
+
export const searchProps = () => {
|
|
17
|
+
return {
|
|
18
|
+
columns: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => [],
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'terms',
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
mode: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'default'
|
|
31
|
+
},
|
|
32
|
+
column: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 4
|
|
35
|
+
},
|
|
36
|
+
labelWidth: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 40
|
|
39
|
+
},
|
|
40
|
+
resetText: {
|
|
41
|
+
type: String
|
|
42
|
+
},
|
|
43
|
+
submitText: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
align: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'value'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const typeOptions = (locale) => {
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
label: locale.setting.or,
|
|
57
|
+
value: 'or'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: locale.setting.and,
|
|
61
|
+
value: 'and'
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const TermTypeMap = (locale) => {
|
|
67
|
+
return {
|
|
68
|
+
EQ: {
|
|
69
|
+
label: '=',
|
|
70
|
+
value: 'eq'
|
|
71
|
+
},
|
|
72
|
+
NOT: {
|
|
73
|
+
label: '!=',
|
|
74
|
+
value: 'not'
|
|
75
|
+
},
|
|
76
|
+
LIKE: {
|
|
77
|
+
label: _optionalChain([locale, 'access', _ => _.setting, 'optionalAccess', _2 => _2.include]),
|
|
78
|
+
value: 'like'
|
|
79
|
+
},
|
|
80
|
+
NLIKE: {
|
|
81
|
+
label: _optionalChain([locale, 'access', _3 => _3.setting, 'optionalAccess', _4 => _4.exclude]),
|
|
82
|
+
value: 'nlike'
|
|
83
|
+
},
|
|
84
|
+
GT: {
|
|
85
|
+
label: '>',
|
|
86
|
+
value: 'gt'
|
|
87
|
+
},
|
|
88
|
+
GTE: {
|
|
89
|
+
label: '>=',
|
|
90
|
+
value: 'gte'
|
|
91
|
+
},
|
|
92
|
+
LT: {
|
|
93
|
+
label: '<',
|
|
94
|
+
value: 'lt'
|
|
95
|
+
},
|
|
96
|
+
LTE: {
|
|
97
|
+
label: '<=',
|
|
98
|
+
value: 'lte'
|
|
99
|
+
},
|
|
100
|
+
IN: {
|
|
101
|
+
label: _optionalChain([locale, 'access', _5 => _5.setting, 'optionalAccess', _6 => _6.in]),
|
|
102
|
+
value: 'in'
|
|
103
|
+
},
|
|
104
|
+
NIN: {
|
|
105
|
+
label: _optionalChain([locale, 'access', _7 => _7.setting, 'optionalAccess', _8 => _8.notIn]),
|
|
106
|
+
value: 'nin'
|
|
107
|
+
},
|
|
108
|
+
BTW: {
|
|
109
|
+
label: _optionalChain([locale, 'access', _9 => _9.setting, 'optionalAccess', _10 => _10.between]),
|
|
110
|
+
value: 'btw'
|
|
111
|
+
},
|
|
112
|
+
NBTW: {
|
|
113
|
+
label: _optionalChain([locale, 'access', _11 => _11.setting, 'optionalAccess', _12 => _12.notBetween]),
|
|
114
|
+
value: 'nbtw'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const termType = (locale) => {
|
|
120
|
+
return Object.values(TermTypeMap(locale))
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const componentType = {
|
|
124
|
+
input: 'input',
|
|
125
|
+
inputNumber: 'number',
|
|
126
|
+
password: 'password',
|
|
127
|
+
switch: 'switch',
|
|
128
|
+
radio: 'radio',
|
|
129
|
+
checkbox: 'checkbox',
|
|
130
|
+
time: 'time',
|
|
131
|
+
date: 'date',
|
|
132
|
+
timeRange: 'timeRange',
|
|
133
|
+
rangePicker: 'rangePicker',
|
|
134
|
+
treeSelect: 'treeSelect',
|
|
135
|
+
upload: 'upload',
|
|
136
|
+
tree: 'tree',
|
|
137
|
+
select: 'select',
|
|
138
|
+
component: 'component'
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export const componentProps = (record) => {
|
|
142
|
+
const type = record.type
|
|
143
|
+
const _props = record.componentProps || {}
|
|
144
|
+
|
|
145
|
+
switch (type) {
|
|
146
|
+
case 'string':
|
|
147
|
+
case componentType.input:
|
|
148
|
+
return {
|
|
149
|
+
type,
|
|
150
|
+
name: Input,
|
|
151
|
+
props: _props
|
|
152
|
+
}
|
|
153
|
+
case componentType.inputNumber:
|
|
154
|
+
return {
|
|
155
|
+
type,
|
|
156
|
+
name: InputNumber,
|
|
157
|
+
props: _props
|
|
158
|
+
}
|
|
159
|
+
case componentType.password:
|
|
160
|
+
return {
|
|
161
|
+
type,
|
|
162
|
+
name: InputPassword,
|
|
163
|
+
props: _props
|
|
164
|
+
}
|
|
165
|
+
case componentType.time:
|
|
166
|
+
return {
|
|
167
|
+
type,
|
|
168
|
+
name: TimePicker,
|
|
169
|
+
props: {
|
|
170
|
+
valueFormat: 'HH:mm:ss',
|
|
171
|
+
..._props
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
case componentType.date:
|
|
175
|
+
return {
|
|
176
|
+
type,
|
|
177
|
+
name: DatePicker,
|
|
178
|
+
props: {
|
|
179
|
+
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
180
|
+
showTime: true,
|
|
181
|
+
..._props
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
case componentType.timeRange:
|
|
185
|
+
return {
|
|
186
|
+
type,
|
|
187
|
+
name: TimeRangePicker,
|
|
188
|
+
props: {
|
|
189
|
+
valueFormat: 'HH:mm:ss',
|
|
190
|
+
..._props
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
case componentType.rangePicker:
|
|
194
|
+
return {
|
|
195
|
+
type,
|
|
196
|
+
name: RangePicker,
|
|
197
|
+
props: {
|
|
198
|
+
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
199
|
+
showTime: true,
|
|
200
|
+
..._props
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
case componentType.treeSelect:
|
|
204
|
+
return {
|
|
205
|
+
type,
|
|
206
|
+
name: TreeSelect,
|
|
207
|
+
props: {
|
|
208
|
+
showSearch: true,
|
|
209
|
+
height: 350,
|
|
210
|
+
fieldNames: {
|
|
211
|
+
label: 'name',
|
|
212
|
+
value: 'id'
|
|
213
|
+
},
|
|
214
|
+
filterTreeNode: (v, option) => {
|
|
215
|
+
return filterTreeSelectNode(v, option)
|
|
216
|
+
},
|
|
217
|
+
..._props
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
case componentType.select:
|
|
221
|
+
return {
|
|
222
|
+
type,
|
|
223
|
+
name: Select,
|
|
224
|
+
props: {
|
|
225
|
+
showSearch: true,
|
|
226
|
+
filterOption: (v, option) => {
|
|
227
|
+
return filterSelectNode(v, option, 'label')
|
|
228
|
+
},
|
|
229
|
+
style: {
|
|
230
|
+
width: '100%',
|
|
231
|
+
minWidth: '80px'
|
|
232
|
+
},
|
|
233
|
+
..._props
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
case componentType.component:
|
|
237
|
+
return {
|
|
238
|
+
type,
|
|
239
|
+
name: record.components,
|
|
240
|
+
props: _props
|
|
241
|
+
}
|
|
242
|
+
default:
|
|
243
|
+
return {}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const genItemStyle = (config) => {
|
|
2
|
+
const { componentCls } = config
|
|
3
|
+
|
|
4
|
+
return {
|
|
5
|
+
[`${componentCls}-item`]: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
gap: '16px',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
|
|
10
|
+
[`${componentCls}-item--type`]: {
|
|
11
|
+
width: '90px',
|
|
12
|
+
minWidth: '0',
|
|
13
|
+
'> span': {
|
|
14
|
+
lineHeight: '34px',
|
|
15
|
+
fontWeight: 'bold'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
[`${componentCls}-item--column`]: {
|
|
20
|
+
width: '130px',
|
|
21
|
+
minWidth: '0'
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
[`${componentCls}-item--termType`]: {
|
|
25
|
+
width: '110px',
|
|
26
|
+
minWidth: '0'
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
[`${componentCls}-item--label`]: {
|
|
30
|
+
minWidth: '40px'
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
[`${componentCls}-item--value`]: {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
width: '0',
|
|
36
|
+
flexGrow: 1
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export const genSearchStyle = (config) => {
|
|
2
|
+
const { componentCls, token } = config
|
|
3
|
+
|
|
4
|
+
return {
|
|
5
|
+
[`${componentCls}-warp`]: {
|
|
6
|
+
padding: '24px',
|
|
7
|
+
backgroundColor: '#fff',
|
|
8
|
+
marginBottom: '24px',
|
|
9
|
+
|
|
10
|
+
'.pack-up': {
|
|
11
|
+
[`${componentCls}-items`]: {
|
|
12
|
+
flex: '1 1 auto',
|
|
13
|
+
'.left': {
|
|
14
|
+
minWidth: '380px',
|
|
15
|
+
maxWidth: '580px'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
'&.senior': {
|
|
21
|
+
[`> ${componentCls}-content`]: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
|
|
24
|
+
[`${componentCls}-footer`]: {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
gap: '64px',
|
|
27
|
+
position: 'relative',
|
|
28
|
+
|
|
29
|
+
'.more-btn': {
|
|
30
|
+
'.more-text': {
|
|
31
|
+
paddingRight: '24px'
|
|
32
|
+
},
|
|
33
|
+
'.more-icon': {
|
|
34
|
+
transition: 'transform 0.3s',
|
|
35
|
+
transform: 'rotateZ(90deg)',
|
|
36
|
+
fontSize: '14px',
|
|
37
|
+
'&.more-up': {
|
|
38
|
+
transform: 'rotateZ(-90deg)'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
'&.expand': {
|
|
44
|
+
marginTop: '16px',
|
|
45
|
+
width: '100%',
|
|
46
|
+
justifyContent: 'space-between'
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
[`${componentCls}-footer--btns`]: {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
gap: '12px'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
'.items-expand': {
|
|
56
|
+
display: 'flex',
|
|
57
|
+
gap: '16px',
|
|
58
|
+
|
|
59
|
+
'.left,& .right': {
|
|
60
|
+
minWidth: 0,
|
|
61
|
+
flex: '1 1 0'
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
'.left-items, & .right-items': {
|
|
65
|
+
display: 'flex',
|
|
66
|
+
gap: '16px',
|
|
67
|
+
flexDirection: 'column'
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
'.center': {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
justifyContent: 'center'
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
'&.vertical': {
|
|
77
|
+
flexDirection: 'column',
|
|
78
|
+
'.center': {
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
justifyContent: 'center'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
'&.senior-expand': {
|
|
86
|
+
flexDirection: 'column'
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
'&.small': {
|
|
90
|
+
gap: '12px',
|
|
91
|
+
[`${componentCls}-footre`]: {
|
|
92
|
+
gap: '4px'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
[`${componentCls}-content`]: {
|
|
99
|
+
'&.simple': {
|
|
100
|
+
[`${componentCls}-footer--btns`]: {
|
|
101
|
+
display: 'flex'
|
|
102
|
+
},
|
|
103
|
+
[`${componentCls}-item`]: {
|
|
104
|
+
gap: '8px',
|
|
105
|
+
[`${componentCls}-item--label`]: {
|
|
106
|
+
textAlign: 'right'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
'.no-radius': {
|
|
113
|
+
borderRadius: 0,
|
|
114
|
+
borderColor: '#f1f1f1'
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
'.search-history-warp': {
|
|
118
|
+
position: 'relative',
|
|
119
|
+
'.search-history-button': {
|
|
120
|
+
paddingRight: '32px'
|
|
121
|
+
},
|
|
122
|
+
'.search-history-button-icon': {
|
|
123
|
+
position: 'absolute',
|
|
124
|
+
width: '24px',
|
|
125
|
+
height: '18px',
|
|
126
|
+
right: '6px',
|
|
127
|
+
top: '8px',
|
|
128
|
+
color: '#fff',
|
|
129
|
+
lineHeight: '18px',
|
|
130
|
+
textAlign: 'center',
|
|
131
|
+
fontWeight: 'bold',
|
|
132
|
+
'> span': {
|
|
133
|
+
fontSize: '14px'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
'.search-history-empty': {
|
|
140
|
+
padding: '12px 12px 6px 12px',
|
|
141
|
+
backgroundColor: '#fff'
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
'.search-history-items': {
|
|
145
|
+
width: '120px',
|
|
146
|
+
maxHeight: '300px',
|
|
147
|
+
overflowY: 'auto',
|
|
148
|
+
|
|
149
|
+
'.search-history-item': {
|
|
150
|
+
display: 'flex',
|
|
151
|
+
padding: '4px 0px 4px 4px',
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
gap: '4px',
|
|
154
|
+
|
|
155
|
+
'&:hover': {
|
|
156
|
+
backgroundColor: '#f1f1f1'
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
'.history-item--title': {
|
|
160
|
+
width: 'calc(100% - 30px)',
|
|
161
|
+
cursor: 'pointer'
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
'.delete': {
|
|
165
|
+
padding: '0 6px',
|
|
166
|
+
flex: '0 0 28px'
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
'.search-history-list-pop': {
|
|
172
|
+
'.ant-popover-inner-content': {
|
|
173
|
+
padding: 0
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|