xianniu-ui 0.1.3 → 0.1.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 (81) hide show
  1. package/lib/style/basic.css +1 -0
  2. package/lib/style/city.css +1 -0
  3. package/lib/style/date.css +1 -0
  4. package/lib/style/flex.css +1 -0
  5. package/lib/style/import.css +1 -0
  6. package/lib/style/index.css +1 -1
  7. package/{src → lib/style}/theme/element-variables.scss +2 -4
  8. package/{src → lib/style}/theme/index.scss +0 -0
  9. package/{src → lib/style}/theme/mixin.scss +0 -0
  10. package/{src → lib/style}/theme/sidebar.scss +0 -0
  11. package/lib/style/theme/theme.scss +4 -0
  12. package/{src → lib/style}/theme/transition.scss +0 -0
  13. package/{src → lib/style}/theme/variables.scss +0 -0
  14. package/lib/style/upload.css +1 -0
  15. package/lib/xianniu-ui.common.js +25504 -18072
  16. package/lib/xianniu-ui.css +1 -0
  17. package/lib/xianniu-ui.umd.js +25508 -18076
  18. package/lib/xianniu-ui.umd.min.js +1 -9
  19. package/package.json +63 -62
  20. package/packages/city/index.js +7 -0
  21. package/packages/city/main.vue +258 -0
  22. package/packages/date/index.js +7 -0
  23. package/packages/date/main.vue +348 -0
  24. package/packages/dialog/!main.vue +90 -0
  25. package/packages/dialog/main.vue +37 -57
  26. package/packages/drawer/index.js +7 -0
  27. package/packages/drawer/main.vue +65 -0
  28. package/packages/empty/index.js +7 -0
  29. package/packages/empty/main.vue +33 -0
  30. package/packages/export/index.js +7 -0
  31. package/packages/export/main.vue +99 -0
  32. package/packages/import/index.js +7 -0
  33. package/packages/import/main.vue +135 -0
  34. package/packages/inputRange/index.js +7 -0
  35. package/packages/inputRange/main.vue +15 -0
  36. package/packages/page/main.vue +5 -5
  37. package/packages/search/index.js +7 -0
  38. package/packages/search/main.vue +230 -0
  39. package/packages/style/lib/basic.css +1 -0
  40. package/packages/style/lib/city.css +1 -0
  41. package/packages/style/lib/date.css +1 -0
  42. package/packages/style/lib/flex.css +1 -0
  43. package/packages/style/lib/import.css +1 -0
  44. package/packages/style/lib/index.css +1 -1
  45. package/packages/style/lib/upload.css +1 -0
  46. package/packages/style/src/basic.scss +64 -0
  47. package/packages/style/src/city.scss +3 -0
  48. package/packages/style/src/date.scss +5 -0
  49. package/packages/style/src/flex.scss +74 -0
  50. package/packages/style/src/import.scss +37 -0
  51. package/packages/style/src/index.scss +9 -1
  52. package/packages/style/src/mixin/mixin.scss +270 -0
  53. package/packages/style/src/search.scss +17 -0
  54. package/packages/style/src/table.scss +36 -4
  55. package/packages/style/src/theme/element-variables.scss +26 -0
  56. package/packages/style/src/theme/index.scss +1 -0
  57. package/packages/style/src/theme/mixin.scss +270 -0
  58. package/packages/style/src/theme/sidebar.scss +271 -0
  59. package/packages/style/src/theme/theme.scss +4 -0
  60. package/packages/style/src/theme/transition.scss +52 -0
  61. package/packages/style/src/theme/variables.scss +36 -0
  62. package/packages/style/src/tip.scss +22 -0
  63. package/packages/style/src/tree.scss +87 -0
  64. package/packages/style/src/upload.scss +46 -0
  65. package/packages/table/column.vue +42 -23
  66. package/packages/table/main.vue +126 -35
  67. package/packages/tip/index.js +7 -0
  68. package/packages/tip/main.vue +22 -0
  69. package/packages/tree/index.js +7 -0
  70. package/packages/tree/main.vue +192 -0
  71. package/packages/upload/index.js +7 -0
  72. package/packages/upload/main.vue +346 -0
  73. package/packages/upload/upload-pop.vue +49 -0
  74. package/packages/upload/upload-slot.vue +0 -0
  75. package/src/index.js +23 -3
  76. package/src/plugins/index.js +1 -1
  77. package/src/utils/format.js +119 -106
  78. package/src/utils/index.js +0 -2
  79. package/src/utils/reg.js +7 -1
  80. package/src/utils/utils.js +76 -10
  81. package/src/utils/lodash.js +0 -2
