@ebiz/designer-components 0.0.19-beta.15 → 0.0.19-beta.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebiz/designer-components",
3
- "version": "0.0.19-beta.15",
3
+ "version": "0.0.19-beta.16",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1,108 @@
1
+ <template>
2
+ <t-loading :delay="delay" :duration="duration" :indicator="indicator" :inherit-color="inheritColor" :layout="layout"
3
+ :loading="loading" :loading-props="loadingProps" :pause="pause" :reverse="reverse" :show-overlay="showOverlay"
4
+ :size="size" :text="text" :theme="theme">
5
+ <!-- 默认插槽 -->
6
+ <slot></slot>
7
+
8
+ <!-- 文本内容插槽 -->
9
+ <template v-if="$slots.text" #text>
10
+ <slot name="text"></slot>
11
+ </template>
12
+
13
+ <!-- 加载指示器插槽 -->
14
+ <template v-if="$slots.indicator" #indicator>
15
+ <slot name="indicator"></slot>
16
+ </template>
17
+
18
+ <!-- 加载内容插槽 -->
19
+ <template v-if="$slots.content" #content>
20
+ <slot name="content"></slot>
21
+ </template>
22
+ </t-loading>
23
+ </template>
24
+
25
+ <script>
26
+ export default {
27
+ name: "EbizTdesignLoading"
28
+ }
29
+ </script>
30
+
31
+ <script setup>
32
+ import { defineProps } from 'vue';
33
+ import { Loading as TLoading } from 'tdesign-vue-next';
34
+
35
+ const props = defineProps({
36
+ // 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒
37
+ delay: {
38
+ type: Number,
39
+ default: 0
40
+ },
41
+ // 加载动画执行完成一次的时间,单位:毫秒
42
+ duration: {
43
+ type: Number,
44
+ default: 800
45
+ },
46
+ // 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符
47
+ indicator: {
48
+ type: [Boolean, Function],
49
+ default: true
50
+ },
51
+ // 是否继承父元素颜色
52
+ inheritColor: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ // 对齐方式
57
+ layout: {
58
+ type: String,
59
+ default: 'horizontal',
60
+ validator: (val) => ['horizontal', 'vertical'].includes(val)
61
+ },
62
+ // 是否处于加载状态
63
+ loading: {
64
+ type: Boolean,
65
+ default: true
66
+ },
67
+ // 透传加载组件全部属性
68
+ loadingProps: {
69
+ type: Object,
70
+ default: () => ({})
71
+ },
72
+ // 是否暂停动画
73
+ pause: {
74
+ type: Boolean,
75
+ default: false
76
+ },
77
+ // 加载动画是否反向
78
+ reverse: {
79
+ type: Boolean,
80
+ default: false
81
+ },
82
+ // 是否需要遮罩层
83
+ showOverlay: {
84
+ type: Boolean,
85
+ default: true
86
+ },
87
+ // 尺寸,示例:small/medium/large/12px/56px
88
+ size: {
89
+ type: String,
90
+ default: 'medium'
91
+ },
92
+ // 加载提示文案
93
+ text: {
94
+ type: String,
95
+ default: ''
96
+ },
97
+ // 加载组件类型
98
+ theme: {
99
+ type: String,
100
+ default: 'circular',
101
+ validator: (val) => ['circular', 'spinner', 'dots', 'bar'].includes(val)
102
+ }
103
+ });
104
+ </script>
105
+
106
+ <style lang="less" scoped>
107
+ /* 自定义样式 */
108
+ </style>
package/src/index.js CHANGED
@@ -57,6 +57,7 @@ import EbizTreeSelector from './components/EbizTreeSelector.vue';
57
57
  import EbizTimePicker from './components/EbizTimePicker.vue';
58
58
  import EbizPopconfirm from './components/EbizPopconfirm.vue';
59
59
  import EbizTreeMergeTable from './components/EbizTreeMergeTable.vue';
60
+ import EbizTdesignLoading from './components/EbizTdesignLoading.vue';
60
61
  import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
61
62
 
62
63
  // import EbizDescriptions from './components/EbizDescriptions.vue';
@@ -181,5 +182,6 @@ export {
181
182
  // 新增 EbizDescriptions 和 EbizDescriptionsItem
182
183
  EbizDescriptions,
183
184
  EbizDescriptionsItem,
184
- TDescriptionsItem
185
+ TDescriptionsItem,
186
+ EbizTdesignLoading
185
187
  };