@nutui/nutui 3.1.22-beta.5 → 3.1.22
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 +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +497 -497
- package/dist/nutui.umd.js +502 -502
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -1
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +1 -1
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +33 -33
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OldPicker.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +1 -1
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +1 -1
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- 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 +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +51 -51
- package/dist/styles/themes/jdb.scss +51 -51
- package/dist/styles/themes/jdt.scss +51 -51
- package/dist/styles/variables-jdb.scss +3 -0
- package/dist/styles/variables-jdt.scss +3 -0
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +2 -2
- package/dist/types/__VUE/address/index.vue.d.ts +6 -6
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +8 -8
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +6 -6
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/comment/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
- package/dist/types/__VUE/image/index.vue.d.ts +4 -4
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +6 -6
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/radio/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +4 -4
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/skeleton/index.vue.d.ts +4 -4
- package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sticky/index.vue.d.ts +4 -4
- package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tag/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +5 -5
- package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref as e, reactive as t, computed as l, watch as n, onMounted as a, resolveComponent as
|
|
7
|
-
import { c as
|
|
6
|
+
import { ref as e, reactive as t, computed as l, watch as n, onMounted as a, resolveComponent as o, openBlock as r, createElementBlock as i, normalizeClass as u, Fragment as s, normalizeStyle as c, createElementVNode as p, toDisplayString as g, createCommentVNode as d, renderSlot as f, createVNode as m, withDirectives as y, createBlock as h, vShow as b, createTextVNode as v } from "vue";
|
|
7
|
+
import { c as k } from "./component.js";
|
|
8
8
|
import { _ as x } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
function
|
|
10
|
+
function I(e2, t2, l2) {
|
|
11
11
|
const n2 = e2.indexOf(t2);
|
|
12
12
|
return n2 === -1 ? e2 : t2 === "-" && n2 !== 0 ? e2.slice(0, n2) : e2.slice(0, n2 + 1) + e2.slice(n2).replace(l2, "");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
e2 = t2 ?
|
|
14
|
+
function S(e2, t2 = true, l2 = true) {
|
|
15
|
+
e2 = t2 ? I(e2, ".", /\./g) : e2.split(".")[0];
|
|
16
16
|
const n2 = t2 ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
17
|
-
return (e2 = l2 ?
|
|
17
|
+
return (e2 = l2 ? I(e2, "-", /-/g) : e2.replace(/-/, "")).replace(n2, "");
|
|
18
18
|
}
|
|
19
|
-
const { componentName:
|
|
20
|
-
const
|
|
19
|
+
const { componentName: C, create: w, translate: B } = k("input"), L = w({ props: { ref: { type: String, default: "" }, type: { type: String, default: "text" }, modelValue: { type: [String, Number], default: "" }, placeholder: { type: String, default: "" }, label: { type: String, default: "" }, labelClass: { type: String, default: "" }, labelWidth: { type: [String, Number], default: "80" }, labelAlign: { type: String, default: "left" }, colon: { type: Boolean, default: false }, inputAlign: { type: String, default: "left" }, center: { type: Boolean, default: false }, required: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, readonly: { type: Boolean, default: false }, error: { type: Boolean, default: false }, maxLength: { type: [String, Number], default: "9999" }, leftIcon: { type: String, default: "" }, leftIconSize: { type: [String, Number], default: "" }, rightIcon: { type: String, default: "" }, rightIconSize: { type: [String, Number], default: "" }, clearable: { type: Boolean, default: false }, clearIcon: { type: String, default: "mask-close" }, clearSize: { type: [String, Number], default: "14" }, border: { type: Boolean, default: true }, formatTrigger: { type: String, default: "onChange" }, formatter: { type: Function, default: null }, rules: { type: Array, default: [] }, errorMessage: { type: String, default: "" }, errorMessageAlign: { type: String, default: "" }, rows: { type: [String, Number], default: null }, showWordLimit: { type: Boolean, default: false }, autofocus: { type: Boolean, default: false } }, emits: ["update:modelValue", "change", "blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon"], setup(o2, { emit: r2, slots: i2 }) {
|
|
20
|
+
const u2 = e(false), s2 = e();
|
|
21
|
+
e();
|
|
22
|
+
const c2 = () => {
|
|
21
23
|
var _a;
|
|
22
|
-
return String((_a =
|
|
23
|
-
},
|
|
24
|
-
const e2 =
|
|
25
|
-
return { [e2]: true, center:
|
|
26
|
-
}),
|
|
27
|
-
l(() => s2.value && u2.input ? s2.value() : r2.modelValue);
|
|
28
|
-
const y2 = (e2, t2 = "onChange") => {
|
|
24
|
+
return String((_a = o2.modelValue) != null ? _a : "");
|
|
25
|
+
}, p2 = t({ focused: false, validateFailed: false, validateMessage: "" }), g2 = l(() => {
|
|
26
|
+
const e2 = C;
|
|
27
|
+
return { [e2]: true, center: o2.center, [`${e2}-disabled`]: o2.disabled, [`${e2}-required`]: o2.required, [`${e2}-error`]: o2.error, [`${e2}-border`]: o2.border };
|
|
28
|
+
}), d2 = l(() => ({ textAlign: o2.inputAlign })), f2 = l(() => ({ textAlign: o2.inputAlign, height: 24 * Number(o2.rows) + "px" })), m2 = (e2, t2 = "onChange") => {
|
|
29
29
|
var _a;
|
|
30
|
-
|
|
30
|
+
o2.type === "digit" && (e2 = S(e2, false, false)), o2.type === "number" && (e2 = S(e2, true, true)), o2.formatter && t2 === o2.formatTrigger && (e2 = o2.formatter(e2)), ((_a = s2 == null ? void 0 : s2.value) == null ? void 0 : _a.value) !== e2 && (s2.value.value = e2), e2 !== o2.modelValue && (r2("update:modelValue", e2), r2("change", e2));
|
|
31
31
|
};
|
|
32
|
-
return n(() =>
|
|
33
|
-
|
|
32
|
+
return n(() => o2.modelValue, () => {
|
|
33
|
+
m2(c2()), p2.validateFailed && (p2.validateFailed = false, p2.validateMessage = "");
|
|
34
34
|
}), a(() => {
|
|
35
|
-
|
|
36
|
-
}), { inputRef:
|
|
35
|
+
m2(c2(), o2.formatTrigger);
|
|
36
|
+
}), { inputRef: s2, active: u2, classes: g2, styles: d2, stylesTextarea: f2, inputType: (e2) => e2 === "number" ? "text" : e2 === "digit" ? "tel" : e2, onInput: (e2) => {
|
|
37
37
|
let t2 = e2.target.value;
|
|
38
|
-
|
|
38
|
+
o2.maxLength && t2.length > Number(o2.maxLength) && (t2 = t2.slice(0, Number(o2.maxLength))), m2(t2);
|
|
39
39
|
}, onFocus: (e2) => {
|
|
40
40
|
let t2 = e2.target.value;
|
|
41
|
-
|
|
41
|
+
u2.value = true, r2("focus", t2, e2);
|
|
42
42
|
}, onBlur: (e2) => {
|
|
43
43
|
setTimeout(() => {
|
|
44
|
-
|
|
44
|
+
u2.value = false;
|
|
45
45
|
}, 200);
|
|
46
46
|
let t2 = e2.target.value;
|
|
47
|
-
|
|
47
|
+
o2.maxLength && t2.length > Number(o2.maxLength) && (t2 = t2.slice(0, Number(o2.maxLength))), m2(c2(), "onBlur"), r2("blur", t2, e2);
|
|
48
48
|
}, clear: (e2) => {
|
|
49
|
-
|
|
49
|
+
r2("update:modelValue", "", e2), r2("change", "", e2), r2("clear", "", e2);
|
|
50
50
|
}, onClickInput: (e2) => {
|
|
51
|
-
|
|
52
|
-
}, onClickLeftIcon: (e2) =>
|
|
53
|
-
} }),
|
|
54
|
-
var
|
|
55
|
-
const x2 =
|
|
56
|
-
return
|
|
51
|
+
r2("click-input", e2);
|
|
52
|
+
}, onClickLeftIcon: (e2) => r2("click-left-icon", e2), onClickRightIcon: (e2) => r2("click-right-icon", e2), translate: B };
|
|
53
|
+
} }), A = { class: "label-string" }, T = { class: "nut-input-value" }, N = { class: "label-string" }, z = { class: "nut-input-value" }, V = ["maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus"], F = ["type", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus"], $ = { key: 0, class: "nut-input-word-limit" }, M = { class: "nut-input-word-num" };
|
|
54
|
+
var R = x(L, [["render", function(e2, t2, l2, n2, a2, k2) {
|
|
55
|
+
const x2 = o("nut-icon");
|
|
56
|
+
return r(), i("view", { class: u(e2.classes) }, [e2.$slots.input ? (r(), i(s, { key: 0 }, [e2.label ? (r(), i("view", { key: 0, class: u(["nut-input-label", e2.labelClass]), style: c({ width: `${e2.labelWidth}px`, textAlign: e2.labelAlign }) }, [p("view", A, g(e2.label) + " " + g(e2.colon ? ":" : ""), 1)], 6)) : d("", true), p("view", T, [p("view", { class: "nut-input-inner", onClick: t2[0] || (t2[0] = (...t3) => e2.onClickInput && e2.onClickInput(...t3)) }, [f(e2.$slots, "input")])])], 64)) : (r(), i(s, { key: 1 }, [e2.leftIcon && e2.leftIcon.length > 0 ? (r(), i("view", { key: 0, class: "nut-input-left-icon", onClick: t2[1] || (t2[1] = (...t3) => e2.onClickLeftIcon && e2.onClickLeftIcon(...t3)) }, [m(x2, { name: e2.leftIcon, size: e2.leftIconSize }, null, 8, ["name", "size"])])) : d("", true), e2.label ? (r(), i("view", { key: 1, class: u(["nut-input-label", e2.labelClass]), style: c({ width: `${e2.labelWidth}px`, textAlign: e2.labelAlign }) }, [p("view", N, g(e2.label) + " " + g(e2.colon ? ":" : ""), 1)], 6)) : d("", true), p("view", z, [p("view", { class: "nut-input-inner", onClick: t2[9] || (t2[9] = (...t3) => e2.onClickInput && e2.onClickInput(...t3)) }, [e2.type == "textarea" ? (r(), i("textarea", { key: 0, class: "input-text", ref: "inputRef", style: c(e2.stylesTextarea), maxlength: e2.maxLength, placeholder: e2.placeholder || e2.translate("placeholder"), disabled: e2.disabled, readonly: e2.readonly, value: e2.modelValue, formatTrigger: e2.formatTrigger, autofocus: e2.autofocus, onInput: t2[2] || (t2[2] = (...t3) => e2.onInput && e2.onInput(...t3)), onFocus: t2[3] || (t2[3] = (...t3) => e2.onFocus && e2.onFocus(...t3)), onBlur: t2[4] || (t2[4] = (...t3) => e2.onBlur && e2.onBlur(...t3)) }, null, 44, V)) : (r(), i("input", { key: 1, class: "input-text", ref: "inputRef", style: c(e2.styles), type: e2.inputType(e2.type), maxlength: e2.maxLength, placeholder: e2.placeholder || e2.translate("placeholder"), disabled: e2.disabled, readonly: e2.readonly, value: e2.modelValue, formatTrigger: e2.formatTrigger, autofocus: e2.autofocus, onInput: t2[5] || (t2[5] = (...t3) => e2.onInput && e2.onInput(...t3)), onFocus: t2[6] || (t2[6] = (...t3) => e2.onFocus && e2.onFocus(...t3)), onBlur: t2[7] || (t2[7] = (...t3) => e2.onBlur && e2.onBlur(...t3)) }, null, 44, F)), e2.clearable && !e2.readonly ? y((r(), h(x2, { key: 2, class: "nut-input-clear", name: e2.clearIcon, size: e2.clearSize, onClick: e2.clear }, null, 8, ["name", "size", "onClick"])), [[b, e2.active && e2.modelValue.length > 0]]) : d("", true), e2.rightIcon && e2.rightIcon.length > 0 ? (r(), i("view", { key: 3, class: "nut-input-right-icon", onClick: t2[8] || (t2[8] = (...t3) => e2.onClickRightIcon && e2.onClickRightIcon(...t3)) }, [m(x2, { name: e2.rightIcon, size: e2.rightIconSize }, null, 8, ["name", "size"])])) : d("", true), e2.$slots.button ? f(e2.$slots, "button", { key: 4, class: "nut-input-button" }) : d("", true)]), e2.showWordLimit && e2.maxLength ? (r(), i("view", $, [p("span", M, g(e2.modelValue ? e2.modelValue.length : 0), 1), v("/" + g(e2.maxLength), 1)])) : d("", true), e2.errorMessage ? (r(), i("view", { key: 1, class: "nut-input-error-message", style: c({ textAlign: e2.errorMessageAlign }) }, g(e2.errorMessage), 5)) : d("", true)])], 64))], 2);
|
|
57
57
|
}]]);
|
|
58
|
-
export {
|
|
58
|
+
export { R as default };
|