@nutui/nutui 4.3.3 → 4.3.4
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 +20 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4461 -4666
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/{Interceptor-WYVtGbGC.js → Interceptor-DlY2h6Y7.js} +2 -2
- package/dist/packages/actionsheet/ActionSheet.js +3 -3
- package/dist/packages/address/Address.js +5 -5
- package/dist/packages/addresslist/AddressList.js +4 -4
- package/dist/packages/animate/Animate.js +1 -1
- package/dist/packages/audio/Audio.js +2 -2
- package/dist/packages/audiooperate/AudioOperate.js +3 -3
- package/dist/packages/avatar/Avatar.js +2 -2
- package/dist/packages/avatarcropper/AvatarCropper.js +5 -5
- package/dist/packages/avatargroup/AvatarGroup.js +3 -3
- package/dist/packages/backtop/Backtop.js +2 -2
- package/dist/packages/badge/Badge.js +2 -2
- package/dist/packages/barrage/Barrage.js +2 -2
- package/dist/packages/button/Button.js +1 -1
- package/dist/packages/calendar/Calendar.js +6 -6
- package/dist/packages/calendarcard/CalendarCard.js +3 -3
- package/dist/packages/card/Card.js +2 -2
- package/dist/packages/cascader/Cascader.js +4 -4
- package/dist/packages/category/Category.js +4 -4
- package/dist/packages/categorypane/CategoryPane.js +5 -5
- package/dist/packages/cell/Cell.js +4 -4
- package/dist/packages/cellgroup/CellGroup.js +2 -2
- package/dist/packages/checkbox/Checkbox.js +4 -4
- package/dist/packages/checkboxgroup/CheckboxGroup.js +2 -2
- package/dist/packages/circleprogress/CircleProgress.js +2 -2
- package/dist/packages/col/Col.js +2 -2
- package/dist/packages/collapse/Collapse.js +2 -2
- package/dist/packages/collapseitem/CollapseItem.js +3 -3
- package/dist/packages/comment/Comment.js +4 -4
- package/dist/packages/{common-4inKawxR.js → common-Chr7cC9o.js} +2 -2
- package/dist/packages/{common-FZL3qC99.js → common-DRG0ue26.js} +1 -1
- package/dist/packages/configprovider/ConfigProvider.js +1 -1
- package/dist/packages/countdown/Countdown.js +4 -4
- package/dist/packages/countup/Countup.js +9 -9
- package/dist/packages/{date-djiVNSnJ.js → date-DHXcwF1m.js} +2 -2
- package/dist/packages/datepicker/DatePicker.js +3 -3
- package/dist/packages/dialog/Dialog.js +8 -8
- package/dist/packages/divider/Divider.js +1 -1
- package/dist/packages/drag/Drag.js +3 -3
- package/dist/packages/ecard/Ecard.js +3 -3
- package/dist/packages/elevator/Elevator.js +2 -2
- package/dist/packages/ellipsis/Ellipsis.js +4 -4
- package/dist/packages/empty/Empty.js +67 -52
- package/dist/packages/fixednav/FixedNav.js +3 -3
- package/dist/packages/form/Form.js +4 -4
- package/dist/packages/formitem/FormItem.js +4 -4
- package/dist/packages/grid/Grid.js +2 -2
- package/dist/packages/griditem/GridItem.js +5 -5
- package/dist/packages/image/Image.js +3 -3
- package/dist/packages/imagepreview/ImagePreview.js +8 -8
- package/dist/packages/{index-s3RgMhc7.js → index-CFigyH92.js} +1 -1
- package/dist/packages/{index--uVlasFu.js → index-Do4_KY74.js} +2 -2
- package/dist/packages/{index-BqB5dTeo.js → index-uHBD4dfS.js} +2 -2
- package/dist/packages/{index.vue_vue_type_script_lang-n0HbjvfF.js → index.vue_vue_type_script_lang-CTQUvlgN.js} +4 -4
- package/dist/packages/{index.vue_vue_type_script_lang-54PRh3YM.js → index.vue_vue_type_script_lang-CaSiRl9x.js} +2 -2
- package/dist/packages/indicator/Indicator.js +56 -50
- package/dist/packages/infiniteloading/InfiniteLoading.js +6 -6
- package/dist/packages/input/Input.js +3 -3
- package/dist/packages/inputnumber/InputNumber.js +3 -3
- package/dist/packages/invoice/Invoice.js +3 -3
- package/dist/packages/layout/Layout.js +2 -2
- package/dist/packages/list/List.js +3 -3
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +2 -2
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menu/Menu.js +5 -5
- package/dist/packages/menuitem/MenuItem.js +5 -5
- package/dist/packages/{mountComponent-uInXoTMp.js → mountComponent-DBQ88Fjz.js} +1 -1
- package/dist/packages/navbar/Navbar.js +1 -1
- package/dist/packages/noticebar/Noticebar.js +3 -3
- package/dist/packages/notify/Notify.js +3 -3
- package/dist/packages/numberkeyboard/NumberKeyboard.js +4 -4
- package/dist/packages/overlay/Overlay.js +3 -3
- package/dist/packages/pagination/Pagination.js +3 -3
- package/dist/packages/picker/Picker.js +7 -10
- package/dist/packages/popover/Popover.js +5 -5
- package/dist/packages/popup/Popup.js +2 -2
- package/dist/packages/price/Price.js +1 -1
- package/dist/packages/progress/Progress.js +1 -1
- package/dist/packages/pullrefresh/PullRefresh.js +7 -7
- package/dist/packages/radio/Radio.js +1 -1
- package/dist/packages/radiogroup/RadioGroup.js +1 -1
- package/dist/packages/range/Range.js +6 -6
- package/dist/packages/rate/Rate.js +5 -5
- package/dist/packages/row/Row.js +2 -2
- package/dist/packages/searchbar/Searchbar.js +5 -5
- package/dist/packages/shortpassword/ShortPassword.js +5 -5
- package/dist/packages/sidenavbar/SideNavbar.js +2 -2
- package/dist/packages/sidenavbaritem/SideNavbarItem.js +2 -2
- package/dist/packages/signature/Signature.js +3 -3
- package/dist/packages/skeleton/Skeleton.js +13 -13
- package/dist/packages/sku/Sku.js +4 -4
- package/dist/packages/space/Space.js +1 -1
- package/dist/packages/step/Step.js +3 -3
- package/dist/packages/steps/Steps.js +2 -2
- package/dist/packages/sticky/Sticky.js +4 -4
- package/dist/packages/subsidenavbar/SubSideNavbar.js +2 -2
- package/dist/packages/swipe/Swipe.js +3 -3
- package/dist/packages/swipegroup/SwipeGroup.js +2 -2
- package/dist/packages/swiper/Swiper.js +7 -7
- package/dist/packages/swiperitem/SwiperItem.js +3 -3
- package/dist/packages/switch/Switch.js +68 -86
- package/dist/packages/tabbar/Tabbar.js +78 -78
- package/dist/packages/tabbaritem/TabbarItem.js +89 -113
- package/dist/packages/table/Table.js +3 -3
- package/dist/packages/tabpane/TabPane.js +2 -2
- package/dist/packages/tabs/Tabs.js +9 -9
- package/dist/packages/tag/Tag.js +1 -1
- package/dist/packages/textarea/Textarea.js +113 -127
- package/dist/packages/timedetail/TimeDetail.js +2 -2
- package/dist/packages/timepannel/TimePannel.js +2 -2
- package/dist/packages/timeselect/TimeSelect.js +4 -4
- package/dist/packages/toast/Toast.js +6 -6
- package/dist/packages/tour/Tour.js +3 -3
- package/dist/packages/trendarrow/TrendArrow.js +51 -83
- package/dist/packages/uploader/Uploader.js +5 -5
- package/dist/packages/{useChildren-GU_NVfD8.js → useChildren-BZ4-J79J.js} +2 -2
- package/dist/packages/useParent-D6DiuxZZ.js +21 -0
- package/dist/packages/{util-4Jkyw4BJ.js → util-DnfK0Qan.js} +2 -2
- package/dist/packages/video/Video.js +16 -16
- package/dist/packages/watermark/Watermark.js +2 -2
- package/dist/smartips/web-types.json +1 -1
- package/dist/types/__VUE/empty/empty.vue.d.ts +62 -0
- package/dist/types/__VUE/empty/index.d.ts +6 -0
- package/dist/types/__VUE/indicator/index.d.ts +6 -0
- package/dist/types/__VUE/indicator/indicator.vue.d.ts +65 -0
- package/dist/types/__VUE/switch/index.d.ts +5 -0
- package/dist/types/__VUE/switch/switch.vue.d.ts +109 -0
- package/dist/types/__VUE/tabbar/index.d.ts +5 -0
- package/dist/types/__VUE/tabbar/tabbar.vue.d.ts +83 -0
- package/dist/types/__VUE/tabbaritem/index.d.ts +5 -0
- package/dist/types/__VUE/tabbaritem/tabbar-item.vue.d.ts +65 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +12 -12
- package/dist/types/__VUE/textarea/index.d.ts +5 -0
- package/dist/types/__VUE/textarea/textarea.vue.d.ts +104 -0
- package/dist/types/__VUE/trendarrow/index.d.ts +5 -0
- package/dist/types/__VUE/trendarrow/trend-arrow.vue.d.ts +96 -0
- package/dist/types/index.d.ts +15 -8
- package/dist/types/utils/throttle.d.ts +1 -1
- package/dist/types/utils/useRelation/useParent.d.ts +1 -0
- package/package.json +1 -1
- package/dist/packages/useParent-KIxqkovs.js +0 -16
- package/dist/types/__VUE/empty/index.vue.d.ts +0 -53
- package/dist/types/__VUE/indicator/index.vue.d.ts +0 -69
- package/dist/types/__VUE/switch/index.vue.d.ts +0 -118
- package/dist/types/__VUE/tabbar/index.vue.d.ts +0 -85
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +0 -60
- package/dist/types/__VUE/textarea/index.vue.d.ts +0 -127
- package/dist/types/__VUE/trendarrow/index.vue.d.ts +0 -102
- /package/dist/packages/{_plugin-vue_export-helper-yVxbj29m.js → _plugin-vue_export-helper-1tPrXgE0.js} +0 -0
- /package/dist/packages/{component-TCzwHGVq.js → component-DQf3CENX.js} +0 -0
- /package/dist/packages/{index-cp6Ms_Qe.js → index-B1qsj2XR.js} +0 -0
- /package/dist/packages/{index-xDfQLRen.js → index-BvmDLUYP.js} +0 -0
- /package/dist/packages/{index-084nl_oE.js → index-I8tfW3Kf.js} +0 -0
- /package/dist/packages/{index-Ii9XdkPy.js → index-aiGQ-EiA.js} +0 -0
- /package/dist/packages/locale/lang/{baseLang-7uiEiO-2.js → baseLang-Bnfy6fTl.js} +0 -0
- /package/dist/packages/{pxCheck-OnXlN1NC.js → pxCheck-DN6FYV6q.js} +0 -0
- /package/dist/packages/{raf-MQjoO-Ag.js → raf-c01wDYCo.js} +0 -0
- /package/dist/packages/{renderIcon--EgZu5_5.js → renderIcon-BfOvhG7i.js} +0 -0
- /package/dist/packages/{types-RCVUm7Nb.js → types-1HzUV14W.js} +0 -0
- /package/dist/packages/{types-zeKkNDAq.js → types-48N1bMrT.js} +0 -0
- /package/dist/packages/{types-Ww4ErYJT.js → types-BKDaJvHp.js} +0 -0
- /package/dist/packages/{types-odSRziQJ.js → types-BODurTjN.js} +0 -0
- /package/dist/packages/{types-qOrhXtA_.js → types-BWhKcf4T.js} +0 -0
- /package/dist/packages/{types-4IflWeQO.js → types-BomhFk3T.js} +0 -0
- /package/dist/packages/{types-j71K23JP.js → types-CkPfROfI.js} +0 -0
- /package/dist/packages/{types-9wCQwtH3.js → types-DUkJysbi.js} +0 -0
- /package/dist/packages/{types-Cq2YypZn.js → types-MuhxzCWc.js} +0 -0
- /package/dist/packages/{with-install-p59gYYU_.js → with-install-Ch3FF0uS.js} +0 -0
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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, toRef, ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, unref, toDisplayString, createCommentVNode } from "vue";
|
|
21
|
+
import { u as useLocale } from "../index-CFigyH92.js";
|
|
22
|
+
import { u as useFormDisabled } from "../common-DRG0ue26.js";
|
|
23
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
24
|
+
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
|
|
25
|
+
const _hoisted_2 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "nut-textarea__limit"
|
|
28
|
+
};
|
|
7
29
|
const cN = "NutTextarea";
|
|
8
|
-
const _sfc_main =
|
|
30
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
31
|
+
name: cN
|
|
32
|
+
}), {
|
|
33
|
+
__name: "textarea",
|
|
9
34
|
props: {
|
|
10
|
-
modelValue: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default: false
|
|
21
|
-
},
|
|
22
|
-
maxLength: {
|
|
23
|
-
type: [String, Number],
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
rows: {
|
|
27
|
-
type: [String, Number],
|
|
28
|
-
default: "2"
|
|
29
|
-
},
|
|
30
|
-
placeholder: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
readonly: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false
|
|
37
|
-
},
|
|
38
|
-
disabled: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false
|
|
41
|
-
},
|
|
42
|
-
autosize: {
|
|
43
|
-
type: [Boolean, Object],
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
autofocus: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
}
|
|
35
|
+
modelValue: { default: "" },
|
|
36
|
+
textAlign: {},
|
|
37
|
+
limitShow: { type: Boolean, default: false },
|
|
38
|
+
maxLength: { default: "" },
|
|
39
|
+
rows: { default: "2" },
|
|
40
|
+
placeholder: { default: "" },
|
|
41
|
+
readonly: { type: Boolean, default: false },
|
|
42
|
+
disabled: { type: Boolean, default: false },
|
|
43
|
+
autosize: { type: [Boolean, Object], default: false },
|
|
44
|
+
autofocus: { type: Boolean, default: false }
|
|
50
45
|
},
|
|
51
46
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
52
|
-
setup(
|
|
47
|
+
setup(__props, { emit: __emit }) {
|
|
48
|
+
const props = __props;
|
|
49
|
+
const emit = __emit;
|
|
53
50
|
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
54
51
|
const translate = useLocale(cN);
|
|
55
|
-
const textareaRef = ref();
|
|
52
|
+
const textareaRef = ref(null);
|
|
56
53
|
const classes = computed(() => {
|
|
57
54
|
const prefixCls = "nut-textarea";
|
|
58
55
|
return {
|
|
@@ -60,37 +57,43 @@ const _sfc_main = create({
|
|
|
60
57
|
[`${prefixCls}--disabled`]: disabled.value
|
|
61
58
|
};
|
|
62
59
|
});
|
|
63
|
-
onMounted(() => {
|
|
64
|
-
if (props.modelValue) {
|
|
65
|
-
emitChange(String(props.modelValue));
|
|
66
|
-
}
|
|
67
|
-
if (props.autosize) {
|
|
68
|
-
nextTick(getContentHeight);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
60
|
const styles = computed(() => {
|
|
72
61
|
return {
|
|
73
62
|
textAlign: props.textAlign
|
|
74
|
-
// resize: props.autosize ? 'vertical' : 'none'
|
|
75
63
|
};
|
|
76
64
|
});
|
|
65
|
+
const setHeight = (height) => {
|
|
66
|
+
const textarea = textareaRef.value;
|
|
67
|
+
if (textarea && textarea.style) {
|
|
68
|
+
textarea.style.height = typeof height === "number" ? `${height}px` : height;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
77
71
|
const getContentHeight = () => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
setHeight("auto");
|
|
73
|
+
if (textareaRef.value) {
|
|
74
|
+
let height = textareaRef.value.scrollHeight;
|
|
75
|
+
if (typeof props.autosize === "object") {
|
|
76
|
+
const { maxHeight, minHeight } = props.autosize;
|
|
77
|
+
if (maxHeight !== void 0) {
|
|
78
|
+
height = Math.min(height, maxHeight);
|
|
79
|
+
}
|
|
80
|
+
if (minHeight !== void 0) {
|
|
81
|
+
height = Math.max(height, minHeight);
|
|
82
|
+
}
|
|
85
83
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
84
|
+
if (height) {
|
|
85
|
+
setHeight(height);
|
|
88
86
|
}
|
|
89
87
|
}
|
|
90
|
-
if (height) {
|
|
91
|
-
textarea.style.height = height + "px";
|
|
92
|
-
}
|
|
93
88
|
};
|
|
89
|
+
onMounted(() => {
|
|
90
|
+
if (props.modelValue) {
|
|
91
|
+
emitChange(String(props.modelValue));
|
|
92
|
+
}
|
|
93
|
+
if (props.autosize) {
|
|
94
|
+
nextTick(getContentHeight);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
94
97
|
watch(
|
|
95
98
|
() => props.modelValue,
|
|
96
99
|
() => {
|
|
@@ -107,8 +110,8 @@ const _sfc_main = create({
|
|
|
107
110
|
emit("change", value, event);
|
|
108
111
|
};
|
|
109
112
|
const change = (event) => {
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
const input = event.target;
|
|
114
|
+
if (!input.composing) {
|
|
112
115
|
let value = input.value;
|
|
113
116
|
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
114
117
|
value = value.slice(0, Number(props.maxLength));
|
|
@@ -117,76 +120,59 @@ const _sfc_main = create({
|
|
|
117
120
|
}
|
|
118
121
|
};
|
|
119
122
|
const focus = (event) => {
|
|
120
|
-
if (disabled.value)
|
|
121
|
-
return;
|
|
122
|
-
if (props.readonly)
|
|
123
|
+
if (disabled.value || props.readonly)
|
|
123
124
|
return;
|
|
124
125
|
emit("focus", event);
|
|
125
126
|
};
|
|
126
127
|
const blur = (event) => {
|
|
127
|
-
if (disabled.value)
|
|
128
|
-
return;
|
|
129
|
-
if (props.readonly)
|
|
128
|
+
if (disabled.value || props.readonly)
|
|
130
129
|
return;
|
|
131
130
|
const input = event.target;
|
|
132
|
-
|
|
131
|
+
const value = input.value;
|
|
133
132
|
emitChange(value, event);
|
|
134
133
|
emit("blur", { value, event });
|
|
135
134
|
};
|
|
136
135
|
const startComposing = ({ target }) => {
|
|
137
|
-
|
|
136
|
+
const input = target;
|
|
137
|
+
input.composing = true;
|
|
138
138
|
};
|
|
139
139
|
const endComposing = ({ target }) => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
const input = target;
|
|
141
|
+
if (input.composing) {
|
|
142
|
+
input.composing = false;
|
|
143
|
+
input.dispatchEvent(new Event("input"));
|
|
143
144
|
}
|
|
144
145
|
};
|
|
145
|
-
return {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return openBlock(), createElementBlock("view", {
|
|
148
|
+
class: normalizeClass(classes.value)
|
|
149
|
+
}, [
|
|
150
|
+
createElementVNode("textarea", {
|
|
151
|
+
ref_key: "textareaRef",
|
|
152
|
+
ref: textareaRef,
|
|
153
|
+
class: "nut-textarea__textarea",
|
|
154
|
+
style: normalizeStyle(styles.value),
|
|
155
|
+
rows: _ctx.rows,
|
|
156
|
+
disabled: unref(disabled),
|
|
157
|
+
readonly: _ctx.readonly,
|
|
158
|
+
value: _ctx.modelValue,
|
|
159
|
+
maxlength: _ctx.maxLength,
|
|
160
|
+
placeholder: _ctx.placeholder || unref(translate)("placeholder"),
|
|
161
|
+
autofocus: _ctx.autofocus,
|
|
162
|
+
onInput: change,
|
|
163
|
+
onBlur: blur,
|
|
164
|
+
onFocus: focus,
|
|
165
|
+
onChange: endComposing,
|
|
166
|
+
onCompositionend: endComposing,
|
|
167
|
+
onCompositionstart: startComposing
|
|
168
|
+
}, null, 44, _hoisted_1),
|
|
169
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
170
|
+
], 2);
|
|
156
171
|
};
|
|
157
172
|
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
const _hoisted_2 = {
|
|
161
|
-
key: 0,
|
|
162
|
-
class: "nut-textarea__limit"
|
|
163
|
-
};
|
|
164
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
165
|
-
return openBlock(), createElementBlock("view", {
|
|
166
|
-
class: normalizeClass(_ctx.classes)
|
|
167
|
-
}, [
|
|
168
|
-
createElementVNode("textarea", {
|
|
169
|
-
ref: "textareaRef",
|
|
170
|
-
class: "nut-textarea__textarea",
|
|
171
|
-
style: normalizeStyle(_ctx.styles),
|
|
172
|
-
rows: _ctx.rows,
|
|
173
|
-
disabled: _ctx.disabled,
|
|
174
|
-
readonly: _ctx.readonly,
|
|
175
|
-
value: _ctx.modelValue,
|
|
176
|
-
maxlength: _ctx.maxLength,
|
|
177
|
-
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
178
|
-
autofocus: _ctx.autofocus,
|
|
179
|
-
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
180
|
-
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
181
|
-
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
182
|
-
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
183
|
-
onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
184
|
-
onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.startComposing && _ctx.startComposing(...args))
|
|
185
|
-
}, null, 44, _hoisted_1),
|
|
186
|
-
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
187
|
-
], 2);
|
|
188
|
-
}
|
|
189
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
173
|
+
}));
|
|
174
|
+
withInstall(_sfc_main);
|
|
190
175
|
export {
|
|
191
|
-
|
|
176
|
+
_sfc_main as Textarea,
|
|
177
|
+
_sfc_main as default
|
|
192
178
|
};
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-
|
|
22
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
21
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
23
23
|
const { create } = createComponent("time-detail");
|
|
24
24
|
const _sfc_main = create({
|
|
25
25
|
name: "timedetail",
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-
|
|
22
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
21
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
23
23
|
const { componentName, create } = createComponent("time-pannel");
|
|
24
24
|
const _sfc_main = create({
|
|
25
25
|
name: "timepannel",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, createElementBlock, toDisplayString, renderSlot } from "vue";
|
|
2
|
-
import { c as createComponent } from "../component-
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
4
|
-
import { u as useLocale } from "../index-
|
|
5
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
2
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
+
import { N as NutPopup } from "../index-uHBD4dfS.js";
|
|
4
|
+
import { u as useLocale } from "../index-CFigyH92.js";
|
|
5
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
const { create } = createComponent("time-select");
|
|
7
7
|
const cN = "NutTimeSelect";
|
|
8
8
|
const _sfc_main = create({
|
|
@@ -18,10 +18,10 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, onMounted, watch, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, vShow, createVNode, render } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-
|
|
22
|
-
import { r as renderIcon } from "../renderIcon
|
|
23
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
24
|
-
import { C as CreateComponent } from "../mountComponent-
|
|
21
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
+
import { r as renderIcon } from "../renderIcon-BfOvhG7i.js";
|
|
23
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
24
|
+
import { C as CreateComponent } from "../mountComponent-DBQ88Fjz.js";
|
|
25
25
|
import { Success, Failure, Tips, Loading } from "@nutui/icons-vue";
|
|
26
26
|
const { create } = createComponent("toast");
|
|
27
27
|
const _sfc_main = create({
|
|
@@ -217,7 +217,7 @@ const defaultOptions = {
|
|
|
217
217
|
msg: "",
|
|
218
218
|
id: "",
|
|
219
219
|
duration: 2e3,
|
|
220
|
-
|
|
220
|
+
// 显示时间(毫秒)
|
|
221
221
|
center: true,
|
|
222
222
|
// 未实现
|
|
223
223
|
type: "text",
|
|
@@ -236,7 +236,7 @@ const defaultOptions = {
|
|
|
236
236
|
// 未实现
|
|
237
237
|
unmount: null,
|
|
238
238
|
cover: false,
|
|
239
|
-
|
|
239
|
+
// 透明遮罩层 // 未实现
|
|
240
240
|
coverColor: "",
|
|
241
241
|
// 未实现
|
|
242
242
|
closeOnClickOverlay: false
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, ref, computed, onMounted, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vShow, Fragment, renderList, normalizeStyle, createCommentVNode, createVNode, withCtx, renderSlot, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "../component-
|
|
22
|
-
import { u as useRect } from "../index-
|
|
21
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
+
import { u as useRect } from "../index-B1qsj2XR.js";
|
|
23
23
|
import { Close } from "@nutui/icons-vue";
|
|
24
24
|
import NutPopover from "../popover/Popover.js";
|
|
25
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
25
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
26
26
|
const { create } = createComponent("tour");
|
|
27
27
|
const _sfc_main = create({
|
|
28
28
|
components: {
|
|
@@ -17,103 +17,71 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import { m as myFixed } from "../util-
|
|
22
|
-
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode, unref } from "vue";
|
|
21
|
+
import { m as myFixed } from "../util-DnfK0Qan.js";
|
|
23
22
|
import { TriangleUp, TriangleDown } from "@nutui/icons-vue";
|
|
24
|
-
import {
|
|
25
|
-
const
|
|
26
|
-
const _sfc_main =
|
|
27
|
-
|
|
23
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
24
|
+
const _hoisted_1 = { class: "nut-trend-arrow" };
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
26
|
+
name: "NutTrendArrow"
|
|
27
|
+
}), {
|
|
28
|
+
__name: "trend-arrow",
|
|
28
29
|
props: {
|
|
29
|
-
rate: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false
|
|
40
|
-
},
|
|
41
|
-
showZero: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false
|
|
44
|
-
},
|
|
45
|
-
arrowLeft: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: false
|
|
48
|
-
},
|
|
49
|
-
syncTextColor: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: true
|
|
52
|
-
},
|
|
53
|
-
textColor: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: "#333"
|
|
56
|
-
},
|
|
57
|
-
riseColor: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: "#fa2c19"
|
|
60
|
-
},
|
|
61
|
-
dropColor: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: "#64b578"
|
|
64
|
-
}
|
|
30
|
+
rate: { default: 0 },
|
|
31
|
+
digits: { default: 2 },
|
|
32
|
+
showSign: { type: Boolean, default: false },
|
|
33
|
+
showZero: { type: Boolean, default: false },
|
|
34
|
+
arrowLeft: { type: Boolean, default: false },
|
|
35
|
+
syncTextColor: { type: Boolean, default: true },
|
|
36
|
+
textColor: { default: "#333" },
|
|
37
|
+
riseColor: { default: "#fa2c19" },
|
|
38
|
+
dropColor: { default: "#64b578" }
|
|
65
39
|
},
|
|
66
|
-
setup(
|
|
67
|
-
const
|
|
68
|
-
|
|
40
|
+
setup(__props) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const isPositive = computed(() => {
|
|
43
|
+
return props.rate > 0 ? true : false;
|
|
69
44
|
});
|
|
70
45
|
const calcRate = computed(() => {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const absRate = Math.abs(rate);
|
|
74
|
-
if (!showZero && rate === 0) {
|
|
46
|
+
const absRate = Math.abs(props.rate);
|
|
47
|
+
if (!props.showZero && props.rate === 0) {
|
|
75
48
|
return "--";
|
|
76
49
|
}
|
|
77
|
-
let resultRate = `${showSign && rate !== 0 ?
|
|
50
|
+
let resultRate = `${props.showSign && props.rate !== 0 ? isPositive.value ? "+" : "-" : ""}${myFixed(
|
|
78
51
|
Number(absRate),
|
|
79
|
-
digits
|
|
52
|
+
props.digits
|
|
80
53
|
)}%`;
|
|
81
54
|
return resultRate;
|
|
82
55
|
});
|
|
83
56
|
const calcStyle = computed(() => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
color: rate === 0 ? textColor : syncTextColor ? state.rateTrend ? riseColor : dropColor : textColor
|
|
57
|
+
return {
|
|
58
|
+
color: props.rate === 0 ? props.textColor : props.syncTextColor ? isPositive.value ? props.riseColor : props.dropColor : props.textColor
|
|
87
59
|
};
|
|
88
|
-
return style;
|
|
89
60
|
});
|
|
90
|
-
return
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
63
|
+
!_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "nut-trend-arrow-icon-before nut-trend-arrow-rate",
|
|
66
|
+
style: normalizeStyle(calcStyle.value)
|
|
67
|
+
}, toDisplayString(calcRate.value), 5)) : createCommentVNode("", true),
|
|
68
|
+
Number(_ctx.rate) !== 0 && isPositive.value ? renderSlot(_ctx.$slots, "up-icon", { key: 1 }, () => [
|
|
69
|
+
createVNode(unref(TriangleUp), { color: _ctx.riseColor }, null, 8, ["color"])
|
|
70
|
+
]) : createCommentVNode("", true),
|
|
71
|
+
Number(_ctx.rate) !== 0 && !isPositive.value ? renderSlot(_ctx.$slots, "down-icon", { key: 2 }, () => [
|
|
72
|
+
createVNode(unref(TriangleDown), { color: _ctx.dropColor }, null, 8, ["color"])
|
|
73
|
+
]) : createCommentVNode("", true),
|
|
74
|
+
_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
75
|
+
key: 3,
|
|
76
|
+
class: "nut-trend-arrow-icon-after nut-trend-arrow-rate",
|
|
77
|
+
style: normalizeStyle(calcStyle.value)
|
|
78
|
+
}, toDisplayString(calcRate.value), 5)) : createCommentVNode("", true)
|
|
79
|
+
]);
|
|
80
|
+
};
|
|
91
81
|
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
|
-
const _component_TriangleUp = resolveComponent("TriangleUp");
|
|
96
|
-
const _component_TriangleDown = resolveComponent("TriangleDown");
|
|
97
|
-
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
98
|
-
!_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "nut-trend-arrow-icon-before nut-trend-arrow-rate",
|
|
101
|
-
style: normalizeStyle(_ctx.calcStyle)
|
|
102
|
-
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true),
|
|
103
|
-
Number(_ctx.rate) !== 0 && _ctx.rateTrend ? renderSlot(_ctx.$slots, "up-icon", { key: 1 }, () => [
|
|
104
|
-
createVNode(_component_TriangleUp, { color: _ctx.riseColor }, null, 8, ["color"])
|
|
105
|
-
]) : createCommentVNode("", true),
|
|
106
|
-
Number(_ctx.rate) !== 0 && !_ctx.rateTrend ? renderSlot(_ctx.$slots, "down-icon", { key: 2 }, () => [
|
|
107
|
-
createVNode(_component_TriangleDown, { color: _ctx.dropColor }, null, 8, ["color"])
|
|
108
|
-
]) : createCommentVNode("", true),
|
|
109
|
-
_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
110
|
-
key: 3,
|
|
111
|
-
class: "nut-trend-arrow-icon-after nut-trend-arrow-rate",
|
|
112
|
-
style: normalizeStyle(_ctx.calcStyle)
|
|
113
|
-
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true)
|
|
114
|
-
]);
|
|
115
|
-
}
|
|
116
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
82
|
+
}));
|
|
83
|
+
withInstall(_sfc_main);
|
|
117
84
|
export {
|
|
118
|
-
|
|
85
|
+
_sfc_main as TrendArrow,
|
|
86
|
+
_sfc_main as default
|
|
119
87
|
};
|
|
@@ -5,13 +5,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { toRef, ref, watch, h, reactive, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createVNode, withModifiers } from "vue";
|
|
8
|
-
import { c as createComponent } from "../component-
|
|
9
|
-
import { f as funInterceptor } from "../Interceptor-
|
|
8
|
+
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
9
|
+
import { f as funInterceptor } from "../Interceptor-DlY2h6Y7.js";
|
|
10
10
|
import { Progress as _sfc_main$1 } from "../progress/Progress.js";
|
|
11
11
|
import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
|
|
12
|
-
import { u as useLocale } from "../index-
|
|
13
|
-
import { u as useFormDisabled } from "../common-
|
|
14
|
-
import { _ as _export_sfc } from "../_plugin-vue_export-helper-
|
|
12
|
+
import { u as useLocale } from "../index-CFigyH92.js";
|
|
13
|
+
import { u as useFormDisabled } from "../common-DRG0ue26.js";
|
|
14
|
+
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
15
15
|
class UploadOptions {
|
|
16
16
|
constructor() {
|
|
17
17
|
__publicField(this, "url", "");
|
|
@@ -27,11 +27,11 @@ const useChildren = (key) => {
|
|
|
27
27
|
};
|
|
28
28
|
const unlink = (child) => {
|
|
29
29
|
if (child.proxy) {
|
|
30
|
-
|
|
30
|
+
const internalIndex = internalChildren.indexOf(child);
|
|
31
31
|
if (internalIndex > -1) {
|
|
32
32
|
internalChildren.splice(internalIndex, 1);
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
const publicIndex = publicChildren.indexOf(child.proxy);
|
|
35
35
|
if (internalIndex > -1) {
|
|
36
36
|
publicChildren.splice(publicIndex, 1);
|
|
37
37
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { inject, getCurrentInstance, onUnmounted, computed } from "vue";
|
|
2
|
+
const useParent = (key) => {
|
|
3
|
+
const parent = inject(key, null);
|
|
4
|
+
if (parent) {
|
|
5
|
+
const instance = getCurrentInstance();
|
|
6
|
+
const { link, unlink, internalChildren } = parent;
|
|
7
|
+
link(instance);
|
|
8
|
+
onUnmounted(() => {
|
|
9
|
+
unlink(instance);
|
|
10
|
+
});
|
|
11
|
+
const index = computed(() => internalChildren.indexOf(instance));
|
|
12
|
+
return { parent, index };
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
parent,
|
|
16
|
+
index: computed(() => -1)
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
useParent as u
|
|
21
|
+
};
|
|
@@ -52,8 +52,8 @@ const getPropByPath = (obj, keyPath) => {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
const floatData = (format, dataOp, mapOps) => {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const mergeFormat = Object.assign({}, format);
|
|
56
|
+
const mergeMapOps = Object.assign({}, mapOps);
|
|
57
57
|
if (Object.keys(dataOp).length > 0) {
|
|
58
58
|
Object.keys(mergeFormat).forEach((keys) => {
|
|
59
59
|
if (Object.prototype.hasOwnProperty.call(mergeMapOps, keys)) {
|