vue-devui 1.0.0-rc.6 → 1.0.0-rc.9
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 +5 -0
- package/alert/index.es.js +37 -11
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +311 -77
- package/auto-complete/index.umd.js +3 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +81 -70
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +29 -4
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5632 -87
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +56 -29
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +364 -234
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/date-picker/index.es.js +310 -157
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +28 -3
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +125 -45
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +437 -22
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +490 -605
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +29 -5
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +71 -50
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +109 -13
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +34 -11
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +330 -130
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +272 -199
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +34 -6
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +34 -10
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +126 -27
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +125 -25
- 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/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/formControlProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/iconProps.js +1 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/overlay/index.es.js +31 -9
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +135 -124
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/popover/index.es.js +198 -83
- package/popover/index.umd.js +16 -16
- package/popover/style.css +1 -1
- package/progress/index.es.js +76 -20
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +161 -140
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +48 -16
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +108 -12
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +379 -167
- package/search/index.umd.js +17 -17
- package/search/style.css +1 -1
- package/select/index.es.js +7339 -556
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +37 -12
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +34 -10
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +201 -84
- package/splitter/index.umd.js +14 -14
- package/splitter/style.css +1 -1
- package/status/index.es.js +26 -2
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +30 -6
- package/switch/index.umd.js +1 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +6808 -585
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +136 -70
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +31 -7
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +5631 -80
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/timeline/index.es.js +108 -12
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +190 -74
- package/tooltip/index.umd.js +17 -17
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +376 -256
- package/tree/index.umd.js +1 -1
- package/tree/style.css +1 -1
- package/upload/index.es.js +138 -34
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +6770 -5769
- package/vue-devui.umd.js +27 -21
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -84
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/commentProps.js +0 -3
- package/nuxt/components/readTipProps.js +0 -3
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -261
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
package/input-number/index.es.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
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];
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
import { createVNode, computed, ref, toRefs, reactive, watch, defineComponent, mergeProps } from "vue";
|
|
2
17
|
const inputNumberProps = {
|
|
3
18
|
placeholder: {
|
|
4
|
-
type: String
|
|
5
|
-
default: void 0
|
|
19
|
+
type: String
|
|
6
20
|
},
|
|
7
21
|
disabled: {
|
|
8
22
|
type: Boolean,
|
|
@@ -10,7 +24,7 @@ const inputNumberProps = {
|
|
|
10
24
|
},
|
|
11
25
|
step: {
|
|
12
26
|
type: Number,
|
|
13
|
-
default:
|
|
27
|
+
default: 1
|
|
14
28
|
},
|
|
15
29
|
max: {
|
|
16
30
|
type: Number,
|
|
@@ -25,216 +39,275 @@ const inputNumberProps = {
|
|
|
25
39
|
default: ""
|
|
26
40
|
},
|
|
27
41
|
modelValue: {
|
|
28
|
-
type: Number
|
|
29
|
-
default: 0
|
|
30
|
-
},
|
|
31
|
-
"onUpdate:modelValue": {
|
|
32
|
-
type: Function,
|
|
33
|
-
default: void 0
|
|
42
|
+
type: Number
|
|
34
43
|
},
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
default: void 0
|
|
38
|
-
},
|
|
39
|
-
"onKeydown": {
|
|
40
|
-
type: Function,
|
|
41
|
-
default: void 0
|
|
42
|
-
},
|
|
43
|
-
"onFocus": {
|
|
44
|
-
type: Function,
|
|
45
|
-
default: void 0
|
|
46
|
-
},
|
|
47
|
-
"onBlur": {
|
|
48
|
-
type: Function,
|
|
49
|
-
default: void 0
|
|
44
|
+
precision: {
|
|
45
|
+
type: Number
|
|
50
46
|
}
|
|
51
47
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
default: "",
|
|
57
|
-
required: true
|
|
58
|
-
},
|
|
59
|
-
size: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: "inherit"
|
|
62
|
-
},
|
|
63
|
-
color: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: "inherit"
|
|
66
|
-
},
|
|
67
|
-
classPrefix: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: "icon"
|
|
48
|
+
function createBem(namespace, element, modifier) {
|
|
49
|
+
let cls = namespace;
|
|
50
|
+
if (element) {
|
|
51
|
+
cls += `__${element}`;
|
|
70
52
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
name: "DIcon",
|
|
74
|
-
props: iconProps,
|
|
75
|
-
setup(props) {
|
|
76
|
-
const {
|
|
77
|
-
name,
|
|
78
|
-
size,
|
|
79
|
-
color,
|
|
80
|
-
classPrefix
|
|
81
|
-
} = toRefs(props);
|
|
82
|
-
return () => {
|
|
83
|
-
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
84
|
-
"src": name.value,
|
|
85
|
-
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
86
|
-
"style": {
|
|
87
|
-
width: size.value,
|
|
88
|
-
verticalAlign: "text-bottom"
|
|
89
|
-
}
|
|
90
|
-
}, null) : createVNode("i", {
|
|
91
|
-
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
92
|
-
"style": {
|
|
93
|
-
fontSize: size.value,
|
|
94
|
-
color: color.value
|
|
95
|
-
}
|
|
96
|
-
}, null);
|
|
97
|
-
};
|
|
53
|
+
if (modifier) {
|
|
54
|
+
cls += `--${modifier}`;
|
|
98
55
|
}
|
|
99
|
-
|
|
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
|
|
118
|
+
},
|
|
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;
|
|
154
|
+
}
|
|
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) {
|
|
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
|
+
const newVal = computeByStep(state.currentValue || 0);
|
|
228
|
+
setCurrentValue(newVal);
|
|
229
|
+
};
|
|
230
|
+
const onSubtract = () => {
|
|
231
|
+
if (disabled.value || minDisabled.value) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const newVal = computeByStep(state.currentValue || 0, -1);
|
|
235
|
+
setCurrentValue(newVal);
|
|
236
|
+
};
|
|
237
|
+
watch(() => props.modelValue, (val) => {
|
|
238
|
+
state.currentValue = correctValue(val, true);
|
|
239
|
+
state.userInputValue = void 0;
|
|
240
|
+
}, { immediate: true });
|
|
241
|
+
const onInput = (event) => {
|
|
242
|
+
const value = event.target.value;
|
|
243
|
+
state.userInputValue = value;
|
|
244
|
+
};
|
|
245
|
+
const onChange = (event) => {
|
|
246
|
+
const value = event.target.value;
|
|
247
|
+
const newVal = value !== "" ? Number(value) : "";
|
|
248
|
+
if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
|
|
249
|
+
setCurrentValue(newVal);
|
|
250
|
+
}
|
|
251
|
+
state.userInputValue = void 0;
|
|
252
|
+
};
|
|
253
|
+
return { inputVal, minDisabled, maxDisabled, onAdd, onSubtract, onInput, onChange };
|
|
254
|
+
}
|
|
255
|
+
var inputNumber = "";
|
|
100
256
|
var InputNumber = defineComponent({
|
|
101
257
|
name: "DInputNumber",
|
|
102
258
|
props: inputNumberProps,
|
|
103
|
-
emits: ["update:modelValue", "change", "input"
|
|
259
|
+
emits: ["update:modelValue", "change", "input"],
|
|
104
260
|
setup(props, ctx) {
|
|
105
|
-
const inputVal = ref(props.modelValue < props.min ? props.min : props.modelValue);
|
|
106
|
-
const focusVal = ref("");
|
|
107
|
-
const isSize = computed(() => {
|
|
108
|
-
return `devui-input-number-${props.size}`;
|
|
109
|
-
});
|
|
110
|
-
const isDisabled = computed(() => {
|
|
111
|
-
return props.disabled;
|
|
112
|
-
});
|
|
113
|
-
const add = () => {
|
|
114
|
-
if (props.disabled) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (inputVal.value >= props.max) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (props.step !== 0) {
|
|
121
|
-
const maxSpaceVal = props.max - inputVal.value;
|
|
122
|
-
if (inputVal.value < props.max && maxSpaceVal < props.step) {
|
|
123
|
-
inputVal.value += maxSpaceVal;
|
|
124
|
-
} else if (inputVal.value < props.max && maxSpaceVal > props.step) {
|
|
125
|
-
inputVal.value += props.step;
|
|
126
|
-
} else {
|
|
127
|
-
inputVal.value += props.step;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
inputVal.value += 1;
|
|
131
|
-
}
|
|
132
|
-
focusVal.value = "active";
|
|
133
|
-
ctx.emit("change", inputVal.value);
|
|
134
|
-
ctx.emit("update:modelValue", inputVal.value);
|
|
135
|
-
};
|
|
136
|
-
const subtract = () => {
|
|
137
|
-
if (props.disabled) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
if (inputVal.value <= props.min) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (props.step !== 0) {
|
|
144
|
-
const minSpaceVal = inputVal.value - props.min;
|
|
145
|
-
if (inputVal.value > props.min && minSpaceVal > props.step) {
|
|
146
|
-
inputVal.value -= props.step;
|
|
147
|
-
} else if (inputVal.value > props.min && minSpaceVal < props.step) {
|
|
148
|
-
inputVal.value -= minSpaceVal;
|
|
149
|
-
} else {
|
|
150
|
-
inputVal.value -= props.step;
|
|
151
|
-
}
|
|
152
|
-
} else {
|
|
153
|
-
inputVal.value -= 1;
|
|
154
|
-
}
|
|
155
|
-
focusVal.value = "active";
|
|
156
|
-
ctx.emit("change", inputVal.value);
|
|
157
|
-
ctx.emit("update:modelValue", inputVal.value);
|
|
158
|
-
};
|
|
159
|
-
const onInput = (val) => {
|
|
160
|
-
inputVal.value = parseInt(val.data);
|
|
161
|
-
ctx.emit("input", inputVal.value);
|
|
162
|
-
ctx.emit("update:modelValue", inputVal.value);
|
|
163
|
-
};
|
|
164
|
-
const onFocus = ($event) => {
|
|
165
|
-
focusVal.value = "active";
|
|
166
|
-
ctx.emit("focus", $event);
|
|
167
|
-
};
|
|
168
|
-
const onBlur = ($event) => {
|
|
169
|
-
focusVal.value = "";
|
|
170
|
-
ctx.emit("blur", $event);
|
|
171
|
-
};
|
|
172
|
-
const onChange = ($event) => {
|
|
173
|
-
ctx.emit("change", $event.target.value);
|
|
174
|
-
};
|
|
175
|
-
const onKeydown = ($event) => {
|
|
176
|
-
ctx.emit("keydown", $event);
|
|
177
|
-
};
|
|
178
|
-
return {
|
|
179
|
-
inputVal,
|
|
180
|
-
focusVal,
|
|
181
|
-
isDisabled,
|
|
182
|
-
isSize,
|
|
183
|
-
add,
|
|
184
|
-
subtract,
|
|
185
|
-
onInput,
|
|
186
|
-
onChange,
|
|
187
|
-
onKeydown,
|
|
188
|
-
onBlur,
|
|
189
|
-
onFocus
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
render() {
|
|
193
261
|
const {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
262
|
+
disabled
|
|
263
|
+
} = toRefs(props);
|
|
264
|
+
const {
|
|
265
|
+
wrapClass,
|
|
266
|
+
customStyle,
|
|
267
|
+
otherAttrs,
|
|
268
|
+
controlButtonsClass,
|
|
269
|
+
inputWrapClass,
|
|
270
|
+
inputInnerClass
|
|
271
|
+
} = useRender(props, ctx);
|
|
272
|
+
const {
|
|
197
273
|
inputVal,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
274
|
+
minDisabled,
|
|
275
|
+
maxDisabled,
|
|
276
|
+
onAdd,
|
|
277
|
+
onSubtract,
|
|
201
278
|
onInput,
|
|
202
|
-
onChange
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
} =
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
"onBlur": onBlur,
|
|
212
|
-
"tabindex": "1",
|
|
213
|
-
"class": ["devui-control-buttons", focusVal.value]
|
|
279
|
+
onChange
|
|
280
|
+
} = useEvent(props, ctx);
|
|
281
|
+
const {
|
|
282
|
+
inputRef
|
|
283
|
+
} = useExpose(ctx);
|
|
284
|
+
return () => createVNode("div", mergeProps({
|
|
285
|
+
"class": wrapClass.value
|
|
286
|
+
}, customStyle), [createVNode("div", {
|
|
287
|
+
"class": controlButtonsClass.value
|
|
214
288
|
}, [createVNode("span", {
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
"
|
|
219
|
-
}, null)]), createVNode("span", {
|
|
220
|
-
"
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"
|
|
224
|
-
}, null)])]), createVNode("div", {
|
|
225
|
-
"class":
|
|
226
|
-
}, [createVNode("input", {
|
|
289
|
+
"class": ["control-button control-inc", {
|
|
290
|
+
disabled: maxDisabled.value
|
|
291
|
+
}],
|
|
292
|
+
"onClick": onAdd
|
|
293
|
+
}, [createVNode(IncIcon, null, null)]), createVNode("span", {
|
|
294
|
+
"class": ["control-button control-dec", {
|
|
295
|
+
disabled: minDisabled.value
|
|
296
|
+
}],
|
|
297
|
+
"onClick": onSubtract
|
|
298
|
+
}, [createVNode(DecIcon, null, null)])]), createVNode("div", {
|
|
299
|
+
"class": inputWrapClass.value
|
|
300
|
+
}, [createVNode("input", mergeProps({
|
|
227
301
|
"type": "number",
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"
|
|
302
|
+
"ref": inputRef,
|
|
303
|
+
"value": inputVal.value,
|
|
304
|
+
"placeholder": props.placeholder,
|
|
305
|
+
"disabled": disabled.value,
|
|
306
|
+
"class": inputInnerClass.value
|
|
307
|
+
}, otherAttrs, {
|
|
232
308
|
"onInput": onInput,
|
|
233
|
-
"onChange": onChange
|
|
234
|
-
|
|
235
|
-
"onBlur": onBlur,
|
|
236
|
-
"onKeydown": onKeydown
|
|
237
|
-
}, null)])]);
|
|
309
|
+
"onChange": onChange
|
|
310
|
+
}), null)])]);
|
|
238
311
|
}
|
|
239
312
|
});
|
|
240
313
|
InputNumber.install = function(app) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
var k=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var z=(s,t)=>{var h={};for(var c in s)T.call(s,c)&&t.indexOf(c)<0&&(h[c]=s[c]);if(s!=null&&k)for(var c of k(s))t.indexOf(c)<0&&j.call(s,c)&&(h[c]=s[c]);return h};(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 h={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,u,o){let a=e;return u&&(a+=`__${u}`),o&&(a+=`--${o}`),a}function P(e,u=!1){const o=u?`.devui-${e}`:`devui-${e}`;return{b:()=>c(o),e:i=>i?c(o,i):"",m:i=>i?c(o,"",i):"",em:(i,f)=>i&&f?c(o,i,f):""}}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 g=e=>typeof e=="number",C=e=>e===void 0,R=e=>e===null,b=P("input-number");function $(e,u){const p=u.attrs,{style:o,class:a}=p,m=z(p,["style","class"]),V={style:o},r=t.computed(()=>[{[b.b()]:!0},a]),i=t.computed(()=>({[b.e("control-buttons")]:!0,disabled:e.disabled,[b.m(e.size)]:!0})),f=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:r,customStyle:V,otherAttrs:m,controlButtonsClass:i,inputWrapClass:f,inputInnerClass:N}}function A(e){const u=t.ref(),o=()=>{u.value.focus()},a=()=>{u.value.blur()},m=()=>{u.value.select()};return e.expose({focus:o,blur:a,select:m}),{inputRef:u}}function L(e){let u=0;if(C(e))return u;const o=e.toString(),a=o.indexOf(".");return a!==-1&&(u=o.length-a-1),u}function _(e,u){const{min:o,max:a,step:m,disabled:V}=t.toRefs(e),r=t.reactive({currentValue:e.modelValue||"",userInputValue:void 0}),i=t.computed(()=>C(e.precision)?Math.max(L(e.modelValue),L(m.value)):e.precision),f=t.computed(()=>{if(!C(r.userInputValue))return r.userInputValue;let n=r.currentValue;return n===""||C(n)||Number.isNaN(n)?"":(g(n)&&(n=n.toFixed(i.value)),n)}),N=n=>Number.parseFloat(n.toFixed(i.value)),p=(n,d=1)=>g(n)?N(n+m.value*d):r.currentValue,I=(n,d)=>{if(n===""||C(n)||R(n)||Number.isNaN(n))return;let l=Number(n);return l=N(l),(l>a.value||l<o.value)&&(l=l>a.value?a.value:o.value,d&&u.emit("update:modelValue",l)),l},v=n=>{const d=r.currentValue,l=I(n);d!==l&&(r.userInputValue=void 0,u.emit("update:modelValue",l),u.emit("input",l),u.emit("change",l,d),r.currentValue=l)},y=t.computed(()=>g(r.currentValue)&&p(r.currentValue,-1)<e.min),x=t.computed(()=>g(r.currentValue)&&p(r.currentValue)>e.max),S=()=>{if(V.value||x.value)return;const n=p(r.currentValue||0);v(n)},B=()=>{if(V.value||y.value)return;const n=p(r.currentValue||0,-1);v(n)};return t.watch(()=>e.modelValue,n=>{r.currentValue=I(n,!0),r.userInputValue=void 0},{immediate:!0}),{inputVal:f,minDisabled:y,maxDisabled:x,onAdd:S,onSubtract:B,onInput:n=>{const d=n.target.value;r.userInputValue=d},onChange:n=>{const d=n.target.value,l=d!==""?Number(d):"";(g(l)&&!Number.isNaN(l)||d==="")&&v(l),r.userInputValue=void 0}}}var O="",w=t.defineComponent({name:"DInputNumber",props:h,emits:["update:modelValue","change","input"],setup(e,u){const{disabled:o}=t.toRefs(e),{wrapClass:a,customStyle:m,otherAttrs:V,controlButtonsClass:r,inputWrapClass:i,inputInnerClass:f}=$(e,u),{inputVal:N,minDisabled:p,maxDisabled:I,onAdd:v,onSubtract:y,onInput:x,onChange:S}=_(e,u),{inputRef:B}=A(u);return()=>t.createVNode("div",t.mergeProps({class:a.value},m),[t.createVNode("div",{class:r.value},[t.createVNode("span",{class:["control-button control-inc",{disabled:I.value}],onClick:v},[t.createVNode(F,null,null)]),t.createVNode("span",{class:["control-button control-dec",{disabled:p.value}],onClick:y},[t.createVNode(M,null,null)])]),t.createVNode("div",{class:i.value},[t.createVNode("input",t.mergeProps({type:"number",ref:B,value:N.value,placeholder:e.placeholder,disabled:o.value,class:f.value},V,{onInput:x,onChange:S}),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, #575d6c);padding-right:24px}.devui-input-number:hover .devui-input-number__control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-hover, #575d6c)}.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, 12px);border-radius:var(--devui-border-radius, 2px);border:1px solid var(--devui-form-control-line, #adb0b8);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, #adb0b8);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, #adb0b8);box-sizing:border-box;line-height:100%;border-radius:0 var(--devui-border-radius, 2px) var(--devui-border-radius, 2px) 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, #526ecc)}.devui-input-number .devui-input-number__control-buttons .control-button.disabled>svg path{fill:var(--devui-disabled-text, #adb0b8)}.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, 12px);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}
|
package/layout/index.es.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { defineComponent, 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 layout = "";
|
|
3
26
|
var Layout = defineComponent({
|
|
4
27
|
name: "DLayout",
|
|
@@ -6,11 +29,12 @@ var Layout = defineComponent({
|
|
|
6
29
|
setup(props, {
|
|
7
30
|
slots
|
|
8
31
|
}) {
|
|
32
|
+
const ns = useNamespace("layout");
|
|
9
33
|
return () => {
|
|
10
34
|
var _a;
|
|
11
35
|
const slotDefault = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
12
|
-
const isAside = slotDefault.some((item) => item.name === "DAside");
|
|
13
|
-
const classNames = `${isAside ? "
|
|
36
|
+
const isAside = slotDefault.some((item) => item.type.name === "DAside");
|
|
37
|
+
const classNames = `${isAside ? ns.e("aside") : ""} ${ns.b()}`;
|
|
14
38
|
return createVNode("div", {
|
|
15
39
|
"class": classNames
|
|
16
40
|
}, [slotDefault]);
|
|
@@ -23,10 +47,11 @@ var Content = defineComponent({
|
|
|
23
47
|
setup(props, {
|
|
24
48
|
slots
|
|
25
49
|
}) {
|
|
50
|
+
const ns = useNamespace("layout");
|
|
26
51
|
return () => {
|
|
27
52
|
var _a;
|
|
28
53
|
return createVNode("div", {
|
|
29
|
-
"class": "
|
|
54
|
+
"class": ns.e("content")
|
|
30
55
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
31
56
|
};
|
|
32
57
|
}
|
|
@@ -37,10 +62,11 @@ var Header = defineComponent({
|
|
|
37
62
|
setup(props, {
|
|
38
63
|
slots
|
|
39
64
|
}) {
|
|
65
|
+
const ns = useNamespace("layout");
|
|
40
66
|
return () => {
|
|
41
67
|
var _a;
|
|
42
68
|
return createVNode("div", {
|
|
43
|
-
"class": "
|
|
69
|
+
"class": ns.e("header")
|
|
44
70
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
45
71
|
};
|
|
46
72
|
}
|
|
@@ -51,10 +77,11 @@ var Footer = defineComponent({
|
|
|
51
77
|
setup(props, {
|
|
52
78
|
slots
|
|
53
79
|
}) {
|
|
80
|
+
const ns = useNamespace("layout");
|
|
54
81
|
return () => {
|
|
55
82
|
var _a;
|
|
56
83
|
return createVNode("div", {
|
|
57
|
-
"class": "
|
|
84
|
+
"class": ns.e("footer")
|
|
58
85
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
59
86
|
};
|
|
60
87
|
}
|
|
@@ -64,10 +91,11 @@ var Aside = defineComponent({
|
|
|
64
91
|
setup(props, {
|
|
65
92
|
slots
|
|
66
93
|
}) {
|
|
94
|
+
const ns = useNamespace("layout");
|
|
67
95
|
return () => {
|
|
68
96
|
var _a;
|
|
69
97
|
return createVNode("div", {
|
|
70
|
-
"class": "
|
|
98
|
+
"class": ns.e("aside")
|
|
71
99
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
72
100
|
};
|
|
73
101
|
}
|