kui-vue 3.6.2 → 3.6.3
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/components/card/card.jsx +19 -9
- package/components/card/demo/basic.md +3 -3
- package/components/card/demo/border.md +1 -7
- package/components/card/demo/index.jsx +9 -7
- package/components/card/demo/notitle.md +23 -0
- package/components/card/styles/index.less +5 -3
- package/components/checkbox/styles/index.less +1 -0
- package/components/collapse/styles/index.less +2 -2
- package/components/colorPicker/mode.jsx +1 -1
- package/components/components.js +3 -0
- package/components/drawer/demo/target.md +2 -2
- package/components/dropdown/demo/basic.md +1 -1
- package/components/dropdown/styles/index.less +1 -0
- package/components/flex/demo/size.md +14 -5
- package/components/form/demo/customvalid.md +1 -1
- package/components/form/demo/dynamicvalid.md +1 -1
- package/components/form/demo/length.md +1 -13
- package/components/form/demo/valid.md +9 -1
- package/components/form/form.jsx +1 -1
- package/components/input/input.jsx +12 -10
- package/components/inputNumber/demo/basic.md +1 -0
- package/components/inputNumber/demo/format.md +3 -8
- package/components/inputNumber/inputNumber.jsx +116 -139
- package/components/inputNumber/styles/index.less +3 -3
- package/components/layout/demo/layout5.md +0 -1
- package/components/locale/de.js +1 -0
- package/components/locale/el.js +1 -0
- package/components/locale/en.js +1 -0
- package/components/locale/fr.js +1 -0
- package/components/locale/it.js +1 -0
- package/components/locale/ja.js +1 -0
- package/components/locale/ko.js +1 -0
- package/components/locale/ru.js +1 -0
- package/components/locale/th.js +1 -0
- package/components/locale/uk.js +1 -0
- package/components/locale/vi.js +1 -0
- package/components/locale/zh-CN.js +1 -0
- package/components/locale/zh-TW.js +1 -0
- package/components/menu/demo/collapsed.md +9 -9
- package/components/menu/index.md +1 -0
- package/components/message/group.jsx +11 -4
- package/components/rate/rate.jsx +7 -2
- package/components/rate/star.jsx +20 -5
- package/components/select/select.jsx +5 -3
- package/components/slider/demo/vertical.md +2 -1
- package/components/slider/demo/withNumber.md +0 -2
- package/components/slider/index.md +2 -3
- package/components/slider/slider.jsx +296 -291
- package/components/slider/styles/index.less +11 -12
- package/components/slider/thumb.jsx +70 -148
- package/components/spin/demo/container.md +1 -1
- package/components/spin/demo/mode.md +1 -1
- package/components/statCard/countup.js +254 -0
- package/components/statCard/countup.jsx +45 -0
- package/components/statCard/demo/basic.md +31 -0
- package/components/statCard/demo/card.md +40 -0
- package/components/statCard/demo/index.jsx +19 -0
- package/components/statCard/demo/info.md +9 -0
- package/components/statCard/demo/with-card.md +43 -0
- package/components/statCard/index.js +3 -0
- package/components/statCard/index.md +28 -0
- package/components/statCard/rollup.jsx +64 -0
- package/components/statCard/statCard.jsx +42 -0
- package/components/statCard/statNumber.jsx +53 -0
- package/components/statCard/styles/index.less +76 -0
- package/components/styles/color.less +4 -2
- package/components/styles/index.less +1 -0
- package/components/styles/sys.less +2 -3
- package/components/styles/var.less +1 -0
- package/components/table/demo/col-row-span.md +1 -1
- package/components/table/demo/fixed-col-head.md +1 -1
- package/components/table/demo/head-span.md +2 -2
- package/components/table/demo/size.md +1 -1
- package/components/table/demo/table-check.md +11 -1
- package/components/table/index.md +13 -12
- package/components/table/styles/index.less +67 -58
- package/components/table/table.jsx +7 -5
- package/components/tabs/demo/sample.md +1 -8
- package/components/tabs/index.md +9 -9
- package/components/tabs/tabs.jsx +6 -4
- package/components/treeselect/treeselect.jsx +5 -3
- package/components/upload/demo/custom.md +5 -2
- package/components/upload/demo/exceed.md +1 -1
- package/components/upload/demo/pictures.md +14 -0
- package/components/upload/fileList.jsx +24 -47
- package/components/upload/index.md +13 -4
- package/components/upload/selector.jsx +37 -117
- package/components/upload/styles/index.less +2 -3
- package/components/upload/upload.jsx +189 -116
- package/components/utils/number.js +79 -65
- package/components/utils/placement.js +4 -4
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.d.ts +160 -118
- package/dist/k-ui.esm.js +2 -2
- package/dist/k-ui.umd.js +2 -2
- package/dist/locale/de.js +2 -2
- package/dist/locale/el.js +2 -2
- package/dist/locale/en.js +2 -2
- package/dist/locale/fr.js +2 -2
- package/dist/locale/it.js +2 -2
- package/dist/locale/ja.js +2 -2
- package/dist/locale/ko.js +2 -2
- package/dist/locale/ru.js +2 -2
- package/dist/locale/th.js +2 -2
- package/dist/locale/ua.js +2 -2
- package/dist/locale/uk.js +2 -2
- package/dist/locale/vi.js +2 -2
- package/dist/locale/zh-CN.js +2 -2
- package/dist/locale/zh-TW.js +2 -2
- package/package.json +3 -1
- package/types/index.d.ts +14 -10
- package/types/rate/Rate.d.ts +1 -1
- package/types/slider/Slider.d.ts +7 -6
- package/types/statCard/StatCard.d.ts +20 -0
- package/types/statCard/StatNumber.d.ts +26 -0
- package/types/table/Table.d.ts +1 -0
package/components/card/card.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
2
|
import { defineComponent } from "vue";
|
|
3
|
-
import { withInstall } from
|
|
3
|
+
import { withInstall } from "../utils/vue";
|
|
4
4
|
const Card = defineComponent({
|
|
5
5
|
name: "Card",
|
|
6
6
|
props: {
|
|
@@ -21,16 +21,26 @@ const Card = defineComponent({
|
|
|
21
21
|
// console.log(extraSlot)
|
|
22
22
|
const titleSlot = slots.title?.();
|
|
23
23
|
const selfSlot = slots.default?.();
|
|
24
|
-
const extraNode = extraSlot ?
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const extraNode = extraSlot ? (
|
|
25
|
+
<div class="k-card-extra">{extraSlot}</div>
|
|
26
|
+
) : null;
|
|
27
|
+
const iconNode = icon ? (
|
|
28
|
+
<Icon type={icon} class="k-card-title-icon" />
|
|
29
|
+
) : null;
|
|
30
|
+
const titleNode = title ? (
|
|
31
|
+
<span class="k-card-title">{title}</span>
|
|
32
|
+
) : (
|
|
33
|
+
titleSlot || null
|
|
34
|
+
);
|
|
27
35
|
return (
|
|
28
36
|
<div class={classes}>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
{titleNode && (
|
|
38
|
+
<div class="k-card-head">
|
|
39
|
+
{iconNode}
|
|
40
|
+
{titleNode}
|
|
41
|
+
{extraNode}
|
|
42
|
+
</div>
|
|
43
|
+
)}
|
|
34
44
|
{selfSlot ? <div class="k-card-body k-scroll">{selfSlot}</div> : null}
|
|
35
45
|
</div>
|
|
36
46
|
);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<div class="demo-
|
|
8
|
+
<div class="demo-back">
|
|
9
9
|
<Card title="卡片标题" :icon="Heart" :bordered="false">
|
|
10
10
|
<template #extra>
|
|
11
11
|
<a href="#">更多</a>
|
|
@@ -19,10 +19,4 @@
|
|
|
19
19
|
<script setup>
|
|
20
20
|
import { Heart } from "kui-icons";
|
|
21
21
|
</script>
|
|
22
|
-
<style scoped>
|
|
23
|
-
.demo-card {
|
|
24
|
-
padding: 20px;
|
|
25
|
-
background-color: #7f7f7f26;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
28
22
|
```
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import Basic from
|
|
2
|
-
import Info from
|
|
3
|
-
import Border from
|
|
4
|
-
import
|
|
1
|
+
import Basic from "./basic.md";
|
|
2
|
+
import Info from "./info.md";
|
|
3
|
+
import Border from "./border.md";
|
|
4
|
+
import NoTitle from "./notitle.md";
|
|
5
|
+
import CN from "../index.md";
|
|
5
6
|
export default {
|
|
6
7
|
render() {
|
|
7
8
|
return (
|
|
@@ -9,8 +10,9 @@ export default {
|
|
|
9
10
|
<Info />
|
|
10
11
|
<Basic />
|
|
11
12
|
<Border />
|
|
13
|
+
<NoTitle />
|
|
12
14
|
<CN />
|
|
13
15
|
</div>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
16
|
+
);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<cn>
|
|
2
|
+
### 很奇怪的卡片
|
|
3
|
+
</cn>
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<template>
|
|
7
|
+
<Space vertical block class="demo-back">
|
|
8
|
+
<Card>
|
|
9
|
+
<div>card content</div>
|
|
10
|
+
<div>card content</div>
|
|
11
|
+
<div>card content</div>
|
|
12
|
+
</Card>
|
|
13
|
+
<Card :bordered="false">
|
|
14
|
+
<div>card content</div>
|
|
15
|
+
<div>card content</div>
|
|
16
|
+
<div>card content</div>
|
|
17
|
+
</Card>
|
|
18
|
+
</Space>
|
|
19
|
+
</template>
|
|
20
|
+
<script setup>
|
|
21
|
+
import { Heart } from "kui-icons";
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
.k-card {
|
|
4
4
|
background: var(--kui-color-back);
|
|
5
5
|
position: relative;
|
|
6
|
-
border-radius: var(--kui-border-radius);
|
|
6
|
+
border-radius: var(--kui-border-card-radius);
|
|
7
7
|
color: var(--kui-color-font);
|
|
8
8
|
|
|
9
9
|
.k-card-head {
|
|
10
10
|
position: relative;
|
|
11
|
-
|
|
12
|
-
padding: 14px 16px;
|
|
11
|
+
padding: 16px;
|
|
13
12
|
line-height: 1;
|
|
14
13
|
display: flex;
|
|
15
14
|
align-items: center;
|
|
@@ -42,4 +41,7 @@
|
|
|
42
41
|
|
|
43
42
|
.k-card-bordered {
|
|
44
43
|
border: 1px solid var(--kui-color-border);
|
|
44
|
+
.k-card-head {
|
|
45
|
+
border-bottom: 1px solid var(--kui-color-border);
|
|
46
|
+
}
|
|
45
47
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.k-collapse {
|
|
3
3
|
background-color: var(--kui-color-back);
|
|
4
4
|
border: 1px solid var(--kui-color-border);
|
|
5
|
-
border-radius: var(--kui-border-radius);
|
|
5
|
+
border-radius: var(--kui-border-card-radius);
|
|
6
6
|
// border-bottom: 0;
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
color: var(--kui-color-font);
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
background: var(--kui-color-gray-90);
|
|
65
65
|
border: none;
|
|
66
66
|
margin-bottom: 10px;
|
|
67
|
-
border-radius: var(--kui-border-radius);
|
|
67
|
+
border-radius: var(--kui-border-card-radius);
|
|
68
68
|
overflow: hidden;
|
|
69
69
|
.k-collapse-header {
|
|
70
70
|
border: none;
|
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
48
48
|
};
|
|
49
49
|
const valueChange = (e, type) => {
|
|
50
50
|
// console.log(e.target.value, type);
|
|
51
|
-
const value = parseInt(e
|
|
51
|
+
const value = parseInt(e);
|
|
52
52
|
let color = Color(currentColor.value);
|
|
53
53
|
switch (type) {
|
|
54
54
|
case "r":
|
package/components/components.js
CHANGED
|
@@ -110,6 +110,9 @@ export { Rate };
|
|
|
110
110
|
import { Select, Option } from "./select";
|
|
111
111
|
export { Select, Option };
|
|
112
112
|
|
|
113
|
+
import { StatCard, StatNumber } from "./statCard";
|
|
114
|
+
export { StatCard, StatNumber };
|
|
115
|
+
|
|
113
116
|
import ConfigProvider from "./config";
|
|
114
117
|
export { ConfigProvider };
|
|
115
118
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<Space>
|
|
8
|
+
<Space wrap>
|
|
9
9
|
<RadioGroup v-model="placement" type="button">
|
|
10
10
|
<RadioButton label="left" value="left" />
|
|
11
11
|
<RadioButton label="top" value="top" />
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</Flex>
|
|
22
22
|
<Drawer
|
|
23
23
|
v-model="show"
|
|
24
|
-
width="
|
|
24
|
+
width="50%"
|
|
25
25
|
:footer="null"
|
|
26
26
|
:placement="placement"
|
|
27
27
|
:target="() => refTarget"
|
|
@@ -6,13 +6,19 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Flex vertical size="middle">
|
|
9
|
-
<RadioGroup v-model="flexSize">
|
|
9
|
+
<RadioGroup v-model="flexSize" @change="changeSize">
|
|
10
10
|
<Radio value="small" label="small" />
|
|
11
11
|
<Radio value="middle" label="middle" />
|
|
12
12
|
<Radio value="large" label="large" />
|
|
13
13
|
</RadioGroup>
|
|
14
|
-
<Checkbox v-model="
|
|
15
|
-
<Slider
|
|
14
|
+
<Checkbox v-model="isCustomize" label="customize" />
|
|
15
|
+
<Slider
|
|
16
|
+
v-model="customize"
|
|
17
|
+
:step="1"
|
|
18
|
+
:max="50"
|
|
19
|
+
v-if="isCustomize"
|
|
20
|
+
@change="changeSize"
|
|
21
|
+
/>
|
|
16
22
|
<Flex :size="flexSize">
|
|
17
23
|
<Button type="primary">Primary</Button>
|
|
18
24
|
<Button>Default</Button>
|
|
@@ -24,7 +30,10 @@
|
|
|
24
30
|
<script setup>
|
|
25
31
|
import { ref } from "vue";
|
|
26
32
|
const flexSize = ref("small");
|
|
27
|
-
const
|
|
28
|
-
const
|
|
33
|
+
const customize = ref(8);
|
|
34
|
+
const isCustomize = ref(false);
|
|
35
|
+
const changeSize = (value) => {
|
|
36
|
+
flexSize.value = value;
|
|
37
|
+
};
|
|
29
38
|
</script>
|
|
30
39
|
```
|
|
@@ -78,7 +78,7 @@ const rules = {
|
|
|
78
78
|
};
|
|
79
79
|
const submit = () => {
|
|
80
80
|
formRef.value.validate((valid) => {
|
|
81
|
-
message[valid ? "success" : "error"](valid ? "success" : "
|
|
81
|
+
message[valid ? "success" : "error"](valid ? "success" : "failed");
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
const reset = () => {
|
|
@@ -97,7 +97,7 @@ form.value.webs.splice(index, 1);
|
|
|
97
97
|
};
|
|
98
98
|
const submit = () => {
|
|
99
99
|
formRef.value.validate((valid) => {
|
|
100
|
-
message[valid ? "success" : "error"](valid ? "success" : "
|
|
100
|
+
message[valid ? "success" : "error"](valid ? "success" : "failed");
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
const reset = () => {
|
|
@@ -144,20 +144,8 @@ const setValue = () => {
|
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
const sendCode = () => {
|
|
148
|
-
message.success("验证码发送成功,请注意查收");
|
|
149
|
-
clearInterval(timer.value);
|
|
150
|
-
timer.value = setInterval((e) => {
|
|
151
|
-
if (time.value < 1) {
|
|
152
|
-
clearInterval(timer.value);
|
|
153
|
-
time.value = 60;
|
|
154
|
-
} else {
|
|
155
|
-
time.value -= 1;
|
|
156
|
-
}
|
|
157
|
-
}, 1000);
|
|
158
|
-
};
|
|
159
147
|
const submit = ({ valid, model }) => {
|
|
160
|
-
message[valid ? "success" : "error"](valid ? "success" : "
|
|
148
|
+
message[valid ? "success" : "error"](valid ? "success" : "failed");
|
|
161
149
|
console.log(model);
|
|
162
150
|
};
|
|
163
151
|
</script>
|
|
@@ -69,6 +69,9 @@
|
|
|
69
69
|
<FormItem label="Slider" prop="slider">
|
|
70
70
|
<Slider />
|
|
71
71
|
</FormItem>
|
|
72
|
+
<FormItem label="Rate" prop="rate">
|
|
73
|
+
<Rate />
|
|
74
|
+
</FormItem>
|
|
72
75
|
<FormItem label="Gender" prop="gender">
|
|
73
76
|
<RadioGroup>
|
|
74
77
|
<Radio value="0" label="Girl" />
|
|
@@ -152,6 +155,7 @@ const form = ref({
|
|
|
152
155
|
phone: "",
|
|
153
156
|
captcha: "",
|
|
154
157
|
slider: 5,
|
|
158
|
+
rate: 0,
|
|
155
159
|
tree: "",
|
|
156
160
|
gender: "",
|
|
157
161
|
one: false,
|
|
@@ -199,6 +203,10 @@ const rules = {
|
|
|
199
203
|
{ max: 50, message: "最大值为50" },
|
|
200
204
|
],
|
|
201
205
|
gender: [{ required: true, message: "请选择性别" }],
|
|
206
|
+
rate: [
|
|
207
|
+
{ required: true, message: "请选择评分" },
|
|
208
|
+
{ min: 1, message: "评分最小1分" },
|
|
209
|
+
],
|
|
202
210
|
one: [{ required: true, message: "霸王选项" }],
|
|
203
211
|
system: [{ required: true, message: "请选择系统类型" }],
|
|
204
212
|
hardcore: [{ required: true, message: "霸王选项" }],
|
|
@@ -250,7 +258,7 @@ const sendCode = () => {
|
|
|
250
258
|
};
|
|
251
259
|
const submit = () => {
|
|
252
260
|
formRef.value.validate((valid) => {
|
|
253
|
-
message[valid ? "success" : "error"](valid ? "success" : "
|
|
261
|
+
message[valid ? "success" : "error"](valid ? "success" : "failed");
|
|
254
262
|
});
|
|
255
263
|
};
|
|
256
264
|
const reset = () => {
|
package/components/form/form.jsx
CHANGED
|
@@ -39,7 +39,7 @@ const Form = defineComponent({
|
|
|
39
39
|
const { model, rules, size, shape, theme, disabled, layout, name } =
|
|
40
40
|
toRefs(props);
|
|
41
41
|
|
|
42
|
-
const updateMode = (prop, value =
|
|
42
|
+
const updateMode = (prop, value = null) => {
|
|
43
43
|
const keys = prop
|
|
44
44
|
.replace(/\[(\w+)\]/g, ".$1")
|
|
45
45
|
.replace(/^\./, "")
|
|
@@ -6,6 +6,7 @@ import { defineComponent, ref, nextTick, watch, inject, provide } from "vue";
|
|
|
6
6
|
import { withInstall } from "../utils/vue";
|
|
7
7
|
import InputBox from "./inputBox";
|
|
8
8
|
import { sizeMap, filterSize } from "../utils/size";
|
|
9
|
+
import { getChildren } from "../utils/vnode";
|
|
9
10
|
|
|
10
11
|
const Input = defineComponent({
|
|
11
12
|
name: "Input",
|
|
@@ -132,19 +133,20 @@ const Input = defineComponent({
|
|
|
132
133
|
shape,
|
|
133
134
|
inputType,
|
|
134
135
|
} = ps;
|
|
135
|
-
const slotSuffix = slots.suffix?.();
|
|
136
|
-
const slotPrefix = slots.prefix?.();
|
|
136
|
+
const slotSuffix = getChildren(slots.suffix?.());
|
|
137
|
+
const slotPrefix = getChildren(slots.prefix?.());
|
|
138
|
+
const slotControls = getChildren(slots.controls?.());
|
|
137
139
|
let multiple =
|
|
138
140
|
(icon ||
|
|
139
141
|
// attrs.onSearch ||
|
|
140
142
|
"search" in listeners ||
|
|
141
|
-
slotSuffix ||
|
|
143
|
+
slotSuffix.length > 0 ||
|
|
142
144
|
suffix ||
|
|
143
|
-
slotPrefix ||
|
|
145
|
+
slotPrefix.length > 0 ||
|
|
144
146
|
prefix ||
|
|
145
147
|
type == "password" ||
|
|
146
148
|
clearable ||
|
|
147
|
-
|
|
149
|
+
slotControls.length > 0) &&
|
|
148
150
|
type !== "hidden";
|
|
149
151
|
const inputProps = {
|
|
150
152
|
attrs: { ...attrs },
|
|
@@ -199,9 +201,9 @@ const Input = defineComponent({
|
|
|
199
201
|
};
|
|
200
202
|
// const prefixNode = prefix ? <div class={`k-input-prefix`}>{prefix}</div> : null;
|
|
201
203
|
|
|
202
|
-
if (slotPrefix || slotSuffix) {
|
|
204
|
+
if (slotPrefix.length || slotSuffix.length) {
|
|
203
205
|
const preChildren = [];
|
|
204
|
-
if (slotPrefix)
|
|
206
|
+
if (slotPrefix.length)
|
|
205
207
|
preChildren.push(
|
|
206
208
|
<div class="k-input-group-prefix">{slotPrefix}</div>
|
|
207
209
|
);
|
|
@@ -231,12 +233,12 @@ const Input = defineComponent({
|
|
|
231
233
|
/>
|
|
232
234
|
);
|
|
233
235
|
const sufChildren = [];
|
|
234
|
-
if (slotSuffix)
|
|
236
|
+
if (slotSuffix.length)
|
|
235
237
|
sufChildren.push(
|
|
236
238
|
<div class="k-input-group-suffix">{slotSuffix}</div>
|
|
237
239
|
);
|
|
238
240
|
|
|
239
|
-
if (
|
|
241
|
+
if (slotControls.length) innerChildren.push(slotControls);
|
|
240
242
|
return (
|
|
241
243
|
<InputGroup size={size}>
|
|
242
244
|
{preChildren}
|
|
@@ -272,7 +274,7 @@ const Input = defineComponent({
|
|
|
272
274
|
/>
|
|
273
275
|
);
|
|
274
276
|
if (suffixNode) children.push(suffixNode);
|
|
275
|
-
if (
|
|
277
|
+
if (slotControls.length) children.push(slotControls);
|
|
276
278
|
|
|
277
279
|
return (
|
|
278
280
|
<div {...props} mult>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<cn>
|
|
2
|
-
### 高精度小数/格式化展示
|
|
3
|
-
通过 formatter 格式化数字,以展示具有具体含义的数据,往往需要配合 parser 一起使用。
|
|
2
|
+
### 高精度小数/格式化展示
|
|
3
|
+
通过 formatter 格式化数字,以展示具有具体含义的数据,往往需要配合 parser 一起使用。
|
|
4
4
|
</cn>
|
|
5
5
|
|
|
6
6
|
```vue
|
|
@@ -9,12 +9,7 @@
|
|
|
9
9
|
<code> 0.1+0.2 = 0.3 (yes) ,输出:{{ n }}</code>
|
|
10
10
|
<InputNumber :step="0.2" v-model="n" />
|
|
11
11
|
<code>步长为 0.00000000000001 ,输出:{{ n1 }}</code>
|
|
12
|
-
<InputNumber
|
|
13
|
-
v-model="n1"
|
|
14
|
-
:min="0"
|
|
15
|
-
:max="10"
|
|
16
|
-
:step="0.00000000000001"
|
|
17
|
-
/>
|
|
12
|
+
<InputNumber v-model="n1" :min="0" :max="10" :step="0.00000000000001" />
|
|
18
13
|
<code>保留2位小数, 输出:{{ n3 }}</code>
|
|
19
14
|
<InputNumber :precision="2" v-model="n3" />
|
|
20
15
|
<code> 货币,千分位,输出: {{ n4 }}</code>
|