@nutui/nutui 3.1.10 → 3.1.12-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/CHANGELOG.md +17 -0
- package/dist/nutui.d.ts +5 -1
- package/dist/nutui.es.js +4041 -3518
- package/dist/nutui.umd.js +4084 -3627
- package/dist/packages/_es/ActionSheet.js +13 -12
- package/dist/packages/_es/Address.js +63 -49
- package/dist/packages/_es/Avatar.js +4 -5
- package/dist/packages/_es/BackTop.js +72 -109
- package/dist/packages/_es/Badge.js +4 -5
- package/dist/packages/_es/Barrage.js +63 -57
- package/dist/packages/_es/Button.js +5 -6
- package/dist/packages/_es/Calendar.js +27 -18
- package/dist/packages/_es/Card.js +104 -0
- package/dist/packages/_es/Cell.js +5 -13
- package/dist/packages/_es/CellGroup.js +4 -5
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +9 -4
- package/dist/packages/_es/CircleProgress.js +142 -46
- package/dist/packages/_es/Col.js +4 -5
- package/dist/packages/_es/Collapse.js +35 -10
- package/dist/packages/_es/CollapseItem.js +80 -35
- package/dist/packages/_es/CountDown.js +7 -5
- package/dist/packages/_es/CountUp.js +34 -31
- package/dist/packages/_es/DatePicker.js +451 -219
- package/dist/packages/_es/Dialog.js +13 -87
- package/dist/packages/_es/Divider.js +5 -6
- package/dist/packages/_es/Drag.js +76 -50
- package/dist/packages/_es/Elevator.js +81 -52
- package/dist/packages/_es/FixedNav.js +8 -9
- package/dist/packages/_es/Form.js +137 -0
- package/dist/packages/_es/FormItem.js +109 -0
- package/dist/packages/_es/Icon.js +6 -40
- package/dist/packages/_es/ImagePreview.js +23 -21
- package/dist/packages/_es/InfiniteLoading.js +95 -109
- package/dist/packages/_es/Input.js +22 -21
- package/dist/packages/_es/InputNumber.js +24 -18
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +89 -171
- package/dist/packages/_es/MenuItem.js +155 -18
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +39 -26
- package/dist/packages/_es/Notify.js +30 -166
- package/dist/packages/_es/NumberKeyboard.js +10 -6
- package/dist/packages/_es/OverLay.js +22 -29
- package/dist/packages/_es/Pagination.js +8 -9
- package/dist/packages/_es/Picker.js +61 -447
- package/dist/packages/_es/Popover.js +146 -25
- package/dist/packages/_es/Popup.js +18 -39
- package/dist/packages/_es/Price.js +18 -7
- package/dist/packages/_es/Progress.js +23 -12
- package/dist/packages/_es/Radio.js +20 -7
- package/dist/packages/_es/RadioGroup.js +7 -3
- package/dist/packages/_es/Range.js +38 -59
- package/dist/packages/_es/Rate.js +16 -20
- package/dist/packages/_es/Row.js +4 -5
- package/dist/packages/_es/SearchBar.js +7 -5
- package/dist/packages/_es/ShortPassword.js +89 -59
- package/dist/packages/_es/Signature.js +70 -71
- package/dist/packages/_es/Sku.js +508 -0
- package/dist/packages/_es/Step.js +10 -8
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +42 -27
- package/dist/packages/_es/Swiper.js +17 -418
- package/dist/packages/_es/SwiperItem.js +14 -39
- package/dist/packages/_es/Switch.js +4 -5
- package/dist/packages/_es/TabPane.js +4 -5
- package/dist/packages/_es/Tabbar.js +4 -5
- package/dist/packages/_es/TabbarItem.js +8 -9
- package/dist/packages/_es/Tabs.js +23 -17
- package/dist/packages/_es/Tag.js +5 -6
- package/dist/packages/_es/TextArea.js +16 -12
- package/dist/packages/_es/TimeDetail.js +7 -5
- package/dist/packages/_es/TimePannel.js +7 -5
- package/dist/packages/_es/TimeSelect.js +12 -7
- package/dist/packages/_es/Toast.js +41 -163
- package/dist/packages/_es/Uploader.js +210 -164
- package/dist/packages/_es/commonProps.js +30 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
- package/dist/packages/_es/index2.js +44 -8
- package/dist/packages/_es/index3.js +419 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +47 -0
- package/dist/packages/button/index.scss +9 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +60 -0
- package/dist/packages/menu/index.scss +32 -60
- package/dist/packages/menuitem/index.scss +36 -99
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/radio/index.scss +32 -4
- package/dist/packages/radiogroup/index.scss +20 -0
- package/dist/packages/sku/index.scss +147 -0
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/uploader/index.scss +95 -8
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -2
- package/dist/styles/mixins/index.scss +0 -4
- package/dist/styles/themes/default.scss +34 -30
- package/dist/styles/variables.scss +45 -3
- package/package.json +3 -2
- package/dist/packages/_es/Video.js +0 -405
- package/dist/packages/_es/plugin-vue_export-helper.js +0 -12
- package/dist/packages/_es/style.css +0 -160
|
@@ -14,14 +14,16 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
+
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
18
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
+
};
|
|
17
20
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
19
22
|
* (c) 2021 @jdf2e.
|
|
20
23
|
* Released under the MIT License.
|
|
21
24
|
*/
|
|
22
|
-
import { computed,
|
|
25
|
+
import { computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, renderSlot, vShow } from "vue";
|
|
23
26
|
import { c as createComponent } from "./component.js";
|
|
24
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
25
27
|
const { componentName, create } = createComponent("overlay");
|
|
26
28
|
const overlayProps = {
|
|
27
29
|
visible: {
|
|
@@ -52,7 +54,7 @@ const overlayProps = {
|
|
|
52
54
|
default: true
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
|
-
|
|
57
|
+
var _sfc_main = create({
|
|
56
58
|
props: overlayProps,
|
|
57
59
|
emits: ["click", "update:visible"],
|
|
58
60
|
setup(props, { emit }) {
|
|
@@ -63,56 +65,47 @@ const _sfc_main = create({
|
|
|
63
65
|
[props.overlayClass]: true
|
|
64
66
|
};
|
|
65
67
|
});
|
|
66
|
-
watch(() => props.visible, (value) => {
|
|
67
|
-
value ? lock() : unlock();
|
|
68
|
-
});
|
|
69
|
-
const lock = () => {
|
|
70
|
-
if (props.lockScroll && props.visible) {
|
|
71
|
-
document.body.classList.add("nut-overflow-hidden");
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const unlock = () => {
|
|
75
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
76
|
-
};
|
|
77
|
-
onDeactivated(unlock);
|
|
78
|
-
onBeforeUnmount(unlock);
|
|
79
|
-
onMounted(lock);
|
|
80
|
-
onActivated(lock);
|
|
81
68
|
const style = computed(() => {
|
|
82
69
|
return __spreadValues({
|
|
83
70
|
animationDuration: `${props.duration}s`,
|
|
84
71
|
zIndex: props.zIndex
|
|
85
72
|
}, props.overlayStyle);
|
|
86
73
|
});
|
|
87
|
-
const touchmove = (e) => {
|
|
88
|
-
if (props.lockScroll)
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
};
|
|
91
74
|
const onClick = (e) => {
|
|
92
75
|
emit("click", e);
|
|
93
76
|
if (props.closeOnClickOverlay) {
|
|
94
77
|
emit("update:visible", false);
|
|
95
78
|
}
|
|
96
79
|
};
|
|
97
|
-
return { classes, style,
|
|
80
|
+
return { classes, style, onClick };
|
|
98
81
|
}
|
|
99
82
|
});
|
|
100
83
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
101
84
|
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
102
85
|
default: withCtx(() => [
|
|
103
|
-
withDirectives(
|
|
86
|
+
_ctx.lockScroll ? withDirectives((openBlock(), createElementBlock("view", {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: normalizeClass(_ctx.classes),
|
|
89
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
90
|
+
style: normalizeStyle(_ctx.style),
|
|
91
|
+
"catch-move": true
|
|
92
|
+
}, [
|
|
93
|
+
renderSlot(_ctx.$slots, "default")
|
|
94
|
+
], 6)), [
|
|
95
|
+
[vShow, _ctx.visible]
|
|
96
|
+
]) : withDirectives((openBlock(), createElementBlock("view", {
|
|
97
|
+
key: 1,
|
|
104
98
|
class: normalizeClass(_ctx.classes),
|
|
105
|
-
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
|
|
106
99
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
107
100
|
style: normalizeStyle(_ctx.style)
|
|
108
101
|
}, [
|
|
109
102
|
renderSlot(_ctx.$slots, "default")
|
|
110
|
-
],
|
|
103
|
+
], 6)), [
|
|
111
104
|
[vShow, _ctx.visible]
|
|
112
105
|
])
|
|
113
106
|
]),
|
|
114
107
|
_: 3
|
|
115
108
|
});
|
|
116
109
|
}
|
|
117
|
-
|
|
118
|
-
export {
|
|
110
|
+
_sfc_main.render = _sfc_render;
|
|
111
|
+
export { _sfc_main as default, overlayProps };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
8
|
const { componentName, create } = createComponent("pagination");
|
|
10
|
-
|
|
9
|
+
var _sfc_main = create({
|
|
11
10
|
props: {
|
|
12
11
|
modelValue: {
|
|
13
12
|
type: Number,
|
|
@@ -67,13 +66,13 @@ const _sfc_main = create({
|
|
|
67
66
|
return { number, text, active };
|
|
68
67
|
};
|
|
69
68
|
const pages = computed(() => {
|
|
70
|
-
if (mode.value == "simple")
|
|
71
|
-
return;
|
|
72
69
|
let items = [];
|
|
73
70
|
const pageCount = countRef.value;
|
|
74
71
|
const pageSize = showPageSize.value;
|
|
75
72
|
let startPage = 1;
|
|
76
73
|
let endPage = pageCount;
|
|
74
|
+
if (mode.value == "simple")
|
|
75
|
+
return;
|
|
77
76
|
const partialShow = pageCount > pageSize;
|
|
78
77
|
if (partialShow) {
|
|
79
78
|
startPage = Math.max(modelValue.value - Math.floor(pageSize / 2), 1);
|
|
@@ -134,9 +133,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
134
133
|
])
|
|
135
134
|
], 2),
|
|
136
135
|
_ctx.mode == "multi" ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
137
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item,
|
|
136
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index) => {
|
|
138
137
|
return openBlock(), createElementBlock("view", {
|
|
139
|
-
key:
|
|
138
|
+
key: index + "pagination",
|
|
140
139
|
class: normalizeClass(["nut-pagination-item", item.active ? "active" : ""]),
|
|
141
140
|
onClick: ($event) => _ctx.select(item.number, true)
|
|
142
141
|
}, [
|
|
@@ -159,5 +158,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
159
158
|
], 2)
|
|
160
159
|
]);
|
|
161
160
|
}
|
|
162
|
-
|
|
163
|
-
export {
|
|
161
|
+
_sfc_main.render = _sfc_render;
|
|
162
|
+
export { _sfc_main as default };
|