@@ -0,0 +1,348 @@
1
+ <template>
2
+ <div class="xn-date">
3
+ <template v-if="mode === 'range'">
4
+ <el-date-picker
5
+ :value="value"
6
+ :type="type"
7
+ align="right"
8
+ v-bind="$attrs"
9
+ v-on="$listeners"
10
+ :placeholder="placeholder"
11
+ :start-placeholder="startPlaceholder"
12
+ :end-placeholder="endPlaceholder"
13
+ :picker-options="pickerOpts"
14
+ :format="format ? format : _format.format"
15
+ :value-format="valueFormat ? valueFormat : _format.valueFormat"
16
+ :style="styles"
17
+ :default-time="defaultTime"
18
+ :disabled="disabled"
19
+ :readonly="readonly"
20
+ :clearable="clearable"
21
+ @input="onChange"
22
+ />
23
+ </template>
24
+ <template v-if="mode === 'group'">
25
+ <div class="xn-date-group">
26
+ <el-date-picker
27
+ v-model="startTime"
28
+ class="xn-date-group--item"
29
+ :type="type"
30
+ v-bind="$attrs"
31
+ v-on="$listeners"
32
+ placeholder="开始日期"
33
+ :disabled="disabled"
34
+ :readonly="readonly"
35
+ :clearable="clearable"
36
+ :format="format ? format : _format.format"
37
+ :value-format="valueFormat ? valueFormat : _format.valueFormat"
38
+ :picker-options="groupPickerOptions"
39
+ @change="onChangeStart"
40
+ />
41
+ <span class="xn-date-group--separator">-</span>
42
+ <el-date-picker
43
+ v-model="endTime"
44
+ class="xn-date-group--item"
45
+ :type="type"
46
+ v-bind="$attrs"
47
+ v-on="$listeners"
48
+ placeholder="结束日期"
49
+ :disabled="disabled"
50
+ :readonly="readonly"
51
+ :clearable="clearable"
52
+ :picker-options="groupEndPickerOptions"
53
+ :format="format ? format : _format.format"
54
+ :value-format="valueFormat ? valueFormat : _format.valueFormat"
55
+ @change="onChangeEnd"
56
+ />
57
+ </div>
58
+ </template>
59
+ </div>
60
+ </template>
61
+
62
+ <script>
63
+ export default {
64
+ name: "XnDate",
65
+ model: {
66
+ prop: "value",
67
+ event: "on-change",
68
+ },
69
+ props: {
70
+ /**
71
+ * 显示类型
72
+ * https://element.eleme.cn/#/zh-CN/component/datetime-picker
73
+ * year/month/date/week/ datetime/datetimerange/daterange
74
+ */
75
+ type: {
76
+ type: String,
77
+ default: "daterange",
78
+ },
79
+ placeholder: {
80
+ type: String,
81
+ default: "请选择",
82
+ },
83
+ value: {
84
+ type: [String, Array],
85
+ default: () => [],
86
+ },
87
+ disabled: {
88
+ type: Boolean,
89
+ default: false,
90
+ },
91
+ readonly: {
92
+ type: Boolean,
93
+ default: false,
94
+ },
95
+ clearable: {
96
+ type: Boolean,
97
+ default: true,
98
+ },
99
+ // 显示的格式
100
+ format: {
101
+ type: String,
102
+ default: "",
103
+ },
104
+ // 值的格式
105
+ valueFormat: {
106
+ type: String,
107
+ default: "",
108
+ },
109
+ // 开启快捷选项
110
+ isShortcut: {
111
+ type: Boolean,
112
+ default: false,
113
+ },
114
+ firstDayOfWeek: {
115
+ type: Number,
116
+ default: 1,
117
+ },
118
+ startPlaceholder: {
119
+ type: String,
120
+ default: "开始日期",
121
+ },
122
+ endPlaceholder: {
123
+ type: String,
124
+ default: "结束日期",
125
+ },
126
+ defaultTime: {
127
+ type: [String, Array],
128
+ default: null,
129
+ },
130
+ isDisabledBefore: {
131
+ type: Boolean,
132
+ default: false,
133
+ },
134
+ mode: {
135
+ type: String,
136
+ default: "range",
137
+ validator: (val) => {
138
+ return ["range", "group"].indexOf(val) !== -1;
139
+ },
140
+ },
141
+ },
142
+ data() {
143
+ return {
144
+ startTime: "",
145
+ endTime: "",
146
+ groupPickerOptions: {
147
+ disabledDate: (time) => {
148
+ if (this.endTime !== "" && this.endTime != null) {
149
+ // return time.getTime() > new Date(this.endTime);
150
+ } else {
151
+ return time.getTime() < new Date(this.endTime);
152
+ }
153
+ },
154
+ },
155
+ groupEndPickerOptions: {
156
+ disabledDate: (time) => {
157
+ if (this.startTime !== "") {
158
+ return (
159
+ time.getTime() <=
160
+ new Date(this.startTime).getTime() - 3600 * 1000 * 24
161
+ );
162
+ }
163
+ },
164
+ },
165
+ pickerOptionsDate: {
166
+ disabledDate: (time) => {
167
+ return this.isDisabledBefore
168
+ ? time.getTime() < Date.now() - 1 * 24 * 3600 * 1000
169
+ : false;
170
+ },
171
+ },
172
+ pickerOptionsPlug: {
173
+ shortcuts: [
174
+ {
175
+ text: "昨天",
176
+ onClick(picker) {
177
+ const start = new Date();
178
+ start.setTime(start.getTime() - 3600 * 1000 * 24);
179
+ picker.$emit("pick", [start, start]);
180
+ },
181
+ },
182
+ {
183
+ text: "最近一周",
184
+ onClick(picker) {
185
+ const end = new Date();
186
+ const start = new Date();
187
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
188
+ picker.$emit("pick", [start, end]);
189
+ },
190
+ },
191
+ {
192
+ text: "最近一个月",
193
+ onClick(picker) {
194
+ const end = new Date();
195
+ const start = new Date();
196
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
197
+ picker.$emit("pick", [start, end]);
198
+ },
199
+ },
200
+ {
201
+ text: "最近三个月",
202
+ onClick(picker) {
203
+ const end = new Date();
204
+ const start = new Date();
205
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
206
+ picker.$emit("pick", [start, end]);
207
+ },
208
+ },
209
+ {
210
+ text: "最近六个月",
211
+ onClick(picker) {
212
+ const end = new Date();
213
+ const start = new Date();
214
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
215
+ picker.$emit("pick", [start, end]);
216
+ },
217
+ },
218
+ {
219
+ text: "最近十二个月",
220
+ onClick(picker) {
221
+ const end = new Date();
222
+ const start = new Date();
223
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 360);
224
+ picker.$emit("pick", [start, end]);
225
+ },
226
+ },
227
+ ],
228
+ },
229
+ };
230
+ },
231
+ watch: {
232
+ value: {
233
+ handler(n) {
234
+ if (this.mode === "group") {
235
+ if (Array.isArray(n) && n.length) {
236
+ this.startTime = n[0];
237
+ this.endTime = n[1];
238
+ }
239
+ }
240
+ },
241
+ immediate: true,
242
+ },
243
+ },
244
+ computed: {
245
+ pickerOpts() {
246
+ var obj = {};
247
+ if (this.isShortcut) {
248
+ obj = Object.assign(obj, this.pickerOptionsPlug);
249
+ }
250
+ if (this.isDisabledBefore) {
251
+ obj = Object.assign(obj, this.pickerOptionsDate);
252
+ }
253
+ return obj;
254
+ },
255
+ styles() {
256
+ const _isRange = this.isRange(this.type);
257
+ return {
258
+ width: _isRange ? "100%" : "auto",
259
+ };
260
+ },
261
+ _format() {
262
+ const obj = {};
263
+ switch (this.type) {
264
+ case "date":
265
+ obj.format = "yyyy-MM-dd";
266
+ obj.valueFormat = "yyyy-MM-dd HH:mm:ss";
267
+ break;
268
+ case "week":
269
+ obj.format = "yyyy 第 WW 周";
270
+ obj.valueFormat = "yyyy-MM-dd";
271
+ break;
272
+ case "month":
273
+ obj.format = "yyyy-MM";
274
+ obj.valueFormat = "yyyy-MM";
275
+ break;
276
+ case "year":
277
+ obj.format = "yyyy";
278
+ obj.valueFormat = "yyyy";
279
+ break;
280
+ case "dates":
281
+ obj.format = "yyyy-MM-dd";
282
+ obj.valueFormat = "yyyy-MM-dd";
283
+ break;
284
+ case "datetime":
285
+ obj.format = "yyyy-MM-dd HH:mm:ss";
286
+ obj.valueFormat = "yyyy-MM-dd HH:mm:ss";
287
+ break;
288
+ case "datetimerange":
289
+ obj.format = "yyyy-MM-dd HH:mm:ss";
290
+ obj.valueFormat = "yyyy-MM-dd HH:mm:ss";
291
+ break;
292
+ case "daterange":
293
+ obj.format = "yyyy-MM-dd";
294
+ obj.valueFormat = "yyyy-MM-dd HH:mm:ss";
295
+ break;
296
+ case "monthrange":
297
+ obj.format = "yyyy-MM";
298
+ obj.valueFormat = "yyyy-MM";
299
+ break;
300
+ }
301
+ return obj;
302
+ },
303
+ isRange() {
304
+ return (type) => {
305
+ return ["datetimerange", "daterange", "monthrange"].includes(type);
306
+ };
307
+ },
308
+ },
309
+ methods: {
310
+ handleTime() {
311
+ const sUnix = this.$dayjs(this.startTime).unix();
312
+ const eUnix = this.$dayjs(this.endTime).unix();
313
+ if (sUnix > eUnix) {
314
+ this.endTime = "";
315
+ }
316
+ },
317
+ onChangeStart() {
318
+ if (this.mode === "group") {
319
+ if (this.startTime && this.endTime) {
320
+ this.handleTime();
321
+ this.$emit("on-change", [this.startTime, this.endTime]);
322
+ }
323
+ }
324
+ },
325
+ onChangeEnd() {
326
+ if (this.mode === "group") {
327
+ if (this.startTime && this.endTime) {
328
+ this.$emit("on-change", [this.startTime, this.endTime]);
329
+ }
330
+ }
331
+ },
332
+ onChange(value) {
333
+ if (
334
+ this.type === "datetimerange" ||
335
+ this.type === "daterange" ||
336
+ this.type === "monthrange"
337
+ ) {
338
+ const start = value && value.length ? value[0] : "";
339
+ const end = value && value.length ? value[1] : "";
340
+ this.$emit("on-format", { value, start: start || "", end: end || "" });
341
+ } else {
342
+ this.$emit("on-format", { value });
343
+ }
344
+ this.$emit("on-change", value || "");
345
+ },
346
+ },
347
+ };
348
+ </script>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <el-dialog
3
+ :visible.sync="dialogVisible"
4
+ v-bind="$attrs"
5
+ v-on="$listeners"
6
+ :before-close="onBeforeClose"
7
+ :width="$attrs.width ? $attrs.width : _width"
8
+ >
9
+ <slot />
10
+ <span slot="footer" class="text-right">
11
+ <slot name="footer">
12
+ <el-button @click="onClose">取消</el-button>
13
+ <el-button
14
+ v-if="$attrs['show-confirm']"
15
+ type="primary"
16
+ @click="onConfirm"
17
+ >{{ $attrs["confirm-text"] || "提交" }}</el-button
18
+ >
19
+ </slot>
20
+ </span>
21
+ </el-dialog>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ name: "XnDialog",
27
+ inheritAttrs: false,
28
+ props: {
29
+ show: {
30
+ type: Boolean,
31
+ default: false,
32
+ },
33
+ beforeClose: {
34
+ type: Function,
35
+ default: () => {},
36
+ },
37
+ },
38
+ created() {
39
+ console.log(this);
40
+ },
41
+ computed: {
42
+ _width() {
43
+ const arr = [
44
+ { label: "mini", value: "320px" },
45
+ { label: "small", value: "560px" },
46
+ { label: "medium", value: "720px" },
47
+ { label: "large", value: "960px" },
48
+ ];
49
+
50
+ var width = "";
51
+ arr.forEach((item) => {
52
+ if (item.label === this.$attrs.size || this.size) {
53
+ width = item.value;
54
+ }
55
+ });
56
+ return width;
57
+ },
58
+ dialogVisible: {
59
+ get() {
60
+ return this.show;
61
+ },
62
+ set(val) {
63
+ console.log('val: ', val);
64
+ this.$emit("on-visible", val);
65
+ },
66
+ },
67
+ },
68
+ data() {
69
+ return {};
70
+ },
71
+ methods: {
72
+ onClose() {
73
+ this.$emit("update:show", false);
74
+ },
75
+ onBeforeClose(){
76
+ if(this.beforeClose && typeof beforeClose === 'function'){
77
+ return this.beforeClose()
78
+ }else{
79
+ return this.onClose()
80
+ }
81
+ },
82
+ onConfirm() {
83
+ this.$emit("on-confirm");
84
+ },
85
+ },
86
+ };
87
+ </script>
88
+
89
+ <style>
90
+ </style>
@@ -2,15 +2,15 @@
2
2
  <el-dialog
