@nutui/nutui 3.1.11-beta.0 → 3.1.12
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 +44 -0
- package/dist/nutui.d.ts +5 -2
- package/dist/nutui.es.js +4243 -3673
- package/dist/nutui.umd.js +4252 -3679
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- 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/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 +1 -1
- package/dist/packages/_es/CountUp.js +1 -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 +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +138 -0
- package/dist/packages/_es/FormItem.js +110 -0
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +148 -32
- 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 +83 -167
- package/dist/packages/_es/MenuItem.js +154 -15
- 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 +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 +52 -13
- 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 +4 -32
- 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/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 +28 -8
- 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/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 +18 -8
- package/dist/packages/_es/Uploader.js +30 -22
- package/dist/packages/_es/Video.js +3 -3
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +58 -7
- package/dist/packages/_es/index3.js +36 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +4 -3
- 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/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/fixednav/index.scss +6 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +63 -0
- package/dist/packages/icon/index.scss +2 -1
- 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/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/switch/index.scss +1 -1
- 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/packages/uploader/index.scss +1 -0
- package/dist/style.css +1 -1
- 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 +39 -36
- package/dist/styles/variables.scss +29 -2
- package/package.json +3 -2
- package/dist/packages/_es/style.css +0 -160
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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");
|
|
@@ -32,6 +32,22 @@ const _sfc_main = create({
|
|
|
32
32
|
inactiveText: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: ""
|
|
35
|
+
},
|
|
36
|
+
loading: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
name: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "loading1"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
type: [String, Number],
|
|
46
|
+
default: "12px"
|
|
47
|
+
},
|
|
48
|
+
color: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
35
51
|
}
|
|
36
52
|
},
|
|
37
53
|
emits: ["change", "update:modelValue"],
|
|
@@ -51,9 +67,10 @@ const _sfc_main = create({
|
|
|
51
67
|
};
|
|
52
68
|
});
|
|
53
69
|
const onClick = (event) => {
|
|
54
|
-
if (props.disable)
|
|
70
|
+
if (props.disable || props.loading)
|
|
55
71
|
return;
|
|
56
72
|
emit("update:modelValue", !props.modelValue);
|
|
73
|
+
emit("update:loading");
|
|
57
74
|
emit("change", !props.modelValue, event);
|
|
58
75
|
};
|
|
59
76
|
return {
|
|
@@ -64,18 +81,21 @@ const _sfc_main = create({
|
|
|
64
81
|
}
|
|
65
82
|
});
|
|
66
83
|
const _hoisted_1 = { class: "switch-button" };
|
|
67
|
-
const _hoisted_2 = { class: "close-line" };
|
|
68
84
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
85
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
69
86
|
return openBlock(), createElementBlock("view", {
|
|
70
87
|
class: normalizeClass(_ctx.classes),
|
|
71
88
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
72
89
|
style: normalizeStyle(_ctx.style)
|
|
73
90
|
}, [
|
|
74
91
|
createElementVNode("view", _hoisted_1, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
92
|
+
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
93
|
+
key: 0,
|
|
94
|
+
name: _ctx.name,
|
|
95
|
+
size: _ctx.size,
|
|
96
|
+
color: _ctx.color
|
|
97
|
+
}, null, 8, ["name", "size", "color"])) : createCommentVNode("", true),
|
|
98
|
+
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
79
99
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
80
100
|
[vShow, _ctx.modelValue]
|
|
81
101
|
]),
|
|
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
21
|
/*!
|
|
22
|
-
* @nutui/nutui v3.1.
|
|
22
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2021 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
package/dist/packages/_es/Tag.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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, createCommentVNode, vShow, render } from "vue";
|
|
25
|
+
import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, createCommentVNode, toDisplayString, vShow, render } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import _sfc_main$1 from "./Icon.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -46,8 +46,8 @@ const _sfc_main = create({
|
|
|
46
46
|
type: String,
|
|
47
47
|
customClass: String,
|
|
48
48
|
bottom: {
|
|
49
|
-
type:
|
|
50
|
-
default:
|
|
49
|
+
type: String,
|
|
50
|
+
default: "30px"
|
|
51
51
|
},
|
|
52
52
|
size: {
|
|
53
53
|
type: [String, Number],
|
|
@@ -76,6 +76,10 @@ const _sfc_main = create({
|
|
|
76
76
|
type: String,
|
|
77
77
|
default: "rgba(0, 0, 0, 0)"
|
|
78
78
|
},
|
|
79
|
+
title: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
79
83
|
closeOnClickOverlay: {
|
|
80
84
|
type: Boolean,
|
|
81
85
|
default: false
|
|
@@ -156,7 +160,11 @@ const _hoisted_1 = {
|
|
|
156
160
|
key: 0,
|
|
157
161
|
class: "nut-toast-icon-wrapper"
|
|
158
162
|
};
|
|
159
|
-
const _hoisted_2 =
|
|
163
|
+
const _hoisted_2 = {
|
|
164
|
+
key: 1,
|
|
165
|
+
class: "nut-toast-title"
|
|
166
|
+
};
|
|
167
|
+
const _hoisted_3 = ["innerHTML"];
|
|
160
168
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
161
169
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
162
170
|
return openBlock(), createBlock(Transition, {
|
|
@@ -167,7 +175,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
175
|
withDirectives(createElementVNode("view", {
|
|
168
176
|
class: normalizeClass(_ctx.toastBodyClass),
|
|
169
177
|
style: normalizeStyle({
|
|
170
|
-
bottom: _ctx.center ? "auto" : _ctx.bottom
|
|
178
|
+
bottom: _ctx.center ? "auto" : _ctx.bottom,
|
|
171
179
|
"background-color": _ctx.coverColor
|
|
172
180
|
}),
|
|
173
181
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
|
|
@@ -186,10 +194,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
186
194
|
name: _ctx.icon
|
|
187
195
|
}, null, 8, ["name"])
|
|
188
196
|
])) : createCommentVNode("", true),
|
|
197
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
189
198
|
createElementVNode("view", {
|
|
190
199
|
class: "nut-toast-text",
|
|
191
200
|
innerHTML: _ctx.msg
|
|
192
|
-
}, null, 8,
|
|
201
|
+
}, null, 8, _hoisted_3)
|
|
193
202
|
], 4)
|
|
194
203
|
], 6), [
|
|
195
204
|
[vShow, _ctx.state.mounted]
|
|
@@ -205,8 +214,9 @@ const defaultOptions = {
|
|
|
205
214
|
duration: 2e3,
|
|
206
215
|
center: true,
|
|
207
216
|
type: "text",
|
|
217
|
+
title: "",
|
|
208
218
|
customClass: "",
|
|
209
|
-
bottom:
|
|
219
|
+
bottom: "30px",
|
|
210
220
|
size: "base",
|
|
211
221
|
icon: null,
|
|
212
222
|
textAlignCenter: true,
|
|
@@ -19,11 +19,11 @@ var __publicField = (obj, key, value) => {
|
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
21
|
/*!
|
|
22
|
-
* @nutui/nutui v3.1.
|
|
22
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2021 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
|
26
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList,
|
|
26
|
+
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode } from "vue";
|
|
27
27
|
import { c as createComponent } from "./component.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
29
|
class UploadOptions {
|
|
@@ -258,6 +258,7 @@ const _sfc_main = create({
|
|
|
258
258
|
fileItem.status = "ready";
|
|
259
259
|
fileItem.type = file.type;
|
|
260
260
|
fileItem.formData = formData;
|
|
261
|
+
fileItem.message = "\u7B49\u5F85\u4E0A\u4F20";
|
|
261
262
|
executeUpload(fileItem, index2);
|
|
262
263
|
if (props.isPreview && file.type.includes("image")) {
|
|
263
264
|
const reader = new FileReader();
|
|
@@ -352,20 +353,25 @@ const _hoisted_5 = {
|
|
|
352
353
|
class: "nut-uploader__preview__progress"
|
|
353
354
|
};
|
|
354
355
|
const _hoisted_6 = { class: "nut-uploader__preview__progress__msg" };
|
|
355
|
-
const _hoisted_7 =
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
const _hoisted_7 = {
|
|
357
|
+
key: 1,
|
|
358
|
+
class: "nut-uploader__preview__progress"
|
|
359
|
+
};
|
|
360
|
+
const _hoisted_8 = { class: "nut-uploader__preview__progress__msg" };
|
|
361
|
+
const _hoisted_9 = ["onClick", "src"];
|
|
362
|
+
const _hoisted_10 = {
|
|
363
|
+
key: 4,
|
|
358
364
|
class: "nut-uploader__preview-img__file"
|
|
359
365
|
};
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
const
|
|
366
|
+
const _hoisted_11 = ["onClick"];
|
|
367
|
+
const _hoisted_12 = { class: "tips" };
|
|
368
|
+
const _hoisted_13 = {
|
|
363
369
|
key: 1,
|
|
364
370
|
class: "nut-uploader__preview-list"
|
|
365
371
|
};
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
const
|
|
372
|
+
const _hoisted_14 = ["onClick"];
|
|
373
|
+
const _hoisted_15 = ["accept", "multiple", "name", "disabled"];
|
|
374
|
+
const _hoisted_16 = ["accept", "multiple", "name", "disabled"];
|
|
369
375
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
370
376
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
371
377
|
const _component_nut_progress = resolveComponent("nut-progress");
|
|
@@ -403,26 +409,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
403
409
|
key: item.uid
|
|
404
410
|
}, [
|
|
405
411
|
_ctx.listType == "picture" && !_ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
406
|
-
item.status
|
|
412
|
+
item.status == "ready" ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
413
|
+
createElementVNode("view", _hoisted_6, toDisplayString(item.message), 1)
|
|
414
|
+
])) : item.status != "success" ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
407
415
|
createVNode(_component_nut_icon, {
|
|
408
416
|
color: "#fff",
|
|
409
417
|
name: item.status == "error" ? "failure" : "loading"
|
|
410
418
|
}, null, 8, ["name"]),
|
|
411
|
-
createElementVNode("view",
|
|
419
|
+
createElementVNode("view", _hoisted_8, toDisplayString(item.message), 1)
|
|
412
420
|
])) : createCommentVNode("", true),
|
|
413
421
|
_ctx.isDeletable ? (openBlock(), createBlock(_component_nut_icon, {
|
|
414
|
-
key:
|
|
422
|
+
key: 2,
|
|
415
423
|
color: "rgba(0,0,0,0.6)",
|
|
416
424
|
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
417
425
|
class: "close",
|
|
418
426
|
name: "failure"
|
|
419
427
|
}, null, 8, ["onClick"])) : createCommentVNode("", true),
|
|
420
428
|
item.type.includes("image") && item.url ? (openBlock(), createElementBlock("img", {
|
|
421
|
-
key:
|
|
429
|
+
key: 3,
|
|
422
430
|
class: "nut-uploader__preview-img__c",
|
|
423
431
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
424
432
|
src: item.url
|
|
425
|
-
}, null, 8,
|
|
433
|
+
}, null, 8, _hoisted_9)) : (openBlock(), createElementBlock("view", _hoisted_10, [
|
|
426
434
|
createElementVNode("view", {
|
|
427
435
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
428
436
|
class: "nut-uploader__preview-img__file__name"
|
|
@@ -432,17 +440,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
440
|
name: "link"
|
|
433
441
|
}),
|
|
434
442
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
435
|
-
], 8,
|
|
443
|
+
], 8, _hoisted_11)
|
|
436
444
|
])),
|
|
437
|
-
createElementVNode("view",
|
|
438
|
-
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view",
|
|
445
|
+
createElementVNode("view", _hoisted_12, toDisplayString(item.name), 1)
|
|
446
|
+
])) : _ctx.listType == "list" ? (openBlock(), createElementBlock("view", _hoisted_13, [
|
|
439
447
|
createElementVNode("view", {
|
|
440
448
|
onClick: ($event) => _ctx.fileItemClick(item),
|
|
441
449
|
class: normalizeClass(["nut-uploader__preview-img__file__name", [item.status]])
|
|
442
450
|
}, [
|
|
443
451
|
createVNode(_component_nut_icon, { name: "link" }),
|
|
444
452
|
createTextVNode("\xA0" + toDisplayString(item.name), 1)
|
|
445
|
-
], 10,
|
|
453
|
+
], 10, _hoisted_14),
|
|
446
454
|
createVNode(_component_nut_icon, {
|
|
447
455
|
class: "nut-uploader__preview-img__file__del",
|
|
448
456
|
onClick: ($event) => _ctx.onDelete(item, index2),
|
|
@@ -478,7 +486,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
478
486
|
name: _ctx.name,
|
|
479
487
|
disabled: _ctx.disabled,
|
|
480
488
|
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
481
|
-
}, null, 40,
|
|
489
|
+
}, null, 40, _hoisted_15)) : (openBlock(), createElementBlock("input", {
|
|
482
490
|
key: 1,
|
|
483
491
|
class: "nut-uploader__input",
|
|
484
492
|
type: "file",
|
|
@@ -487,7 +495,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
487
495
|
name: _ctx.name,
|
|
488
496
|
disabled: _ctx.disabled,
|
|
489
497
|
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.onChange && _ctx.onChange(...args))
|
|
490
|
-
}, null, 40,
|
|
498
|
+
}, null, 40, _hoisted_16))
|
|
491
499
|
], 2)) : createCommentVNode("", true)
|
|
492
500
|
], 2);
|
|
493
501
|
}
|
|
@@ -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.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2021 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -401,5 +401,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
401
401
|
])
|
|
402
402
|
], 512);
|
|
403
403
|
}
|
|
404
|
-
var
|
|
405
|
-
export {
|
|
404
|
+
var Video = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
405
|
+
export { Video as default };
|
|
@@ -1,64 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
|
|
6
|
+
import { getCurrentInstance } from "vue";
|
|
7
|
+
function useExpose(apis) {
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
if (instance) {
|
|
10
|
+
Object.assign(instance.proxy, apis);
|
|
11
11
|
}
|
|
12
|
-
if (y > x && y > MIN_DISTANCE) {
|
|
13
|
-
return "vertical";
|
|
14
|
-
}
|
|
15
|
-
return "";
|
|
16
|
-
}
|
|
17
|
-
function useTouch() {
|
|
18
|
-
const startX = ref(0);
|
|
19
|
-
const startY = ref(0);
|
|
20
|
-
const deltaX = ref(0);
|
|
21
|
-
const deltaY = ref(0);
|
|
22
|
-
const offsetX = ref(0);
|
|
23
|
-
const offsetY = ref(0);
|
|
24
|
-
const direction = ref("");
|
|
25
|
-
const isVertical = () => direction.value === "vertical";
|
|
26
|
-
const isHorizontal = () => direction.value === "horizontal";
|
|
27
|
-
const reset = () => {
|
|
28
|
-
deltaX.value = 0;
|
|
29
|
-
deltaY.value = 0;
|
|
30
|
-
offsetX.value = 0;
|
|
31
|
-
offsetY.value = 0;
|
|
32
|
-
direction.value = "";
|
|
33
|
-
};
|
|
34
|
-
const start = (event) => {
|
|
35
|
-
reset();
|
|
36
|
-
startX.value = event.touches[0].clientX;
|
|
37
|
-
startY.value = event.touches[0].clientY;
|
|
38
|
-
};
|
|
39
|
-
const move = (event) => {
|
|
40
|
-
const touch = event.touches[0];
|
|
41
|
-
deltaX.value = touch.clientX - startX.value;
|
|
42
|
-
deltaY.value = touch.clientY - startY.value;
|
|
43
|
-
offsetX.value = Math.abs(deltaX.value);
|
|
44
|
-
offsetY.value = Math.abs(deltaY.value);
|
|
45
|
-
if (!direction.value) {
|
|
46
|
-
direction.value = getDirection(offsetX.value, offsetY.value);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return {
|
|
50
|
-
move,
|
|
51
|
-
start,
|
|
52
|
-
reset,
|
|
53
|
-
startX,
|
|
54
|
-
startY,
|
|
55
|
-
deltaX,
|
|
56
|
-
deltaY,
|
|
57
|
-
offsetX,
|
|
58
|
-
offsetY,
|
|
59
|
-
direction,
|
|
60
|
-
isVertical,
|
|
61
|
-
isHorizontal
|
|
62
|
-
};
|
|
63
12
|
}
|
|
64
|
-
export {
|
|
13
|
+
export { useExpose as u };
|