@bdsoft/element 1.1.9 → 1.1.12

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 (244) hide show
  1. package/dist/BdElement.js +23111 -0
  2. package/index.js +11 -11
  3. package/package.json +2 -1
  4. package/global/index.ts +0 -6
  5. package/global/register-properties.ts +0 -10
  6. package/index.html +0 -13
  7. package/package-form/core/components/formCreate.js +0 -274
  8. package/package-form/core/components/fragment.js +0 -12
  9. package/package-form/core/factory/context.js +0 -257
  10. package/package-form/core/factory/creator.js +0 -63
  11. package/package-form/core/factory/maker.js +0 -17
  12. package/package-form/core/factory/manager.js +0 -79
  13. package/package-form/core/factory/node.js +0 -85
  14. package/package-form/core/factory/parser.js +0 -28
  15. package/package-form/core/frame/api.js +0 -599
  16. package/package-form/core/frame/attrs.js +0 -12
  17. package/package-form/core/frame/dataDriver.js +0 -76
  18. package/package-form/core/frame/fetch.js +0 -119
  19. package/package-form/core/frame/formCreate.js +0 -274
  20. package/package-form/core/frame/index.js +0 -760
  21. package/package-form/core/frame/provider.js +0 -288
  22. package/package-form/core/frame/util.js +0 -274
  23. package/package-form/core/handler/context.js +0 -380
  24. package/package-form/core/handler/effect.js +0 -122
  25. package/package-form/core/handler/index.js +0 -111
  26. package/package-form/core/handler/inject.js +0 -145
  27. package/package-form/core/handler/input.js +0 -197
  28. package/package-form/core/handler/lifecycle.js +0 -43
  29. package/package-form/core/handler/loader.js +0 -373
  30. package/package-form/core/handler/page.js +0 -46
  31. package/package-form/core/handler/render.js +0 -29
  32. package/package-form/core/index.js +0 -12
  33. package/package-form/core/package.json +0 -15
  34. package/package-form/core/parser/html.js +0 -17
  35. package/package-form/core/render/cache.js +0 -47
  36. package/package-form/core/render/index.js +0 -31
  37. package/package-form/core/render/render.js +0 -393
  38. package/package-form/element-form/components/checkbox/package.json +0 -17
  39. package/package-form/element-form/components/checkbox/src/component.jsx +0 -110
  40. package/package-form/element-form/components/checkbox/src/index.js +0 -3
  41. package/package-form/element-form/components/frame/package.json +0 -17
  42. package/package-form/element-form/components/frame/src/IconCircleClose.vue +0 -14
  43. package/package-form/element-form/components/frame/src/IconDelete.vue +0 -12
  44. package/package-form/element-form/components/frame/src/IconDocument.vue +0 -12
  45. package/package-form/element-form/components/frame/src/IconFolderOpened.vue +0 -12
  46. package/package-form/element-form/components/frame/src/IconView.vue +0 -12
  47. package/package-form/element-form/components/frame/src/component.jsx +0 -349
  48. package/package-form/element-form/components/frame/src/index.js +0 -3
  49. package/package-form/element-form/components/frame/src/style.css +0 -66
  50. package/package-form/element-form/components/group/package.json +0 -17
  51. package/package-form/element-form/components/group/src/component.jsx +0 -314
  52. package/package-form/element-form/components/group/src/index.js +0 -3
  53. package/package-form/element-form/components/group/src/style.css +0 -125
  54. package/package-form/element-form/components/index.js +0 -22
  55. package/package-form/element-form/components/radio/package.json +0 -17
  56. package/package-form/element-form/components/radio/src/component.jsx +0 -101
  57. package/package-form/element-form/components/radio/src/index.js +0 -3
  58. package/package-form/element-form/components/select/package.json +0 -17
  59. package/package-form/element-form/components/select/src/component.jsx +0 -52
  60. package/package-form/element-form/components/select/src/index.js +0 -3
  61. package/package-form/element-form/components/subform/package.json +0 -14
  62. package/package-form/element-form/components/subform/src/component.jsx +0 -76
  63. package/package-form/element-form/components/subform/src/index.js +0 -3
  64. package/package-form/element-form/components/tree/package.json +0 -17
  65. package/package-form/element-form/components/tree/src/component.jsx +0 -62
  66. package/package-form/element-form/components/tree/src/index.js +0 -3
  67. package/package-form/element-form/components/upload/package.json +0 -17
  68. package/package-form/element-form/components/upload/src/IconUpload.vue +0 -12
  69. package/package-form/element-form/components/upload/src/component.jsx +0 -129
  70. package/package-form/element-form/components/upload/src/index.js +0 -3
  71. package/package-form/element-form/components/upload/src/style.css +0 -11
  72. package/package-form/element-form/index.js +0 -8
  73. package/package-form/element-form/package.json +0 -16
  74. package/package-form/element-form/src/components/icon/IconWarning.vue +0 -12
  75. package/package-form/element-form/src/components/index.js +0 -22
  76. package/package-form/element-form/src/core/alias.js +0 -34
  77. package/package-form/element-form/src/core/api.js +0 -208
  78. package/package-form/element-form/src/core/config.js +0 -62
  79. package/package-form/element-form/src/core/index.js +0 -60
  80. package/package-form/element-form/src/core/maker.js +0 -76
  81. package/package-form/element-form/src/core/manager.js +0 -315
  82. package/package-form/element-form/src/core/provider.js +0 -79
  83. package/package-form/element-form/src/parsers/datePicker.js +0 -31
  84. package/package-form/element-form/src/parsers/hidden.js +0 -12
  85. package/package-form/element-form/src/parsers/index.js +0 -17
  86. package/package-form/element-form/src/parsers/input.js +0 -21
  87. package/package-form/element-form/src/parsers/row.js +0 -10
  88. package/package-form/element-form/src/parsers/select.js +0 -15
  89. package/package-form/element-form/src/parsers/slider.js +0 -21
  90. package/package-form/element-form/src/parsers/timePicker.js +0 -17
  91. package/package-form/element-form/src/style/index.css +0 -52
  92. package/src/App.vue +0 -28
  93. package/src/assets/css/element.scss +0 -196
  94. package/src/assets/css/layout.scss +0 -215
  95. package/src/assets/css/tailwind.scss +0 -67
  96. package/src/assets/images/banner.gif +0 -0
  97. package/src/assets/images/banner.png +0 -0
  98. package/src/assets/images/bg1.svg +0 -22
  99. package/src/assets/images/bg2.png +0 -0
  100. package/src/assets/images/ff.png +0 -0
  101. package/src/assets/images/home-file1.png +0 -0
  102. package/src/assets/images/ky.png +0 -0
  103. package/src/assets/images/menu/add.png +0 -0
  104. package/src/assets/images/menu/del.png +0 -0
  105. package/src/assets/images/menu/down.png +0 -0
  106. package/src/assets/images/menu/dr.png +0 -0
  107. package/src/assets/images/menu/edit.png +0 -0
  108. package/src/assets/images/menu/kx.png +0 -0
  109. package/src/assets/images/menu/mb.png +0 -0
  110. package/src/assets/images/menu/pz.png +0 -0
  111. package/src/assets/images/menu/save.png +0 -0
  112. package/src/assets/images/menu/sj.png +0 -0
  113. package/src/assets/images/menu/sjk.png +0 -0
  114. package/src/assets/images/menu/up.png +0 -0
  115. package/src/assets/images/po-i.png +0 -0
  116. package/src/assets/images/po1-i1.png +0 -0
  117. package/src/assets/images/po1-i2.png +0 -0
  118. package/src/assets/images/po1-i3.png +0 -0
  119. package/src/assets/images/po1-i4.png +0 -0
  120. package/src/assets/images/po1-i5.png +0 -0
  121. package/src/assets/images/po1-i6.png +0 -0
  122. package/src/assets/images/po1-i7.png +0 -0
  123. package/src/assets/images/po1-i8.png +0 -0
  124. package/src/assets/images/po2-i1.png +0 -0
  125. package/src/assets/images/po2-i2.png +0 -0
  126. package/src/assets/images/po3-i1.png +0 -0
  127. package/src/assets/images/po4-i1.png +0 -0
  128. package/src/assets/images/po5-i1.png +0 -0
  129. package/src/assets/images/po6-i1.png +0 -0
  130. package/src/assets/images/po6-i2.png +0 -0
  131. package/src/assets/images/po7-i1.png +0 -0
  132. package/src/assets/images/tj1.png +0 -0
  133. package/src/assets/images/tj2.png +0 -0
  134. package/src/assets/images/tj3.png +0 -0
  135. package/src/components/3dcloudwords/index.js +0 -346
  136. package/src/components/3dcloudwords/index.vue +0 -99
  137. package/src/components/3dcloudwords/readme.md +0 -66
  138. package/src/components/badge/index.js +0 -167
  139. package/src/components/badge/index.scss +0 -166
  140. package/src/components/badge/index.vue +0 -98
  141. package/src/components/badge/readme.md +0 -18
  142. package/src/components/basic/Finish.vue +0 -107
  143. package/src/components/basic/button.vue +0 -19
  144. package/src/components/basic/readme.md +0 -7
  145. package/src/components/button/index.vue +0 -48
  146. package/src/components/button/readme.md +0 -62
  147. package/src/components/carousel/index.vue +0 -104
  148. package/src/components/carousel/readme.md +0 -12
  149. package/src/components/chartconfig/index.vue +0 -141
  150. package/src/components/chartconfig/readme.md +0 -25
  151. package/src/components/contextMenu/hookContxtMenu.js +0 -41
  152. package/src/components/contextMenu/index.vue +0 -245
  153. package/src/components/contextMenu/readme.md +0 -55
  154. package/src/components/contextMenu/useElementBounding.js +0 -40
  155. package/src/components/countup/countUp.js +0 -196
  156. package/src/components/countup/index.vue +0 -114
  157. package/src/components/countup/readme.md +0 -9
  158. package/src/components/empty/assets/build.png +0 -0
  159. package/src/components/empty/assets/emptybg.gif +0 -0
  160. package/src/components/empty/assets/emptybg.png +0 -0
  161. package/src/components/empty/assets/emptybg2.jpg +0 -0
  162. package/src/components/empty/assets/emptybg3.jpg +0 -0
  163. package/src/components/empty/assets/wuxiao.png +0 -0
  164. package/src/components/empty/assets/wuxiao.webp +0 -0
  165. package/src/components/empty/building.vue +0 -117
  166. package/src/components/empty/empty.vue +0 -120
  167. package/src/components/empty/index.js +0 -12
  168. package/src/components/empty/invalid.vue +0 -56
  169. package/src/components/error/Error.vue +0 -79
  170. package/src/components/error/readme.md +0 -20
  171. package/src/components/form/Form.vue +0 -84
  172. package/src/components/form/FormItem.vue +0 -143
  173. package/src/components/form/data.js +0 -52
  174. package/src/components/form/readme.md +0 -69
  175. package/src/components/layout/banner.vue +0 -412
  176. package/src/components/layout/bar.vue +0 -43
  177. package/src/components/layout/layout1.vue +0 -60
  178. package/src/components/layout/layout2.vue +0 -134
  179. package/src/components/layout/layout3.vue +0 -107
  180. package/src/components/layout/layout4.vue +0 -66
  181. package/src/components/layout/nav.vue +0 -333
  182. package/src/components/layout/readme.md +0 -61
  183. package/src/components/loading/index.vue +0 -122
  184. package/src/components/loading/readme.md +0 -6
  185. package/src/components/notice/NoticeList.vue +0 -198
  186. package/src/components/notice/NoticeListPaging.vue +0 -281
  187. package/src/components/notice/NoticeView.vue +0 -92
  188. package/src/components/notice/readme.md +0 -1
  189. package/src/components/pagination/index.vue +0 -100
  190. package/src/components/pagination/readme.md +0 -19
  191. package/src/components/pagination/scroll-to.js +0 -51
  192. package/src/components/progress/bar.vue +0 -72
  193. package/src/components/progress/progress.vue +0 -58
  194. package/src/components/screenfull/index.js +0 -3
  195. package/src/components/screenfull/index.vue +0 -65
  196. package/src/components/screenfull/package.json +0 -15
  197. package/src/components/screenfull/readme.md +0 -6
  198. package/src/components/statisticalCount/index.vue +0 -80
  199. package/src/components/statisticalCount/readme.md +0 -21
  200. package/src/components/username/index.vue +0 -79
  201. package/src/components/username/readme.md +0 -22
  202. package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
  203. package/src/index.js +0 -88
  204. package/src/utils/index.js +0 -32
  205. package/src/xm_components/HeadSearch/hook/hookSearch.js +0 -96
  206. package/src/xm_components/HeadSearch/index.vue +0 -206
  207. package/src/xm_components/HeadSearch/readme.md +0 -12
  208. package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
  209. package/src/xm_components/Milestone/index.vue +0 -213
  210. package/src/xm_components/Milestone/readme.md +0 -15
  211. package/src/xm_components/MultiStatisticalCard/image.png +0 -0
  212. package/src/xm_components/MultiStatisticalCard/index.vue +0 -114
  213. package/src/xm_components/MultiStatisticalCard/readme.md +0 -29
  214. package/src/xm_components/StatisticalCard/image.png +0 -0
  215. package/src/xm_components/StatisticalCard/index.vue +0 -196
  216. package/src/xm_components/StatisticalCard/readme.md +0 -41
  217. package/src/xm_components/readme.md +0 -1
  218. package/utils/coms/load.jsx +0 -10
  219. package/utils/func.js +0 -32
  220. package/utils/hookDialog.js +0 -38
  221. package/utils/hookPage.js +0 -49
  222. package/utils/index.js +0 -5
  223. package/utils/lib/console.js +0 -39
  224. package/utils/lib/debounce.js +0 -19
  225. package/utils/lib/deepextend.js +0 -51
  226. package/utils/lib/deepset.js +0 -14
  227. package/utils/lib/extend.js +0 -28
  228. package/utils/lib/index.js +0 -13
  229. package/utils/lib/json.js +0 -90
  230. package/utils/lib/mergeprops.js +0 -62
  231. package/utils/lib/mitt.js +0 -43
  232. package/utils/lib/modify.js +0 -8
  233. package/utils/lib/slot.js +0 -19
  234. package/utils/lib/toarray.js +0 -5
  235. package/utils/lib/tocase.js +0 -11
  236. package/utils/lib/todate.js +0 -10
  237. package/utils/lib/toline.js +0 -10
  238. package/utils/lib/tostring.js +0 -7
  239. package/utils/lib/type.js +0 -45
  240. package/utils/lib/unique.js +0 -6
  241. package/utils/message.js +0 -164
  242. package/utils/package.json +0 -16
  243. package/utils/type.js +0 -45
  244. package/vite.config.js +0 -56