3
3
  :title="title"
4
4
  :visible="show"
5
- :width="width ? width : styleWidth"
5
+ :width="width ? width : _width"
6
6
  :before-close="beforeClose"
7
- :show-close="false"
8
- :append-to-body="appendToBody"
9
7
  :top="top"
8
+ v-bind="$attrs"
9
+ v-on="$listeners"
10
10
  @open="$emit('on-open')"
11
11
  @opened="$emit('on-opened')"
12
12
  >
13
- <template #title>
13
+ <!-- <template #title>
14
14
  <div class="flex align-items-center justify-content-between">
15
15
  <div>
16
16
  <span class="el-dialog__title">{{ title }}</span>
@@ -22,15 +22,17 @@
22
22
  </div>
23
23
  </div>
24
24
  </div>
25
- </template>
25
+ </template> -->
26
26
  <slot />
27
-
28
27
  <span slot="footer">
29
28
  <slot name="footer">
30
29
  <el-button @click="onClose">取消</el-button>
31
- <el-button v-if="showConfirm" type="primary" @click="onConfirm">{{
32
- confirmText
33
- }}</el-button>
30
+ <el-button
31
+ v-if="$attrs['show-confirm'] !== false"
32
+ type="primary"
33
+ @click="onConfirm"
34
+ >{{ $attrs["confirm-text"] || "提交" }}</el-button
35
+ >
34
36
  </slot>
