@nutui/nutui 3.2.1 → 3.2.2-beta.1
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/dist/nutui.es.js +938 -548
- package/dist/nutui.umd.js +938 -548
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +56 -32
- package/dist/packages/_es/AddressList.js +6 -2
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +7 -4
- 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 +7 -4
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +10 -4
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +33 -20
- 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 +31 -17
- package/dist/packages/_es/CheckboxGroup.js +14 -7
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +5 -11
- package/dist/packages/_es/Collapse.js +22 -19
- package/dist/packages/_es/CollapseItem.js +12 -9
- package/dist/packages/_es/Comment.js +13 -9
- package/dist/packages/_es/ConfigProvider.js +8 -4
- package/dist/packages/_es/CountDown.js +36 -24
- package/dist/packages/_es/CountUp.js +35 -19
- package/dist/packages/_es/DatePicker.js +19 -10
- package/dist/packages/_es/Dialog.js +9 -6
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +7 -4
- package/dist/packages/_es/Elevator.js +21 -15
- package/dist/packages/_es/Ellipsis.js +13 -8
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +8 -4
- 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 +15 -11
- package/dist/packages/_es/Image.js +7 -4
- package/dist/packages/_es/ImagePreview.js +15 -9
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +8 -5
- package/dist/packages/_es/InputNumber.js +20 -14
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +7 -4
- package/dist/packages/_es/Menu.js +12 -6
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +13 -7
- package/dist/packages/_es/Notify.js +8 -5
- package/dist/packages/_es/NumberKeyboard.js +12 -5
- package/dist/packages/_es/OldPicker.js +36 -19
- package/dist/packages/_es/OverLay.js +7 -4
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +64 -32
- package/dist/packages/_es/Popover.js +52 -31
- package/dist/packages/_es/Popup.js +22 -13
- 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 +25 -13
- package/dist/packages/_es/RadioGroup.js +12 -5
- package/dist/packages/_es/Range.js +16 -10
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +5 -11
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +18 -11
- 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 +21 -11
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +8 -4
- package/dist/packages/_es/Sticky.js +23 -12
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +23 -14
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +10 -7
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +7 -4
- package/dist/packages/_es/TabbarItem.js +13 -14
- package/dist/packages/_es/Table.js +7 -4
- package/dist/packages/_es/Tabs.js +16 -10
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +8 -5
- 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 +8 -5
- package/dist/packages/_es/Uploader.js +14 -8
- package/dist/packages/_es/Video.js +17 -10
- package/dist/packages/_es/WaterMark.js +30 -21
- package/dist/packages/_es/common.js +20 -10
- 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 +21 -12
- 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/button/index.scss +1 -0
- 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/packages/radio/index.scss +1 -0
- package/dist/smartips/attributes.json +21 -1
- package/dist/smartips/tags.json +7 -2
- package/dist/smartips/web-types.json +47 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +3 -3
- 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 +2 -2
- package/dist/types/__VUE/calendar/index.vue.d.ts +8 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +8 -8
- package/dist/types/__VUE/col/index.vue.d.ts +2 -5
- 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/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/fixednav/index.vue.d.ts +4 -4
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.d.ts +7 -6
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/types.d.ts +7 -0
- package/dist/types/__VUE/input/index.vue.d.ts +4 -4
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +14 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +4 -4
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/Column.vue.d.ts +8 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +18 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/row/index.vue.d.ts +2 -5
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
|
|
6
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, mergeProps, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -46,6 +46,14 @@ const _sfc_main = create({
|
|
|
46
46
|
readonly: {
|
|
47
47
|
type: Boolean,
|
|
48
48
|
default: false
|
|
49
|
+
},
|
|
50
|
+
iconLeft: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "minus"
|
|
53
|
+
},
|
|
54
|
+
iconRight: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "plus"
|
|
49
57
|
}
|
|
50
58
|
},
|
|
51
59
|
emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
|
|
@@ -135,12 +143,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
135
143
|
class: normalizeClass(_ctx.classes),
|
|
136
144
|
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.buttonSize) })
|
|
137
145
|
}, [
|
|
138
|
-
createVNode(_component_nut_icon, {
|
|
139
|
-
name:
|
|
140
|
-
class:
|
|
141
|
-
size: _ctx.buttonSize
|
|
142
|
-
|
|
143
|
-
}, null, 8, ["class", "size", "onClick"]),
|
|
146
|
+
createVNode(_component_nut_icon, mergeProps({
|
|
147
|
+
name: _ctx.iconLeft,
|
|
148
|
+
class: ["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.reduceAllow() }],
|
|
149
|
+
size: _ctx.buttonSize
|
|
150
|
+
}, _ctx.$attrs, { onClick: _ctx.reduce }), null, 16, ["name", "class", "size", "onClick"]),
|
|
144
151
|
createElementVNode("input", {
|
|
145
152
|
type: "number",
|
|
146
153
|
min: _ctx.min,
|
|
@@ -153,12 +160,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
160
|
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
154
161
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
155
162
|
}, null, 44, _hoisted_1),
|
|
156
|
-
createVNode(_component_nut_icon, {
|
|
157
|
-
name:
|
|
158
|
-
class:
|
|
159
|
-
size: _ctx.buttonSize
|
|
160
|
-
|
|
161
|
-
}, null, 8, ["class", "size", "onClick"])
|
|
163
|
+
createVNode(_component_nut_icon, mergeProps({
|
|
164
|
+
name: _ctx.iconRight,
|
|
165
|
+
class: ["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }],
|
|
166
|
+
size: _ctx.buttonSize
|
|
167
|
+
}, _ctx.$attrs, { onClick: _ctx.add }), null, 16, ["name", "class", "size", "onClick"])
|
|
162
168
|
], 6);
|
|
163
169
|
}
|
|
164
170
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -64,9 +64,12 @@ const _sfc_main = create({
|
|
|
64
64
|
}
|
|
65
65
|
state.startOffset = scrollTop - scrollTop % props.height;
|
|
66
66
|
};
|
|
67
|
-
watch(
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
watch(
|
|
68
|
+
() => props.listData,
|
|
69
|
+
() => {
|
|
70
|
+
state.list = props.listData.slice();
|
|
71
|
+
}
|
|
72
|
+
);
|
|
70
73
|
return {
|
|
71
74
|
...toRefs(state),
|
|
72
75
|
list,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -56,11 +56,17 @@ const _sfc_main = create({
|
|
|
56
56
|
publicChildren.push(child.proxy);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
provide(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
provide(
|
|
60
|
+
"menuParent",
|
|
61
|
+
Object.assign(
|
|
62
|
+
{
|
|
63
|
+
link,
|
|
64
|
+
children: publicChildren,
|
|
65
|
+
internalChildren
|
|
66
|
+
},
|
|
67
|
+
value
|
|
68
|
+
)
|
|
69
|
+
);
|
|
64
70
|
};
|
|
65
71
|
return {
|
|
66
72
|
children: publicChildren,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -152,12 +152,18 @@ const _sfc_main = create({
|
|
|
152
152
|
}
|
|
153
153
|
return styles;
|
|
154
154
|
});
|
|
155
|
-
watch(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
watch(
|
|
156
|
+
() => props.text,
|
|
157
|
+
(value) => {
|
|
158
|
+
initScrollWrap();
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
watch(
|
|
162
|
+
() => props.list,
|
|
163
|
+
(value) => {
|
|
164
|
+
state.scrollList = [].concat(value);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
161
167
|
const initScrollWrap = (value) => {
|
|
162
168
|
if (state.showNoticeBar == false) {
|
|
163
169
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -77,11 +77,14 @@ const _sfc_main = create({
|
|
|
77
77
|
if (props.duration) {
|
|
78
78
|
show();
|
|
79
79
|
}
|
|
80
|
-
watch(
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
watch(
|
|
81
|
+
() => props.duration,
|
|
82
|
+
(val) => {
|
|
83
|
+
if (val) {
|
|
84
|
+
show();
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
|
-
|
|
87
|
+
);
|
|
85
88
|
const onAfterLeave = () => {
|
|
86
89
|
clearTimer();
|
|
87
90
|
props.unmount && props.unmount(props.id);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -106,7 +106,11 @@ const _sfc_main = create({
|
|
|
106
106
|
keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
|
|
107
107
|
}
|
|
108
108
|
} else if (customKeys.length === 2) {
|
|
109
|
-
keys.push(
|
|
109
|
+
keys.push(
|
|
110
|
+
{ id: customKeys[0], type: "custom" },
|
|
111
|
+
{ id: 0, type: "number" },
|
|
112
|
+
{ id: customKeys[1], type: "custom" }
|
|
113
|
+
);
|
|
110
114
|
}
|
|
111
115
|
return keys;
|
|
112
116
|
}
|
|
@@ -116,9 +120,12 @@ const _sfc_main = create({
|
|
|
116
120
|
}
|
|
117
121
|
return defaultKey();
|
|
118
122
|
});
|
|
119
|
-
watch(
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
watch(
|
|
124
|
+
() => props.visible,
|
|
125
|
+
(value) => {
|
|
126
|
+
show.value = value;
|
|
127
|
+
}
|
|
128
|
+
);
|
|
122
129
|
function onTouchstart(item, event) {
|
|
123
130
|
event.stopPropagation();
|
|
124
131
|
clickKeyIndex.value = item.id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -158,16 +158,23 @@ const _sfc_main$1 = create$1({
|
|
|
158
158
|
type && setChooseValue();
|
|
159
159
|
setMove(-move);
|
|
160
160
|
};
|
|
161
|
-
watch(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
161
|
+
watch(
|
|
162
|
+
() => props.listData,
|
|
163
|
+
(val) => {
|
|
164
|
+
state.transformY = 0;
|
|
165
|
+
modifyStatus(false);
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
deep: true
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
watch(
|
|
172
|
+
() => props.defaultIndex,
|
|
173
|
+
(val) => {
|
|
174
|
+
state.transformY = 0;
|
|
175
|
+
modifyStatus(false);
|
|
176
|
+
}
|
|
177
|
+
);
|
|
171
178
|
onMounted(() => {
|
|
172
179
|
modifyStatus(true);
|
|
173
180
|
});
|
|
@@ -362,7 +369,9 @@ const _sfc_main = create({
|
|
|
362
369
|
_defaultIndex = dataIndex;
|
|
363
370
|
} else if (dataType.value === "multipleColumns") {
|
|
364
371
|
defaultIndexList[columnIndex] = dataIndex;
|
|
365
|
-
const val = defaultIndexList.map(
|
|
372
|
+
const val = defaultIndexList.map(
|
|
373
|
+
(res, i) => toRaw(state.formattedColumns)[i].values[res]
|
|
374
|
+
);
|
|
366
375
|
emit("change", val, columnIndex, dataIndex);
|
|
367
376
|
}
|
|
368
377
|
};
|
|
@@ -374,7 +383,9 @@ const _sfc_main = create({
|
|
|
374
383
|
for (let i = 0; i < defaultIndexList.length; i++) {
|
|
375
384
|
state.formattedColumns[i].defaultIndex = defaultIndexList[i];
|
|
376
385
|
}
|
|
377
|
-
const checkedArr = toRaw(state.formattedColumns).map(
|
|
386
|
+
const checkedArr = toRaw(state.formattedColumns).map(
|
|
387
|
+
(res) => res.values && res.values[res.defaultIndex]
|
|
388
|
+
);
|
|
378
389
|
emit("confirm", checkedArr);
|
|
379
390
|
} else if (dataType.value === "cascade") {
|
|
380
391
|
emit("confirm", getCascadeData(toRaw(state.formattedColumns), state.defaultIndex));
|
|
@@ -389,12 +400,18 @@ const _sfc_main = create({
|
|
|
389
400
|
if (props.visible)
|
|
390
401
|
state.show = false;
|
|
391
402
|
});
|
|
392
|
-
watch(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
403
|
+
watch(
|
|
404
|
+
() => props.visible,
|
|
405
|
+
(val) => {
|
|
406
|
+
state.show = val;
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
watch(
|
|
410
|
+
() => props.listData,
|
|
411
|
+
(val) => {
|
|
412
|
+
state.formattedColumns = val;
|
|
413
|
+
}
|
|
414
|
+
);
|
|
398
415
|
return {
|
|
399
416
|
classes,
|
|
400
417
|
...toRefs(state),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -48,9 +48,12 @@ const _sfc_main = create({
|
|
|
48
48
|
[props.overlayClass]: true
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
|
-
watch(
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
watch(
|
|
52
|
+
() => props.visible,
|
|
53
|
+
(value) => {
|
|
54
|
+
value ? lock() : unlock();
|
|
55
|
+
}
|
|
56
|
+
);
|
|
54
57
|
const lock = () => {
|
|
55
58
|
if (props.lockScroll && props.visible) {
|
|
56
59
|
document.body.classList.add("nut-overflow-hidden");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -32,6 +32,10 @@ const _sfc_main$1 = create$1({
|
|
|
32
32
|
threeDimensional: {
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: true
|
|
35
|
+
},
|
|
36
|
+
swipeDuration: {
|
|
37
|
+
type: [Number, String],
|
|
38
|
+
default: 1e3
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
emits: ["click", "change"],
|
|
@@ -59,6 +63,7 @@ const _sfc_main$1 = create$1({
|
|
|
59
63
|
const moving = ref(false);
|
|
60
64
|
const touchDeg = ref(0);
|
|
61
65
|
const touchTime = ref(0);
|
|
66
|
+
const DEFAULT_DURATION = 200;
|
|
62
67
|
const INERTIA_TIME = 300;
|
|
63
68
|
const INERTIA_DISTANCE = 15;
|
|
64
69
|
const touchRollerStyle = computed(() => {
|
|
@@ -107,7 +112,7 @@ const _sfc_main$1 = create$1({
|
|
|
107
112
|
let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
|
|
108
113
|
if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
|
|
109
114
|
const distance = momentum(move, moveTime);
|
|
110
|
-
setMove(distance, "end",
|
|
115
|
+
setMove(distance, "end", +props.swipeDuration);
|
|
111
116
|
return;
|
|
112
117
|
} else {
|
|
113
118
|
setMove(move, "end");
|
|
@@ -129,7 +134,7 @@ const _sfc_main$1 = create$1({
|
|
|
129
134
|
return false;
|
|
130
135
|
}
|
|
131
136
|
};
|
|
132
|
-
const setTransform = (translateY = 0, type, time =
|
|
137
|
+
const setTransform = (translateY = 0, type, time = DEFAULT_DURATION, deg) => {
|
|
133
138
|
if (type === "end") {
|
|
134
139
|
touchTime.value = time;
|
|
135
140
|
} else {
|
|
@@ -186,20 +191,28 @@ const _sfc_main$1 = create$1({
|
|
|
186
191
|
moving.value = false;
|
|
187
192
|
setChooseValue();
|
|
188
193
|
};
|
|
189
|
-
watch(
|
|
190
|
-
|
|
194
|
+
watch(
|
|
195
|
+
() => props.column,
|
|
196
|
+
(val) => {
|
|
197
|
+
if (props.column && props.column.length > 0) {
|
|
198
|
+
state.transformY = 0;
|
|
199
|
+
modifyStatus(false);
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
deep: true
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
watch(
|
|
207
|
+
() => props.value,
|
|
208
|
+
(val) => {
|
|
191
209
|
state.transformY = 0;
|
|
192
210
|
modifyStatus(false);
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
deep: true
|
|
193
214
|
}
|
|
194
|
-
|
|
195
|
-
deep: true
|
|
196
|
-
});
|
|
197
|
-
watch(() => props.value, (val) => {
|
|
198
|
-
state.transformY = 0;
|
|
199
|
-
modifyStatus(false);
|
|
200
|
-
}, {
|
|
201
|
-
deep: true
|
|
202
|
-
});
|
|
215
|
+
);
|
|
203
216
|
onMounted(() => {
|
|
204
217
|
modifyStatus(true);
|
|
205
218
|
});
|
|
@@ -304,6 +317,10 @@ const _sfc_main = create({
|
|
|
304
317
|
threeDimensional: {
|
|
305
318
|
type: Boolean,
|
|
306
319
|
default: true
|
|
320
|
+
},
|
|
321
|
+
swipeDuration: {
|
|
322
|
+
type: [Number, String],
|
|
323
|
+
default: 1e3
|
|
307
324
|
}
|
|
308
325
|
},
|
|
309
326
|
emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
|
|
@@ -423,25 +440,39 @@ const _sfc_main = create({
|
|
|
423
440
|
if (props.visible)
|
|
424
441
|
state.show = false;
|
|
425
442
|
});
|
|
426
|
-
watch(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
443
|
+
watch(
|
|
444
|
+
() => props.modelValue,
|
|
445
|
+
(newValues) => {
|
|
446
|
+
const isSameValue = JSON.stringify(newValues) === JSON.stringify(defaultValues.value);
|
|
447
|
+
if (!isSameValue) {
|
|
448
|
+
defaultValues.value = newValues;
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
{ deep: true }
|
|
452
|
+
);
|
|
453
|
+
watch(
|
|
454
|
+
defaultValues,
|
|
455
|
+
(newValues) => {
|
|
456
|
+
const isSameValue = JSON.stringify(newValues) === JSON.stringify(props.modelValue);
|
|
457
|
+
if (!isSameValue) {
|
|
458
|
+
emit("update:modelValue", newValues);
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{ immediate: true }
|
|
462
|
+
);
|
|
463
|
+
watch(
|
|
464
|
+
() => props.visible,
|
|
465
|
+
(val) => {
|
|
466
|
+
state.show = val;
|
|
430
467
|
}
|
|
431
|
-
|
|
432
|
-
watch(
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
468
|
+
);
|
|
469
|
+
watch(
|
|
470
|
+
() => props.columns,
|
|
471
|
+
(val) => {
|
|
472
|
+
if (val.length)
|
|
473
|
+
state.formattedColumns = val;
|
|
436
474
|
}
|
|
437
|
-
|
|
438
|
-
watch(() => props.visible, (val) => {
|
|
439
|
-
state.show = val;
|
|
440
|
-
});
|
|
441
|
-
watch(() => props.columns, (val) => {
|
|
442
|
-
if (val.length)
|
|
443
|
-
state.formattedColumns = val;
|
|
444
|
-
});
|
|
475
|
+
);
|
|
445
476
|
return {
|
|
446
477
|
classes,
|
|
447
478
|
...toRefs(state),
|
|
@@ -507,10 +538,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
507
538
|
columnsType: _ctx.columnsType,
|
|
508
539
|
value: _ctx.defaultValues[columnIndex],
|
|
509
540
|
threeDimensional: _ctx.threeDimensional,
|
|
541
|
+
swipeDuration: _ctx.swipeDuration,
|
|
510
542
|
onChange: (option) => {
|
|
511
543
|
_ctx.changeHandler(columnIndex, option);
|
|
512
544
|
}
|
|
513
|
-
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "onChange"])
|
|
545
|
+
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "swipeDuration", "onChange"])
|
|
514
546
|
]);
|
|
515
547
|
}), 128))
|
|
516
548
|
], 512),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.1
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -38,32 +38,47 @@ function isShadowRoot(node) {
|
|
|
38
38
|
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
39
39
|
}
|
|
40
40
|
var round = Math.round;
|
|
41
|
-
function
|
|
41
|
+
function getUAString() {
|
|
42
|
+
var uaData = navigator.userAgentData;
|
|
43
|
+
if (uaData != null && uaData.brands) {
|
|
44
|
+
return uaData.brands.map(function(item) {
|
|
45
|
+
return item.brand + "/" + item.version;
|
|
46
|
+
}).join(" ");
|
|
47
|
+
}
|
|
48
|
+
return navigator.userAgent;
|
|
49
|
+
}
|
|
50
|
+
function isLayoutViewport() {
|
|
51
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
52
|
+
}
|
|
53
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
42
54
|
if (includeScale === void 0) {
|
|
43
55
|
includeScale = false;
|
|
44
56
|
}
|
|
45
|
-
|
|
57
|
+
if (isFixedStrategy === void 0) {
|
|
58
|
+
isFixedStrategy = false;
|
|
59
|
+
}
|
|
60
|
+
var clientRect = element.getBoundingClientRect();
|
|
46
61
|
var scaleX = 1;
|
|
47
62
|
var scaleY = 1;
|
|
48
|
-
if (isHTMLElement(element)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
if (includeScale && isHTMLElement(element)) {
|
|
64
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
65
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
66
|
+
}
|
|
67
|
+
var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
|
|
68
|
+
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
69
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
70
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
71
|
+
var width = clientRect.width / scaleX;
|
|
72
|
+
var height = clientRect.height / scaleY;
|
|
58
73
|
return {
|
|
59
|
-
width
|
|
60
|
-
height
|
|
61
|
-
top:
|
|
62
|
-
right:
|
|
63
|
-
bottom:
|
|
64
|
-
left:
|
|
65
|
-
x
|
|
66
|
-
y
|
|
74
|
+
width,
|
|
75
|
+
height,
|
|
76
|
+
top: y,
|
|
77
|
+
right: x + width,
|
|
78
|
+
bottom: y + height,
|
|
79
|
+
left: x,
|
|
80
|
+
x,
|
|
81
|
+
y
|
|
67
82
|
};
|
|
68
83
|
}
|
|
69
84
|
function getWindowScroll(node) {
|
|
@@ -117,7 +132,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
117
132
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
118
133
|
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
119
134
|
var documentElement = getDocumentElement(offsetParent);
|
|
120
|
-
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
135
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
|
121
136
|
var scroll = {
|
|
122
137
|
scrollLeft: 0,
|
|
123
138
|
scrollTop: 0
|
|
@@ -199,8 +214,8 @@ function getTrueOffsetParent(element) {
|
|
|
199
214
|
return element.offsetParent;
|
|
200
215
|
}
|
|
201
216
|
function getContainingBlock(element) {
|
|
202
|
-
var isFirefox =
|
|
203
|
-
var isIE =
|
|
217
|
+
var isFirefox = /firefox/i.test(getUAString());
|
|
218
|
+
var isIE = /Trident/i.test(getUAString());
|
|
204
219
|
if (isIE && isHTMLElement(element)) {
|
|
205
220
|
var elementCss = getComputedStyle(element);
|
|
206
221
|
if (elementCss.position === "fixed") {
|
|
@@ -888,13 +903,19 @@ const _sfc_main = create({
|
|
|
888
903
|
onUnmounted(() => {
|
|
889
904
|
window.removeEventListener("click", clickAway, true);
|
|
890
905
|
});
|
|
891
|
-
watch(
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
906
|
+
watch(
|
|
907
|
+
() => props.visible,
|
|
908
|
+
(value) => {
|
|
909
|
+
showPopup.value = value;
|
|
910
|
+
uploadLocation();
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
watch(
|
|
914
|
+
() => props.location,
|
|
915
|
+
(value) => {
|
|
916
|
+
uploadLocation();
|
|
917
|
+
}
|
|
918
|
+
);
|
|
898
919
|
const update = (val) => {
|
|
899
920
|
emit("update", val);
|
|
900
921
|
emit("update:visible", val);
|