@@ -1,167 +0,0 @@
1
- import { ExtractPropTypes, PropType } from 'vue'
2
-
3
- const getPrefixCls = (suffixCls, customizePrefixCls) => {
4
- if (customizePrefixCls) return customizePrefixCls
5
- return suffixCls ? `bd-${suffixCls}` : 'bd'
6
- }
7
- export default defineComponent({
8
- compatConfig: { MODE: 3 }, // 为了实现向后兼容
9
- name: 'BdBadge',
10
- props: {
11
- count: [Object],
12
- showZero: { type: Boolean, default: undefined },
13
- /** Max count to show */
14
- overflowCount: { type: Number, default: 99 },
15
- /** whether to show red dot without number */
16
- dot: { type: Boolean, default: undefined },
17
- prefixCls: String,
18
- scrollNumberPrefixCls: String,
19
- status: { type: String },
20
- size: { type: String, default: 'default' },
21
- color: String,
22
- text: [Object],
23
- offset: [Array],
24
- numberStyle: { type: Object },
25
- title: String
26
- },
27
- slots: ['text', 'count'],
28
- setup(props, { slots, attrs }) {
29
- // 样式
30
- const prefixCls = computed(() => getPrefixCls('badge', props.prefixCls))
31
- // ================================ Misc ================================
32
- const numberedDisplayCount = computed(() => {
33
- return props.count > props.overflowCount ? `${props.overflowCount}+` : props.count
34
- })
35
-
36
- const hasStatus = computed(() => (props.status !== null && props.status !== undefined) || (props.color !== null && props.color !== undefined))
37
-
38
- const showAsDot = computed(() => props.dot)
39
-
40
- const mergedCount = computed(() => (showAsDot.value ? '' : numberedDisplayCount.value))
41
-
42
- const isHidden = computed(() => {
43
- const isEmpty = mergedCount.value === null || mergedCount.value === undefined || mergedCount.value === ''
44
- return isEmpty && !showAsDot.value
45
- })
46
-
47
- // Count should be cache in case hidden change it
48
- const livingCount = ref(props.count)
49
-
50
- // We need cache count since remove motion should not change count display
51
- const displayCount = ref(mergedCount.value)
52
-
53
- // We will cache the dot status to avoid shaking on leaved motion
54
- const isDotRef = ref(showAsDot.value)
55
-
56
- watch(
57
- [() => props.count, mergedCount, showAsDot],
58
- () => {
59
- if (!isHidden.value) {
60
- livingCount.value = props.count
61
- displayCount.value = mergedCount.value
62
- isDotRef.value = showAsDot.value
63
- }
64
- },
65
- { immediate: true }
66
- )
67
-
68
- // Shared styles
69
- const statusCls = computed(() => ({
70
- [`${prefixCls.value}-status-dot`]: hasStatus.value,
71
- [`${prefixCls.value}-status-${props.status}`]: !!props.status,
72
- [`${prefixCls.value}-status-${props.color}`]: isPresetColor(props.color)
73
- }))
74
-
75
- const statusStyle = computed(() => {
76
- if (props.color && !isPresetColor(props.color)) {
77
- return { background: props.color }
78
- } else {
79
- return {}
80
- }
81
- })
82
-
83
- const scrollNumberCls = computed(() => ({
84
- [`${prefixCls.value}-dot`]: isDotRef.value,
85
- [`${prefixCls.value}-count`]: !isDotRef.value,
86
- [`${prefixCls.value}-count-sm`]: props.size === 'small',
87
- [`${prefixCls.value}-multiple-words`]: !isDotRef.value && displayCount.value && displayCount.value.toString().length > 1,
88
- [`${prefixCls.value}-status-${props.status}`]: !!props.status,
89
- [`${prefixCls.value}-status-${props.color}`]: isPresetColor(props.color)
90
- }))
91
-
92
- return () => {
93
- const { offset, title, color } = props
94
- const style = attrs.style
95
- const text = getPropsSlot(slots, props, 'text')
96
- const pre = prefixCls.value
97
- const count = livingCount.value
98
- let children = flattenChildren(slots.default?.())
99
- children = children.length ? children : null
100
-
101
- const visible = !!(!isHidden.value || slots.count)
102
-
103
- // =============================== Styles ===============================
104
- const mergedStyle = (() => {
105
- if (!offset) {
106
- return { ...style }
107
- }
108
-
109
- const offsetStyle = {
110
- marginTop: isNumeric(offset[1]) ? `${offset[1]}px` : offset[1]
111
- }
112
- // if (direction.value === 'rtl') {
113
- // offsetStyle.left = `${parseInt(offset[0] as string, 10)}px`;
114
- // } else {
115
- // offsetStyle.right = `${-parseInt(offset[0] as string, 10)}px`;
116
- // }
117
-
118
- return {
119
- ...offsetStyle,
120
- ...style
121
- }
122
- })()
123
-
124
- // =============================== Render ===============================
125
- // >>> Title
126
- const titleNode = title ?? (typeof count === 'string' || typeof count === 'number' ? count : undefined)
127
-
128
- // >>> Status Text
129
- const statusTextNode = visible || !text ? null : <span class={`${pre}-status-text`}>{text}</span>
130
-
131
- // >>> Display Component
132
- const displayNode =
133
- typeof count === 'object' || (count === undefined && slots.count)
134
- ? cloneElement(
135
- count ?? slots.count?.(),
136
- {
137
- style: mergedStyle
138
- },
139
- false
140
- )
141
- : null
142
-
143
- const badgeClassName = classNames(
144
- pre,
145
- {
146
- [`${pre}-status`]: hasStatus.value,
147
- [`${pre}-not-a-wrapper`]: !children,
148
- [`${pre}-rtl`]: direction.value === 'rtl'
149
- },
150
- attrs.class
151
- )
152
-
153
- // <Badge status="success" />
154
- if (!children && hasStatus.value) {
155
- const statusTextColor = mergedStyle.color
156
- return (
157
- <span {...attrs} class={badgeClassName} style={mergedStyle}>
158
- <span class={statusCls.value} style={statusStyle.value} />
159
- <span style={{ color: statusTextColor }} class={`${pre}-status-text`}>
160
- {text}
161
- </span>
162
- </span>
163
- )
164
- }
165
- }
166
- }
167
- })
@@ -1,166 +0,0 @@
1
- $badge-prefix-cls: 'bd-badge';
2
- $badge-status-size: 7px;
3
- $success-color: #52c41a;
4
- $processing-color: #1890ff;
5
- $normal-color: #d9d9d9;
6
- $error-color: #ff4d4f;
7
- $primary-color: #1890ff;
8
- $warning-color: #faad14;
9
- $text-color: #000000d9;
10
- $font-size-base: 14px;
11
-
12
- .bd-badge {
13
- position: relative;
14
- display: inline-block;
15
- line-height: 1;
16
-
17
- &-status {
18
- line-height: inherit;
19
- vertical-align: baseline;
20
-
21
- &-dot {
22
- position: relative;
23
- top: -1px;
24
- display: inline-block;
25
- width: $badge-status-size;
26
- height: $badge-status-size;
27
- vertical-align: middle;
28
- border-radius: 50%;
29
- }
30
-
31
- &-success {
32
- background-color: $success-color;
33
- &-text {
34
- color: $success-color !important;
35
- }
36
- }
37
-
38
-
39
- &-processing {
40
- position: relative;
41
- background-color: $processing-color;
42
- &-text {
43
- color: $processing-color !important;
44
- }
45
- &::after {
46
- position: absolute;
47
- top: -1px;
48
- left: -1px;
49
- width: 100%;
50
- height: 100%;
51
- border: 1px solid $processing-color;
52
- border-radius: 50%;
53
- animation: antStatusProcessing 1.2s infinite ease-in-out;
54
- content: '';
55
- }
56
- }
57
-
58
- &-default {
59
- background-color: $normal-color;
60
-
61
- }
62
- &-primary {
63
- background-color: $primary-color !important;
64
- &-text {
65
- color: $primary-color !important;
66
- }
67
- }
68
- &-error {
69
- background-color: $error-color !important;
70
- &-text {
71
- color: $error-color !important;
72
- }
73
- }
74
-
75
- &-warning {
76
- background-color: $warning-color;
77
- &-text {
78
- color: $warning-color !important;
79
- }
80
- }
81
-
82
- &-text {
83
- margin-left: 8px;
84
- color: $text-color;
85
- font-size: $font-size-base;
86
- }
87
- }
88
-
89
- // &-zoom-appear,
90
- // &-zoom-enter {
91
- // animation: antZoomBadgeIn $animation-duration-slow $ease-out-back;
92
- // animation-fill-mode: both;
93
- // }
94
-
95
- // &-zoom-leave {
96
- // animation: antZoomBadgeOut $animation-duration-slow $ease-in-back;
97
- // animation-fill-mode: both;
98
- // }
99
- }
100
-
101
- @keyframes antStatusProcessing {
102
- 0% {
103
- transform: scale(0.8);
104
- opacity: 0.5;
105
- }
106
-
107
- 100% {
108
- transform: scale(2.4);
109
- opacity: 0;
110
- }
111
- }
112
-
113
- @keyframes antZoomBadgeIn {
114
- 0% {
115
- transform: scale(0) translate(50%, -50%);
116
- opacity: 0;
117
- }
118
-
119
- 100% {
120
- transform: scale(1) translate(50%, -50%);
121
- }
122
- }
123
-
124
- @keyframes antZoomBadgeOut {
125
- 0% {
126
- transform: scale(1) translate(50%, -50%);
127
- }
128
-
129
- 100% {
130
- transform: scale(0) translate(50%, -50%);
131
- opacity: 0;
132
- }
133
- }
134
-
135
- @keyframes antNoWrapperZoomBadgeIn {
136
- 0% {
137
- transform: scale(0);
138
- opacity: 0;
139
- }
140
-
141
- 100% {
142
- transform: scale(1);
143
- }
144
- }
145
-
146
- @keyframes antNoWrapperZoomBadgeOut {
147
- 0% {
148
- transform: scale(1);
149
- }
150
-
151
- 100% {
152
- transform: scale(0);
153
- opacity: 0;
154
- }
155
- }
156
-
157
- @keyframes antBadgeLoadingCircle {
158
- 0% {
159
- transform-origin: 50%;
160
- }
161
-
162
- 100% {
163
- transform: translate(50%, -50%) rotate(360deg);
164
- transform-origin: 50%;
165
- }
166
- }
@@ -1,98 +0,0 @@
1
- <!--
2
- * @FileDescription: 徽章组件
3
- * @Author: 李兵泉
4
- * @Date: 2021-06-08 09 时
5
- * @LastEditors: 最后更新作者
6
- * @LastEditTime: 最后更新时间
7
- -->
8
- <script setup>
9
- import { ref, useAttrs, computed, watch, onMounted } from 'vue';
10
- const props = defineProps({
11
- count: [Object],
12
- showZero: { type: Boolean, default: undefined },
13
- /** Max count to show */
14
- overflowCount: { type: Number, default: 99 },
15
- /** whether to show red dot without number */
16
- dot: { type: Boolean, default: undefined },
17
- prefixCls: String,
18
- scrollNumberPrefixCls: String,
19
- status: { type: String, default: '' },
20
- type: { type: String, default: 'default' },
21
- size: { type: String, default: 'default' },
22
- color: String,
23
- text: [String],
24
- offset: [Array],
25
- numberStyle: { type: Object },
26
- title: String
27
- });
28
- // public
29
- const isString = val => typeof val === 'string';
30
- const isArray = Array.isArray;
31
- const isObject = val => val !== null && typeof val === 'object';
32
-
33
- let attrs = useAttrs();
34
- // 类样式返回
35
- const classNames = (...args) => {
36
- const classes = [];
37
- for (let i = 0; i < args.length; i++) {
38
- const value = args[i];
39
- if (!value) continue;
40
- if (isString(value)) {
41
- classes.push(value);
42
- } else if (isArray(value)) {
43
- for (let i = 0; i < value.length; i++) {
44
- const inner = classNames(value[i]);
45
- if (inner) {
46
- classes.push(inner);
47
- }
48
- }
49
- } else if (isObject(value)) {
50
- for (const name in value) {
51
- if (value[name]) {
52
- classes.push(name);
53
- }
54
- }
55
- }
56
- }
57
- return classes.join(' ');
58
- };
59
-
60
- const prefixCls = ref('bd-badge');
61
- const pre = prefixCls.value;
62
- const numberedDisplayCount = true;
63
- const hasStatus = ref(true);
64
- // 容器样式
65
- const badgeClassName = classNames(
66
- pre,
67
- {
68
- [`${pre}-status`]: hasStatus.value,
69
- [`${pre}-not-a-wrapper`]: true
70
- },
71
- attrs.class
72
- );
73
- const statusCls = computed(() => ({
74
- [`${prefixCls.value}-status-dot`]: hasStatus.value,
75
- [`${prefixCls.value}-status-${props.status || props.type}`]: !!props.type
76
- }));
77
-
78
- const statusStyle = computed(() => {
79
- if (props.color) {
80
- return { background: props.color };
81
- } else {
82
- return {};
83
- }
84
- });
85
- const style = attrs.style;
86
- </script>
87
- <template>
88
- <span v-bind="attrs" :class="{ badgeClassName }" :style="{ style }">
89
- <span :class="statusCls" :style="{ statusStyle }" />
90
- <span :class="`${pre}-status-text ${pre}-status-${type}-text`">
91
- {{ text }}
92
- </span>
93
- </span>
94
- </template>
95
-
96
- <style lang="scss" scoped>
97
- @use './index.scss';
98
- </style>
@@ -1,18 +0,0 @@
1
-
2
-
3
-
4
- ## 圆点组件
5
-
6
- ```
7
- import { BdBadge } from '@bdsoft/element';
8
- <ul>
9
- 如果想与圆点同色 写到text里面 如果想自定义颜色 写到/BdBadge后面
10
- <li><BdBadge text='默认提示点'></BdBadge>默认提示点</li>
11
- <li><BdBadge type="warning"></BdBadge>警告提示点</li>
12
- <li><BdBadge type="error"></BdBadge>错误提示点</li>
13
- <li><BdBadge type="processing"></BdBadge>动态提示点</li>
14
- <li><BdBadge type="processing"></BdBadge>动态提示点</li>
15
- <li><BdBadge type="success"></BdBadge>动态提示点</li>
16
- </ul>
17
- ```
18
- text 值与原点同色,放到slot里面则是灰色
@@ -1,107 +0,0 @@
1
- <!--
2
- * @FileDescription: 完成提示 动画组件
3
- * @Author: 李兵泉
4
- * @Date: 2025-09-09
5
- * @LastEditors: 最后更新作者
6
- * @LastEditTime: 最后更新时间
7
- -->
8
- <template>
9
- <div class='svgwarp' :style="{scale:scale}">
10
- <svg width="100" height="100">
11
- <!-- 圆形部分 -->
12
- <circle fill="none" stroke="#68E534" stroke-width="8" cx="50" cy="50" r="45" class="circle"
13
- stroke-linecap="round" transform="rotate(-23 50 50)" />
14
-
15
- <!-- 打钩部分 -->
16
- <polyline fill="none" stroke="#68E534" stroke-width="10" points="22,53 43,71 76,34" stroke-linecap="round"
17
- stroke-linejoin="round" class="tick" />
18
- </svg>
19
- <h2 class="title">{{ text }}</h2>
20
- </div>
21
- </template>
22
- <script setup>
23
- import { ref, reactive, computed, watch, onMounted } from "vue";
24
- const props = defineProps({
25
- text: {
26
- type: String,
27
- default: '处理数据完成!'
28
- },
29
- scale: {
30
- type: Number,
31
- default: 0.5
32
- },
33
- })
34
- </script>
35
-
36
- <style lang="scss" scoped>
37
- .svgwarp {
38
- display: flex;
39
- }
40
-
41
- svg .circle {
42
- stroke-dasharray: 298;
43
- /* 圆周长:2πr = 2×3.14×190 ≈ 1194 */
44
- stroke-dashoffset: 298;
45
- /* 初始偏移量等于周长 */
46
- animation: circle 1s ease-in-out;
47
- animation-fill-mode: forwards;
48
- }
49
-
50
- svg .tick {
51
- stroke-dasharray: 88;
52
- /* 打钩路径总长度 */
53
- stroke-dashoffset: 88;
54
- /* 初始偏移量 */
55
- animation: tick .8s ease-out;
56
- animation-fill-mode: forwards;
57
- animation-delay: .95s;
58
- /* 延迟启动 */
59
- }
60
-
61
- .title {
62
- height: 100px;
63
- line-height: 100px;
64
- font-size: 36px;
65
- color: #333;
66
- opacity: 0;
67
- animation: .6s titleAn ease-in-out;
68
- animation-delay: 1.2s;
69
- animation-fill-mode: forwards;
70
- justify-content: center;
71
- align-items: center;
72
- margin-left: 20px;
73
-
74
- }
75
-
76
- @keyframes titleAn {
77
- from {
78
- opacity: 0;
79
- }
80
-
81
- to {
82
- opacity: 1;
83
- }
84
- }
85
-
86
- @keyframes tick {
87
- from {
88
- stroke-dashoffset: 88;
89
- }
90
-
91
- to {
92
- stroke-dashoffset: 0;
93
- /* 动画结束时完全显示 */
94
- }
95
- }
96
-
97
- @keyframes circle {
98
- from {
99
- stroke-dashoffset: 298;
100
- }
101
-
102
- to {
103
- stroke-dashoffset: 597;
104
- /* 动画结束时偏移量为2倍周长 */
105
- }
106
- }
107
- </style>
@@ -1,19 +0,0 @@
1
- <!--
2
- * @FileDescription: 按钮处理
3
- * @Author: 李兵泉
4
- * @Date: 2021-06-08 09 时
5
- * @LastEditors: 最后更新作者
6
- * @LastEditTime: 最后更新时间
7
- -->
8
- <template>
9
- <div>
10
- <el-button type="primary" > 测试按钮</el-button>
11
- </div>
12
- </template>
13
- <script setup>
14
- import {ref ,reactive ,computed, watch,onMounted} from "vue";
15
- </script>
16
-
17
- <style lang="scss" scoped>
18
-
19
- </style>
@@ -1,7 +0,0 @@
1
- ## 示例
2
-
3
- ```
4
- import finish from "@bdsoft/element";
5
-
6
- <finish text='处理数据完成!' :scale='0.5'></finish>
7
- ```
@@ -1,48 +0,0 @@
1
- <!--
2
- * @FileDescription: 按钮组件-支持每个按钮添加loading效果
3
- * @Author: 李兵泉
4
- * @Date: 2021-06-08 09 时
5
- * @LastEditors: 最后更新作者
6
- * @LastEditTime: 最后更新时间
7
- -->
8
- <script setup>
9
- import { ref, useSlots } from 'vue'
10
- //props
11
- const props = defineProps({
12
- onClick:{
13
- type: Function,
14
- required: true
15
- },
16
- loadingText: {
17
- type: String,
18
- default: '加载中...',
19
- required: false
20
- }
21
- })
22
-
23
- const loading = ref(false)
24
-
25
- // 点击事件
26
- const clickHandler = async (e) => {
27
-
28
- loading.value = true
29
- try {
30
- await props.onClick(e)
31
- } finally {
32
- loading.value = false
33
- }
34
- }
35
- const slots = useSlots()
36
- </script>
37
-
38
- <template>
39
- <el-button @click="clickHandler" :loading="loading">
40
-
41
- <template v-if="loading">
42
- {{ props.loadingText }}
43
- </template>
44
- <template v-else>
45
- <slot />
46
- </template>
47
- </el-button>
48
- </template>
@@ -1,62 +0,0 @@
1
- ## 使用示例
2
-
3
- ```html
4
- <!--
5
- * @FileDescription: 测试
6
- * @Author: 李兵泉
7
- * @Date: 2021-06-08 09 时
8
- * @LastEditors: 最后更新作者
9
- * @LastEditTime: 最后更新时间
10
- -->
11
- <template>
12
- <div>11111</div>
13
- <!-- <BdButton @click="handler1">测试按钮</BdButton> -->
14
- <BdButton type="primary" loadingText="加载中" @click="handler1"> 按钮1 </BdButton>
15
- <BdButton @click="asyncFn" loadingText="保存中"> 按钮2 </BdButton>
16
- <BdButton type="primary" plain @click="handler3">
17
- <template #loading>
18
- <div class="custom-loading">
19
- <el-icon><Refresh /></el-icon>
20
- </div>
21
- </template>
22
- 按钮3
23
- </BdButton>
24
- </template>
25
- <script setup>
26
- import { ref, reactive, computed, watch, onMounted } from 'vue'
27
- import { BdButton } from '@bdsoft/element'
28
-
29
- const asyncFn = () =>
30
- new Promise((resolve) => {
31
- setTimeout(resolve, 3000)
32
- })
33
-
34
- const handler1 = async () => {
35
- // ...
36
- await asyncFn()
37
- }
38
-
39
- const handler3 = () => {
40
- // ...
41
- return asyncFn()
42
- }
43
- </script>
44
-
45
- <style lang="scss" scoped>
46
- .el-button .custom-loading {
47
- // margin-right: 6px;
48
- width: 16px;
49
- height: 16px;
50
- animation: loading-rotate 2s linear infinite;
51
- }
52
-
53
- .el-button .custom-loading .circular .path {
54
- animation: loading-dash 1.5s ease-in-out infinite;
55
- stroke-dasharray: 90, 150;
56
- stroke-dashoffset: 0;
57
- stroke-width: 2;
58
- stroke: var(--el-button-text-color);
59
- stroke-linecap: round;
60
- }
61
- </style>
62
- ```