@nutui/nutui 3.1.12-beta.0 → 3.1.13
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 +54 -0
- package/README.md +139 -37
- package/dist/nutui.d.ts +12 -2
- package/dist/nutui.es.js +6704 -5011
- package/dist/nutui.umd.js +6720 -5017
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +18 -17
- package/dist/packages/_es/Avatar.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/Card.js +105 -0
- package/dist/packages/_es/Cascader.js +547 -0
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +10 -4
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- 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/CountDown.js +3 -4
- package/dist/packages/_es/CountUp.js +3 -1
- package/dist/packages/_es/DatePicker.js +2 -2
- package/dist/packages/_es/Dialog.js +10 -23
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +3 -2
- package/dist/packages/_es/Empty.js +74 -0
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +151 -0
- package/dist/packages/_es/FormItem.js +110 -0
- package/dist/packages/_es/Grid.js +12 -0
- package/dist/packages/_es/GridItem.js +149 -0
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +148 -32
- package/dist/packages/_es/Indicator.js +66 -0
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +6 -8
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +9 -7
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +2 -2
- package/dist/packages/_es/Popover.js +11 -17
- 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/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +3 -3
- package/dist/packages/_es/Rate.js +19 -5
- 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/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +138 -0
- package/dist/packages/_es/Sku.js +2 -37
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Swipe.js +2 -2
- package/dist/packages/_es/Swiper.js +11 -11
- package/dist/packages/_es/SwiperItem.js +3 -3
- package/dist/packages/_es/Switch.js +43 -13
- 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 +191 -0
- package/dist/packages/_es/Tabs.js +6 -2
- 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 +18 -8
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +3 -3
- package/dist/packages/_es/common.js +136 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +56 -28
- package/dist/packages/_es/index3.js +31 -8
- 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/_es/util.js +47 -0
- package/dist/packages/button/index.scss +6 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/cascader/index.scss +81 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/dialog/index.scss +17 -0
- package/dist/packages/drag/index.scss +4 -0
- package/dist/packages/empty/index.scss +33 -0
- package/dist/packages/fixednav/index.scss +6 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +63 -0
- package/dist/packages/grid/index.scss +10 -0
- package/dist/packages/griditem/index.scss +92 -0
- package/dist/packages/icon/index.scss +2 -1
- package/dist/packages/indicator/index.scss +48 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/skeleton/index.scss +57 -0
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/table/index.scss +81 -0
- package/dist/packages/tabs/index.scss +16 -0
- package/dist/packages/textarea/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +1 -2
- package/dist/packages/timeselect/index.scss +3 -0
- package/dist/packages/toast/index.scss +6 -0
- package/dist/style.css +1 -1
- package/dist/styles/.DS_Store +0 -0
- package/dist/styles/font/config.json +2 -1
- package/dist/styles/font/demo_index.html +26 -3
- package/dist/styles/font/iconfont.css +7 -3
- package/dist/styles/font/iconfont.js +31 -32
- package/dist/styles/font/iconfont.json +7 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +44 -34
- package/dist/styles/variables.scss +64 -1
- package/package.json +3 -4
|
@@ -18,14 +18,14 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { ref, computed, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, withModifiers, Fragment, renderList, renderSlot } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useTouch } from "./
|
|
28
|
-
import { u as useRect } from "./
|
|
27
|
+
import { u as useTouch } from "./index2.js";
|
|
28
|
+
import { u as useRect } from "./index3.js";
|
|
29
29
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
30
|
const { componentName, create } = createComponent("range");
|
|
31
31
|
const _sfc_main = create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -53,6 +53,14 @@ const _sfc_main = create({
|
|
|
53
53
|
spacing: {
|
|
54
54
|
type: [String, Number],
|
|
55
55
|
default: 14
|
|
56
|
+
},
|
|
57
|
+
classPrefix: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "nut-icon"
|
|
60
|
+
},
|
|
61
|
+
fontClassName: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "nutui-iconfont"
|
|
56
64
|
}
|
|
57
65
|
},
|
|
58
66
|
emits: ["update:modelValue", "change"],
|
|
@@ -105,22 +113,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
105
113
|
createVNode(_component_nut_icon, {
|
|
106
114
|
size: _ctx.iconSize,
|
|
107
115
|
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
116
|
+
"font-class-name": _ctx.fontClassName,
|
|
117
|
+
"class-prefix": _ctx.classPrefix,
|
|
108
118
|
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
109
119
|
name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
|
|
110
|
-
}, null, 8, ["size", "class", "color", "name"]),
|
|
120
|
+
}, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]),
|
|
111
121
|
_ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
112
122
|
key: 0,
|
|
113
123
|
class: "nut-rate-item__icon nut-rate-item__icon--half",
|
|
114
|
-
|
|
124
|
+
"font-class-name": _ctx.fontClassName,
|
|
125
|
+
"class-prefix": _ctx.classPrefix,
|
|
126
|
+
color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
115
127
|
size: _ctx.iconSize,
|
|
116
128
|
name: _ctx.checkedIcon
|
|
117
|
-
}, null, 8, ["color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
129
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
118
130
|
key: 1,
|
|
119
131
|
class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
|
|
132
|
+
"font-class-name": _ctx.fontClassName,
|
|
133
|
+
"class-prefix": _ctx.classPrefix,
|
|
120
134
|
color: _ctx.voidColor,
|
|
121
135
|
size: _ctx.iconSize,
|
|
122
136
|
name: _ctx.uncheckedIcon
|
|
123
|
-
}, null, 8, ["color", "size", "name"])) : createCommentVNode("", true)
|
|
137
|
+
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
124
138
|
], 12, _hoisted_1);
|
|
125
139
|
}), 128))
|
|
126
140
|
], 2);
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
|
+
* (c) 2021 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createElementVNode, createBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderList } from "vue";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
const component = {
|
|
10
|
+
props: {
|
|
11
|
+
width: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "100px"
|
|
14
|
+
},
|
|
15
|
+
height: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "100px"
|
|
18
|
+
},
|
|
19
|
+
animated: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
avatar: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
avatarShape: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "round"
|
|
30
|
+
},
|
|
31
|
+
avatarSize: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "50px"
|
|
34
|
+
},
|
|
35
|
+
loading: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true
|
|
38
|
+
},
|
|
39
|
+
round: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
row: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "1"
|
|
46
|
+
},
|
|
47
|
+
title: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
setup(props) {
|
|
53
|
+
const { avatarShape, round, avatarSize } = toRefs(props);
|
|
54
|
+
const avatarClass = computed(() => {
|
|
55
|
+
const prefixCls = "avatarClass";
|
|
56
|
+
return {
|
|
57
|
+
[prefixCls]: true,
|
|
58
|
+
[`${prefixCls}--${avatarShape.value}`]: avatarShape.value
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const blockClass = computed(() => {
|
|
62
|
+
const prefixCls = "blockClass";
|
|
63
|
+
return {
|
|
64
|
+
[prefixCls]: true,
|
|
65
|
+
[`${prefixCls}--round`]: round.value
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
const getStyle = () => {
|
|
69
|
+
if (avatarSize == null ? void 0 : avatarSize.value) {
|
|
70
|
+
return {
|
|
71
|
+
width: avatarSize.value,
|
|
72
|
+
height: avatarSize.value
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
width: "50px",
|
|
77
|
+
height: "50px"
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
onMounted(() => {
|
|
81
|
+
console.log("row", props.row);
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
avatarShape,
|
|
85
|
+
avatarClass,
|
|
86
|
+
blockClass,
|
|
87
|
+
getStyle
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const { create } = createComponent("skeleton");
|
|
92
|
+
const _sfc_main = create(component);
|
|
93
|
+
const _hoisted_1 = { key: 0 };
|
|
94
|
+
const _hoisted_2 = {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: "skeleton"
|
|
97
|
+
};
|
|
98
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("view", { class: "skeleton-animation" }, null, -1);
|
|
99
|
+
const _hoisted_4 = { class: "content" };
|
|
100
|
+
const _hoisted_5 = { class: "content-line" };
|
|
101
|
+
const _hoisted_6 = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "title"
|
|
104
|
+
};
|
|
105
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
106
|
+
const _component_nut_avatar = resolveComponent("nut-avatar");
|
|
107
|
+
return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
108
|
+
renderSlot(_ctx.$slots, "default")
|
|
109
|
+
])) : (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
110
|
+
_hoisted_3,
|
|
111
|
+
createElementVNode("view", _hoisted_4, [
|
|
112
|
+
_ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: normalizeClass(_ctx.avatarClass),
|
|
115
|
+
shape: _ctx.avatarShape,
|
|
116
|
+
style: normalizeStyle(_ctx.getStyle()),
|
|
117
|
+
"bg-color": "rgb(239, 239, 239)"
|
|
118
|
+
}, null, 8, ["class", "shape", "style"])) : createCommentVNode("", true),
|
|
119
|
+
Number(_ctx.row) == 1 ? (openBlock(), createElementBlock("view", {
|
|
120
|
+
key: 1,
|
|
121
|
+
class: normalizeClass(_ctx.blockClass),
|
|
122
|
+
style: normalizeStyle({ width: _ctx.width, height: _ctx.height })
|
|
123
|
+
}, null, 6)) : createCommentVNode("", true),
|
|
124
|
+
createElementVNode("view", _hoisted_5, [
|
|
125
|
+
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_6)) : createCommentVNode("", true),
|
|
126
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.row), (item, index2) => {
|
|
127
|
+
return openBlock(), createElementBlock("view", {
|
|
128
|
+
key: index2,
|
|
129
|
+
class: normalizeClass(_ctx.blockClass),
|
|
130
|
+
style: normalizeStyle({ width: _ctx.width, height: _ctx.height })
|
|
131
|
+
}, null, 6);
|
|
132
|
+
}), 128))
|
|
133
|
+
])
|
|
134
|
+
])
|
|
135
|
+
]));
|
|
136
|
+
}
|
|
137
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
138
|
+
export { index as default };
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import { T as TypeOfFun } from "./util.js";
|
|
9
10
|
const { componentName: componentName$4, create: create$4 } = createComponent("sku-header");
|
|
10
11
|
const _sfc_main$4 = create$4({
|
|
11
12
|
props: {
|
|
@@ -110,42 +111,6 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
110
111
|
]);
|
|
111
112
|
}
|
|
112
113
|
var SkuSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
113
|
-
const TypeOfFun = (value) => {
|
|
114
|
-
if (value === null) {
|
|
115
|
-
return "null";
|
|
116
|
-
}
|
|
117
|
-
const type = typeof value;
|
|
118
|
-
if (type === "undefined" || type === "string") {
|
|
119
|
-
return type;
|
|
120
|
-
}
|
|
121
|
-
const typeString = toString.call(value);
|
|
122
|
-
switch (typeString) {
|
|
123
|
-
case "[object Array]":
|
|
124
|
-
return "array";
|
|
125
|
-
case "[object Date]":
|
|
126
|
-
return "date";
|
|
127
|
-
case "[object Boolean]":
|
|
128
|
-
return "boolean";
|
|
129
|
-
case "[object Number]":
|
|
130
|
-
return "number";
|
|
131
|
-
case "[object Function]":
|
|
132
|
-
return "function";
|
|
133
|
-
case "[object RegExp]":
|
|
134
|
-
return "regexp";
|
|
135
|
-
case "[object Object]":
|
|
136
|
-
if (value.nodeType !== void 0) {
|
|
137
|
-
if (value.nodeType == 3) {
|
|
138
|
-
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
139
|
-
} else {
|
|
140
|
-
return "element";
|
|
141
|
-
}
|
|
142
|
-
} else {
|
|
143
|
-
return "object";
|
|
144
|
-
}
|
|
145
|
-
default:
|
|
146
|
-
return "unknow";
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
114
|
const { componentName: componentName$2, create: create$2 } = createComponent("sku-stepper");
|
|
150
115
|
const _sfc_main$2 = create$2({
|
|
151
116
|
props: {
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { u as useTouch } from "./
|
|
25
|
+
import { u as useTouch } from "./index2.js";
|
|
26
26
|
import { computed, ref, reactive, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot } from "vue";
|
|
27
27
|
import { c as createComponent } from "./component.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, ref, computed, provide, onMounted, nextTick, onActivated, onDeactivated, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useExpose } from "./
|
|
8
|
+
import { u as useExpose } from "./index.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const DISTANCE = 5;
|
|
11
11
|
function useTouch() {
|
|
@@ -249,17 +249,17 @@ const _sfc_main = create({
|
|
|
249
249
|
});
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
|
-
const to = (
|
|
252
|
+
const to = (index) => {
|
|
253
253
|
resettPosition();
|
|
254
254
|
touch.reset();
|
|
255
255
|
requestFrame(() => {
|
|
256
256
|
requestFrame(() => {
|
|
257
257
|
state.moving = false;
|
|
258
258
|
let targetIndex;
|
|
259
|
-
if (props.loop && childCount.value ===
|
|
260
|
-
targetIndex = state.active === 0 ? 0 :
|
|
259
|
+
if (props.loop && childCount.value === index) {
|
|
260
|
+
targetIndex = state.active === 0 ? 0 : index;
|
|
261
261
|
} else {
|
|
262
|
-
targetIndex =
|
|
262
|
+
targetIndex = index % childCount.value;
|
|
263
263
|
}
|
|
264
264
|
move({
|
|
265
265
|
pace: targetIndex - state.active,
|
|
@@ -414,16 +414,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
414
414
|
[`${_ctx.componentName}-pagination-vertical`]: _ctx.isVertical
|
|
415
415
|
})
|
|
416
416
|
}, [
|
|
417
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.children.length, (item,
|
|
417
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.children.length, (item, index) => {
|
|
418
418
|
return openBlock(), createElementBlock("i", {
|
|
419
419
|
style: normalizeStyle({
|
|
420
|
-
backgroundColor: _ctx.activePagination ===
|
|
420
|
+
backgroundColor: _ctx.activePagination === index ? _ctx.paginationColor : "#ddd"
|
|
421
421
|
}),
|
|
422
|
-
key:
|
|
422
|
+
key: index
|
|
423
423
|
}, null, 4);
|
|
424
424
|
}), 128))
|
|
425
425
|
], 2)) : createCommentVNode("", true)
|
|
426
426
|
], 34);
|
|
427
427
|
}
|
|
428
|
-
var
|
|
429
|
-
export {
|
|
428
|
+
var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
429
|
+
export { Swiper as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -56,5 +56,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
56
56
|
renderSlot(_ctx.$slots, "default")
|
|
57
57
|
], 6);
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
export {
|
|
59
|
+
var SwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
60
|
+
export { SwiperItem as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.13 Wed Dec 22 2021 20:42:09 GMT+0800 (GMT+08:00)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode,
|
|
6
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
const { componentName, create } = createComponent("switch");
|
|
10
10
|
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: {
|
|
13
|
-
type: Boolean,
|
|
13
|
+
type: [String, Number, Boolean],
|
|
14
14
|
default: false
|
|
15
15
|
},
|
|
16
16
|
disable: {
|
|
@@ -32,29 +32,56 @@ const _sfc_main = create({
|
|
|
32
32
|
inactiveText: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: ""
|
|
35
|
+
},
|
|
36
|
+
activeValue: {
|
|
37
|
+
type: [String, Number, Boolean],
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
inactiveValue: {
|
|
41
|
+
type: [String, Number, Boolean],
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
loading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
name: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "loading1"
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
type: [String, Number],
|
|
54
|
+
default: "12px"
|
|
55
|
+
},
|
|
56
|
+
color: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ""
|
|
35
59
|
}
|
|
36
60
|
},
|
|
37
61
|
emits: ["change", "update:modelValue"],
|
|
38
62
|
setup(props, { emit }) {
|
|
63
|
+
const isActive = computed(() => props.modelValue === props.activeValue);
|
|
39
64
|
const classes = computed(() => {
|
|
40
65
|
const prefixCls = componentName;
|
|
41
66
|
return {
|
|
42
67
|
[prefixCls]: true,
|
|
43
|
-
[
|
|
68
|
+
[isActive.value ? "switch-open" : "switch-close"]: true,
|
|
44
69
|
[`${prefixCls}-disable`]: props.disable,
|
|
45
70
|
[`${prefixCls}-base`]: true
|
|
46
71
|
};
|
|
47
72
|
});
|
|
48
73
|
const style = computed(() => {
|
|
49
74
|
return {
|
|
50
|
-
backgroundColor:
|
|
75
|
+
backgroundColor: isActive.value ? props.activeColor : props.inactiveColor
|
|
51
76
|
};
|
|
52
77
|
});
|
|
53
78
|
const onClick = (event) => {
|
|
54
|
-
if (props.disable)
|
|
79
|
+
if (props.disable || props.loading)
|
|
55
80
|
return;
|
|
56
|
-
|
|
57
|
-
emit("
|
|
81
|
+
const value = isActive.value ? props.inactiveValue : props.activeValue;
|
|
82
|
+
emit("update:modelValue", value);
|
|
83
|
+
emit("update:loading");
|
|
84
|
+
emit("change", value, event);
|
|
58
85
|
};
|
|
59
86
|
return {
|
|
60
87
|
classes,
|
|
@@ -64,18 +91,21 @@ const _sfc_main = create({
|
|
|
64
91
|
}
|
|
65
92
|
});
|
|
66
93
|
const _hoisted_1 = { class: "switch-button" };
|
|
67
|
-
const _hoisted_2 = { class: "close-line" };
|
|
68
94
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
69
96
|
return openBlock(), createElementBlock("view", {
|
|
70
97
|
class: normalizeClass(_ctx.classes),
|
|
71
98
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
72
99
|
style: normalizeStyle(_ctx.style)
|
|
73
100
|
}, [
|
|
74
101
|
createElementVNode("view", _hoisted_1, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
102
|
+
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
103
|
+
key: 0,
|
|
104
|
+
name: _ctx.name,
|
|
105
|
+
size: _ctx.size,
|
|
106
|
+
color: _ctx.color
|
|
107
|
+
}, null, 8, ["name", "size", "color"])) : createCommentVNode("", true),
|
|
108
|
+
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
79
109
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
80
110
|
[vShow, _ctx.modelValue]
|
|
81
111
|
]),
|