35
37
  </span>
36
38
  </el-dialog>
@@ -39,85 +41,63 @@
39
41
  <script>
40
42
  // 320 560 720 960
41
43
  export default {
42
- name: 'XnDialog',
44
+ name: "XnDialog",
45
+ inheritAttrs: false,
43
46
  props: {
44
47
  beforeClose: {
45
48
  type: Function,
46
- default: null
49
+ default: () => {},
47
50
  },
48
51
  top: {
49
52
  type: String,
50
- default: '15vh'
53
+ default: "15vh",
51
54
  },
52
55
  title: {
53
56
  type: String,
54
- default: ''
57
+ default: "",
55
58
  },
56
59
  width: {
57
60
  type: String,
58
- default: ''
61
+ default: "",
59
62
  },
60
63
  show: {
61
64
  type: Boolean,
62
- default: false
63
- },
64
- showConfirm: {
65
- type: Boolean,
66
- default: true
67
- },
68
- appendToBody: {
69
- type: Boolean,
70
- default: false
71
- },
72
- confirmText: {
73
- type: String,
74
- default: '确认'
75
- },
76
- drag: {
77
- type: Boolean,
78
- default: false
65
+ default: false,
79
66
  },
80
67
  size: {
81
68
  type: String,
82
- default: 'small'
83
- }
69
+ default: "small",
70
+ },
84
71
  },
