@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,195 @@
|
|
|
1
|
+
import { Keyframes } from 'ant-design-vue'
|
|
2
|
+
import genComponentStyle from '../../style/styleRegister'
|
|
3
|
+
|
|
4
|
+
const JSkeletonSizeLg = '36px'
|
|
5
|
+
const JSkeletonSizeSm = '16px'
|
|
6
|
+
const JSkeletonSize = '24px'
|
|
7
|
+
const JSkeletonBorderRadius = '8px'
|
|
8
|
+
const JSkeletonBg = '#f0f2f5'
|
|
9
|
+
const JSkeletonBg1 = '#e6e8eb'
|
|
10
|
+
const JSkeletonBorder = `4px solid ${JSkeletonBg}`
|
|
11
|
+
|
|
12
|
+
const JSkeletonFlex = {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
gap: '24px',
|
|
15
|
+
marginBottom: '16px'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 动画
|
|
19
|
+
const waveKeyframes = new Keyframes('wave', {
|
|
20
|
+
'0%': {
|
|
21
|
+
backgroundPosition: '200% 0'
|
|
22
|
+
},
|
|
23
|
+
'100%': {
|
|
24
|
+
backgroundPosition: '-200% 0'
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const genSkeletonStyle = (config) => {
|
|
29
|
+
const { componentCls } = config
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
[`${componentCls}-flex`]: JSkeletonFlex,
|
|
33
|
+
|
|
34
|
+
[`${componentCls}-flex-between`]: {
|
|
35
|
+
...JSkeletonFlex,
|
|
36
|
+
justifyContent: 'space-between'
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
[`${componentCls}-flex-column`]: {
|
|
40
|
+
...JSkeletonFlex,
|
|
41
|
+
flexDirection: 'column'
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
[componentCls]: {
|
|
45
|
+
height: '100%',
|
|
46
|
+
|
|
47
|
+
[`${componentCls}-item`]: {
|
|
48
|
+
background: `linear-gradient(90deg, ${JSkeletonBg} 25%, ${JSkeletonBg1} 50%, ${JSkeletonBg} 75%)`,
|
|
49
|
+
backgroundSize: '400% 100%',
|
|
50
|
+
borderRadius: JSkeletonBorderRadius,
|
|
51
|
+
height: JSkeletonSize
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
[`${componentCls}-item-active`]: {
|
|
55
|
+
animationName: waveKeyframes,
|
|
56
|
+
animationDuration: '1.8s',
|
|
57
|
+
animationIterationCount: 'infinite',
|
|
58
|
+
animationTimingFunction: 'ease-in-out'
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
[`${componentCls}-item-lg`]: {
|
|
62
|
+
height: JSkeletonSizeLg
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
[`${componentCls}-item-sm`]: {
|
|
66
|
+
height: JSkeletonSizeSm
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
[`${componentCls}-item-large`]: {
|
|
70
|
+
height: JSkeletonSizeLg
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
[`${componentCls}-dashboard-card`]: {
|
|
74
|
+
...JSkeletonFlex,
|
|
75
|
+
border: JSkeletonBorder,
|
|
76
|
+
borderRadius: JSkeletonBorderRadius,
|
|
77
|
+
height: '100%',
|
|
78
|
+
padding: '24px',
|
|
79
|
+
flexDirection: 'column'
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
[`${componentCls}-tabs`]: {
|
|
83
|
+
display: 'flex',
|
|
84
|
+
gap: '16px',
|
|
85
|
+
margin: '60px 0 20px 0',
|
|
86
|
+
borderBottom: JSkeletonBorder,
|
|
87
|
+
padding: '16px 0'
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
[`${componentCls}-desc`]: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
flexDirection: 'column',
|
|
93
|
+
marginBottom: '24px',
|
|
94
|
+
|
|
95
|
+
[`${componentCls}-desc-content`]: {
|
|
96
|
+
display: 'grid',
|
|
97
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
98
|
+
gap: '36px',
|
|
99
|
+
margin: '24px 0 0 0'
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
[`${componentCls}-desc-item`]: {
|
|
103
|
+
display: 'flex',
|
|
104
|
+
gap: '16px'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
[`${componentCls}-box`]: {
|
|
109
|
+
borderBottom: JSkeletonBorder,
|
|
110
|
+
padding: '16px 0'
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
[`${componentCls}-table`]: {
|
|
114
|
+
marginTop: '16px'
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
[`${componentCls}-table-cell`]: {
|
|
118
|
+
display: 'grid',
|
|
119
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(0, 1fr)) 200px',
|
|
120
|
+
gap: '24px',
|
|
121
|
+
padding: '12px 6px',
|
|
122
|
+
borderRadius: '8px'
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
[`${componentCls}-table-header`]: {
|
|
126
|
+
backgroundColor: 'lightgrey'
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
[`${componentCls}-table-action`]: {
|
|
130
|
+
width: '200px',
|
|
131
|
+
display: 'grid',
|
|
132
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(0, 1fr))',
|
|
133
|
+
gap: '24px'
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
[`${componentCls}-cards`]: {
|
|
137
|
+
display: 'grid',
|
|
138
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
139
|
+
gap: '16px'
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
[`${componentCls}-card`]: {
|
|
143
|
+
[`${componentCls}-card-content`]: {
|
|
144
|
+
display: 'flex',
|
|
145
|
+
gap: '16px',
|
|
146
|
+
border: '2px solid #f0f2f5',
|
|
147
|
+
borderRadius: '8px',
|
|
148
|
+
padding: '24px',
|
|
149
|
+
marginBottom: '16px',
|
|
150
|
+
|
|
151
|
+
[`${componentCls}-image`]: {
|
|
152
|
+
width: '100px',
|
|
153
|
+
height: '100px'
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
[`${componentCls}-right`]: {
|
|
157
|
+
flex: 1,
|
|
158
|
+
minWidth: '200px',
|
|
159
|
+
|
|
160
|
+
[`${componentCls}-right-content`]: {
|
|
161
|
+
display: 'flex',
|
|
162
|
+
gap: '16px',
|
|
163
|
+
marginTop: '16px',
|
|
164
|
+
|
|
165
|
+
[`${componentCls}-right-content-item`]: {
|
|
166
|
+
flex: 1,
|
|
167
|
+
minWidth: '100px',
|
|
168
|
+
display: 'flex',
|
|
169
|
+
flexDirection: 'column',
|
|
170
|
+
gap: '16px'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
[`${componentCls}-action`]: {
|
|
177
|
+
display: 'flex',
|
|
178
|
+
justifyContent: 'flex-end',
|
|
179
|
+
gap: '16px',
|
|
180
|
+
|
|
181
|
+
'.btn': {
|
|
182
|
+
flex: 1,
|
|
183
|
+
minWidth: '100px'
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
'.delete': {
|
|
187
|
+
flex: '0 0 100px'
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export default genComponentStyle([genSkeletonStyle])
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import { defineComponent, computed } from 'vue'
|
|
3
|
+
import dayjs from 'dayjs'
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'JTimeFormat',
|
|
7
|
+
props: {
|
|
8
|
+
time: {
|
|
9
|
+
type: [String, Number, undefined]
|
|
10
|
+
},
|
|
11
|
+
format: {
|
|
12
|
+
type: String
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(props) {
|
|
16
|
+
const handleValue = (time, format) => {
|
|
17
|
+
const value = Number(time)
|
|
18
|
+
const _format = format || 'YYYY-MM-DD HH:mm:ss'
|
|
19
|
+
if (!isNaN(value)) {
|
|
20
|
+
return dayjs(value).format(_format)
|
|
21
|
+
}
|
|
22
|
+
return time
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const timeFormat = computed(() => {
|
|
26
|
+
if (props.time) {
|
|
27
|
+
return handleValue(props.time, props.format)
|
|
28
|
+
}
|
|
29
|
+
return props.time
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
timeFormat
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { defineComponent, computed } from 'vue'
|
|
3
|
+
import useTitleStyle from './style'
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'JTitle',
|
|
7
|
+
props: {
|
|
8
|
+
data: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ''
|
|
11
|
+
},
|
|
12
|
+
style: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => ({})
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props) {
|
|
18
|
+
const prefixCls = computed(() => 'j-title')
|
|
19
|
+
const [wrapSSR, hashId] = useTitleStyle(prefixCls)
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
prefixCls,
|
|
23
|
+
hashId
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import genComponentStyle from '../../style/styleRegister'
|
|
2
|
+
|
|
3
|
+
const genTitleStyle = (config) => {
|
|
4
|
+
const { componentCls, token } = config
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
[componentCls]: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
width: '100%',
|
|
11
|
+
marginBottom: '16px',
|
|
12
|
+
|
|
13
|
+
[`${componentCls}-content`]: {
|
|
14
|
+
position: 'relative',
|
|
15
|
+
paddingLeft: '10px',
|
|
16
|
+
color: 'rgba(0, 0, 0, 0.8)',
|
|
17
|
+
fontWeight: 600,
|
|
18
|
+
lineHeight: 1,
|
|
19
|
+
'&::before': {
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
top: 0,
|
|
22
|
+
left: 0,
|
|
23
|
+
width: 4,
|
|
24
|
+
height: '100%',
|
|
25
|
+
background: '#1890ff',
|
|
26
|
+
borderRadius: '0 3px 3px 0',
|
|
27
|
+
content: '""'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default genComponentStyle([genTitleStyle])
|
|
@@ -0,0 +1,113 @@
|
|
|
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; }
|
|
2
|
+
import { defineComponent, ref, watch, computed } from 'vue'
|
|
3
|
+
import { componentsType } from './util'
|
|
4
|
+
import {
|
|
5
|
+
Select,
|
|
6
|
+
DatePicker,
|
|
7
|
+
TimePicker,
|
|
8
|
+
Input,
|
|
9
|
+
InputNumber,
|
|
10
|
+
InputPassword,
|
|
11
|
+
Upload,
|
|
12
|
+
} from 'ant-design-vue'
|
|
13
|
+
import { omit } from 'lodash-es'
|
|
14
|
+
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
name: 'JValueItem',
|
|
17
|
+
components: {
|
|
18
|
+
Select,
|
|
19
|
+
DatePicker,
|
|
20
|
+
TimePicker,
|
|
21
|
+
Input,
|
|
22
|
+
InputNumber,
|
|
23
|
+
InputPassword,
|
|
24
|
+
Upload,
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
// 组件双向绑定的值
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
// 组件类型
|
|
33
|
+
itemType: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'string',
|
|
36
|
+
},
|
|
37
|
+
// 多选框
|
|
38
|
+
mode: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: undefined,
|
|
41
|
+
},
|
|
42
|
+
placeholder: String,
|
|
43
|
+
options: Array,
|
|
44
|
+
style: Object,
|
|
45
|
+
class: String,
|
|
46
|
+
valueFormat: String,
|
|
47
|
+
action: [String, Promise] ,
|
|
48
|
+
headers: Object,
|
|
49
|
+
disabled: Boolean,
|
|
50
|
+
extraProps: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: () => ({})
|
|
53
|
+
},
|
|
54
|
+
handleFileChange: {
|
|
55
|
+
type: Function,
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: ['update:modelValue', 'change'],
|
|
59
|
+
setup(props, { emit }) {
|
|
60
|
+
const typeMap = new Map(Object.entries(componentsType))
|
|
61
|
+
const myValue = ref(undefined)
|
|
62
|
+
const objectValue = ref('')
|
|
63
|
+
|
|
64
|
+
const bindProps = computed(() => {
|
|
65
|
+
return Object.assign(omit(props, ['extraProps']), props.extraProps)
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const handleItemModalSubmit = () => {
|
|
69
|
+
myValue.value = objectValue.value.replace(/[\r\n]\s*/g, '')
|
|
70
|
+
emit('update:modelValue', objectValue.value)
|
|
71
|
+
emit('change', objectValue.value)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const onChange = (e) => {
|
|
75
|
+
emit('update:modelValue', myValue.value)
|
|
76
|
+
emit('change', e && e.target ? e.target.value : e)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const monacoCancel = () => {
|
|
80
|
+
objectValue.value = props.modelValue
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const handleFileChangeInternal = async (info) => {
|
|
84
|
+
if (info.file.status === 'done') {
|
|
85
|
+
let url = _optionalChain([info, 'optionalAccess', _ => _.file, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.result, 'optionalAccess', _4 => _4.accessUrl])
|
|
86
|
+
if (props.handleFileChange) {
|
|
87
|
+
url = await props.handleFileChange(info, info.file.response)
|
|
88
|
+
}
|
|
89
|
+
myValue.value = url
|
|
90
|
+
emit('update:modelValue', url)
|
|
91
|
+
emit('change', url)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
watch(() => props.modelValue, () => {
|
|
96
|
+
myValue.value = props.modelValue
|
|
97
|
+
if (props.itemType === 'object') {
|
|
98
|
+
objectValue.value = props.modelValue
|
|
99
|
+
}
|
|
100
|
+
}, { immediate: true })
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
typeMap,
|
|
104
|
+
myValue,
|
|
105
|
+
objectValue,
|
|
106
|
+
bindProps,
|
|
107
|
+
handleItemModalSubmit,
|
|
108
|
+
onChange,
|
|
109
|
+
monacoCancel,
|
|
110
|
+
handleFileChangeInternal,
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const componentsType = {
|
|
2
|
+
int: 'inputNumber',
|
|
3
|
+
long: 'inputNumber',
|
|
4
|
+
float: 'inputNumber',
|
|
5
|
+
double: 'inputNumber',
|
|
6
|
+
string: 'input',
|
|
7
|
+
array: 'input',
|
|
8
|
+
password: 'password',
|
|
9
|
+
enum: 'select',
|
|
10
|
+
select: 'select',
|
|
11
|
+
boolean: 'select',
|
|
12
|
+
date: 'date',
|
|
13
|
+
time: 'time',
|
|
14
|
+
object: 'object',
|
|
15
|
+
geoPoint: 'geoPoint',
|
|
16
|
+
file: 'file'
|
|
17
|
+
}
|