@nutui/nutui 4.3.0 → 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 +45 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +5980 -6124
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -3
- package/dist/packages/address/Address.js +1 -4
- package/dist/packages/addresslist/AddressList.js +0 -4
- package/dist/packages/animate/Animate.js +51 -44
- package/dist/packages/audio/Audio.js +0 -3
- package/dist/packages/audiooperate/AudioOperate.js +0 -4
- package/dist/packages/avatar/Avatar.js +0 -1
- package/dist/packages/avatarcropper/AvatarCropper.js +0 -1
- package/dist/packages/calendar/Calendar.js +1 -7
- package/dist/packages/calendarcard/CalendarCard.js +0 -2
- package/dist/packages/calendaritem/CalendarItem.js +0 -2
- package/dist/packages/card/Card.js +2 -3
- package/dist/packages/cascader/Cascader.js +1 -10
- package/dist/packages/checkbox/Checkbox.js +4 -2
- package/dist/packages/col/Col.js +41 -30
- package/dist/packages/collapse/Collapse.js +40 -28
- package/dist/packages/collapseitem/CollapseItem.js +112 -125
- package/dist/packages/comment/Comment.js +0 -5
- package/dist/packages/common-FZL3qC99.js +16 -0
- package/dist/packages/countdown/Countdown.js +3 -4
- package/dist/packages/datepicker/DatePicker.js +0 -4
- package/dist/packages/dialog/Dialog.js +1 -5
- package/dist/packages/ecard/Ecard.js +0 -4
- package/dist/packages/empty/Empty.js +0 -2
- package/dist/packages/fixednav/FixedNav.js +0 -2
- package/dist/packages/form/Form.js +163 -157
- package/dist/packages/formitem/FormItem.js +77 -108
- package/dist/packages/grid/Grid.js +0 -1
- package/dist/packages/imagepreview/ImagePreview.js +1 -5
- package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
- package/dist/packages/{index.vue_vue_type_script_lang-MJYVRFbp.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +6 -4
- package/dist/packages/infiniteloading/InfiniteLoading.js +0 -1
- package/dist/packages/input/Input.js +10 -7
- package/dist/packages/inputnumber/InputNumber.js +11 -8
- package/dist/packages/invoice/Invoice.js +10 -21
- package/dist/packages/layout/Layout.js +3 -0
- package/dist/packages/locale/lang/index.js +0 -1
- package/dist/packages/menuitem/MenuItem.js +1 -3
- package/dist/packages/notify/Notify.js +1 -4
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -5
- package/dist/packages/pagination/Pagination.js +0 -2
- package/dist/packages/picker/Picker.js +10 -5
- package/dist/packages/popover/Popover.js +1 -4
- package/dist/packages/popup/Popup.js +1 -5
- package/dist/packages/price/Price.js +69 -77
- package/dist/packages/pullrefresh/PullRefresh.js +0 -1
- package/dist/packages/radio/Radio.js +1 -6
- package/dist/packages/radiogroup/RadioGroup.js +0 -3
- package/dist/packages/range/Range.js +10 -7
- package/dist/packages/rate/Rate.js +6 -3
- package/dist/packages/row/Row.js +43 -39
- package/dist/packages/searchbar/Searchbar.js +5 -4
- package/dist/packages/shortpassword/ShortPassword.js +1 -4
- package/dist/packages/signature/Signature.js +0 -4
- package/dist/packages/sku/Sku.js +8 -12
- package/dist/packages/switch/Switch.js +12 -2
- package/dist/packages/switch/index.css +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/table/Table.js +0 -2
- package/dist/packages/tabs/Tabs.js +0 -1
- package/dist/packages/textarea/Textarea.js +7 -6
- package/dist/packages/timepannel/TimePannel.js +2 -2
- package/dist/packages/timeselect/TimeSelect.js +1 -5
- package/dist/packages/toast/Toast.js +3 -3
- package/dist/packages/tour/Tour.js +0 -4
- package/dist/packages/uploader/Uploader.js +7 -5
- package/dist/packages/video/Video.js +0 -2
- package/dist/smartips/web-types.json +21 -3
- package/dist/style.css +1 -1
- package/dist/types/__VUE/address/index.vue.d.ts +43 -3
- 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/collapse/collapse.vue.d.ts +60 -0
- package/dist/types/__VUE/collapse/index.d.ts +6 -0
- package/dist/types/__VUE/collapse/types.d.ts +3 -2
- package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +201 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +5 -0
- package/dist/types/__VUE/countdown/index.vue.d.ts +23 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/form/common.d.ts +4 -30
- package/dist/types/__VUE/form/form.vue.d.ts +80 -0
- package/dist/types/__VUE/form/index.d.ts +6 -0
- package/dist/types/__VUE/form/types.d.ts +12 -5
- package/dist/types/__VUE/formitem/form-item.vue.d.ts +97 -0
- package/dist/types/__VUE/formitem/index.d.ts +5 -0
- package/dist/types/__VUE/input/index.vue.d.ts +1 -0
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -0
- 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/picker/index.vue.d.ts +1 -0
- package/dist/types/__VUE/picker/types.d.ts +1 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -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/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +1 -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/searchbar/index.vue.d.ts +1 -0
- package/dist/types/__VUE/skeleton/index.vue.d.ts +3 -3
- package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
- package/dist/types/__VUE/table/index.vue.d.ts +4 -4
- package/dist/types/__VUE/tabs/index.vue.d.ts +4 -4
- package/dist/types/__VUE/textarea/index.vue.d.ts +1 -0
- package/dist/types/__VUE/toast/index.vue.d.ts +21 -1
- package/dist/types/index.d.ts +19 -10
- package/dist/types/utils/index.d.ts +1 -0
- 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/collapse/index.vue.d.ts +0 -39
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +0 -212
- package/dist/types/__VUE/form/index.vue.d.ts +0 -58
- package/dist/types/__VUE/formitem/index.vue.d.ts +0 -134
- package/dist/types/__VUE/formitem/types.d.ts +0 -11
- 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,8 +1,9 @@
|
|
|
1
|
-
import { toRefs, inject, computed, h } from "vue";
|
|
1
|
+
import { toRef, toRefs, inject, computed, h } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-TCzwHGVq.js";
|
|
3
3
|
import { CheckNormal, CheckChecked } from "@nutui/icons-vue";
|
|
4
4
|
import { p as pxCheck } from "./pxCheck-OnXlN1NC.js";
|
|
5
5
|
import { R as RADIO_KEY } from "./types-odSRziQJ.js";
|
|
6
|
+
import { u as useFormDisabled } from "./common-FZL3qC99.js";
|
|
6
7
|
const { componentName, create } = createComponent("radio");
|
|
7
8
|
const _sfc_main = create({
|
|
8
9
|
components: {
|
|
@@ -32,13 +33,14 @@ const _sfc_main = create({
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
setup(props, { slots }) {
|
|
36
|
+
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
35
37
|
const { size } = toRefs(props);
|
|
36
38
|
let parent = inject(RADIO_KEY, null);
|
|
37
39
|
const isCurValue = computed(() => {
|
|
38
40
|
return parent.label.value === props.label;
|
|
39
41
|
});
|
|
40
42
|
const color = computed(() => {
|
|
41
|
-
return !
|
|
43
|
+
return !disabled.value ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
|
|
42
44
|
});
|
|
43
45
|
const renderIcon = () => {
|
|
44
46
|
const { iconSize } = props;
|
|
@@ -59,7 +61,7 @@ const _sfc_main = create({
|
|
|
59
61
|
return h(
|
|
60
62
|
"view",
|
|
61
63
|
{
|
|
62
|
-
class: `${componentName}__label ${
|
|
64
|
+
class: `${componentName}__label ${disabled.value ? `${componentName}__label--disabled` : ""}`
|
|
63
65
|
},
|
|
64
66
|
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
65
67
|
);
|
|
@@ -75,7 +77,7 @@ const _sfc_main = create({
|
|
|
75
77
|
);
|
|
76
78
|
};
|
|
77
79
|
const handleClick = () => {
|
|
78
|
-
if (isCurValue.value ||
|
|
80
|
+
if (isCurValue.value || disabled.value)
|
|
79
81
|
return;
|
|
80
82
|
parent.updateValue(props.label);
|
|
81
83
|
};
|
|
@@ -25,7 +25,6 @@ import { r as requestAniFrame } from "../raf-MQjoO-Ag.js";
|
|
|
25
25
|
import { Loading } from "@nutui/icons-vue";
|
|
26
26
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
27
27
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
28
|
-
import "@nutui/nutui/dist/packages/locale/lang";
|
|
29
28
|
const { create } = createComponent("infinite-loading");
|
|
30
29
|
const cN = "NutInfiniteLoading";
|
|
31
30
|
const _sfc_main = create({
|
|
@@ -14,9 +14,10 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
|
|
18
|
-
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
17
|
+
import { toRef, ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
|
|
19
18
|
import { MaskClose } from "@nutui/icons-vue";
|
|
19
|
+
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
20
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
20
21
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
21
22
|
function trimExtraChar(value, char, regExp) {
|
|
22
23
|
const index2 = value.indexOf(char);
|
|
@@ -141,6 +142,7 @@ const _sfc_main = create({
|
|
|
141
142
|
emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "clickInput", "confirm"],
|
|
142
143
|
expose: ["focus", "blur", "select"],
|
|
143
144
|
setup(props, { emit }) {
|
|
145
|
+
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
144
146
|
const active = ref(false);
|
|
145
147
|
const inputRef = ref();
|
|
146
148
|
const getModelValue = () => {
|
|
@@ -159,7 +161,7 @@ const _sfc_main = create({
|
|
|
159
161
|
const prefixCls = componentName;
|
|
160
162
|
return {
|
|
161
163
|
[prefixCls]: true,
|
|
162
|
-
[`${prefixCls}--disabled`]:
|
|
164
|
+
[`${prefixCls}--disabled`]: disabled.value,
|
|
163
165
|
[`${prefixCls}--required`]: props.required,
|
|
164
166
|
[`${prefixCls}--error`]: props.error,
|
|
165
167
|
[`${prefixCls}--border`]: props.border,
|
|
@@ -198,14 +200,14 @@ const _sfc_main = create({
|
|
|
198
200
|
}
|
|
199
201
|
};
|
|
200
202
|
const onFocus = (event) => {
|
|
201
|
-
if (
|
|
203
|
+
if (disabled.value || props.readonly) {
|
|
202
204
|
return;
|
|
203
205
|
}
|
|
204
206
|
active.value = true;
|
|
205
207
|
emit("focus", event);
|
|
206
208
|
};
|
|
207
209
|
const onBlur = (event) => {
|
|
208
|
-
if (
|
|
210
|
+
if (disabled.value || props.readonly) {
|
|
209
211
|
return;
|
|
210
212
|
}
|
|
211
213
|
setTimeout(() => {
|
|
@@ -221,7 +223,7 @@ const _sfc_main = create({
|
|
|
221
223
|
};
|
|
222
224
|
const clear = (event) => {
|
|
223
225
|
event.stopPropagation();
|
|
224
|
-
if (
|
|
226
|
+
if (disabled.value)
|
|
225
227
|
return;
|
|
226
228
|
emit("update:modelValue", "", event);
|
|
227
229
|
emit("clear", "", event);
|
|
@@ -233,7 +235,7 @@ const _sfc_main = create({
|
|
|
233
235
|
}
|
|
234
236
|
};
|
|
235
237
|
const onClickInput = (event) => {
|
|
236
|
-
if (
|
|
238
|
+
if (disabled.value) {
|
|
237
239
|
return;
|
|
238
240
|
}
|
|
239
241
|
emit("clickInput", event);
|
|
@@ -283,6 +285,7 @@ const _sfc_main = create({
|
|
|
283
285
|
active,
|
|
284
286
|
classes,
|
|
285
287
|
styles,
|
|
288
|
+
disabled,
|
|
286
289
|
onInput,
|
|
287
290
|
onFocus,
|
|
288
291
|
onBlur,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
|
|
1
|
+
import { toRef, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
3
|
import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
|
|
4
4
|
import { Minus, Plus } from "@nutui/icons-vue";
|
|
5
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
5
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
6
7
|
const { componentName, create } = createComponent("input-number");
|
|
7
8
|
const _sfc_main = create({
|
|
@@ -46,11 +47,12 @@ const _sfc_main = create({
|
|
|
46
47
|
},
|
|
47
48
|
emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
|
|
48
49
|
setup(props, { emit }) {
|
|
50
|
+
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
49
51
|
const classes = computed(() => {
|
|
50
52
|
const prefixCls = componentName;
|
|
51
53
|
return {
|
|
52
54
|
[prefixCls]: true,
|
|
53
|
-
[`${prefixCls}--disabled`]:
|
|
55
|
+
[`${prefixCls}--disabled`]: disabled.value
|
|
54
56
|
};
|
|
55
57
|
});
|
|
56
58
|
const fixedDecimalPlaces = (v) => {
|
|
@@ -68,13 +70,13 @@ const _sfc_main = create({
|
|
|
68
70
|
emit("change", output_value, event);
|
|
69
71
|
};
|
|
70
72
|
const addAllow = (value = Number(props.modelValue)) => {
|
|
71
|
-
return value < Number(props.max) && !
|
|
73
|
+
return value < Number(props.max) && !disabled.value;
|
|
72
74
|
};
|
|
73
75
|
const reduceAllow = (value = Number(props.modelValue)) => {
|
|
74
|
-
return value > Number(props.min) && !
|
|
76
|
+
return value > Number(props.min) && !disabled.value;
|
|
75
77
|
};
|
|
76
78
|
const reduce = (event) => {
|
|
77
|
-
if (
|
|
79
|
+
if (disabled.value)
|
|
78
80
|
return;
|
|
79
81
|
emit("reduce", event);
|
|
80
82
|
let output_value = Number(props.modelValue) - Number(props.step);
|
|
@@ -86,7 +88,7 @@ const _sfc_main = create({
|
|
|
86
88
|
}
|
|
87
89
|
};
|
|
88
90
|
const add = (event) => {
|
|
89
|
-
if (
|
|
91
|
+
if (disabled.value)
|
|
90
92
|
return;
|
|
91
93
|
emit("add", event);
|
|
92
94
|
let output_value = Number(props.modelValue) + Number(props.step);
|
|
@@ -98,14 +100,14 @@ const _sfc_main = create({
|
|
|
98
100
|
}
|
|
99
101
|
};
|
|
100
102
|
const focus = (event) => {
|
|
101
|
-
if (
|
|
103
|
+
if (disabled.value)
|
|
102
104
|
return;
|
|
103
105
|
if (props.readonly)
|
|
104
106
|
return;
|
|
105
107
|
emit("focus", event);
|
|
106
108
|
};
|
|
107
109
|
const blur = (event) => {
|
|
108
|
-
if (
|
|
110
|
+
if (disabled.value)
|
|
109
111
|
return;
|
|
110
112
|
if (props.readonly)
|
|
111
113
|
return;
|
|
@@ -142,6 +144,7 @@ const _sfc_main = create({
|
|
|
142
144
|
);
|
|
143
145
|
return {
|
|
144
146
|
classes,
|
|
147
|
+
disabled,
|
|
145
148
|
change,
|
|
146
149
|
blur,
|
|
147
150
|
focus,
|
|
@@ -19,31 +19,20 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, reactive, computed, onMounted, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, withDirectives, vModelText, createCommentVNode } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { _ as _sfc_main$
|
|
25
|
-
import { _ as _sfc_main$
|
|
26
|
-
import { Button as _sfc_main$
|
|
22
|
+
import { Form as _sfc_main$1 } from "../form/Form.js";
|
|
23
|
+
import { FormItem as _sfc_main$2 } from "../formitem/FormItem.js";
|
|
24
|
+
import { _ as _sfc_main$3 } from "../index.vue_vue_type_script_lang-n0HbjvfF.js";
|
|
25
|
+
import { _ as _sfc_main$4 } from "../index.vue_vue_type_script_lang-54PRh3YM.js";
|
|
26
|
+
import { Button as _sfc_main$5 } from "../button/Button.js";
|
|
27
27
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
28
|
-
import "../util-4Jkyw4BJ.js";
|
|
29
|
-
import "../types-Ynmct7na.js";
|
|
30
|
-
import "../useChildren-GU_NVfD8.js";
|
|
31
|
-
import "../cellgroup/CellGroup.js";
|
|
32
|
-
import "../pxCheck-OnXlN1NC.js";
|
|
33
|
-
import "../cell/Cell.js";
|
|
34
|
-
import "../index-Ii9XdkPy.js";
|
|
35
|
-
import "@nutui/icons-vue";
|
|
36
|
-
import "../useParent-KIxqkovs.js";
|
|
37
|
-
import "../types-odSRziQJ.js";
|
|
38
|
-
import "../with-install-p59gYYU_.js";
|
|
39
28
|
const { componentName, create } = createComponent("invoice");
|
|
40
29
|
const _sfc_main = create({
|
|
41
30
|
components: {
|
|
42
|
-
NutForm,
|
|
43
|
-
NutFormItem,
|
|
44
|
-
NutRadio: _sfc_main$
|
|
45
|
-
NutRadioGroup: _sfc_main$
|
|
46
|
-
NutButton: _sfc_main$
|
|
31
|
+
NutForm: _sfc_main$1,
|
|
32
|
+
NutFormItem: _sfc_main$2,
|
|
33
|
+
NutRadio: _sfc_main$3,
|
|
34
|
+
NutRadioGroup: _sfc_main$4,
|
|
35
|
+
NutButton: _sfc_main$5
|
|
47
36
|
},
|
|
48
37
|
props: {
|
|
49
38
|
data: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
2
2
|
import "vue";
|
|
3
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
3
4
|
const { create } = createComponent("layout");
|
|
4
5
|
const _sfc_main = create({});
|
|
6
|
+
withInstall(_sfc_main);
|
|
5
7
|
export {
|
|
8
|
+
_sfc_main as Layout,
|
|
6
9
|
_sfc_main as default
|
|
7
10
|
};
|
|
@@ -7,7 +7,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import { reactive, ref } from "vue";
|
|
8
8
|
import Lang from "./zh-CN.js";
|
|
9
9
|
import Lang$1 from "./en-US.js";
|
|
10
|
-
import "./baseLang-7uiEiO-2.js";
|
|
11
10
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
12
11
|
const deepMerge = (target, newObj) => {
|
|
13
12
|
Object.keys(newObj).forEach((key) => {
|
|
@@ -19,13 +19,11 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
22
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
23
23
|
import { Check } from "@nutui/icons-vue";
|
|
24
24
|
import { u as useParent } from "../useParent-KIxqkovs.js";
|
|
25
25
|
import { M as MENU_KEY } from "../types-j71K23JP.js";
|
|
26
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
27
|
-
import "../overlay/Overlay.js";
|
|
28
|
-
import "../util-4Jkyw4BJ.js";
|
|
29
27
|
const { create } = createComponent("menu-item");
|
|
30
28
|
const _sfc_main = create({
|
|
31
29
|
props: {
|
|
@@ -19,11 +19,8 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
22
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
23
23
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
24
|
-
import "@nutui/icons-vue";
|
|
25
|
-
import "../overlay/Overlay.js";
|
|
26
|
-
import "../util-4Jkyw4BJ.js";
|
|
27
24
|
const { create } = createComponent("notify");
|
|
28
25
|
const _sfc_main = create({
|
|
29
26
|
components: {
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } 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
|
-
import "@nutui/icons-vue";
|
|
7
|
-
import "../overlay/Overlay.js";
|
|
8
|
-
import "../util-4Jkyw4BJ.js";
|
|
9
|
-
import "@nutui/nutui/dist/packages/locale/lang";
|
|
10
6
|
const { create } = createComponent("number-keyboard");
|
|
11
7
|
const cN = "NutNumberKeyboard";
|
|
12
8
|
const _sfc_main = create({
|
|
@@ -2,8 +2,6 @@ import { toRefs, computed, watchEffect, openBlock, createElementBlock, createEle
|
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
3
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
4
4
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
5
|
-
import "@nutui/nutui/dist/packages/locale/lang";
|
|
6
|
-
import "../util-4Jkyw4BJ.js";
|
|
7
5
|
const { create } = createComponent("pagination");
|
|
8
6
|
const cN = "NutPagination";
|
|
9
7
|
const _sfc_main = create({
|
|
@@ -24,11 +24,11 @@ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
|
|
|
24
24
|
import { u as useTouch } from "../index-084nl_oE.js";
|
|
25
25
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
26
26
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
27
|
-
import "@nutui/nutui/dist/packages/locale/lang";
|
|
28
27
|
const DEFAULT_FILED_NAMES = {
|
|
29
28
|
text: "text",
|
|
30
29
|
value: "value",
|
|
31
|
-
children: "children"
|
|
30
|
+
children: "children",
|
|
31
|
+
className: "className"
|
|
32
32
|
};
|
|
33
33
|
const usePicker = (props, emit) => {
|
|
34
34
|
const state = reactive({
|
|
@@ -450,14 +450,19 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
450
450
|
}, [
|
|
451
451
|
item && item[_ctx.fieldNames.text] && _ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
452
452
|
key: 0,
|
|
453
|
-
class: normalizeClass(["nut-picker-roller-item", {
|
|
453
|
+
class: normalizeClass(["nut-picker-roller-item", {
|
|
454
|
+
"nut-picker-roller-item-hidden": _ctx.isHidden(index + 1),
|
|
455
|
+
[item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className]
|
|
456
|
+
}]),
|
|
454
457
|
style: normalizeStyle(_ctx.setRollerStyle(index + 1))
|
|
455
458
|
}, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true),
|
|
456
459
|
item && item[_ctx.fieldNames.text] && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
457
460
|
key: 1,
|
|
458
|
-
class: "nut-picker-roller-item-tile",
|
|
461
|
+
class: normalizeClass(["nut-picker-roller-item-tile", {
|
|
462
|
+
[item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className]
|
|
463
|
+
}]),
|
|
459
464
|
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.optionHeight), lineHeight: _ctx.pxCheck(_ctx.optionHeight) })
|
|
460
|
-
}, toDisplayString(item[_ctx.fieldNames.text]),
|
|
465
|
+
}, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true)
|
|
461
466
|
], 64);
|
|
462
467
|
}), 128))
|
|
463
468
|
], 36),
|
|
@@ -2,11 +2,8 @@ import { ref, computed, onMounted, watch, nextTick, resolveComponent, openBlock,
|
|
|
2
2
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
3
3
|
import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
|
|
4
4
|
import { u as useRect } from "../index-cp6Ms_Qe.js";
|
|
5
|
-
import { N as NutPopup } from "../index-
|
|
5
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
7
|
-
import "@nutui/icons-vue";
|
|
8
|
-
import "../overlay/Overlay.js";
|
|
9
|
-
import "../util-4Jkyw4BJ.js";
|
|
10
7
|
const { create } = createComponent("popover");
|
|
11
8
|
const _sfc_main = create({
|
|
12
9
|
components: {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { N } from "../index-
|
|
1
|
+
import { N } from "../index-BqB5dTeo.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
4
|
-
import "@nutui/icons-vue";
|
|
5
|
-
import "../overlay/Overlay.js";
|
|
6
|
-
import "../component-TCzwHGVq.js";
|
|
7
|
-
import "../util-4Jkyw4BJ.js";
|
|
8
4
|
export {
|
|
9
5
|
N as default
|
|
10
6
|
};
|
|
@@ -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
|
};
|
|
@@ -26,7 +26,6 @@ import { u as useScrollParent } from "../index-xDfQLRen.js";
|
|
|
26
26
|
import { Loading } from "@nutui/icons-vue";
|
|
27
27
|
import { u as useLocale } from "../index-s3RgMhc7.js";
|
|
28
28
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
29
|
-
import "@nutui/nutui/dist/packages/locale/lang";
|
|
30
29
|
const { create } = createComponent("pull-refresh");
|
|
31
30
|
const cN = "NutPullRefresh";
|
|
32
31
|
const _sfc_main = create({
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-
|
|
2
|
-
import "vue";
|
|
3
|
-
import "../component-TCzwHGVq.js";
|
|
4
|
-
import "@nutui/icons-vue";
|
|
5
|
-
import "../pxCheck-OnXlN1NC.js";
|
|
6
|
-
import "../types-odSRziQJ.js";
|
|
1
|
+
import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-n0HbjvfF.js";
|
|
7
2
|
export {
|
|
8
3
|
_sfc_main as default
|
|
9
4
|
};
|
|
@@ -17,11 +17,12 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
|
|
20
|
+
import { toRef, ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
|
|
21
21
|
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-FZL3qC99.js";
|
|
25
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
|
|
26
27
|
const { componentName, create } = createComponent("range");
|
|
27
28
|
const _sfc_main = create({
|
|
@@ -69,6 +70,7 @@ const _sfc_main = create({
|
|
|
69
70
|
},
|
|
70
71
|
emits: ["change", "dragEnd", "dragStart", "update:modelValue"],
|
|
71
72
|
setup(props, { emit }) {
|
|
73
|
+
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
72
74
|
const buttonIndex = ref(0);
|
|
73
75
|
let startValue;
|
|
74
76
|
let currentValue;
|
|
@@ -86,7 +88,7 @@ const _sfc_main = create({
|
|
|
86
88
|
const prefixCls = componentName;
|
|
87
89
|
return {
|
|
88
90
|
[prefixCls]: true,
|
|
89
|
-
[`${prefixCls}-disabled`]:
|
|
91
|
+
[`${prefixCls}-disabled`]: disabled.value,
|
|
90
92
|
[`${prefixCls}-vertical`]: props.vertical,
|
|
91
93
|
[`${prefixCls}-show-number`]: !props.hiddenRange
|
|
92
94
|
};
|
|
@@ -211,7 +213,7 @@ const _sfc_main = create({
|
|
|
211
213
|
}
|
|
212
214
|
};
|
|
213
215
|
const onClick = (event) => {
|
|
214
|
-
if (
|
|
216
|
+
if (disabled.value) {
|
|
215
217
|
return;
|
|
216
218
|
}
|
|
217
219
|
const { min, modelValue } = props;
|
|
@@ -236,7 +238,7 @@ const _sfc_main = create({
|
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
240
|
const onTouchStart = (event) => {
|
|
239
|
-
if (
|
|
241
|
+
if (disabled.value) {
|
|
240
242
|
return;
|
|
241
243
|
}
|
|
242
244
|
touch.start(event);
|
|
@@ -249,7 +251,7 @@ const _sfc_main = create({
|
|
|
249
251
|
dragStatus.value = "start";
|
|
250
252
|
};
|
|
251
253
|
const onTouchMove = (event) => {
|
|
252
|
-
if (
|
|
254
|
+
if (disabled.value) {
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
255
257
|
if (dragStatus.value === "start") {
|
|
@@ -274,7 +276,7 @@ const _sfc_main = create({
|
|
|
274
276
|
updateValue(currentValue);
|
|
275
277
|
};
|
|
276
278
|
const onTouchEnd = () => {
|
|
277
|
-
if (
|
|
279
|
+
if (disabled.value) {
|
|
278
280
|
return;
|
|
279
281
|
}
|
|
280
282
|
if (dragStatus.value === "draging") {
|
|
@@ -304,7 +306,8 @@ const _sfc_main = create({
|
|
|
304
306
|
markClassName,
|
|
305
307
|
marksStyle,
|
|
306
308
|
marksList,
|
|
307
|
-
tickStyle
|
|
309
|
+
tickStyle,
|
|
310
|
+
disabled
|
|
308
311
|
});
|
|
309
312
|
}
|
|
310
313
|
});
|