@bdsoft/element 1.1.9 → 1.1.11
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/dist/BdElement.js +23111 -0
- package/package.json +2 -1
- package/global/index.ts +0 -6
- package/global/register-properties.ts +0 -10
- package/index.html +0 -13
- package/package-form/core/components/formCreate.js +0 -274
- package/package-form/core/components/fragment.js +0 -12
- package/package-form/core/factory/context.js +0 -257
- package/package-form/core/factory/creator.js +0 -63
- package/package-form/core/factory/maker.js +0 -17
- package/package-form/core/factory/manager.js +0 -79
- package/package-form/core/factory/node.js +0 -85
- package/package-form/core/factory/parser.js +0 -28
- package/package-form/core/frame/api.js +0 -599
- package/package-form/core/frame/attrs.js +0 -12
- package/package-form/core/frame/dataDriver.js +0 -76
- package/package-form/core/frame/fetch.js +0 -119
- package/package-form/core/frame/formCreate.js +0 -274
- package/package-form/core/frame/index.js +0 -760
- package/package-form/core/frame/provider.js +0 -288
- package/package-form/core/frame/util.js +0 -274
- package/package-form/core/handler/context.js +0 -380
- package/package-form/core/handler/effect.js +0 -122
- package/package-form/core/handler/index.js +0 -111
- package/package-form/core/handler/inject.js +0 -145
- package/package-form/core/handler/input.js +0 -197
- package/package-form/core/handler/lifecycle.js +0 -43
- package/package-form/core/handler/loader.js +0 -373
- package/package-form/core/handler/page.js +0 -46
- package/package-form/core/handler/render.js +0 -29
- package/package-form/core/index.js +0 -12
- package/package-form/core/package.json +0 -15
- package/package-form/core/parser/html.js +0 -17
- package/package-form/core/render/cache.js +0 -47
- package/package-form/core/render/index.js +0 -31
- package/package-form/core/render/render.js +0 -393
- package/package-form/element-form/components/checkbox/package.json +0 -17
- package/package-form/element-form/components/checkbox/src/component.jsx +0 -110
- package/package-form/element-form/components/checkbox/src/index.js +0 -3
- package/package-form/element-form/components/frame/package.json +0 -17
- package/package-form/element-form/components/frame/src/IconCircleClose.vue +0 -14
- package/package-form/element-form/components/frame/src/IconDelete.vue +0 -12
- package/package-form/element-form/components/frame/src/IconDocument.vue +0 -12
- package/package-form/element-form/components/frame/src/IconFolderOpened.vue +0 -12
- package/package-form/element-form/components/frame/src/IconView.vue +0 -12
- package/package-form/element-form/components/frame/src/component.jsx +0 -349
- package/package-form/element-form/components/frame/src/index.js +0 -3
- package/package-form/element-form/components/frame/src/style.css +0 -66
- package/package-form/element-form/components/group/package.json +0 -17
- package/package-form/element-form/components/group/src/component.jsx +0 -314
- package/package-form/element-form/components/group/src/index.js +0 -3
- package/package-form/element-form/components/group/src/style.css +0 -125
- package/package-form/element-form/components/index.js +0 -22
- package/package-form/element-form/components/radio/package.json +0 -17
- package/package-form/element-form/components/radio/src/component.jsx +0 -101
- package/package-form/element-form/components/radio/src/index.js +0 -3
- package/package-form/element-form/components/select/package.json +0 -17
- package/package-form/element-form/components/select/src/component.jsx +0 -52
- package/package-form/element-form/components/select/src/index.js +0 -3
- package/package-form/element-form/components/subform/package.json +0 -14
- package/package-form/element-form/components/subform/src/component.jsx +0 -76
- package/package-form/element-form/components/subform/src/index.js +0 -3
- package/package-form/element-form/components/tree/package.json +0 -17
- package/package-form/element-form/components/tree/src/component.jsx +0 -62
- package/package-form/element-form/components/tree/src/index.js +0 -3
- package/package-form/element-form/components/upload/package.json +0 -17
- package/package-form/element-form/components/upload/src/IconUpload.vue +0 -12
- package/package-form/element-form/components/upload/src/component.jsx +0 -129
- package/package-form/element-form/components/upload/src/index.js +0 -3
- package/package-form/element-form/components/upload/src/style.css +0 -11
- package/package-form/element-form/index.js +0 -8
- package/package-form/element-form/package.json +0 -16
- package/package-form/element-form/src/components/icon/IconWarning.vue +0 -12
- package/package-form/element-form/src/components/index.js +0 -22
- package/package-form/element-form/src/core/alias.js +0 -34
- package/package-form/element-form/src/core/api.js +0 -208
- package/package-form/element-form/src/core/config.js +0 -62
- package/package-form/element-form/src/core/index.js +0 -60
- package/package-form/element-form/src/core/maker.js +0 -76
- package/package-form/element-form/src/core/manager.js +0 -315
- package/package-form/element-form/src/core/provider.js +0 -79
- package/package-form/element-form/src/parsers/datePicker.js +0 -31
- package/package-form/element-form/src/parsers/hidden.js +0 -12
- package/package-form/element-form/src/parsers/index.js +0 -17
- package/package-form/element-form/src/parsers/input.js +0 -21
- package/package-form/element-form/src/parsers/row.js +0 -10
- package/package-form/element-form/src/parsers/select.js +0 -15
- package/package-form/element-form/src/parsers/slider.js +0 -21
- package/package-form/element-form/src/parsers/timePicker.js +0 -17
- package/package-form/element-form/src/style/index.css +0 -52
- package/src/App.vue +0 -28
- package/src/assets/css/element.scss +0 -196
- package/src/assets/css/layout.scss +0 -215
- package/src/assets/css/tailwind.scss +0 -67
- package/src/assets/images/banner.gif +0 -0
- package/src/assets/images/banner.png +0 -0
- package/src/assets/images/bg1.svg +0 -22
- package/src/assets/images/bg2.png +0 -0
- package/src/assets/images/ff.png +0 -0
- package/src/assets/images/home-file1.png +0 -0
- package/src/assets/images/ky.png +0 -0
- package/src/assets/images/menu/add.png +0 -0
- package/src/assets/images/menu/del.png +0 -0
- package/src/assets/images/menu/down.png +0 -0
- package/src/assets/images/menu/dr.png +0 -0
- package/src/assets/images/menu/edit.png +0 -0
- package/src/assets/images/menu/kx.png +0 -0
- package/src/assets/images/menu/mb.png +0 -0
- package/src/assets/images/menu/pz.png +0 -0
- package/src/assets/images/menu/save.png +0 -0
- package/src/assets/images/menu/sj.png +0 -0
- package/src/assets/images/menu/sjk.png +0 -0
- package/src/assets/images/menu/up.png +0 -0
- package/src/assets/images/po-i.png +0 -0
- package/src/assets/images/po1-i1.png +0 -0
- package/src/assets/images/po1-i2.png +0 -0
- package/src/assets/images/po1-i3.png +0 -0
- package/src/assets/images/po1-i4.png +0 -0
- package/src/assets/images/po1-i5.png +0 -0
- package/src/assets/images/po1-i6.png +0 -0
- package/src/assets/images/po1-i7.png +0 -0
- package/src/assets/images/po1-i8.png +0 -0
- package/src/assets/images/po2-i1.png +0 -0
- package/src/assets/images/po2-i2.png +0 -0
- package/src/assets/images/po3-i1.png +0 -0
- package/src/assets/images/po4-i1.png +0 -0
- package/src/assets/images/po5-i1.png +0 -0
- package/src/assets/images/po6-i1.png +0 -0
- package/src/assets/images/po6-i2.png +0 -0
- package/src/assets/images/po7-i1.png +0 -0
- package/src/assets/images/tj1.png +0 -0
- package/src/assets/images/tj2.png +0 -0
- package/src/assets/images/tj3.png +0 -0
- package/src/components/3dcloudwords/index.js +0 -346
- package/src/components/3dcloudwords/index.vue +0 -99
- package/src/components/3dcloudwords/readme.md +0 -66
- package/src/components/badge/index.js +0 -167
- package/src/components/badge/index.scss +0 -166
- package/src/components/badge/index.vue +0 -98
- package/src/components/badge/readme.md +0 -18
- package/src/components/basic/Finish.vue +0 -107
- package/src/components/basic/button.vue +0 -19
- package/src/components/basic/readme.md +0 -7
- package/src/components/button/index.vue +0 -48
- package/src/components/button/readme.md +0 -62
- package/src/components/carousel/index.vue +0 -104
- package/src/components/carousel/readme.md +0 -12
- package/src/components/chartconfig/index.vue +0 -141
- package/src/components/chartconfig/readme.md +0 -25
- package/src/components/contextMenu/hookContxtMenu.js +0 -41
- package/src/components/contextMenu/index.vue +0 -245
- package/src/components/contextMenu/readme.md +0 -55
- package/src/components/contextMenu/useElementBounding.js +0 -40
- package/src/components/countup/countUp.js +0 -196
- package/src/components/countup/index.vue +0 -114
- package/src/components/countup/readme.md +0 -9
- package/src/components/empty/assets/build.png +0 -0
- package/src/components/empty/assets/emptybg.gif +0 -0
- package/src/components/empty/assets/emptybg.png +0 -0
- package/src/components/empty/assets/emptybg2.jpg +0 -0
- package/src/components/empty/assets/emptybg3.jpg +0 -0
- package/src/components/empty/assets/wuxiao.png +0 -0
- package/src/components/empty/assets/wuxiao.webp +0 -0
- package/src/components/empty/building.vue +0 -117
- package/src/components/empty/empty.vue +0 -120
- package/src/components/empty/index.js +0 -12
- package/src/components/empty/invalid.vue +0 -56
- package/src/components/error/Error.vue +0 -79
- package/src/components/error/readme.md +0 -20
- package/src/components/form/Form.vue +0 -84
- package/src/components/form/FormItem.vue +0 -143
- package/src/components/form/data.js +0 -52
- package/src/components/form/readme.md +0 -69
- package/src/components/layout/banner.vue +0 -412
- package/src/components/layout/bar.vue +0 -43
- package/src/components/layout/layout1.vue +0 -60
- package/src/components/layout/layout2.vue +0 -134
- package/src/components/layout/layout3.vue +0 -107
- package/src/components/layout/layout4.vue +0 -66
- package/src/components/layout/nav.vue +0 -333
- package/src/components/layout/readme.md +0 -61
- package/src/components/loading/index.vue +0 -122
- package/src/components/loading/readme.md +0 -6
- package/src/components/notice/NoticeList.vue +0 -198
- package/src/components/notice/NoticeListPaging.vue +0 -281
- package/src/components/notice/NoticeView.vue +0 -92
- package/src/components/notice/readme.md +0 -1
- package/src/components/pagination/index.vue +0 -100
- package/src/components/pagination/readme.md +0 -19
- package/src/components/pagination/scroll-to.js +0 -51
- package/src/components/progress/bar.vue +0 -72
- package/src/components/progress/progress.vue +0 -58
- package/src/components/screenfull/index.js +0 -3
- package/src/components/screenfull/index.vue +0 -65
- package/src/components/screenfull/package.json +0 -15
- package/src/components/screenfull/readme.md +0 -6
- package/src/components/statisticalCount/index.vue +0 -80
- package/src/components/statisticalCount/readme.md +0 -21
- package/src/components/username/index.vue +0 -79
- package/src/components/username/readme.md +0 -22
- package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
- package/src/index.js +0 -88
- package/src/utils/index.js +0 -32
- package/src/xm_components/HeadSearch/hook/hookSearch.js +0 -96
- package/src/xm_components/HeadSearch/index.vue +0 -206
- package/src/xm_components/HeadSearch/readme.md +0 -12
- package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
- package/src/xm_components/Milestone/index.vue +0 -213
- package/src/xm_components/Milestone/readme.md +0 -15
- package/src/xm_components/MultiStatisticalCard/image.png +0 -0
- package/src/xm_components/MultiStatisticalCard/index.vue +0 -114
- package/src/xm_components/MultiStatisticalCard/readme.md +0 -29
- package/src/xm_components/StatisticalCard/image.png +0 -0
- package/src/xm_components/StatisticalCard/index.vue +0 -196
- package/src/xm_components/StatisticalCard/readme.md +0 -41
- package/src/xm_components/readme.md +0 -1
- package/utils/coms/load.jsx +0 -10
- package/utils/func.js +0 -32
- package/utils/hookDialog.js +0 -38
- package/utils/hookPage.js +0 -49
- package/utils/index.js +0 -5
- package/utils/lib/console.js +0 -39
- package/utils/lib/debounce.js +0 -19
- package/utils/lib/deepextend.js +0 -51
- package/utils/lib/deepset.js +0 -14
- package/utils/lib/extend.js +0 -28
- package/utils/lib/index.js +0 -13
- package/utils/lib/json.js +0 -90
- package/utils/lib/mergeprops.js +0 -62
- package/utils/lib/mitt.js +0 -43
- package/utils/lib/modify.js +0 -8
- package/utils/lib/slot.js +0 -19
- package/utils/lib/toarray.js +0 -5
- package/utils/lib/tocase.js +0 -11
- package/utils/lib/todate.js +0 -10
- package/utils/lib/toline.js +0 -10
- package/utils/lib/tostring.js +0 -7
- package/utils/lib/type.js +0 -45
- package/utils/lib/unique.js +0 -6
- package/utils/message.js +0 -164
- package/utils/package.json +0 -16
- package/utils/type.js +0 -45
- package/vite.config.js +0 -56
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
// target = id of html element or var of previously selected html element where counting occurs
|
|
2
|
-
// startVal = the value you want to begin at
|
|
3
|
-
// endVal = the value you want to arrive at
|
|
4
|
-
// decimals = number of decimal places, default 0
|
|
5
|
-
// duration = duration of animation in seconds, default 2
|
|
6
|
-
// options = optional object of options (see below)
|
|
7
|
-
|
|
8
|
-
var CountUp = function (target, startVal, endVal, decimals, duration, options) {
|
|
9
|
-
// make sure requestAnimationFrame and cancelAnimationFrame are defined
|
|
10
|
-
// polyfill for browsers without native support
|
|
11
|
-
// by Opera engineer Erik Möller
|
|
12
|
-
var lastTime = 0
|
|
13
|
-
var vendors = ['webkit', 'moz', 'ms', 'o']
|
|
14
|
-
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
|
15
|
-
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']
|
|
16
|
-
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']
|
|
17
|
-
}
|
|
18
|
-
if (!window.requestAnimationFrame) {
|
|
19
|
-
window.requestAnimationFrame = function (callback, element) {
|
|
20
|
-
var currTime = new Date().getTime()
|
|
21
|
-
var timeToCall = Math.max(0, 16 - (currTime - lastTime))
|
|
22
|
-
var id = window.setTimeout(function () {
|
|
23
|
-
callback(currTime + timeToCall)
|
|
24
|
-
}, timeToCall)
|
|
25
|
-
lastTime = currTime + timeToCall
|
|
26
|
-
return id
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (!window.cancelAnimationFrame) {
|
|
30
|
-
window.cancelAnimationFrame = function (id) {
|
|
31
|
-
clearTimeout(id)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var self = this
|
|
36
|
-
|
|
37
|
-
// default options
|
|
38
|
-
self.options = {
|
|
39
|
-
useEasing: true, // toggle easing
|
|
40
|
-
useGrouping: true, // 1,000,000 vs 1000000
|
|
41
|
-
separator: ',', // character to use as a separator
|
|
42
|
-
decimal: '.', // character to use as a decimal
|
|
43
|
-
easingFn: null, // optional custom easing closure function, default is Robert Penner's easeOutExpo
|
|
44
|
-
formattingFn: null // optional custom formatting function, default is self.formatNumber below
|
|
45
|
-
}
|
|
46
|
-
// extend default options with passed options object
|
|
47
|
-
for (var key in options) {
|
|
48
|
-
if (options.hasOwnProperty(key)) {
|
|
49
|
-
self.options[key] = options[key]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (self.options.separator === '') {
|
|
53
|
-
self.options.useGrouping = false
|
|
54
|
-
}
|
|
55
|
-
if (!self.options.prefix) self.options.prefix = ''
|
|
56
|
-
if (!self.options.suffix) self.options.suffix = ''
|
|
57
|
-
|
|
58
|
-
self.d = typeof target === 'string' ? document.getElementById(target) : target
|
|
59
|
-
self.startVal = Number(startVal)
|
|
60
|
-
self.endVal = Number(endVal)
|
|
61
|
-
self.countDown = self.startVal > self.endVal
|
|
62
|
-
self.frameVal = self.startVal
|
|
63
|
-
self.decimals = Math.max(0, decimals || 0)
|
|
64
|
-
self.dec = Math.pow(10, self.decimals)
|
|
65
|
-
self.duration = Number(duration) * 1000 || 2000
|
|
66
|
-
|
|
67
|
-
self.formatNumber = function (nStr) {
|
|
68
|
-
nStr = nStr.toFixed(self.decimals)
|
|
69
|
-
nStr += ''
|
|
70
|
-
var x, x1, x2, rgx
|
|
71
|
-
x = nStr.split('.')
|
|
72
|
-
x1 = x[0]
|
|
73
|
-
x2 = x.length > 1 ? self.options.decimal + x[1] : ''
|
|
74
|
-
rgx = /(\d+)(\d{3})/
|
|
75
|
-
if (self.options.useGrouping) {
|
|
76
|
-
while (rgx.test(x1)) {
|
|
77
|
-
x1 = x1.replace(rgx, '$1' + self.options.separator + '$2')
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return self.options.prefix + x1 + x2 + self.options.suffix
|
|
81
|
-
}
|
|
82
|
-
// Robert Penner's easeOutExpo
|
|
83
|
-
self.easeOutExpo = function (t, b, c, d) {
|
|
84
|
-
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
self.easingFn = self.options.easingFn ? self.options.easingFn : self.easeOutExpo
|
|
88
|
-
self.formattingFn = self.options.formattingFn ? self.options.formattingFn : self.formatNumber
|
|
89
|
-
|
|
90
|
-
self.version = function () {
|
|
91
|
-
return '1.7.1'
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Print value to target
|
|
95
|
-
self.printValue = function (value) {
|
|
96
|
-
var result = self.formattingFn(value)
|
|
97
|
-
|
|
98
|
-
if (self.d?.tagName === 'INPUT') {
|
|
99
|
-
this.d.value = result
|
|
100
|
-
} else if (self.d?.tagName === 'text' || self.d?.tagName === 'tspan') {
|
|
101
|
-
this.d.textContent = result
|
|
102
|
-
} else {
|
|
103
|
-
this.d.innerHTML = result
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
self.count = function (timestamp) {
|
|
108
|
-
if (!self.startTime) {
|
|
109
|
-
self.startTime = timestamp
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
self.timestamp = timestamp
|
|
113
|
-
var progress = timestamp - self.startTime
|
|
114
|
-
self.remaining = self.duration - progress
|
|
115
|
-
|
|
116
|
-
// to ease or not to ease
|
|
117
|
-
if (self.options.useEasing) {
|
|
118
|
-
if (self.countDown) {
|
|
119
|
-
self.frameVal = self.startVal - self.easingFn(progress, 0, self.startVal - self.endVal, self.duration)
|
|
120
|
-
} else {
|
|
121
|
-
self.frameVal = self.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration)
|
|
122
|
-
}
|
|
123
|
-
} else {
|
|
124
|
-
if (self.countDown) {
|
|
125
|
-
self.frameVal = self.startVal - (self.startVal - self.endVal) * (progress / self.duration)
|
|
126
|
-
} else {
|
|
127
|
-
self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration)
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// don't go past endVal since progress can exceed duration in the last frame
|
|
132
|
-
if (self.countDown) {
|
|
133
|
-
self.frameVal = self.frameVal < self.endVal ? self.endVal : self.frameVal
|
|
134
|
-
} else {
|
|
135
|
-
self.frameVal = self.frameVal > self.endVal ? self.endVal : self.frameVal
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// decimal
|
|
139
|
-
self.frameVal = Math.round(self.frameVal * self.dec) / self.dec
|
|
140
|
-
|
|
141
|
-
// format and print value
|
|
142
|
-
self.printValue(self.frameVal)
|
|
143
|
-
|
|
144
|
-
// whether to continue
|
|
145
|
-
if (progress < self.duration) {
|
|
146
|
-
self.rAF = requestAnimationFrame(self.count)
|
|
147
|
-
} else {
|
|
148
|
-
if (self.callback) {
|
|
149
|
-
self.callback()
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// start your animation
|
|
154
|
-
self.start = function (callback) {
|
|
155
|
-
self.callback = callback
|
|
156
|
-
self.rAF = requestAnimationFrame(self.count)
|
|
157
|
-
return false
|
|
158
|
-
}
|
|
159
|
-
// toggles pause/resume animation
|
|
160
|
-
self.pauseResume = function () {
|
|
161
|
-
if (!self.paused) {
|
|
162
|
-
self.paused = true
|
|
163
|
-
cancelAnimationFrame(self.rAF)
|
|
164
|
-
} else {
|
|
165
|
-
self.paused = false
|
|
166
|
-
delete self.startTime
|
|
167
|
-
self.duration = self.remaining
|
|
168
|
-
self.startVal = self.frameVal
|
|
169
|
-
requestAnimationFrame(self.count)
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// reset to startVal so animation can be run again
|
|
173
|
-
self.reset = function () {
|
|
174
|
-
self.paused = false
|
|
175
|
-
delete self.startTime
|
|
176
|
-
self.startVal = startVal
|
|
177
|
-
cancelAnimationFrame(self.rAF)
|
|
178
|
-
self.printValue(self.startVal)
|
|
179
|
-
}
|
|
180
|
-
// pass a new endVal and start animation
|
|
181
|
-
self.update = function (newEndVal) {
|
|
182
|
-
cancelAnimationFrame(self.rAF)
|
|
183
|
-
self.paused = false
|
|
184
|
-
delete self.startTime
|
|
185
|
-
self.startVal = self.frameVal
|
|
186
|
-
self.endVal = Number(newEndVal)
|
|
187
|
-
self.countDown = self.startVal > self.endVal
|
|
188
|
-
self.rAF = requestAnimationFrame(self.count)
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// format startVal on initialization
|
|
192
|
-
self.printValue(self.startVal)
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export { CountUp }
|
|
196
|
-
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 统计组件
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2021-06-08 09 时
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { ref, reactive, nextTick, watch, onMounted } from "vue";
|
|
10
|
-
import { CountUp } from './countUp.js'
|
|
11
|
-
const props = defineProps({
|
|
12
|
-
idName: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: ''
|
|
15
|
-
},
|
|
16
|
-
// 标题显示
|
|
17
|
-
title: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ''
|
|
20
|
-
},
|
|
21
|
-
startVal: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 0
|
|
24
|
-
},
|
|
25
|
-
endVal: {
|
|
26
|
-
type: Number,
|
|
27
|
-
default: 0
|
|
28
|
-
},
|
|
29
|
-
iconType: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ''
|
|
32
|
-
},
|
|
33
|
-
color: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: '#3b3a3a' // D9524E
|
|
36
|
-
},
|
|
37
|
-
introText: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: ''
|
|
40
|
-
},
|
|
41
|
-
docTypeText: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: ''
|
|
44
|
-
},
|
|
45
|
-
countSize: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: `30px`
|
|
48
|
-
},
|
|
49
|
-
countWeight: {
|
|
50
|
-
type: Number,
|
|
51
|
-
default: 700
|
|
52
|
-
},
|
|
53
|
-
delay: {
|
|
54
|
-
type: Number,
|
|
55
|
-
default: 500
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
const className = ref('')
|
|
59
|
-
|
|
60
|
-
function transformValue (val) {
|
|
61
|
-
let endVal = 0
|
|
62
|
-
let unit = ''
|
|
63
|
-
if (val < 1000) {
|
|
64
|
-
endVal = val
|
|
65
|
-
} else if (val >= 1000 && val < 1000000) {
|
|
66
|
-
endVal = parseInt(val / 1000)
|
|
67
|
-
unit = 'K+'
|
|
68
|
-
} else if (val >= 1000000 && val < 10000000000) {
|
|
69
|
-
endVal = parseInt(val / 1000000)
|
|
70
|
-
unit = 'M+'
|
|
71
|
-
} else {
|
|
72
|
-
endVal = parseInt(val / 1000000000)
|
|
73
|
-
unit = 'B+'
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
val: endVal,
|
|
77
|
-
unit: unit
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
let demo = {}
|
|
81
|
-
|
|
82
|
-
watch(() => props.endVal, (val) => {
|
|
83
|
-
const endVal = val
|
|
84
|
-
if (demo.update) { demo.update(endVal) }
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
onMounted(() => {
|
|
88
|
-
nextTick(() => {
|
|
89
|
-
setTimeout(() => {
|
|
90
|
-
|
|
91
|
-
const res = transformValue(props.endVal)
|
|
92
|
-
const endVal = props.endVal // res.val
|
|
93
|
-
let idname = props.idName
|
|
94
|
-
demo = new CountUp(props.idName, props.startVal, endVal, props.decimals, props.duration, props.options)
|
|
95
|
-
if (!demo.error) {
|
|
96
|
-
demo.start()
|
|
97
|
-
}
|
|
98
|
-
}, props.delay)
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
</script>
|
|
103
|
-
<template>
|
|
104
|
-
<div>
|
|
105
|
-
<div v-if="title" style="color: #606266;">{{ title }}</div>
|
|
106
|
-
<div :class="className"
|
|
107
|
-
:style="{ textAlign: 'center', color: color, fontSize: countSize, fontWeight: countWeight, fontFamily: 'PingFang SC' }">
|
|
108
|
-
<span v-cloak :id="idName">{{ startVal }}</span>
|
|
109
|
-
</div>
|
|
110
|
-
<slot name="intro"></slot>
|
|
111
|
-
</div>
|
|
112
|
-
</template>
|
|
113
|
-
|
|
114
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# 动态计数组件
|
|
2
|
-
11
|
|
3
|
-
## 示例
|
|
4
|
-
```
|
|
5
|
-
import {BdCountUp} from '@bdsoft/element';
|
|
6
|
-
<count-up class="infor-intro-num user-created-count" id-name="idName3"
|
|
7
|
-
:end-val="statistics.moduleusecount" color="rgba(5, 76, 232, 1)" :countSize="1033" :countWeight="700">
|
|
8
|
-
</count-up>
|
|
9
|
-
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 正在建设中
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2025-03-24
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { computed } from "vue";
|
|
10
|
-
const props = defineProps({
|
|
11
|
-
paddingTop: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: '20%'
|
|
14
|
-
},
|
|
15
|
-
// 是自定义图片展示还是默认svg展示 img /svg
|
|
16
|
-
imgType: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: 'img'
|
|
19
|
-
},
|
|
20
|
-
imgSize: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 200
|
|
23
|
-
},
|
|
24
|
-
// 可以接收第三方URL地址
|
|
25
|
-
imgUrl: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: ''
|
|
28
|
-
},
|
|
29
|
-
// 指定默认图
|
|
30
|
-
imgName: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: 'build.png'
|
|
33
|
-
},
|
|
34
|
-
// 图片的高
|
|
35
|
-
imgHeight: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: '506px'
|
|
38
|
-
},
|
|
39
|
-
// 图片的宽
|
|
40
|
-
imgWidth: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: '900px'
|
|
43
|
-
},
|
|
44
|
-
// 支持缩放
|
|
45
|
-
scale: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 1
|
|
48
|
-
},
|
|
49
|
-
// svg的描述
|
|
50
|
-
des:{
|
|
51
|
-
type: String,
|
|
52
|
-
default: ''
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const imgUrlPath = computed(() => {
|
|
57
|
-
if (props.imgUrl) {
|
|
58
|
-
return props.imgUrl;
|
|
59
|
-
} else if (props.imgName) {
|
|
60
|
-
return new URL(`./assets/${props.imgName}`, import.meta.url).href;
|
|
61
|
-
}
|
|
62
|
-
// return props.imgUrl? props.imgUrl : new URL('./assets/emptybg2.jpg', import.meta.url).href ;
|
|
63
|
-
});
|
|
64
|
-
</script>
|
|
65
|
-
<template>
|
|
66
|
-
<div ref="emptywarpRef" id="emptywarp">
|
|
67
|
-
|
|
68
|
-
<div style="width: 820px; margin: 0 auto; overflow: hidden;text-align:center" >
|
|
69
|
-
<img id="bdelogo" class="menubar" ref="bdlogoRef" :src="imgUrlPath" alt=""
|
|
70
|
-
:style="{ marginTop: props.paddingTop, height: props.imgHeight, width: props.imgWidth ,transform: `scale(${scale})`}" />
|
|
71
|
-
<br/>
|
|
72
|
-
<span style="color: #bec0c3;font-size: 20px;">{{ des }}</span>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<style lang="scss" scoped>
|
|
78
|
-
#emptywarp {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 100%;
|
|
81
|
-
margin: 0 auto;
|
|
82
|
-
display: flex;
|
|
83
|
-
transform-style: preserve-3d;
|
|
84
|
-
perspective: 200px;
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
#bdelogo {
|
|
90
|
-
margin: auto;
|
|
91
|
-
width: 715px;
|
|
92
|
-
height: 493px;
|
|
93
|
-
transform-style: preserve-3d;
|
|
94
|
-
transition: all 0.2s;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.menubar {
|
|
98
|
-
// animation: im_icon 2s linear infinite;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@keyframes im_icon {
|
|
102
|
-
0% {
|
|
103
|
-
// opacity: 0.8;
|
|
104
|
-
transform: translate(0, 0);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
50% {
|
|
108
|
-
// opacity: 1;
|
|
109
|
-
transform: translate(0, 5px);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
100% {
|
|
113
|
-
// opacity: 0.8;
|
|
114
|
-
transform: translate(0, 0);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 空页面 数据未加载前显示 后续可完善能动态元素的效果
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2021-06-08 09 时
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { computed } from "vue";
|
|
10
|
-
const props = defineProps({
|
|
11
|
-
paddingTop: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: '20%'
|
|
14
|
-
},
|
|
15
|
-
// 是自定义图片展示还是默认svg展示 img /svg
|
|
16
|
-
imgType: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: 'img'
|
|
19
|
-
},
|
|
20
|
-
imgSize: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 200
|
|
23
|
-
},
|
|
24
|
-
// 可以接收第三方URL地址
|
|
25
|
-
imgUrl: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: ''
|
|
28
|
-
},
|
|
29
|
-
// 指定默认图
|
|
30
|
-
imgName: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: 'emptybg.png'
|
|
33
|
-
},
|
|
34
|
-
// 图片的高
|
|
35
|
-
imgHeight: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: '493px'
|
|
38
|
-
},
|
|
39
|
-
// 图片的宽
|
|
40
|
-
imgWidth: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: '715px'
|
|
43
|
-
},
|
|
44
|
-
// 支持缩放
|
|
45
|
-
scale: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 1
|
|
48
|
-
},
|
|
49
|
-
// svg的描述
|
|
50
|
-
des:{
|
|
51
|
-
type: String,
|
|
52
|
-
default: '无数据'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const imgUrlPath = computed(() => {
|
|
57
|
-
if (props.imgUrl) {
|
|
58
|
-
return props.imgUrl;
|
|
59
|
-
} else if (props.imgName) {
|
|
60
|
-
return new URL(`./assets/${props.imgName}`, import.meta.url).href;
|
|
61
|
-
}
|
|
62
|
-
// return props.imgUrl? props.imgUrl : new URL('./assets/emptybg2.jpg', import.meta.url).href ;
|
|
63
|
-
});
|
|
64
|
-
</script>
|
|
65
|
-
<template>
|
|
66
|
-
<div ref="emptywarpRef" id="emptywarp">
|
|
67
|
-
<div v-if="imgType == 'svg'" style="width: 420px; margin: 0 auto; overflow: hidden" >
|
|
68
|
-
<el-empty :image-size="imgSize" :description="des" />
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div v-else style="width: 820px; margin: 0 auto; overflow: hidden;text-align:center" >
|
|
72
|
-
<img id="bdelogo" class="menubar" ref="bdlogoRef" :src="imgUrlPath" alt=""
|
|
73
|
-
:style="{ marginTop: props.paddingTop, height: props.imgHeight, width: props.imgWidth ,transform: `scale(${scale})`}" />
|
|
74
|
-
<br/>
|
|
75
|
-
<span style="color: #bec0c3;font-size: 20px;">{{ des }}</span>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<style lang="scss" scoped>
|
|
81
|
-
#emptywarp {
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
margin: 0 auto;
|
|
85
|
-
display: flex;
|
|
86
|
-
transform-style: preserve-3d;
|
|
87
|
-
perspective: 200px;
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
#bdelogo {
|
|
93
|
-
margin: auto;
|
|
94
|
-
width: 715px;
|
|
95
|
-
height: 493px;
|
|
96
|
-
transform-style: preserve-3d;
|
|
97
|
-
transition: all 0.2s;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.menubar {
|
|
101
|
-
animation: im_icon 2s linear infinite;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@keyframes im_icon {
|
|
105
|
-
0% {
|
|
106
|
-
// opacity: 0.8;
|
|
107
|
-
transform: translate(0, 0);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
50% {
|
|
111
|
-
// opacity: 1;
|
|
112
|
-
transform: translate(0, 5px);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
100% {
|
|
116
|
-
// opacity: 0.8;
|
|
117
|
-
transform: translate(0, 0);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</style>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 空页面 数据未加载前显示 后续可完善能动态元素的效果
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2021-06-08 09 时
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { computed } from "vue";
|
|
10
|
-
import empty from "./empty.vue";
|
|
11
|
-
</script>
|
|
12
|
-
<template>
|
|
13
|
-
<empty imgName="wuxiao.png" imgWidth="100%" des="" imgHeight="auto"></empty>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style lang="scss" scoped>
|
|
17
|
-
#emptywarp {
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 100%;
|
|
20
|
-
margin: 0 auto;
|
|
21
|
-
display: flex;
|
|
22
|
-
transform-style: preserve-3d;
|
|
23
|
-
perspective: 200px;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
#bdelogo {
|
|
29
|
-
margin: auto;
|
|
30
|
-
width: 715px;
|
|
31
|
-
height: 493px;
|
|
32
|
-
transform-style: preserve-3d;
|
|
33
|
-
transition: all 0.2s;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.menubar {
|
|
37
|
-
animation: im_icon 2s linear infinite;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@keyframes im_icon {
|
|
41
|
-
0% {
|
|
42
|
-
// opacity: 0.8;
|
|
43
|
-
transform: translate(0, 0);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
50% {
|
|
47
|
-
// opacity: 1;
|
|
48
|
-
transform: translate(0, 5px);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
100% {
|
|
52
|
-
// opacity: 0.8;
|
|
53
|
-
transform: translate(0, 0);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</style>
|