@meethive/components 0.0.3 → 0.0.4

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.
Files changed (111) hide show
  1. package/es/AutoComplete/AutoComplete.js +71 -80
  2. package/es/BadgeStatus/Badge.js +38 -47
  3. package/es/CardSelect/CardSelect.js +115 -137
  4. package/es/CheckButton/CheckButton.js +102 -118
  5. package/es/ConfigProvider/ConfigProvider.js +44 -68
  6. package/es/DragModal/DragModal.js +191 -212
  7. package/es/EditTable/Body.js +158 -189
  8. package/es/EditTable/CellRender.js +10 -12
  9. package/es/EditTable/EditTable.js +385 -434
  10. package/es/EditTable/FormItem.js +140 -169
  11. package/es/EditTable/Group.js +171 -204
  12. package/es/EditTable/Header.js +57 -63
  13. package/es/EditTable/HeaderRender.js +10 -12
  14. package/es/EditTable/components/ContextMenu/Menu.js +78 -86
  15. package/es/EditTable/components/Search/Search.js +151 -163
  16. package/es/EditTable/components/Search/Sort.js +104 -119
  17. package/es/Ellipsis/Ellipsis.js +144 -148
  18. package/es/Empty/Empty.js +51 -57
  19. package/es/FullPage/FullPage.js +20 -19
  20. package/es/Icon/Icon.js +42 -49
  21. package/es/LocaleProvider/LocaleProvider.js +32 -38
  22. package/es/Markdown/Markdown.js +101 -118
  23. package/es/PermissionButton/PermissionButton.js +118 -118
  24. package/es/ProLayout/Basic/BasicLayout.js +301 -418
  25. package/es/ProLayout/Basic/Header.js +91 -111
  26. package/es/ProLayout/PageContainer/index.js +267 -344
  27. package/es/ProLayout/SiderMenu/BaseMenu.js +186 -240
  28. package/es/ProTable/Alert.js +39 -40
  29. package/es/ProTable/Content.js +84 -97
  30. package/es/ProTable/Header.js +32 -33
  31. package/es/ProTable/Pagination.js +56 -55
  32. package/es/ProTable/ProTable.js +256 -276
  33. package/es/RadioButton/RadioButton.js +48 -53
  34. package/es/Scrollbar/Bar.js +65 -76
  35. package/es/Scrollbar/Scrollbar.js +129 -161
  36. package/es/Scrollbar/Thumb.js +101 -150
  37. package/es/Search/Item.js +208 -236
  38. package/es/Search/Search.js +90 -90
  39. package/es/Skeleton/Skeleton.js +26 -27
  40. package/es/Skeleton/components/DashBoardCard.js +26 -27
  41. package/es/Skeleton/components/DashBoardChart.js +26 -27
  42. package/es/Skeleton/components/Detail.js +26 -27
  43. package/es/Skeleton/components/Drawer.js +26 -27
  44. package/es/Skeleton/components/Item.js +55 -54
  45. package/es/Skeleton/components/List.js +29 -27
  46. package/es/Skeleton/components/ListCard.js +28 -28
  47. package/es/Skeleton/components/ListCardItem.js +20 -20
  48. package/es/Skeleton/components/ListTable.js +26 -27
  49. package/es/Skeleton/components/Page.js +27 -26
  50. package/es/Skeleton/components/Search.js +16 -16
  51. package/es/Skeleton/components/Tree.js +26 -27
  52. package/es/TimeFormat/TimeFormat.js +32 -36
  53. package/es/Title/Title.js +23 -26
  54. package/es/ValueItem/ValueItem.js +100 -113
  55. package/es/VirtualTable/VirtualTable.js +235 -271
  56. package/lib/AutoComplete/AutoComplete.js +71 -80
  57. package/lib/BadgeStatus/Badge.js +38 -47
  58. package/lib/CardSelect/CardSelect.js +115 -137
  59. package/lib/CheckButton/CheckButton.js +102 -118
  60. package/lib/ConfigProvider/ConfigProvider.js +44 -68
  61. package/lib/DragModal/DragModal.js +191 -212
  62. package/lib/EditTable/Body.js +158 -189
  63. package/lib/EditTable/CellRender.js +10 -12
  64. package/lib/EditTable/EditTable.js +385 -434
  65. package/lib/EditTable/FormItem.js +140 -169
  66. package/lib/EditTable/Group.js +171 -204
  67. package/lib/EditTable/Header.js +57 -63
  68. package/lib/EditTable/HeaderRender.js +10 -12
  69. package/lib/EditTable/components/ContextMenu/Menu.js +78 -86
  70. package/lib/EditTable/components/Search/Search.js +151 -163
  71. package/lib/EditTable/components/Search/Sort.js +104 -119
  72. package/lib/Ellipsis/Ellipsis.js +144 -148
  73. package/lib/Empty/Empty.js +51 -57
  74. package/lib/FullPage/FullPage.js +20 -19
  75. package/lib/Icon/Icon.js +42 -49
  76. package/lib/LocaleProvider/LocaleProvider.js +32 -38
  77. package/lib/Markdown/Markdown.js +101 -118
  78. package/lib/PermissionButton/PermissionButton.js +118 -118
  79. package/lib/ProLayout/Basic/BasicLayout.js +301 -418
  80. package/lib/ProLayout/Basic/Header.js +91 -111
  81. package/lib/ProLayout/PageContainer/index.js +267 -344
  82. package/lib/ProLayout/SiderMenu/BaseMenu.js +186 -240
  83. package/lib/ProTable/Alert.js +39 -40
  84. package/lib/ProTable/Content.js +84 -97
  85. package/lib/ProTable/Header.js +32 -33
  86. package/lib/ProTable/Pagination.js +56 -55
  87. package/lib/ProTable/ProTable.js +256 -276
  88. package/lib/RadioButton/RadioButton.js +48 -53
  89. package/lib/Scrollbar/Bar.js +65 -76
  90. package/lib/Scrollbar/Scrollbar.js +129 -161
  91. package/lib/Scrollbar/Thumb.js +101 -150
  92. package/lib/Search/Item.js +208 -236
  93. package/lib/Search/Search.js +90 -90
  94. package/lib/Skeleton/Skeleton.js +26 -27
  95. package/lib/Skeleton/components/DashBoardCard.js +26 -27
  96. package/lib/Skeleton/components/DashBoardChart.js +26 -27
  97. package/lib/Skeleton/components/Detail.js +26 -27
  98. package/lib/Skeleton/components/Drawer.js +26 -27
  99. package/lib/Skeleton/components/Item.js +55 -54
  100. package/lib/Skeleton/components/List.js +29 -27
  101. package/lib/Skeleton/components/ListCard.js +28 -28
  102. package/lib/Skeleton/components/ListCardItem.js +20 -20
  103. package/lib/Skeleton/components/ListTable.js +26 -27
  104. package/lib/Skeleton/components/Page.js +27 -26
  105. package/lib/Skeleton/components/Search.js +16 -16
  106. package/lib/Skeleton/components/Tree.js +26 -27
  107. package/lib/TimeFormat/TimeFormat.js +32 -36
  108. package/lib/Title/Title.js +23 -26
  109. package/lib/ValueItem/ValueItem.js +100 -113
  110. package/lib/VirtualTable/VirtualTable.js +235 -271
  111. package/package.json +1 -1
