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/input-number/index.es.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
1
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
2
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
3
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
for (var prop in
|
|
8
|
-
if (__hasOwnProp.call(
|
|
9
|
-
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(
|
|
12
|
-
if (__propIsEnum.call(
|
|
13
|
-
|
|
4
|
+
var __objRest = (source, exclude) => {
|
|
5
|
+
var target = {};
|
|
6
|
+
for (var prop in source)
|
|
7
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8
|
+
target[prop] = source[prop];
|
|
9
|
+
if (source != null && __getOwnPropSymbols)
|
|
10
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
11
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
12
|
+
target[prop] = source[prop];
|
|
14
13
|
}
|
|
15
|
-
return
|
|
14
|
+
return target;
|
|
16
15
|
};
|
|
17
|
-
import {
|
|
16
|
+
import { createVNode, computed, ref, toRefs, reactive, watch, defineComponent, mergeProps } from "vue";
|
|
18
17
|
const inputNumberProps = {
|
|
19
18
|
placeholder: {
|
|
20
|
-
type: String
|
|
21
|
-
default: void 0
|
|
19
|
+
type: String
|
|
22
20
|
},
|
|
23
21
|
disabled: {
|
|
24
22
|
type: Boolean,
|
|
@@ -26,7 +24,7 @@ const inputNumberProps = {
|
|
|
26
24
|
},
|
|
27
25
|
step: {
|
|
28
26
|
type: Number,
|
|
29
|
-
default:
|
|
27
|
+
default: 1
|
|
30
28
|
},
|
|
31
29
|
max: {
|
|
32
30
|
type: Number,
|
|
@@ -41,189 +39,277 @@ const inputNumberProps = {
|
|
|
41
39
|
default: ""
|
|
42
40
|
},
|
|
43
41
|
modelValue: {
|
|
44
|
-
type: Number
|
|
45
|
-
default: 0
|
|
46
|
-
},
|
|
47
|
-
"onUpdate:modelValue": {
|
|
48
|
-
type: Function,
|
|
49
|
-
default: void 0
|
|
50
|
-
},
|
|
51
|
-
"onChange": {
|
|
52
|
-
type: Function,
|
|
53
|
-
default: void 0
|
|
54
|
-
},
|
|
55
|
-
"onKeydown": {
|
|
56
|
-
type: Function,
|
|
57
|
-
default: void 0
|
|
42
|
+
type: Number
|
|
58
43
|
},
|
|
59
|
-
|
|
60
|
-
type:
|
|
61
|
-
default: void 0
|
|
62
|
-
},
|
|
63
|
-
"onBlur": {
|
|
64
|
-
type: Function,
|
|
65
|
-
default: void 0
|
|
44
|
+
precision: {
|
|
45
|
+
type: Number
|
|
66
46
|
}
|
|
67
47
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
48
|
+
function createBem(namespace, element, modifier) {
|
|
49
|
+
let cls = namespace;
|
|
50
|
+
if (element) {
|
|
51
|
+
cls += `__${element}`;
|
|
52
|
+
}
|
|
53
|
+
if (modifier) {
|
|
54
|
+
cls += `--${modifier}`;
|
|
55
|
+
}
|
|
56
|
+
return cls;
|
|
57
|
+
}
|
|
58
|
+
function useNamespace(block, needDot = false) {
|
|
59
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
60
|
+
const b = () => createBem(namespace);
|
|
61
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
62
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
63
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
64
|
+
return {
|
|
65
|
+
b,
|
|
66
|
+
e,
|
|
67
|
+
m,
|
|
68
|
+
em
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const ns$1 = useNamespace("input-number");
|
|
72
|
+
function IncIcon() {
|
|
73
|
+
return createVNode("svg", {
|
|
74
|
+
"class": ns$1.e("icon-arrow"),
|
|
75
|
+
"width": "1em",
|
|
76
|
+
"height": "1em",
|
|
77
|
+
"viewBox": "0 0 16 16",
|
|
78
|
+
"version": "1.1",
|
|
79
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
80
|
+
}, [createVNode("g", {
|
|
81
|
+
"stroke": "none",
|
|
82
|
+
"stroke-width": "1",
|
|
83
|
+
"fill": "none",
|
|
84
|
+
"fill-rule": "evenodd"
|
|
85
|
+
}, [createVNode("path", {
|
|
86
|
+
"d": "M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z",
|
|
87
|
+
"fill-rule": "nonzero"
|
|
88
|
+
}, null)])]);
|
|
89
|
+
}
|
|
90
|
+
function DecIcon() {
|
|
91
|
+
return createVNode("svg", {
|
|
92
|
+
"class": ns$1.e("icon-arrow"),
|
|
93
|
+
"width": "1em",
|
|
94
|
+
"height": "1em",
|
|
95
|
+
"viewBox": "0 0 16 16",
|
|
96
|
+
"version": "1.1",
|
|
97
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
98
|
+
}, [createVNode("g", {
|
|
99
|
+
"stroke": "none",
|
|
100
|
+
"stroke-width": "1",
|
|
101
|
+
"fill": "none",
|
|
102
|
+
"fill-rule": "evenodd"
|
|
103
|
+
}, [createVNode("path", {
|
|
104
|
+
"d": "M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z",
|
|
105
|
+
"fill-rule": "nonzero"
|
|
106
|
+
}, null)])]);
|
|
107
|
+
}
|
|
108
|
+
const isNumber = (value) => typeof value === "number";
|
|
109
|
+
const isUndefined = (value) => value === void 0;
|
|
110
|
+
const isNull = (value) => value === null;
|
|
111
|
+
const ns = useNamespace("input-number");
|
|
112
|
+
function useRender(props, ctx) {
|
|
113
|
+
const _a = ctx.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
|
|
114
|
+
const customStyle = { style };
|
|
115
|
+
const wrapClass = computed(() => [
|
|
116
|
+
{
|
|
117
|
+
[ns.b()]: true
|
|
83
118
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
customClass
|
|
120
|
+
]);
|
|
121
|
+
const controlButtonsClass = computed(() => ({
|
|
122
|
+
[ns.e("control-buttons")]: true,
|
|
123
|
+
disabled: props.disabled,
|
|
124
|
+
[ns.m(props.size)]: true
|
|
125
|
+
}));
|
|
126
|
+
const inputWrapClass = computed(() => ({
|
|
127
|
+
[ns.e("input-wrap")]: true,
|
|
128
|
+
[ns.m(props.size)]: true
|
|
129
|
+
}));
|
|
130
|
+
const inputInnerClass = computed(() => ({
|
|
131
|
+
[ns.e("input-box")]: true,
|
|
132
|
+
disabled: props.disabled
|
|
133
|
+
}));
|
|
134
|
+
return { wrapClass, customStyle, otherAttrs, controlButtonsClass, inputWrapClass, inputInnerClass };
|
|
135
|
+
}
|
|
136
|
+
function useExpose(ctx) {
|
|
137
|
+
const inputRef = ref();
|
|
138
|
+
const focus = () => {
|
|
139
|
+
inputRef.value.focus();
|
|
140
|
+
};
|
|
141
|
+
const blur = () => {
|
|
142
|
+
inputRef.value.blur();
|
|
143
|
+
};
|
|
144
|
+
const select = () => {
|
|
145
|
+
inputRef.value.select();
|
|
146
|
+
};
|
|
147
|
+
ctx.expose({ focus, blur, select });
|
|
148
|
+
return { inputRef };
|
|
149
|
+
}
|
|
150
|
+
function getPrecision(pre) {
|
|
151
|
+
let precision = 0;
|
|
152
|
+
if (isUndefined(pre)) {
|
|
153
|
+
return precision;
|
|
113
154
|
}
|
|
114
|
-
|
|
155
|
+
const preString = pre.toString();
|
|
156
|
+
const dotIndex = preString.indexOf(".");
|
|
157
|
+
if (dotIndex !== -1) {
|
|
158
|
+
precision = preString.length - dotIndex - 1;
|
|
159
|
+
}
|
|
160
|
+
return precision;
|
|
161
|
+
}
|
|
162
|
+
function useEvent(props, ctx, inputRef) {
|
|
163
|
+
const { min, max, step, disabled } = toRefs(props);
|
|
164
|
+
const state = reactive({
|
|
165
|
+
currentValue: props.modelValue || "",
|
|
166
|
+
userInputValue: void 0
|
|
167
|
+
});
|
|
168
|
+
const numPrecision = computed(() => {
|
|
169
|
+
if (!isUndefined(props.precision)) {
|
|
170
|
+
return props.precision;
|
|
171
|
+
} else {
|
|
172
|
+
return Math.max(getPrecision(props.modelValue), getPrecision(step.value));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
const inputVal = computed(() => {
|
|
176
|
+
if (!isUndefined(state.userInputValue)) {
|
|
177
|
+
return state.userInputValue;
|
|
178
|
+
}
|
|
179
|
+
let currentValue = state.currentValue;
|
|
180
|
+
if (currentValue === "" || isUndefined(currentValue) || Number.isNaN(currentValue)) {
|
|
181
|
+
return "";
|
|
182
|
+
}
|
|
183
|
+
if (isNumber(currentValue)) {
|
|
184
|
+
currentValue = currentValue.toFixed(numPrecision.value);
|
|
185
|
+
}
|
|
186
|
+
return currentValue;
|
|
187
|
+
});
|
|
188
|
+
const toPrecision = (num) => {
|
|
189
|
+
return Number.parseFloat(num.toFixed(numPrecision.value));
|
|
190
|
+
};
|
|
191
|
+
const computeByStep = (val, addOrNot = 1) => {
|
|
192
|
+
if (!isNumber(val)) {
|
|
193
|
+
return state.currentValue;
|
|
194
|
+
}
|
|
195
|
+
return toPrecision(val + step.value * addOrNot);
|
|
196
|
+
};
|
|
197
|
+
const correctValue = (value, shouldUpdate) => {
|
|
198
|
+
if (value === "" || isUndefined(value) || isNull(value) || Number.isNaN(value)) {
|
|
199
|
+
return void 0;
|
|
200
|
+
}
|
|
201
|
+
let newVal = Number(value);
|
|
202
|
+
newVal = toPrecision(newVal);
|
|
203
|
+
if (newVal > max.value || newVal < min.value) {
|
|
204
|
+
newVal = newVal > max.value ? max.value : min.value;
|
|
205
|
+
shouldUpdate && ctx.emit("update:modelValue", newVal);
|
|
206
|
+
}
|
|
207
|
+
return newVal;
|
|
208
|
+
};
|
|
209
|
+
const setCurrentValue = (value) => {
|
|
210
|
+
const oldVal = state.currentValue;
|
|
211
|
+
const newVal = correctValue(value);
|
|
212
|
+
if (oldVal === newVal) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
state.userInputValue = void 0;
|
|
216
|
+
ctx.emit("update:modelValue", newVal);
|
|
217
|
+
ctx.emit("input", newVal);
|
|
218
|
+
ctx.emit("change", newVal, oldVal);
|
|
219
|
+
state.currentValue = newVal;
|
|
220
|
+
};
|
|
221
|
+
const minDisabled = computed(() => isNumber(state.currentValue) && computeByStep(state.currentValue, -1) < props.min);
|
|
222
|
+
const maxDisabled = computed(() => isNumber(state.currentValue) && computeByStep(state.currentValue) > props.max);
|
|
223
|
+
const onAdd = () => {
|
|
224
|
+
if (disabled.value || maxDisabled.value) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
inputRef.value.focus();
|
|
228
|
+
const newVal = computeByStep(state.currentValue || 0);
|
|
229
|
+
setCurrentValue(newVal);
|
|
230
|
+
};
|
|
231
|
+
const onSubtract = () => {
|
|
232
|
+
if (disabled.value || minDisabled.value) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
inputRef.value.focus();
|
|
236
|
+
const newVal = computeByStep(state.currentValue || 0, -1);
|
|
237
|
+
setCurrentValue(newVal);
|
|
238
|
+
};
|
|
239
|
+
watch(() => props.modelValue, (val) => {
|
|
240
|
+
state.currentValue = correctValue(val, true);
|
|
241
|
+
state.userInputValue = void 0;
|
|
242
|
+
}, { immediate: true });
|
|
243
|
+
const onInput = (event) => {
|
|
244
|
+
const value = event.target.value;
|
|
245
|
+
state.userInputValue = value;
|
|
246
|
+
};
|
|
247
|
+
const onChange = (event) => {
|
|
248
|
+
const value = event.target.value;
|
|
249
|
+
const newVal = value !== "" ? Number(value) : "";
|
|
250
|
+
if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
|
|
251
|
+
setCurrentValue(newVal);
|
|
252
|
+
}
|
|
253
|
+
state.userInputValue = void 0;
|
|
254
|
+
};
|
|
255
|
+
return { inputVal, minDisabled, maxDisabled, onAdd, onSubtract, onInput, onChange };
|
|
256
|
+
}
|
|
257
|
+
var inputNumber = "";
|
|
115
258
|
var InputNumber = defineComponent({
|
|
116
259
|
name: "DInputNumber",
|
|
117
260
|
props: inputNumberProps,
|
|
118
|
-
emits: ["update:modelValue", "change", "input"
|
|
261
|
+
emits: ["update:modelValue", "change", "input"],
|
|
119
262
|
setup(props, ctx) {
|
|
120
|
-
const inputVal = ref(props.modelValue);
|
|
121
|
-
const focusVal = ref("");
|
|
122
|
-
const isSize = computed(() => {
|
|
123
|
-
return `devui-input-number-${props.size}`;
|
|
124
|
-
});
|
|
125
|
-
const isDisabled = computed(() => {
|
|
126
|
-
return props.disabled;
|
|
127
|
-
});
|
|
128
|
-
const add = () => {
|
|
129
|
-
if (props.disabled)
|
|
130
|
-
return;
|
|
131
|
-
if (inputVal.value >= props.max)
|
|
132
|
-
return;
|
|
133
|
-
inputVal.value += props.step != 0 ? props.step : 1;
|
|
134
|
-
focusVal.value = "active";
|
|
135
|
-
ctx.emit("change", inputVal.value);
|
|
136
|
-
ctx.emit("update:modelValue", inputVal.value);
|
|
137
|
-
};
|
|
138
|
-
const subtract = () => {
|
|
139
|
-
if (props.disabled)
|
|
140
|
-
return;
|
|
141
|
-
if (inputVal.value <= props.min)
|
|
142
|
-
return;
|
|
143
|
-
inputVal.value -= props.step != 0 ? props.step : 1;
|
|
144
|
-
focusVal.value = "active";
|
|
145
|
-
ctx.emit("change", inputVal.value);
|
|
146
|
-
ctx.emit("update:modelValue", inputVal.value);
|
|
147
|
-
};
|
|
148
|
-
const onInput = (val) => {
|
|
149
|
-
inputVal.value = parseInt(val.data);
|
|
150
|
-
ctx.emit("input", val.data);
|
|
151
|
-
ctx.emit("update:modelValue", val.data);
|
|
152
|
-
};
|
|
153
|
-
const onFocus = ($event) => {
|
|
154
|
-
focusVal.value = "active";
|
|
155
|
-
ctx.emit("focus", $event);
|
|
156
|
-
};
|
|
157
|
-
const onBlur = ($event) => {
|
|
158
|
-
focusVal.value = "";
|
|
159
|
-
ctx.emit("blur", $event);
|
|
160
|
-
};
|
|
161
|
-
const onChange = ($event) => {
|
|
162
|
-
ctx.emit("change", $event.target.value);
|
|
163
|
-
};
|
|
164
|
-
const onKeydown = ($event) => {
|
|
165
|
-
ctx.emit("keydown", $event);
|
|
166
|
-
};
|
|
167
|
-
return {
|
|
168
|
-
inputVal,
|
|
169
|
-
focusVal,
|
|
170
|
-
isDisabled,
|
|
171
|
-
isSize,
|
|
172
|
-
add,
|
|
173
|
-
subtract,
|
|
174
|
-
onInput,
|
|
175
|
-
onChange,
|
|
176
|
-
onKeydown,
|
|
177
|
-
onBlur,
|
|
178
|
-
onFocus
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
render() {
|
|
182
263
|
const {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
264
|
+
disabled
|
|
265
|
+
} = toRefs(props);
|
|
266
|
+
const {
|
|
267
|
+
wrapClass,
|
|
268
|
+
customStyle,
|
|
269
|
+
otherAttrs,
|
|
270
|
+
controlButtonsClass,
|
|
271
|
+
inputWrapClass,
|
|
272
|
+
inputInnerClass
|
|
273
|
+
} = useRender(props, ctx);
|
|
274
|
+
const {
|
|
275
|
+
inputRef
|
|
276
|
+
} = useExpose(ctx);
|
|
277
|
+
const {
|
|
186
278
|
inputVal,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
279
|
+
minDisabled,
|
|
280
|
+
maxDisabled,
|
|
281
|
+
onAdd,
|
|
282
|
+
onSubtract,
|
|
190
283
|
onInput,
|
|
191
|
-
onChange
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return createVNode("div", {
|
|
198
|
-
"class": dInputNum
|
|
199
|
-
}, [createVNode("div", {
|
|
200
|
-
"onBlur": onBlur,
|
|
201
|
-
"tabindex": "1",
|
|
202
|
-
"class": ["devui-control-buttons", focusVal.value]
|
|
284
|
+
onChange
|
|
285
|
+
} = useEvent(props, ctx, inputRef);
|
|
286
|
+
return () => createVNode("div", mergeProps({
|
|
287
|
+
"class": wrapClass.value
|
|
288
|
+
}, customStyle), [createVNode("div", {
|
|
289
|
+
"class": controlButtonsClass.value
|
|
203
290
|
}, [createVNode("span", {
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
}, null)]), createVNode("span", {
|
|
209
|
-
"
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"
|
|
213
|
-
}, null)])]), createVNode("div", {
|
|
214
|
-
"class":
|
|
215
|
-
}, [createVNode("input", {
|
|
291
|
+
"class": ["control-button control-inc", {
|
|
292
|
+
disabled: maxDisabled.value
|
|
293
|
+
}],
|
|
294
|
+
"onClick": onAdd
|
|
295
|
+
}, [createVNode(IncIcon, null, null)]), createVNode("span", {
|
|
296
|
+
"class": ["control-button control-dec", {
|
|
297
|
+
disabled: minDisabled.value
|
|
298
|
+
}],
|
|
299
|
+
"onClick": onSubtract
|
|
300
|
+
}, [createVNode(DecIcon, null, null)])]), createVNode("div", {
|
|
301
|
+
"class": inputWrapClass.value
|
|
302
|
+
}, [createVNode("input", mergeProps({
|
|
216
303
|
"type": "number",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
"
|
|
304
|
+
"ref": inputRef,
|
|
305
|
+
"value": inputVal.value,
|
|
306
|
+
"placeholder": props.placeholder,
|
|
307
|
+
"disabled": disabled.value,
|
|
308
|
+
"class": inputInnerClass.value
|
|
309
|
+
}, otherAttrs, {
|
|
221
310
|
"onInput": onInput,
|
|
222
|
-
"onChange": onChange
|
|
223
|
-
|
|
224
|
-
"onBlur": onBlur,
|
|
225
|
-
"onKeydown": onKeydown
|
|
226
|
-
}, null)])]);
|
|
311
|
+
"onChange": onChange
|
|
312
|
+
}), null)])]);
|
|
227
313
|
}
|
|
228
314
|
});
|
|
229
315
|
InputNumber.install = function(app) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var k=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var z=(s,t)=>{var g={};for(var c in s)j.call(s,c)&&t.indexOf(c)<0&&(g[c]=s[c]);if(s!=null&&k)for(var c of k(s))t.indexOf(c)<0&&O.call(s,c)&&(g[c]=s[c]);return g};(function(s,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(s=typeof globalThis!="undefined"?globalThis:s||self,t(s.index={},s.Vue))})(this,function(s,t){"use strict";const g={placeholder:{type:String},disabled:{type:Boolean,default:!1},step:{type:Number,default:1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},size:{type:String,default:""},modelValue:{type:Number},precision:{type:Number}};function c(e,o,r){let a=e;return o&&(a+=`__${o}`),r&&(a+=`--${r}`),a}function P(e,o=!1){const r=o?`.devui-${e}`:`devui-${e}`;return{b:()=>c(r),e:n=>n?c(r,n):"",m:n=>n?c(r,"",n):"",em:(n,m)=>n&&m?c(r,n,m):""}}const D=P("input-number");function F(){return t.createVNode("svg",{class:D.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}function M(){return t.createVNode("svg",{class:D.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}const C=e=>typeof e=="number",v=e=>e===void 0,$=e=>e===null,b=P("input-number");function A(e,o){const V=o.attrs,{style:r,class:a}=V,d=z(V,["style","class"]),p={style:r},f=t.computed(()=>[{[b.b()]:!0},a]),n=t.computed(()=>({[b.e("control-buttons")]:!0,disabled:e.disabled,[b.m(e.size)]:!0})),m=t.computed(()=>({[b.e("input-wrap")]:!0,[b.m(e.size)]:!0})),N=t.computed(()=>({[b.e("input-box")]:!0,disabled:e.disabled}));return{wrapClass:f,customStyle:p,otherAttrs:d,controlButtonsClass:n,inputWrapClass:m,inputInnerClass:N}}function R(e){const o=t.ref(),r=()=>{o.value.focus()},a=()=>{o.value.blur()},d=()=>{o.value.select()};return e.expose({focus:r,blur:a,select:d}),{inputRef:o}}function L(e){let o=0;if(v(e))return o;const r=e.toString(),a=r.indexOf(".");return a!==-1&&(o=r.length-a-1),o}function _(e,o,r){const{min:a,max:d,step:p,disabled:f}=t.toRefs(e),n=t.reactive({currentValue:e.modelValue||"",userInputValue:void 0}),m=t.computed(()=>v(e.precision)?Math.max(L(e.modelValue),L(p.value)):e.precision),N=t.computed(()=>{if(!v(n.userInputValue))return n.userInputValue;let u=n.currentValue;return u===""||v(u)||Number.isNaN(u)?"":(C(u)&&(u=u.toFixed(m.value)),u)}),V=u=>Number.parseFloat(u.toFixed(m.value)),h=(u,i=1)=>C(u)?V(u+p.value*i):n.currentValue,y=(u,i)=>{if(u===""||v(u)||$(u)||Number.isNaN(u))return;let l=Number(u);return l=V(l),(l>d.value||l<a.value)&&(l=l>d.value?d.value:a.value,i&&o.emit("update:modelValue",l)),l},I=u=>{const i=n.currentValue,l=y(u);i!==l&&(n.userInputValue=void 0,o.emit("update:modelValue",l),o.emit("input",l),o.emit("change",l,i),n.currentValue=l)},x=t.computed(()=>C(n.currentValue)&&h(n.currentValue,-1)<e.min),S=t.computed(()=>C(n.currentValue)&&h(n.currentValue)>e.max),B=()=>{if(f.value||S.value)return;r.value.focus();const u=h(n.currentValue||0);I(u)},T=()=>{if(f.value||x.value)return;r.value.focus();const u=h(n.currentValue||0,-1);I(u)};return t.watch(()=>e.modelValue,u=>{n.currentValue=y(u,!0),n.userInputValue=void 0},{immediate:!0}),{inputVal:N,minDisabled:x,maxDisabled:S,onAdd:B,onSubtract:T,onInput:u=>{const i=u.target.value;n.userInputValue=i},onChange:u=>{const i=u.target.value,l=i!==""?Number(i):"";(C(l)&&!Number.isNaN(l)||i==="")&&I(l),n.userInputValue=void 0}}}var W="",w=t.defineComponent({name:"DInputNumber",props:g,emits:["update:modelValue","change","input"],setup(e,o){const{disabled:r}=t.toRefs(e),{wrapClass:a,customStyle:d,otherAttrs:p,controlButtonsClass:f,inputWrapClass:n,inputInnerClass:m}=A(e,o),{inputRef:N}=R(o),{inputVal:V,minDisabled:h,maxDisabled:y,onAdd:I,onSubtract:x,onInput:S,onChange:B}=_(e,o,N);return()=>t.createVNode("div",t.mergeProps({class:a.value},d),[t.createVNode("div",{class:f.value},[t.createVNode("span",{class:["control-button control-inc",{disabled:y.value}],onClick:I},[t.createVNode(F,null,null)]),t.createVNode("span",{class:["control-button control-dec",{disabled:h.value}],onClick:x},[t.createVNode(M,null,null)])]),t.createVNode("div",{class:n.value},[t.createVNode("input",t.mergeProps({type:"number",ref:N,value:V.value,placeholder:e.placeholder,disabled:r.value,class:m.value},p,{onInput:S,onChange:B}),null)])])}});w.install=function(e){e.component(w.name,w)};var E={title:"InputNumber \u6570\u5B57\u8F93\u5165\u6846",category:"\u6570\u636E\u5F55\u5165",status:"50%",install(e){e.use(w)}};s.InputNumber=w,s.default=E,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/input-number/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-input-number{position:relative;display:inline-block;width:80px
|
|
1
|
+
.devui-input-number{position:relative;display:inline-block;width:80px}.devui-input-number:hover .devui-input-number__input-box:not(.disabled){border:1px solid var(--devui-form-control-line-hover, #9b9fa8);padding-right:24px}.devui-input-number:hover .devui-input-number__control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-input-number:focus-within .devui-input-number__input-box:not(.disabled){border:1px solid var(--devui-form-control-line-active, #5e7ce0);padding-right:24px}.devui-input-number:focus-within .devui-input-number__control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-input-number.devui-input-number--md{width:80px}.devui-input-number.devui-input-number--md .devui-input-number__input-box{height:32px;line-height:32px}.devui-input-number .devui-input-number__input-box{box-sizing:border-box;padding:4px 8px;font-size:var(--devui-font-size, 14px);border-radius:var(--devui-border-radius, 4px);border:1px solid var(--devui-form-control-line, #d7d8da);outline:none;width:100%;line-height:20px;height:28px;display:block;cursor:text;-moz-appearance:textfield;transition:border-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-input-number .devui-input-number__input-box:not(.disabled){background-color:var(--devui-base-bg, #ffffff);border-color:var(--devui-line, #d7d8da);color:var(--devui-text, #252b3a)}.devui-input-number .devui-input-number__input-box::-webkit-inner-spin-button,.devui-input-number .devui-input-number__input-box::-webkit-outer-spin-button{-webkit-appearance:none}.devui-input-number .devui-input-number__control-buttons{display:none;position:absolute;right:0;width:22px;height:100%;flex-direction:column;justify-content:center;align-items:center;border:1px solid transparent;border-left-color:var(--devui-line, #d7d8da);box-sizing:border-box;line-height:100%;border-radius:0 var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0}.devui-input-number .devui-input-number__control-buttons.disabled{border-left-color:var(--devui-disabled-line, #dfe1e6)}.devui-input-number .devui-input-number__control-buttons .control-button{user-select:none;box-sizing:border-box;height:50%;line-height:50%;border-width:0 1px;transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));display:flex;justify-content:center;align-items:center;background-color:var(--devui-base-bg, #ffffff)}.devui-input-number .devui-input-number__control-buttons .control-button.control-inc svg{position:relative;top:2px;transform:rotate(180deg)}.devui-input-number .devui-input-number__control-buttons .control-button.control-dec svg{position:relative;bottom:2px}.devui-input-number .devui-input-number__control-buttons .control-button svg path{fill:var(--devui-text-weak, #575d6c)}.devui-input-number .devui-input-number__control-buttons .control-button:not(.disabled){cursor:pointer}.devui-input-number .devui-input-number__control-buttons .control-button:not(.disabled):hover>svg path{fill:var(--devui-icon-fill-active-hover, #252b3a)}.devui-input-number .devui-input-number__control-buttons .control-button.disabled>svg path{fill:var(--devui-disabled-text, #cfd0d3)}.devui-input-number .devui-input-number--lg>.devui-input-number__input-box{font-size:var(--devui-font-size-lg, 14px);line-height:24px;height:46px}.devui-input-number .devui-input-number--lg.devui-input-number__control-buttons .control-button .devui-input-number__icon-arrow{width:16px;height:16px}.devui-input-number .devui-input-number--md>.devui-input-number__input-box{font-size:var(--devui-font-size, 14px);line-height:20px;height:28px}.devui-input-number .devui-input-number--sm>.devui-input-number__input-box{font-size:var(--devui-font-size-sm, 12px);line-height:18px;height:26px}.devui-input-number .devui-input-number--sm.devui-input-number__control-buttons .control-button:first-child .devui-input-number__icon-arrow{width:14px;height:14px}.devui-input-number .devui-input-number--sm.devui-input-number__control-buttons .control-button:last-child .devui-input-number__icon-arrow{width:14px;height:14px}.devui-input-number .devui-input-number__input-wrap{line-height:100%}.devui-input-number .disabled{cursor:not-allowed}
|