85
72
  computed: {
86
- styleWidth() {
73
+ _width() {
87
74
  const arr = [
88
- { label: 'mini', value: '320px' },
89
- { label: 'small', value: '560px' },
90
- { label: 'medium', value: '720px' },
91
- { label: 'large', value: '960px' }
92
- ]
75
+ { label: "mini", value: "320px" },
76
+ { label: "small", value: "560px" },
77
+ { label: "medium", value: "720px" },
78
+ { label: "large", value: "960px" },
79
+ ];
93
80
 
94
- var width = ''
95
- arr.forEach(item => {
81
+ var width = "";
82
+ arr.forEach((item) => {
96
83
  if (item.label === this.size) {
97
- width = item.value
84
+ width = item.value;
98
85
  }
99
- })
100
- return width
101
- }
86
+ });
87
+ return width;
88
+ },
102
89
  },
103
90
 
104
91
  methods: {
105
92
  onClose() {
106
- console.log(this.beforeClose);
107
- if(this.beforeClose && typeof this.beforeClose === 'function'){
108
- this.beforeClose()
109
- return
110
- }
111
- this.$emit('update:show',false)
93
+ this.beforeClose();
112
94
  },
113
-
114
95
  onConfirm() {
115
- this.$emit('on-confirm')
116
- }
117
- }
118
- }
96
+ this.$emit("on-confirm");
97
+ },
98
+ },
99
+ };
119
100
  </script>