@@ -1,119 +1,104 @@
1
-
2
- import { defineComponent, ref, reactive } from 'vue'
3
- import { Popover as APopover, Table as ATable, Space as ASpace, Button as AButton } from 'ant-design-vue'
4
- import { useTableTool, useTableWrapper } from '../../context'
5
- import { useLocaleReceiver } from '../../../LocaleReciver'
6
- import AIcon from '../../../Icon'
7
-
8
- export default defineComponent({
9
- name: 'JEditTableSearchSort',
10
- components: {
11
- APopover,
12
- ATable,
13
- ASpace,
14
- AButton,
15
- AIcon
16
- },
17
- props: {
18
- dataSource: {
19
- type: [Function, Array],
20
- default: () => []
21
- },
22
- sortKey: {
23
- type: [String, Array],
24
- default: undefined
25
- },
26
- dataIndex: {
27
- type: [Number, String],
28
- default: undefined
29
- },
30
- selectedRowKeys: {
31
- type: Array,
32
- default: () => []
33
- },
34
- active: {
35
- type: Boolean,
36
- default: false
37
- }
38
- },
39
- emits: ['click'],
40
- setup(props, { emit }) {
41
- const [contextLocale] = useLocaleReceiver('EditTable')
42
- const tableWrapperRef = useTableWrapper()
43
- const tableTool = useTableTool()
44
-
45
- const visible = ref(false)
46
- const localDataSource = ref([])
47
- const mySelectedRowKeys = ref([])
48
-
49
- const columns = reactive([
50
- {
51
- dataIndex: 'name',
52
- title: contextLocale.value.columns.name
53
- },
54
- {
55
- dataIndex: 'total',
56
- title: contextLocale.value.columns.count,
57
- width: 70
58
- }
59
- ])
60
-
61
- const visibleChange = (e) => {
62
- if (e) {
63
- mySelectedRowKeys.value = props.selectedRowKeys
64
- const ds = typeof props.dataSource === 'function' ? props.dataSource() : props.dataSource
65
- localDataSource.value = (ds || []).map((item, index) =>
66
- Object.assign(item, { __index: index + 1 })
67
- )
68
- }
69
- if (!e) {
70
- setTimeout(() => {
71
- visible.value = e
72
- }, 300)
73
- } else {
74
- visible.value = e
75
- }
76
- }
77
-
78
- const onSelectChange = (keys) => {
79
- mySelectedRowKeys.value = keys
80
- }
81
-
82
- const cleanParams = () => {
83
- mySelectedRowKeys.value = []
84
- tableTool.cleanOrder()
85
- }
86
-
87
- const handleSortRowKeys = () => {
88
- return localDataSource.value
89
- .filter((item) => mySelectedRowKeys.value.includes(item.key))
90
- .sort((a, b) => b.__index - a.__index)
91
- .map((item) => item.key)
92
- }
93
-
94
- const onAsc = () => {
95
- tableTool.order('asc', props.sortKey, handleSortRowKeys(), props.dataIndex)
96
- emit('click')
97
- }
98
-
99
- const onDesc = () => {
100
- tableTool.order('desc', props.sortKey, handleSortRowKeys(), props.dataIndex)
101
- emit('click')
102
- }
103
-
104
- return {
105
- props,
106
- contextLocale,
107
- tableWrapperRef,
108
- visible,
109
- localDataSource,
110
- mySelectedRowKeys,
111
- columns,
112
- visibleChange,
113
- onSelectChange,
114
- cleanParams,
115
- onAsc,
116
- onDesc
117
- }
118
- }
119
- })
1
+ import { defineComponent, ref, reactive } from 'vue';
2
+ import { Popover as APopover, Table as ATable, Space as ASpace, Button as AButton } from 'ant-design-vue';
3
+ import { useTableTool, useTableWrapper } from '../../context';
4
+ import { useLocaleReceiver } from '../../../LocaleReciver';
5
+ import AIcon from '../../../Icon';
6
+ export default defineComponent({
7
+ name: 'JEditTableSearchSort',
8
+ components: {
9
+ APopover,
10
+ ATable,
11
+ ASpace,
12
+ AButton,
13
+ AIcon
14
+ },
15
+ props: {
16
+ dataSource: {
17
+ type: [Function, Array],
18
+ default: () => []
19
+ },
20
+ sortKey: {
21
+ type: [String, Array],
22
+ default: undefined
23
+ },
24
+ dataIndex: {
25
+ type: [Number, String],
26
+ default: undefined
27
+ },
28
+ selectedRowKeys: {
29
+ type: Array,
30
+ default: () => []
31
+ },
32
+ active: {
33
+ type: Boolean,
34
+ default: false
35
+ }
36
+ },
37
+ emits: ['click'],
38
+ setup(props, {
39
+ emit
40
+ }) {
41
+ const [contextLocale] = useLocaleReceiver('EditTable');
42
+ const tableWrapperRef = useTableWrapper();
43
+ const tableTool = useTableTool();
44
+ const visible = ref(false);
45
+ const localDataSource = ref([]);
46
+ const mySelectedRowKeys = ref([]);
47
+ const columns = reactive([{
48
+ dataIndex: 'name',
49
+ title: contextLocale.value.columns.name
50
+ }, {
51
+ dataIndex: 'total',
52
+ title: contextLocale.value.columns.count,
53
+ width: 70
54
+ }]);
55
+ const visibleChange = e => {
56
+ if (e) {
57
+ mySelectedRowKeys.value = props.selectedRowKeys;
58
+ const ds = typeof props.dataSource === 'function' ? props.dataSource() : props.dataSource;
59
+ localDataSource.value = (ds || []).map((item, index) => Object.assign(item, {
60
+ __index: index + 1
61
+ }));
62
+ }
63
+ if (!e) {
64
+ setTimeout(() => {
65
+ visible.value = e;
66
+ }, 300);
67
+ } else {
68
+ visible.value = e;
69
+ }
70
+ };
71
+ const onSelectChange = keys => {
72
+ mySelectedRowKeys.value = keys;
73
+ };
74
+ const cleanParams = () => {
75
+ mySelectedRowKeys.value = [];
76
+ tableTool.cleanOrder();
77
+ };
78
+ const handleSortRowKeys = () => {
79
+ return localDataSource.value.filter(item => mySelectedRowKeys.value.includes(item.key)).sort((a, b) => b.__index - a.__index).map(item => item.key);
80
+ };
81
+ const onAsc = () => {
82
+ tableTool.order('asc', props.sortKey, handleSortRowKeys(), props.dataIndex);
83
+ emit('click');
84
+ };
85
+ const onDesc = () => {
86
+ tableTool.order('desc', props.sortKey, handleSortRowKeys(), props.dataIndex);
87
+ emit('click');
88
+ };
89
+ return {
90
+ props,
91
+ contextLocale,
92
+ tableWrapperRef,
93
+ visible,
94
+ localDataSource,
95
+ mySelectedRowKeys,
96
+ columns,
97
+ visibleChange,
98
+ onSelectChange,
99
+ cleanParams,
100
+ onAsc,
101
+ onDesc
102
+ };
103
+ }
104
+ });
@@ -1,148 +1,144 @@
1
-
2
- import { defineComponent, computed, ref, useAttrs, mergeProps } from 'vue'
3
- import { Tooltip } from 'ant-design-vue'
4
- import useEllipsisStyle from './style'
5
-
6
- const jEllipsis = 'j-ellipsis'
7
- const jEllipsisCursorClass = 'j-ellipsis-cursor'
8
- const jEllipsisLineClampClass = 'j-ellipsis-line-clamp'
9
-
10
- export default defineComponent({
11
- name: 'JEllipsis',
12
- components: { Tooltip },
13
- props: {
14
- expandTrigger: {
15
- type: String,
16
- default: undefined
17
- },
18
- /** multiline ellipsis */
19
- lineClamp: {
20
- type: [Number, String],
21
- default: 1
22
- },
23
- tooltip: {
24
- type: [Boolean, Object],
25
- default: true
26
- }
27
- },
28
- setup(props) {
29
- const prefixCls = computed(() => 'j-ellipsis')
30
- const [wrapSSR, hashId] = useEllipsisStyle(prefixCls)
31
-
32
- // define class name
33
- const expandedRef = ref(false)
34
- const tooltipRef = ref(null)
35
- const triggerRef = ref(null)
36
- const visible = ref(false)
37
- const attrs = useAttrs()
38
-
39
- const handleClickRef = computed(() => {
40
- return props.expandTrigger === 'click'
41
- ? () => {
42
- const { value: expanded } = expandedRef
43
- expandedRef.value = !expanded
44
- }
45
- : undefined
46
- })
47
-
48
- const ellipsisStyleRef = computed(() => {
49
- const { lineClamp } = props
50
- const { value: expanded } = expandedRef
51
- if (lineClamp !== undefined) {
52
- return {
53
- textOverflow: '',
54
- '-webkit-line-clamp': expanded ? '' : lineClamp
55
- }
56
- } else {
57
- return {
58
- textOverflow: expanded ? '' : 'ellipsis',
59
- '-webkit-line-clamp': ''
60
- }
61
- }
62
- })
63
-
64
- function triggerAttrs() {
65
- return {
66
- ...mergeProps(attrs, {
67
- class: [
68
- jEllipsis,
69
- props.lineClamp !== undefined ? jEllipsisLineClampClass : undefined,
70
- props.expandTrigger === 'click' ? jEllipsisCursorClass : undefined,
71
- hashId.value
72
- ],
73
- style: ellipsisStyleRef.value
74
- })
75
- }
76
- }
77
-
78
- const showTooltip = () => {
79
- const { value: trigger } = triggerRef
80
- if (trigger) {
81
- visible.value = trigger.scrollHeight > trigger.offsetHeight
82
- }
83
- }
84
-
85
- const syncTriggerClass = (trigger, styleClass, action) => {
86
- if (action === 'add') {
87
- if (!trigger.classList.contains(styleClass)) {
88
- trigger.classList.add(styleClass)
89
- }
90
- } else {
91
- if (trigger.classList.contains(styleClass)) {
92
- trigger.classList.remove(styleClass)
93
- }
94
- }
95
- }
96
-
97
- const syncEllipsisStyle = (trigger) => {
98
- if (!trigger) return
99
- const latestStyle = ellipsisStyleRef.value
100
- const lineClampClass = jEllipsisLineClampClass
101
- if (props.lineClamp !== undefined) {
102
- syncTriggerClass(trigger, lineClampClass, 'add')
103
- } else {
104
- syncTriggerClass(trigger, lineClampClass, 'remove')
105
- }
106
- for (const key in latestStyle) {
107
- if ((trigger.style )[key] !== (latestStyle )[key]) {
108
- ;(trigger.style )[key] = (latestStyle )[key]
109
- }
110
- }
111
- }
112
-
113
- const syncCursorStyle = (trigger, tooltipDisabled) => {
114
- if (props.expandTrigger === 'click' && !tooltipDisabled) {
115
- syncTriggerClass(trigger, jEllipsisCursorClass, 'add')
116
- } else {
117
- syncTriggerClass(trigger, jEllipsisCursorClass, 'remove')
118
- }
119
- }
120
-
121
- const getTooltipDisabled = () => {
122
- let tooltipDisabled = false
123
- const { value: expanded } = expandedRef
124
- if (expanded) return true
125
- const { value: trigger } = triggerRef
126
- if (trigger) {
127
- syncEllipsisStyle(trigger)
128
- tooltipDisabled = trigger.scrollHeight <= trigger.offsetHeight
129
- syncCursorStyle(trigger, tooltipDisabled)
130
- }
131
- return tooltipDisabled
132
- }
133
-
134
- return {
135
- jEllipsis,
136
- jEllipsisCursorClass,
137
- jEllipsisLineClampClass,
138
- hashId,
139
- tooltipRef,
140
- triggerRef,
141
- visible,
142
- handleClickRef,
143
- triggerAttrs,
144
- showTooltip,
145
- getTooltipDisabled
146
- }
147
- }
148
- })
1
+ import { defineComponent, computed, ref, useAttrs, mergeProps } from 'vue';
2
+ import { Tooltip } from 'ant-design-vue';
3
+ import useEllipsisStyle from './style';
4
+ const jEllipsis = 'j-ellipsis';
5
+ const jEllipsisCursorClass = 'j-ellipsis-cursor';
6
+ const jEllipsisLineClampClass = 'j-ellipsis-line-clamp';
7
+ export default defineComponent({
8
+ name: 'JEllipsis',
9
+ components: {
10
+ Tooltip
11
+ },
12
+ props: {
13
+ expandTrigger: {
14
+ type: String,
15
+ default: undefined
16
+ },
17
+ /** multiline ellipsis */
18
+ lineClamp: {
19
+ type: [Number, String],
20
+ default: 1
21
+ },
22
+ tooltip: {
23
+ type: [Boolean, Object],
24
+ default: true
25
+ }
26
+ },
27
+ setup(props) {
28
+ const prefixCls = computed(() => 'j-ellipsis');
29
+ const [wrapSSR, hashId] = useEllipsisStyle(prefixCls);
30
+
31
+ // define class name
32
+ const expandedRef = ref(false);
33
+ const tooltipRef = ref(null);
34
+ const triggerRef = ref(null);
35
+ const visible = ref(false);
36
+ const attrs = useAttrs();
37
+ const handleClickRef = computed(() => {
38
+ return props.expandTrigger === 'click' ? () => {
39
+ const {
40
+ value: expanded
41
+ } = expandedRef;
42
+ expandedRef.value = !expanded;
43
+ } : undefined;
44
+ });
45
+ const ellipsisStyleRef = computed(() => {
46
+ const {
47
+ lineClamp
48
+ } = props;
49
+ const {
50
+ value: expanded
51
+ } = expandedRef;
52
+ if (lineClamp !== undefined) {
53
+ return {
54
+ textOverflow: '',
55
+ '-webkit-line-clamp': expanded ? '' : lineClamp
56
+ };
57
+ } else {
58
+ return {
59
+ textOverflow: expanded ? '' : 'ellipsis',
60
+ '-webkit-line-clamp': ''
61
+ };
62
+ }
63
+ });
64
+ function triggerAttrs() {
65
+ return {
66
+ ...mergeProps(attrs, {
67
+ class: [jEllipsis, props.lineClamp !== undefined ? jEllipsisLineClampClass : undefined, props.expandTrigger === 'click' ? jEllipsisCursorClass : undefined, hashId.value],
68
+ style: ellipsisStyleRef.value
69
+ })
70
+ };
71
+ }
72
+ const showTooltip = () => {
73
+ const {
74
+ value: trigger
75
+ } = triggerRef;
76
+ if (trigger) {
77
+ visible.value = trigger.scrollHeight > trigger.offsetHeight;
78
+ }
79
+ };
80
+ const syncTriggerClass = (trigger, styleClass, action) => {
81
+ if (action === 'add') {
82
+ if (!trigger.classList.contains(styleClass)) {
83
+ trigger.classList.add(styleClass);
84
+ }
85
+ } else {
86
+ if (trigger.classList.contains(styleClass)) {
87
+ trigger.classList.remove(styleClass);
88
+ }
89
+ }
90
+ };
91
+ const syncEllipsisStyle = trigger => {
92
+ if (!trigger) return;
93
+ const latestStyle = ellipsisStyleRef.value;
94
+ const lineClampClass = jEllipsisLineClampClass;
95
+ if (props.lineClamp !== undefined) {
96
+ syncTriggerClass(trigger, lineClampClass, 'add');
97
+ } else {
98
+ syncTriggerClass(trigger, lineClampClass, 'remove');
99
+ }
100
+ for (const key in latestStyle) {
101
+ if (trigger.style[key] !== latestStyle[key]) {
102
+ ;
103
+ trigger.style[key] = latestStyle[key];
104
+ }
105
+ }
106
+ };
107
+ const syncCursorStyle = (trigger, tooltipDisabled) => {
108
+ if (props.expandTrigger === 'click' && !tooltipDisabled) {
109
+ syncTriggerClass(trigger, jEllipsisCursorClass, 'add');
110
+ } else {
111
+ syncTriggerClass(trigger, jEllipsisCursorClass, 'remove');
112
+ }
113
+ };
114
+ const getTooltipDisabled = () => {
115
+ let tooltipDisabled = false;
116
+ const {
117
+ value: expanded
118
+ } = expandedRef;
119
+ if (expanded) return true;
120
+ const {
121
+ value: trigger
122
+ } = triggerRef;
123
+ if (trigger) {
124
+ syncEllipsisStyle(trigger);
125
+ tooltipDisabled = trigger.scrollHeight <= trigger.offsetHeight;
126
+ syncCursorStyle(trigger, tooltipDisabled);
127
+ }
128
+ return tooltipDisabled;
129
+ };
130
+ return {
131
+ jEllipsis,
132
+ jEllipsisCursorClass,
133
+ jEllipsisLineClampClass,
134
+ hashId,
135
+ tooltipRef,
136
+ triggerRef,
137
+ visible,
138
+ handleClickRef,
139
+ triggerAttrs,
140
+ showTooltip,
141
+ getTooltipDisabled
142
+ };
143
+ }
144
+ });
@@ -1,63 +1,57 @@
1
- import { defineComponent as _defineComponent } from 'vue'
2
- import { unref as _unref, renderSlot as _renderSlot, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue"
3
-
4
- import { useSlots } from 'vue'
5
- import { Empty } from 'ant-design-vue'
6
- import NoData from './image'
7
- import { omit } from 'lodash-es'
8
- import { useLocaleReceiver } from '../LocaleReciver'
9
- import LocaleProvider from '../LocaleProvider'
10
-
11
-
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, renderSlot as _renderSlot, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
+ import { useSlots } from 'vue';
4
+ import { Empty } from 'ant-design-vue';
5
+ import NoData from './image';
6
+ import { omit } from 'lodash-es';
7
+ import { useLocaleReceiver } from '../LocaleReciver';
8
+ import LocaleProvider from '../LocaleProvider';
12
9
  const __sfc_main__ = _defineComponent({
13
- ...{
14
- name: 'JEmpty'
15
- },
10
+ ...{
11
+ name: 'JEmpty'
12
+ },
16
13
  __name: 'Empty',
17
- props: {
18
- description: {
19
- type: String
20
- },
21
- image: {
22
- type: String,
23
- default: NoData
24
- },
25
- imageStyle: {
26
- type: Object,
27
- default: () => {
28
- return { height: '60px' }
29
- }
30
- }
31
- },
14
+ props: {
15
+ description: {
16
+ type: String
17
+ },
18
+ image: {
19
+ type: String,
20
+ default: NoData
21
+ },
22
+ imageStyle: {
23
+ type: Object,
24
+ default: () => {
25
+ return {
26
+ height: '60px'
27
+ };
28
+ }
29
+ }
30
+ },
32
31
  setup(__props) {
33
-
34
-
35
-
36
- const props = __props
37
-
38
- const slots = useSlots()
39
- const renderArr = Object.keys(slots)
40
- const [contextLocale] = useLocaleReceiver('Empty')
41
- const baseProps = omit({ ...props, description: props.description || contextLocale.value.description }, ...renderArr)
42
-
43
- return (_ctx,_cache) => {
44
- return (_openBlock(), _createBlock(_unref(LocaleProvider), null, {
45
- default: _withCtx(() => [
46
- _createVNode(_unref(Empty), _normalizeProps(_guardReactiveProps(_unref(baseProps))), _createSlots({ _: 2 /* DYNAMIC */ }, [
47
- _renderList(_unref(renderArr), (item) => {
32
+ const props = __props;
33
+ const slots = useSlots();
34
+ const renderArr = Object.keys(slots);
35
+ const [contextLocale] = useLocaleReceiver('Empty');
36
+ const baseProps = omit({
37
+ ...props,
38
+ description: props.description || contextLocale.value.description
39
+ }, ...renderArr);
40
+ return (_ctx, _cache) => {
41
+ return _openBlock(), _createBlock(_unref(LocaleProvider), null, {
42
+ default: _withCtx(() => [_createVNode(_unref(Empty), _normalizeProps(_guardReactiveProps(_unref(baseProps))), _createSlots({
43
+ _: 2 /* DYNAMIC */
44
+ }, [_renderList(_unref(renderArr), item => {
48
45
  return {
49
46
  name: item,
50
- fn: _withCtx((scope) => [
51
- _renderSlot(_ctx.$slots, item, { scope: scope })
52
- ])
53
- }
54
- })
55
- ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */)
56
- ]),
57
- _: 3 /* FORWARDED */
58
- }))
59
- }
60
- }
61
-
62
- })
47
+ fn: _withCtx(scope => [_renderSlot(_ctx.$slots, item, {
48
+ scope: scope
49
+ })])
50
+ };
51
+ })]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */)]),
52
+ _: 3 /* FORWARDED */
53
+ });
54
+ };
55
+ }
56
+ });
63
57
  export default __sfc_main__;