vue-devui 1.0.0-pre.0 → 1.0.0-rc.10
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/README.md +149 -187
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8182 -296
- package/auto-complete/index.umd.js +29 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +30 -5
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5741 -127
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +59 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8060 -255
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +379 -0
- package/collapse/index.umd.js +1 -0
- package/{anchor → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/date-picker/index.es.js +8159 -288
- package/date-picker/index.umd.js +27 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +31 -4
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +297 -181
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +525 -154
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1039 -1175
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +42 -21
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +101 -86
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +197 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +55 -31
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8066 -144
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +269 -183
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +74 -35
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +412 -204
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +307 -57
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/overlay/index.es.js +127 -149
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +10 -44
- package/pagination/index.es.js +158 -148
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +317 -246
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +7964 -157
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +184 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3644 -1122
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9144 -597
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +63 -41
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +109 -75
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +469 -349
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +7 -18
- package/statistic/index.umd.js +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +7794 -64
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +10119 -1206
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +342 -141
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7913 -83
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/{anchor → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +425 -0
- package/timeline/index.umd.js +1 -0
- package/{back-top → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +308 -236
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +4189 -1851
- package/tree/index.umd.js +18 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +380 -123
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +18121 -23161
- package/vue-devui.umd.js +25 -15
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8187
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/statistic/index.es.js
CHANGED
|
@@ -61,9 +61,10 @@ const isHasDot = (value) => {
|
|
|
61
61
|
if (!isNaN(value)) {
|
|
62
62
|
return (value + "").indexOf(".") !== -1;
|
|
63
63
|
}
|
|
64
|
+
return false;
|
|
64
65
|
};
|
|
65
66
|
const analysisValueType = (value, propsValue, groupSeparator, splitPrecisionNumber) => {
|
|
66
|
-
const fixedNumber = propsValue.toString().indexOf(".") !== -1 ? propsValue.toString().length - propsValue.toString().indexOf(".") - 1 : 0;
|
|
67
|
+
const fixedNumber = (propsValue == null ? void 0 : propsValue.toString().indexOf(".")) !== -1 ? (propsValue == null ? void 0 : propsValue.toString().length) - (propsValue == null ? void 0 : propsValue.toString().indexOf(".")) - 1 : 0;
|
|
67
68
|
if (typeof value === "number") {
|
|
68
69
|
if (isHasDot(value)) {
|
|
69
70
|
return splitPrecisionNumber ? separator(value.toFixed(splitPrecisionNumber).toString(), groupSeparator) : separator(value.toFixed(fixedNumber).toString(), groupSeparator);
|
|
@@ -92,16 +93,7 @@ const easeInExpo = function(x) {
|
|
|
92
93
|
const easeInOutCirc = function(x) {
|
|
93
94
|
return x < 0.5 ? (1 - sqrt(1 - pow(2 * x, 2))) / 2 : (sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2;
|
|
94
95
|
};
|
|
95
|
-
var easing =
|
|
96
|
-
__proto__: null,
|
|
97
|
-
[Symbol.toStringTag]: "Module",
|
|
98
|
-
easeOutCubic,
|
|
99
|
-
linear,
|
|
100
|
-
easeOutExpo,
|
|
101
|
-
easeInOutExpo,
|
|
102
|
-
easeInExpo,
|
|
103
|
-
easeInOutCirc
|
|
104
|
-
});
|
|
96
|
+
var easing = { easeOutCubic, linear, easeOutExpo, easeInOutExpo, easeInExpo, easeInOutCirc };
|
|
105
97
|
class Tween {
|
|
106
98
|
constructor(options) {
|
|
107
99
|
__publicField(this, "from");
|
|
@@ -119,7 +111,7 @@ class Tween {
|
|
|
119
111
|
__publicField(this, "time");
|
|
120
112
|
__publicField(this, "elapsed");
|
|
121
113
|
__publicField(this, "keys");
|
|
122
|
-
const { from, to, duration, delay, easing:
|
|
114
|
+
const { from, to, duration, delay, easing: easingValue, onStart, onUpdate, onFinish } = options;
|
|
123
115
|
for (const key in from) {
|
|
124
116
|
if (to[key] === void 0) {
|
|
125
117
|
to[key] = from[key];
|
|
@@ -134,7 +126,7 @@ class Tween {
|
|
|
134
126
|
this.to = to;
|
|
135
127
|
this.duration = duration;
|
|
136
128
|
this.delay = delay;
|
|
137
|
-
this.easing =
|
|
129
|
+
this.easing = easingValue;
|
|
138
130
|
this.onStart = onStart;
|
|
139
131
|
this.onUpdate = onUpdate;
|
|
140
132
|
this.onFinish = onFinish;
|
|
@@ -253,15 +245,12 @@ var Statistic = defineComponent({
|
|
|
253
245
|
};
|
|
254
246
|
}
|
|
255
247
|
});
|
|
256
|
-
Statistic.install = function(app) {
|
|
257
|
-
app.component(Statistic.name, Statistic);
|
|
258
|
-
};
|
|
259
248
|
var index = {
|
|
260
249
|
title: "Statistic \u7EDF\u8BA1\u6570\u503C",
|
|
261
250
|
category: "\u6570\u636E\u5C55\u793A",
|
|
262
251
|
status: "100%",
|
|
263
252
|
install(app) {
|
|
264
|
-
app.
|
|
253
|
+
app.component(Statistic.name, Statistic);
|
|
265
254
|
}
|
|
266
255
|
};
|
|
267
|
-
export { Statistic, index as default };
|
|
256
|
+
export { Statistic, index as default, statisticProps };
|
package/statistic/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var q=Object.defineProperty;var j=(s,i,d)=>i in s?q(s,i,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[i]=d;var a=(s,i,d)=>(j(s,typeof i!="symbol"?i+"":i,d),d);(function(s,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(s=typeof globalThis!="undefined"?globalThis:s||self,i(s.index={},s.Vue))})(this,function(s,i){"use strict";const d={title:{type:String,default:""},value:{type:[Number,String]},prefix:{type:String},suffix:{type:String},precision:{type:Number},groupSeparator:{type:String,default:""},valueStyle:{type:Object},animationDuration:{type:Number,default:2e3},valueFrom:{type:Number},animation:{type:Boolean,default:!1},start:{type:Boolean,default:!0},extra:{type:String,default:""}},m=(t,e)=>t.replace(/\d+/,function(n){return n.replace(/(\d)(?=(\d{3})+$)/g,function(f){return f+`${e}`})}),E=t=>isNaN(t)?!1:(t+"").indexOf(".")!==-1,A=(t,e,r,n)=>{const f=(e==null?void 0:e.toString().indexOf("."))!==-1?(e==null?void 0:e.toString().length)-(e==null?void 0:e.toString().indexOf("."))-1:0;return typeof t=="number"?E(t)?m(n?t.toFixed(n).toString():t.toFixed(f).toString(),r):m(n?t.toFixed(n).toString():t.toString(),r):t},c=Math.pow,v=Math.sqrt;var I={easeOutCubic:function(t){return 1-c(1-t,3)},linear:t=>t,easeOutExpo:function(t){return t===1?1:1-c(2,-10*t)},easeInOutExpo:function(t){return t===0?0:t===1?1:t<.5?c(2,20*t-10)/2:(2-c(2,-20*t+10))/2},easeInExpo:function(t){return t===0?0:c(2,10*t-10)},easeInOutCirc:function(t){return t<.5?(1-v(1-c(2*t,2)))/2:(v(1-c(-2*t+2,2))+1)/2}};class M{constructor(e){a(this,"from");a(this,"to");a(this,"duration");a(this,"delay");a(this,"easing");a(this,"onStart");a(this,"onUpdate");a(this,"onFinish");a(this,"startTime");a(this,"started");a(this,"finished");a(this,"timer");a(this,"time");a(this,"elapsed");a(this,"keys");const{from:r,to:n,duration:f,delay:g,easing:y,onStart:u,onUpdate:l,onFinish:h}=e;for(const o in r)n[o]===void 0&&(n[o]=r[o]);for(const o in n)r[o]===void 0&&(r[o]=n[o]);this.from=r,this.to=n,this.duration=f,this.delay=g,this.easing=y,this.onStart=u,this.onUpdate=l,this.onFinish=h,this.startTime=Date.now()+this.delay,this.started=!1,this.finished=!1,this.timer=null,this.keys={}}update(){if(this.time=Date.now(),!(this.time<this.startTime)&&!this.finished){if(this.elapsed===this.duration){this.finished||(this.finished=!0,this.onFinish&&this.onFinish(this.keys));return}this.elapsed=this.time-this.startTime,this.elapsed=this.elapsed>this.duration?this.duration:this.elapsed;for(const e in this.to)this.keys[e]=this.from[e]+(this.to[e]-this.from[e])*I[this.easing](this.elapsed/this.duration);this.started||(this.onStart&&this.onStart(this.keys),this.started=!0),this.onUpdate(this.keys)}}start(){this.startTime=Date.now()+this.delay;const e=()=>{this.update(),this.timer=requestAnimationFrame(e),this.finished&&(cancelAnimationFrame(this.timer),this.timer=null)};e()}stop(){cancelAnimationFrame(this.timer),this.timer=null}}var G="",S=i.defineComponent({name:"DStatistic",inheritAttrs:!1,props:d,setup(t,e){var y;const r=i.ref((y=t.valueFrom)!=null?y:t.value),n=i.ref(null),f=(u=(h=>(h=t.valueFrom)!=null?h:0)(),l=typeof t.value=="number"?t.value:Number(t.value))=>{u!==l&&(n.value=new M({from:{value:u},to:{value:l},delay:0,duration:t.animationDuration,easing:"easeOutCubic",onUpdate:o=>{r.value=o.value},onFinish:()=>{r.value=l}}),n.value.start())},g=i.computed(()=>A(r.value,t.value,t.groupSeparator,t.precision));return i.onMounted(()=>{t.animation&&t.start&&f()}),i.watch(()=>t.start,u=>{u&&!n.value&&f()}),()=>{var u,l,h,o,x,F,O,N,b,T,k,w,C,D;return i.createVNode("div",i.mergeProps({class:"devui-statistic"},e.attrs),[i.createVNode("div",{class:"devui-statistic-title",style:t.titleStyle},[((l=(u=e.slots).title)==null?void 0:l.call(u))||t.title]),i.createVNode("div",{class:"devui-statistic-content",style:t.valueStyle},[t.prefix||((o=(h=e.slots).prefix)==null?void 0:o.call(h))?i.createVNode("span",{class:"devui-statistic-prefix"},[((F=(x=e.slots).prefix)==null?void 0:F.call(x))||t.prefix]):null,i.createVNode("span",{class:"devui-statistic--value"},[g.value]),t.suffix||((N=(O=e.slots).suffix)==null?void 0:N.call(O))?i.createVNode("span",{class:"devui-statistic-suffix"},[((T=(b=e.slots).suffix)==null?void 0:T.call(b))||t.suffix]):null]),t.extra||((w=(k=e.slots).extra)==null?void 0:w.call(k))?i.createVNode("div",{class:"devui-statistic-extra"},[i.createTextVNode(" "),((D=(C=e.slots).extra)==null?void 0:D.call(C))||t.extra]):null])}}}),U={title:"Statistic \u7EDF\u8BA1\u6570\u503C",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(t){t.component(S.name,S)}};s.Statistic=S,s.default=U,s.statisticProps=d,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/status/index.es.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from "vue";
|
|
2
|
+
function createBem(namespace, element, modifier) {
|
|
3
|
+
let cls = namespace;
|
|
4
|
+
if (element) {
|
|
5
|
+
cls += `__${element}`;
|
|
6
|
+
}
|
|
7
|
+
if (modifier) {
|
|
8
|
+
cls += `--${modifier}`;
|
|
9
|
+
}
|
|
10
|
+
return cls;
|
|
11
|
+
}
|
|
12
|
+
function useNamespace(block, needDot = false) {
|
|
13
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
14
|
+
const b = () => createBem(namespace);
|
|
15
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
16
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
17
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
18
|
+
return {
|
|
19
|
+
b,
|
|
20
|
+
e,
|
|
21
|
+
m,
|
|
22
|
+
em
|
|
23
|
+
};
|
|
24
|
+
}
|
|
2
25
|
var status = "";
|
|
3
26
|
var Status = defineComponent({
|
|
4
27
|
name: "DStatus",
|
|
@@ -9,14 +32,15 @@ var Status = defineComponent({
|
|
|
9
32
|
}
|
|
10
33
|
},
|
|
11
34
|
setup(props, ctx) {
|
|
35
|
+
const ns = useNamespace("status");
|
|
12
36
|
const typeClass = computed(() => {
|
|
13
37
|
const {
|
|
14
38
|
type
|
|
15
39
|
} = props;
|
|
16
40
|
const typeStatus = ["success", "error", "initial", "warning", "waiting", "running", "invalid"];
|
|
17
|
-
let typeClassStr =
|
|
41
|
+
let typeClassStr = `${ns.b()} ${ns.em("bg", "invalid")}`;
|
|
18
42
|
if (typeStatus.includes(type)) {
|
|
19
|
-
typeClassStr =
|
|
43
|
+
typeClassStr = `${ns.b()} ${ns.em("bg", type)}`;
|
|
20
44
|
}
|
|
21
45
|
return typeClassStr;
|
|
22
46
|
});
|
|
@@ -28,15 +52,12 @@ var Status = defineComponent({
|
|
|
28
52
|
};
|
|
29
53
|
}
|
|
30
54
|
});
|
|
31
|
-
Status.install = function(app) {
|
|
32
|
-
app.component(Status.name, Status);
|
|
33
|
-
};
|
|
34
55
|
var index = {
|
|
35
56
|
title: "Status \u72B6\u6001",
|
|
36
57
|
category: "\u901A\u7528",
|
|
37
58
|
status: "100%",
|
|
38
59
|
install(app) {
|
|
39
|
-
app.
|
|
60
|
+
app.component(Status.name, Status);
|
|
40
61
|
}
|
|
41
62
|
};
|
|
42
63
|
export { Status, index as default };
|
package/status/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,
|
|
1
|
+
(function(t,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(t=typeof globalThis!="undefined"?globalThis:t||self,u(t.index={},t.Vue))})(this,function(t,u){"use strict";function r(n,a,e){let i=n;return a&&(i+=`__${a}`),e&&(i+=`--${e}`),i}function f(n,a=!1){const e=a?`.devui-${n}`:`devui-${n}`;return{b:()=>r(e),e:s=>s?r(e,s):"",m:s=>s?r(e,"",s):"",em:(s,p)=>s&&p?r(e,s,p):""}}var y="",d=u.defineComponent({name:"DStatus",props:{type:{default:"invalid",type:String}},setup(n,a){const e=f("status"),i=u.computed(()=>{const{type:o}=n,c=["success","error","initial","warning","waiting","running","invalid"];let l=`${e.b()} ${e.em("bg","invalid")}`;return c.includes(o)&&(l=`${e.b()} ${e.em("bg",o)}`),l});return()=>{var o,c;return u.createVNode("span",{class:i.value},[(c=(o=a.slots).default)==null?void 0:c.call(o)])}}}),m={title:"Status \u72B6\u6001",category:"\u901A\u7528",status:"100%",install(n){n.component(d.name,d)}};t.Status=d,t.default=m,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/status/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-
|
|
1
|
+
.devui-status{line-height:20px;height:20px;display:flex;align-items:center}.devui-status:before{display:inline-block;content:"";width:10px;height:10px;margin-right:5px;border-radius:100%}.devui-status.devui-status__bg--success:before{background-color:var(--devui-success, #50d4ab)}.devui-status.devui-status__bg--error:before{background-color:var(--devui-danger, #f66f6a)}.devui-status.devui-status__bg--warning:before{background-color:var(--devui-warning, #fac20a)}.devui-status.devui-status__bg--initial:before{background-color:var(--devui-initial, #e9edfa)}.devui-status.devui-status__bg--waiting:before{background-color:var(--devui-waiting, #beccfa)}.devui-status.devui-status__bg--running:before{background-color:var(--devui-info, #5e7ce0)}.devui-status.devui-status__bg--invalid:before{background-color:var(--devui-dividing-line, #f2f2f3)}
|