@nutui/nutui 4.3.1 → 4.3.2
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/CHANGELOG.md +24 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4021 -4081
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -1
- package/dist/packages/address/Address.js +1 -1
- package/dist/packages/animate/Animate.js +51 -44
- package/dist/packages/calendar/Calendar.js +1 -1
- package/dist/packages/card/Card.js +2 -2
- package/dist/packages/cascader/Cascader.js +1 -1
- package/dist/packages/checkbox/Checkbox.js +1 -1
- package/dist/packages/col/Col.js +41 -30
- package/dist/packages/{common-LvGbU-A3.js → common-FZL3qC99.js} +5 -2
- package/dist/packages/dialog/Dialog.js +1 -1
- package/dist/packages/form/Form.js +3 -1
- package/dist/packages/formitem/FormItem.js +1 -1
- package/dist/packages/imagepreview/ImagePreview.js +1 -1
- package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
- package/dist/packages/{index.vue_vue_type_script_lang-w2sgcysj.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +1 -1
- package/dist/packages/input/Input.js +1 -1
- package/dist/packages/inputnumber/InputNumber.js +1 -1
- package/dist/packages/invoice/Invoice.js +1 -1
- package/dist/packages/layout/Layout.js +3 -0
- package/dist/packages/menuitem/MenuItem.js +1 -1
- package/dist/packages/notify/Notify.js +1 -1
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -1
- package/dist/packages/popover/Popover.js +1 -1
- package/dist/packages/popup/Popup.js +1 -1
- package/dist/packages/price/Price.js +69 -77
- package/dist/packages/radio/Radio.js +1 -1
- package/dist/packages/range/Range.js +1 -1
- package/dist/packages/rate/Rate.js +1 -1
- package/dist/packages/row/Row.js +43 -39
- package/dist/packages/searchbar/Searchbar.js +1 -1
- package/dist/packages/shortpassword/ShortPassword.js +1 -1
- package/dist/packages/sku/Sku.js +3 -3
- package/dist/packages/switch/Switch.js +12 -4
- package/dist/packages/switch/index.css +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/textarea/Textarea.js +1 -1
- package/dist/packages/timeselect/TimeSelect.js +1 -1
- package/dist/packages/uploader/Uploader.js +1 -1
- package/dist/smartips/web-types.json +11 -2
- package/dist/style.css +1 -1
- package/dist/types/__VUE/animate/animate.vue.d.ts +75 -0
- package/dist/types/__VUE/animate/index.d.ts +6 -0
- package/dist/types/__VUE/col/col.vue.d.ts +53 -0
- package/dist/types/__VUE/col/index.d.ts +5 -0
- package/dist/types/__VUE/form/common.d.ts +2 -0
- package/dist/types/__VUE/form/types.d.ts +0 -1
- package/dist/types/__VUE/input/index.vue.d.ts +1 -1
- package/dist/types/__VUE/layout/index.d.ts +4 -0
- package/dist/types/__VUE/layout/layout.vue.d.ts +10 -0
- package/dist/types/__VUE/price/index.d.ts +6 -0
- package/dist/types/__VUE/price/price.vue.d.ts +83 -0
- package/dist/types/__VUE/row/index.d.ts +5 -0
- package/dist/types/__VUE/row/row.vue.d.ts +71 -0
- package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
- package/dist/types/index.d.ts +11 -6
- package/package.json +1 -1
- package/dist/packages/types-Ynmct7na.js +0 -4
- package/dist/types/__VUE/animate/index.vue.d.ts +0 -71
- package/dist/types/__VUE/col/index.vue.d.ts +0 -42
- package/dist/types/__VUE/layout/index.vue.d.ts +0 -12
- package/dist/types/__VUE/price/index.vue.d.ts +0 -97
- package/dist/types/__VUE/row/index.vue.d.ts +0 -62
- /package/dist/types/__VUE/animate/{type.d.ts → types.d.ts} +0 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: String,
|
|
17
|
-
default: "¥"
|
|
18
|
-
},
|
|
19
|
-
decimalDigits: {
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 2
|
|
22
|
-
},
|
|
23
|
-
thousands: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
position: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "before"
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "normal"
|
|
34
|
-
},
|
|
35
|
-
strikeThrough: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
38
16
|
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
|
|
21
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
22
|
+
const _hoisted_1 = ["innerHTML"];
|
|
23
|
+
const _hoisted_2 = ["innerHTML"];
|
|
24
|
+
const prefix = "nut-price";
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
26
|
+
name: "NutPrice"
|
|
27
|
+
}), {
|
|
28
|
+
__name: "price",
|
|
29
|
+
props: {
|
|
30
|
+
price: { default: 0 },
|
|
31
|
+
needSymbol: { type: Boolean, default: true },
|
|
32
|
+
symbol: { default: "¥" },
|
|
33
|
+
decimalDigits: { default: 2 },
|
|
34
|
+
thousands: { type: Boolean, default: false },
|
|
35
|
+
position: { default: "before" },
|
|
36
|
+
size: { default: "normal" },
|
|
37
|
+
strikeThrough: { type: Boolean, default: false }
|
|
39
38
|
},
|
|
40
|
-
setup(
|
|
39
|
+
setup(__props) {
|
|
40
|
+
const props = __props;
|
|
41
41
|
const classes = computed(() => {
|
|
42
42
|
return {
|
|
43
|
-
[
|
|
44
|
-
[`${
|
|
43
|
+
[prefix]: true,
|
|
44
|
+
[`${prefix}--strike`]: props.strikeThrough
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
const showSymbol = computed(() => {
|
|
@@ -81,44 +81,36 @@ const _sfc_main = create({
|
|
|
81
81
|
const resultFixed = Number(result).toFixed(props.decimalDigits);
|
|
82
82
|
return String(resultFixed).substring(2, resultFixed.length);
|
|
83
83
|
};
|
|
84
|
-
return {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
return (_ctx, _cache) => {
|
|
85
|
+
return openBlock(), createElementBlock("view", {
|
|
86
|
+
class: normalizeClass(classes.value)
|
|
87
|
+
}, [
|
|
88
|
+
_ctx.needSymbol && _ctx.position === "before" ? (openBlock(), createElementBlock("view", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
91
|
+
innerHTML: showSymbol.value
|
|
92
|
+
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
93
|
+
createElementVNode("view", {
|
|
94
|
+
class: normalizeClass(`nut-price--${_ctx.size}`)
|
|
95
|
+
}, toDisplayString(formatThousands(_ctx.price)), 3),
|
|
96
|
+
_ctx.decimalDigits != 0 ? (openBlock(), createElementBlock("view", {
|
|
97
|
+
key: 1,
|
|
98
|
+
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
99
|
+
}, ".", 2)) : createCommentVNode("", true),
|
|
100
|
+
createElementVNode("view", {
|
|
101
|
+
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
102
|
+
}, toDisplayString(formatDecimal(_ctx.price)), 3),
|
|
103
|
+
_ctx.needSymbol && _ctx.position === "after" ? (openBlock(), createElementBlock("view", {
|
|
104
|
+
key: 2,
|
|
105
|
+
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
106
|
+
innerHTML: showSymbol.value
|
|
107
|
+
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
108
|
+
], 2);
|
|
90
109
|
};
|
|
91
110
|
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const _hoisted_2 = ["innerHTML"];
|
|
95
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
96
|
-
return openBlock(), createElementBlock("view", {
|
|
97
|
-
class: normalizeClass(_ctx.classes)
|
|
98
|
-
}, [
|
|
99
|
-
_ctx.needSymbol && _ctx.position === "before" ? (openBlock(), createElementBlock("view", {
|
|
100
|
-
key: 0,
|
|
101
|
-
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
102
|
-
innerHTML: _ctx.showSymbol
|
|
103
|
-
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
104
|
-
createElementVNode("view", {
|
|
105
|
-
class: normalizeClass(`nut-price--${_ctx.size}`)
|
|
106
|
-
}, toDisplayString(_ctx.formatThousands(_ctx.price)), 3),
|
|
107
|
-
_ctx.decimalDigits != 0 ? (openBlock(), createElementBlock("view", {
|
|
108
|
-
key: 1,
|
|
109
|
-
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
110
|
-
}, ".", 2)) : createCommentVNode("", true),
|
|
111
|
-
createElementVNode("view", {
|
|
112
|
-
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
113
|
-
}, toDisplayString(_ctx.formatDecimal(_ctx.price)), 3),
|
|
114
|
-
_ctx.needSymbol && _ctx.position === "after" ? (openBlock(), createElementBlock("view", {
|
|
115
|
-
key: 2,
|
|
116
|
-
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
117
|
-
innerHTML: _ctx.showSymbol
|
|
118
|
-
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
119
|
-
], 2);
|
|
120
|
-
}
|
|
121
|
-
const NutPrice = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
111
|
+
}));
|
|
112
|
+
withInstall(_sfc_main);
|
|
122
113
|
export {
|
|
123
|
-
|
|
114
|
+
_sfc_main as Price,
|
|
115
|
+
_sfc_main as default
|
|
124
116
|
};
|
|
@@ -22,7 +22,7 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
|
22
22
|
import { a as isArray } from "../util-4Jkyw4BJ.js";
|
|
23
23
|
import { u as useTouch } from "../index-084nl_oE.js";
|
|
24
24
|
import { u as useRect } from "../index-cp6Ms_Qe.js";
|
|
25
|
-
import { u as useFormDisabled } from "../common-
|
|
25
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
26
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
27
27
|
const { componentName, create } = createComponent("range");
|
|
28
28
|
const _sfc_main = create({
|
|
@@ -23,7 +23,7 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
|
23
23
|
import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
|
|
24
24
|
import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
|
|
25
25
|
import { u as useTouch } from "../index-084nl_oE.js";
|
|
26
|
-
import { u as useFormDisabled } from "../common-
|
|
26
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
27
27
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
28
28
|
const { create } = createComponent("rate");
|
|
29
29
|
const _sfc_main = create({
|
package/dist/packages/row/Row.js
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
3
21
|
import { L as LAYOUT_KEY } from "../types-Ww4ErYJT.js";
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
const _sfc_main =
|
|
22
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
23
|
+
const prefixCls = "nut-row";
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
25
|
+
name: "NutRow"
|
|
26
|
+
}), {
|
|
27
|
+
__name: "row",
|
|
7
28
|
props: {
|
|
8
|
-
type: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
type: [String, Number],
|
|
14
|
-
default: ""
|
|
15
|
-
},
|
|
16
|
-
justify: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "start"
|
|
19
|
-
},
|
|
20
|
-
align: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: "flex-start"
|
|
23
|
-
},
|
|
24
|
-
flexWrap: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: "nowrap"
|
|
27
|
-
}
|
|
29
|
+
type: { default: "" },
|
|
30
|
+
gutter: { default: "" },
|
|
31
|
+
justify: { default: "start" },
|
|
32
|
+
align: { default: "flex-start" },
|
|
33
|
+
flexWrap: { default: "nowrap" }
|
|
28
34
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
35
|
+
setup(__props) {
|
|
36
|
+
const props = __props;
|
|
31
37
|
provide(LAYOUT_KEY, props.gutter);
|
|
32
38
|
const getClass = (prefix, type) => {
|
|
33
39
|
return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
|
|
@@ -41,19 +47,17 @@ const _sfc_main = create({
|
|
|
41
47
|
getClass("flex", props.flexWrap)
|
|
42
48
|
];
|
|
43
49
|
});
|
|
44
|
-
return {
|
|
45
|
-
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("view", {
|
|
52
|
+
class: normalizeClass(classes.value)
|
|
53
|
+
}, [
|
|
54
|
+
renderSlot(_ctx.$slots, "default")
|
|
55
|
+
], 2);
|
|
46
56
|
};
|
|
47
57
|
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return openBlock(), createElementBlock("view", {
|
|
51
|
-
class: normalizeClass(_ctx.classes)
|
|
52
|
-
}, [
|
|
53
|
-
renderSlot(_ctx.$slots, "default")
|
|
54
|
-
], 2);
|
|
55
|
-
}
|
|
56
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
58
|
+
}));
|
|
59
|
+
withInstall(_sfc_main);
|
|
57
60
|
export {
|
|
58
|
-
|
|
61
|
+
_sfc_main as Row,
|
|
62
|
+
_sfc_main as default
|
|
59
63
|
};
|
|
@@ -22,7 +22,7 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
|
22
22
|
import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
|
|
23
23
|
import { CircleClose } from "@nutui/icons-vue";
|
|
24
24
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
25
|
-
import { u as useFormDisabled } from "../common-
|
|
25
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
26
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
27
27
|
const { create } = createComponent("searchbar");
|
|
28
28
|
const cN = "NutSearchbar";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
4
4
|
import { Tips } from "@nutui/icons-vue";
|
|
5
5
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
package/dist/packages/sku/Sku.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import { Price as _sfc_main$5 } from "../price/Price.js";
|
|
3
3
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
4
4
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
6
6
|
import NutInputNumber from "../inputnumber/InputNumber.js";
|
|
7
|
-
import { N as NutPopup } from "../index-
|
|
7
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
8
8
|
const { create: create$4 } = createComponent("sku-header");
|
|
9
9
|
const cN$1 = "NutSkuHeader";
|
|
10
10
|
const _sfc_main$4 = create$4({
|
|
@@ -15,7 +15,7 @@ const _sfc_main$4 = create$4({
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
components: {
|
|
18
|
-
NutPrice
|
|
18
|
+
NutPrice: _sfc_main$5
|
|
19
19
|
},
|
|
20
20
|
setup(props, { slots }) {
|
|
21
21
|
const translate = useLocale(cN$1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
3
|
import { Loading1 } from "@nutui/icons-vue";
|
|
4
|
-
import { u as useFormDisabled } from "../common-
|
|
4
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
6
6
|
const { componentName, create } = createComponent("switch");
|
|
7
7
|
const _sfc_main = create({
|
|
@@ -11,6 +11,13 @@ const _sfc_main = create({
|
|
|
11
11
|
type: [String, Number, Boolean],
|
|
12
12
|
default: false
|
|
13
13
|
},
|
|
14
|
+
disabled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Please use `disabled` prop instead.
|
|
20
|
+
*/
|
|
14
21
|
disable: {
|
|
15
22
|
type: Boolean,
|
|
16
23
|
default: false
|
|
@@ -46,14 +53,15 @@ const _sfc_main = create({
|
|
|
46
53
|
},
|
|
47
54
|
emits: ["change", "update:modelValue", "update:loading"],
|
|
48
55
|
setup(props, { emit }) {
|
|
49
|
-
const
|
|
56
|
+
const legacyDisabled = computed(() => props.disabled || props.disable);
|
|
57
|
+
const disabled = useFormDisabled(legacyDisabled);
|
|
50
58
|
const isActive = computed(() => props.modelValue === props.activeValue);
|
|
51
59
|
const classes = computed(() => {
|
|
52
60
|
const prefixCls = componentName;
|
|
53
61
|
return {
|
|
54
62
|
[prefixCls]: true,
|
|
55
63
|
[isActive.value ? "nut-switch-open" : "nut-switch-close"]: true,
|
|
56
|
-
[`${prefixCls}-
|
|
64
|
+
[`${prefixCls}-disabled`]: disabled.value,
|
|
57
65
|
[`${prefixCls}-base`]: true
|
|
58
66
|
};
|
|
59
67
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-switch{cursor:pointer;display:inline-flex;align-items:center;background-color:var(--nut-primary-color, #fa2c19);border-radius:var(--nut-switch-border-radius, 21px);background-size:100% 100%;background-repeat:no-repeat;background-position:center center;flex:0 0 auto}.nut-switch .nut-icon-loading1{width:12px;height:12px;font-size:12px}.nut-switch.nut-switch-close{background-color:var(--nut-switch-close-bg-color, #ebebeb)}.nut-switch .nut-switch-button{display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--nut-white, #fff);transition:transform .3s}.nut-switch .nut-switch-button .nut-switch-label{color:var(--nut-white, #fff);font-size:var(--nut-font-size-1, 12px)}.nut-switch .nut-switch-button .nut-switch-label.open{transform:translateX(-16px)}.nut-switch .nut-switch-button .nut-switch-label.close{transform:translateX(16px)}.nut-switch.nut-switch-
|
|
1
|
+
.nut-switch{cursor:pointer;display:inline-flex;align-items:center;background-color:var(--nut-primary-color, #fa2c19);border-radius:var(--nut-switch-border-radius, 21px);background-size:100% 100%;background-repeat:no-repeat;background-position:center center;flex:0 0 auto}.nut-switch .nut-icon-loading1{width:12px;height:12px;font-size:12px}.nut-switch.nut-switch-close{background-color:var(--nut-switch-close-bg-color, #ebebeb)}.nut-switch .nut-switch-button{display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--nut-white, #fff);transition:transform .3s}.nut-switch .nut-switch-button .nut-switch-label{color:var(--nut-white, #fff);font-size:var(--nut-font-size-1, 12px)}.nut-switch .nut-switch-button .nut-switch-label.open{transform:translateX(-16px)}.nut-switch .nut-switch-button .nut-switch-label.close{transform:translateX(16px)}.nut-switch.nut-switch-disabled{opacity:.6}.nut-switch.nut-switch-base{min-width:var(--nut-switch-width, 36px);height:var(--nut-switch-height, 21px);line-height:var(--nut-switch-line-height, 21px);overflow:hidden}.nut-switch.nut-switch-base .nut-switch-button{height:var(--nut-switch-inside-height, 13px);width:var(--nut-switch-inside-width, 13px);transform:var(--nut-switch-inside-close-transform, translateX(30%))}.nut-switch.nut-switch-base.nut-switch-open .nut-switch-button{transform:var(--nut-switch-inside-open-transform, translateX(146%))}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toRef, ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
3
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
4
|
-
import { u as useFormDisabled } from "../common-
|
|
4
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
6
6
|
const { create } = createComponent("textarea");
|
|
7
7
|
const cN = "NutTextarea";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, createElementBlock, toDisplayString, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
4
4
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
6
6
|
const { create } = createComponent("time-select");
|
|
@@ -10,7 +10,7 @@ import { f as funInterceptor } from "../Interceptor-WYVtGbGC.js";
|
|
|
10
10
|
import NutProgress from "../progress/Progress.js";
|
|
11
11
|
import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
|
|
12
12
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
13
|
-
import { u as useFormDisabled } from "../common-
|
|
13
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
14
14
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
15
15
|
class UploadOptions {
|
|
16
16
|
constructor() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.3.
|
|
5
|
+
"version": "4.3.2",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -5986,7 +5986,7 @@
|
|
|
5986
5986
|
}
|
|
5987
5987
|
},
|
|
5988
5988
|
{
|
|
5989
|
-
"name": "
|
|
5989
|
+
"name": "disabled ",
|
|
5990
5990
|
"default": "`false`",
|
|
5991
5991
|
"description": "禁用状态",
|
|
5992
5992
|
"value": {
|
|
@@ -6056,6 +6056,15 @@
|
|
|
6056
6056
|
"type": "boolean | string | number",
|
|
6057
6057
|
"kind": "expression"
|
|
6058
6058
|
}
|
|
6059
|
+
},
|
|
6060
|
+
{
|
|
6061
|
+
"name": "disable ",
|
|
6062
|
+
"default": "`false`",
|
|
6063
|
+
"description": "禁用状态",
|
|
6064
|
+
"value": {
|
|
6065
|
+
"type": "boolean",
|
|
6066
|
+
"kind": "expression"
|
|
6067
|
+
}
|
|
6059
6068
|
}
|
|
6060
6069
|
]
|
|
6061
6070
|
},
|