120
101
 
121
102
  <style lang="scss" scoped>
122
-
123
103
  </style>
@@ -0,0 +1,7 @@
1
+ import XnDrawer from './main.vue'
2
+
3
+ XnDrawer.install = function (Vue) {
4
+ Vue.component(XnDrawer.name, XnDrawer)
5
+ }
6
+
7
+ export default XnDrawer
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <el-drawer
3
+ :title="title"
4
+ :visible.sync="show"
5
+ direction="rtl"
6
+ :size="size"
7
+ custom-class="drawer-body"
8
+ :before-close="beforeClose"
9
+ v-bind="$attrs"
10
+ v-on="$listeners"
11
+ @open="$emit('on-open')"
12
+ @opened="$emit('on-opened')"
13
+ >
14
+ <div class="drawer-content">
15
+ <slot />
16
+ </div>
17
+ <div class="drawer-footer" :class="`text-${align}`">
18
+ <slot name="footer">
19
+ <el-button @click="onClose">关闭</el-button>
20
+ </slot>
21
+ </div>
22
+ </el-drawer>
23
+ </template>
24
+
25
+ <script>
26
+ export default {
27
+ name: "XnDrawer",
28
+ props: {
29
+ show: Boolean,
30
+ title: {
31
+ type: String,
32
+ default: "",
33
+ },
34
+ size: {
35
+ type: String,
36
+ default: "70%",
37
+ },
38
+ beforeClose: {
39
+ type: Function,
40
+ default: () => {},
41
+ },
42
+ align: {
43
+ type: String,
44
+ default: "left",
45
+ validator: (val)=>{
46
+ return ['left','center','right'].includes(val)
47
+ }
48
+ },
49
+ },
50
+ methods: {
51
+ onClose() {
52
+ this.beforeClose();
53
+ },
54
+ },
55
+ };
56
+ </script>
57
+
58
+ <style scope lang="scss">
59
+ /* 解决弹出层双滚动条 */
60
+ .drawer-body {
61
+ .el-drawer__body {
62
+ overflow: hidden;
63
+ }
64
+ }
65
+ </style>
@@ -0,0 +1,7 @@
1
+ import XnEmpty from './main.vue'
2
+
3
+ XnEmpty.install = function (Vue) {
4
+ Vue.component(XnEmpty.name, XnEmpty)
5
+ }
6
+
7
+ export default XnEmpty
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="xn-empty">
3
+ <el-empty v-bind="$attrs" v-on="$listeners" :image-size="size" :description="desc" :image="image">
4
+ <slot name="default"></slot>
5
+ <slot name="image"></slot>
6
+ <slot name="description"></slot>
7
+ </el-empty>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: "XnEmpty",
14
+ props: {
15
+ size: {
16
+ type: Number,
17
+ default: 80,
18
+ },
19
+ image: {
20
+ type: String,
21
+ default: "",
22
+ },
23
+ desc: {
24
+ type: String,
25
+ default: "暂无数据",
26
+ },
27
+ },
28
+ };
29
+ </script>
30
+
31
+ <style lang="scss" scoped>
32
+
33
+ </style>