@nutui/nutui 3.1.23-beta.6 → 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/CHANGELOG.md +63 -1
- package/dist/nutui.es.js +1475 -1070
- package/dist/nutui.umd.js +1468 -1063
- package/dist/packages/_es/ActionSheet.js +4 -22
- package/dist/packages/_es/Address.js +79 -71
- package/dist/packages/_es/AddressList.js +7 -5
- package/dist/packages/_es/Animate.js +2 -21
- package/dist/packages/_es/Audio.js +39 -68
- package/dist/packages/_es/AudioOperate.js +3 -24
- package/dist/packages/_es/Avatar.js +8 -24
- 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 +6 -5
- 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 +51 -65
- package/dist/packages/_es/Category.js +2 -2
- package/dist/packages/_es/CategoryPane.js +10 -10
- package/dist/packages/_es/Cell.js +8 -9
- 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 +30 -42
- package/dist/packages/_es/Comment.js +13 -9
- package/dist/packages/_es/ConfigProvider.js +8 -4
- package/dist/packages/_es/CountDown.js +40 -46
- package/dist/packages/_es/CountUp.js +39 -40
- package/dist/packages/_es/DatePicker.js +25 -33
- package/dist/packages/_es/Dialog.js +12 -27
- package/dist/packages/_es/Divider.js +7 -24
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +7 -4
- package/dist/packages/_es/Elevator.js +25 -38
- package/dist/packages/_es/Ellipsis.js +14 -28
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +18 -14
- 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 +6 -5
- package/dist/packages/_es/Icon.js +15 -11
- package/dist/packages/_es/Image.js +8 -24
- package/dist/packages/_es/ImagePreview.js +24 -39
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +8 -33
- package/dist/packages/_es/Input.js +75 -69
- package/dist/packages/_es/InputNumber.js +20 -14
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +10 -25
- package/dist/packages/_es/Menu.js +17 -10
- package/dist/packages/_es/MenuItem.js +5 -26
- package/dist/packages/_es/Navbar.js +10 -8
- package/dist/packages/_es/NoticeBar.js +20 -31
- package/dist/packages/_es/Notify.js +16 -32
- package/dist/packages/_es/NumberKeyboard.js +21 -16
- package/dist/packages/_es/OldPicker.js +47 -46
- package/dist/packages/_es/OverLay.js +11 -23
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +81 -59
- package/dist/packages/_es/Popover.js +58 -58
- package/dist/packages/_es/Popup.js +38 -43
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +4 -5
- package/dist/packages/_es/PullRefresh.js +5 -20
- package/dist/packages/_es/Radio.js +25 -13
- package/dist/packages/_es/RadioGroup.js +12 -5
- package/dist/packages/_es/Range.js +20 -33
- package/dist/packages/_es/Rate.js +5 -24
- package/dist/packages/_es/Row.js +5 -11
- package/dist/packages/_es/SearchBar.js +5 -24
- package/dist/packages/_es/ShortPassword.js +18 -11
- package/dist/packages/_es/SideNavBar.js +4 -22
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +15 -23
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +24 -32
- package/dist/packages/_es/Step.js +9 -26
- package/dist/packages/_es/Steps.js +8 -4
- package/dist/packages/_es/Sticky.js +23 -12
- package/dist/packages/_es/SubSideNavBar.js +4 -22
- package/dist/packages/_es/Swipe.js +5 -24
- package/dist/packages/_es/Swiper.js +23 -14
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +15 -11
- 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 +10 -25
- package/dist/packages/_es/Tabs.js +20 -29
- package/dist/packages/_es/Tag.js +11 -15
- package/dist/packages/_es/TextArea.js +8 -5
- package/dist/packages/_es/TimeDetail.js +5 -24
- package/dist/packages/_es/TimePannel.js +4 -22
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +22 -39
- package/dist/packages/_es/Uploader.js +54 -54
- package/dist/packages/_es/Video.js +22 -33
- package/dist/packages/_es/WaterMark.js +31 -44
- package/dist/packages/_es/common.js +21 -11
- package/dist/packages/_es/component.js +5 -5
- 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 +26 -35
- 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/style.css +1 -111
- package/dist/packages/actionsheet/index.scss +17 -0
- package/dist/packages/address/index.scss +60 -0
- package/dist/packages/addresslist/index.scss +57 -17
- package/dist/packages/audio/index.scss +8 -0
- package/dist/packages/barrage/index.scss +7 -0
- package/dist/packages/button/index.scss +1 -0
- package/dist/packages/card/index.scss +8 -1
- package/dist/packages/category/index.scss +25 -4
- package/dist/packages/categorypane/index.scss +18 -65
- package/dist/packages/circleprogress/index.scss +6 -0
- package/dist/packages/collapseitem/index.scss +21 -0
- package/dist/packages/comment/index.scss +37 -0
- package/dist/packages/countup/index.scss +24 -3
- package/dist/packages/ecard/index.scss +31 -1
- package/dist/packages/elevator/index.scss +16 -0
- package/dist/packages/empty/index.scss +6 -0
- package/dist/packages/fixednav/index.scss +7 -0
- package/dist/packages/image/index.scss +12 -0
- package/dist/packages/infiniteloading/index.scss +18 -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/menu/index.scss +14 -2
- package/dist/packages/menuitem/index.scss +8 -0
- package/dist/packages/noticebar/index.scss +13 -0
- package/dist/packages/numberkeyboard/index.scss +10 -0
- package/dist/packages/picker/index.scss +33 -0
- package/dist/packages/popup/index.scss +10 -0
- package/dist/packages/radio/index.scss +1 -0
- package/dist/packages/shortpassword/index.scss +20 -0
- package/dist/packages/sidenavbaritem/index.scss +9 -0
- package/dist/packages/sku/index.scss +40 -0
- package/dist/packages/step/index.scss +52 -0
- package/dist/packages/subsidenavbar/index.scss +12 -0
- package/dist/packages/swiper/index.scss +2 -0
- package/dist/packages/swiperitem/index.scss +3 -0
- package/dist/packages/tag/index.scss +20 -0
- package/dist/packages/watermark/index.scss +1 -1
- package/dist/smartips/attributes.json +38 -2
- package/dist/smartips/tags.json +14 -4
- package/dist/smartips/web-types.json +86 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +51 -51
- package/dist/styles/themes/jdb.scss +51 -51
- package/dist/styles/themes/jdt.scss +51 -51
- package/dist/styles/variables-jdb.scss +28 -7
- package/dist/styles/variables-jdt.scss +28 -7
- package/dist/styles/variables.scss +27 -7
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +1 -1
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/audio/index.vue.d.ts +4 -1
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +15 -72
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/index.vue.d.ts +7 -0
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +9 -2
- package/dist/types/__VUE/cellgroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -1
- 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 +1 -1
- package/dist/types/__VUE/configprovider/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countdown/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/common.d.ts +56 -0
- package/dist/types/__VUE/fixednav/index.vue.d.ts +17 -9
- package/dist/types/__VUE/formitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.d.ts +7 -6
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +4 -4
- package/dist/types/__VUE/imagepreview/types.d.ts +7 -0
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +4 -9
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +15 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +3 -0
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -4
- package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/overlay/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/Column.vue.d.ts +8 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +28 -13
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -1
- package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/row/index.vue.d.ts +2 -5
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/signature/index.vue.d.ts +5 -2
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timedetail/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timepannel/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/index.vue.d.ts +7 -0
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
- package/dist/packages/index.d.ts +0 -3
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
1
|
/*!
|
|
18
|
-
* @nutui/nutui v3.
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
19
3
|
* (c) 2022 @jdf2e.
|
|
20
4
|
* Released under the MIT License.
|
|
21
5
|
*/
|
|
22
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode } from "vue";
|
|
6
|
+
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode, mergeProps } from "vue";
|
|
23
7
|
import { c as createComponent } from "./component.js";
|
|
24
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
25
9
|
import "../locale/lang";
|
|
@@ -45,10 +29,14 @@ class Uploader {
|
|
|
45
29
|
const xhr = new XMLHttpRequest();
|
|
46
30
|
xhr.timeout = options.timeout;
|
|
47
31
|
if (xhr.upload) {
|
|
48
|
-
xhr.upload.addEventListener(
|
|
49
|
-
|
|
50
|
-
(
|
|
51
|
-
|
|
32
|
+
xhr.upload.addEventListener(
|
|
33
|
+
"progress",
|
|
34
|
+
(e) => {
|
|
35
|
+
var _a2;
|
|
36
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, e, options);
|
|
37
|
+
},
|
|
38
|
+
false
|
|
39
|
+
);
|
|
52
40
|
xhr.onreadystatechange = () => {
|
|
53
41
|
var _a2, _b;
|
|
54
42
|
if (xhr.readyState === 4) {
|
|
@@ -65,8 +53,8 @@ class Uploader {
|
|
|
65
53
|
xhr.setRequestHeader(key, value);
|
|
66
54
|
}
|
|
67
55
|
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
68
|
-
if (options.
|
|
69
|
-
|
|
56
|
+
if (options.beforeXhrUpload) {
|
|
57
|
+
options.beforeXhrUpload(xhr, options);
|
|
70
58
|
} else {
|
|
71
59
|
xhr.send(options.formData);
|
|
72
60
|
}
|
|
@@ -80,33 +68,38 @@ class Uploader {
|
|
|
80
68
|
if (env === "WEB") {
|
|
81
69
|
this.upload();
|
|
82
70
|
} else {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
71
|
+
if (options.beforeXhrUpload) {
|
|
72
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
73
|
+
} else {
|
|
74
|
+
const uploadTask = uploadFile({
|
|
75
|
+
url: options.url,
|
|
76
|
+
filePath: options.taroFilePath,
|
|
77
|
+
fileType: options.fileType,
|
|
78
|
+
header: {
|
|
79
|
+
"Content-Type": "multipart/form-data",
|
|
80
|
+
...options.headers
|
|
81
|
+
},
|
|
82
|
+
formData: options.formData,
|
|
83
|
+
name: options.name,
|
|
84
|
+
success(response) {
|
|
85
|
+
var _a2, _b;
|
|
86
|
+
if (options.xhrState == response.statusCode) {
|
|
87
|
+
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
88
|
+
} else {
|
|
89
|
+
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
fail(e) {
|
|
93
|
+
var _a2;
|
|
94
|
+
(_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
|
|
98
95
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
96
|
+
});
|
|
97
|
+
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
98
|
+
uploadTask.progress((res) => {
|
|
101
99
|
var _a2;
|
|
102
|
-
(_a2 = options.
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
106
|
-
uploadTask.progress((res) => {
|
|
107
|
-
var _a2;
|
|
108
|
-
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
109
|
-
});
|
|
100
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
110
103
|
}
|
|
111
104
|
}
|
|
112
105
|
}
|
|
@@ -149,6 +142,10 @@ const _sfc_main = create({
|
|
|
149
142
|
type: Function,
|
|
150
143
|
default: null
|
|
151
144
|
},
|
|
145
|
+
beforeXhrUpload: {
|
|
146
|
+
type: Function,
|
|
147
|
+
default: null
|
|
148
|
+
},
|
|
152
149
|
beforeDelete: {
|
|
153
150
|
type: Function,
|
|
154
151
|
default: (file, files) => {
|
|
@@ -192,6 +189,7 @@ const _sfc_main = create({
|
|
|
192
189
|
uploadOption.xhrState = props.xhrState;
|
|
193
190
|
uploadOption.headers = props.headers;
|
|
194
191
|
uploadOption.withCredentials = props.withCredentials;
|
|
192
|
+
uploadOption.beforeXhrUpload = props.beforeXhrUpload;
|
|
195
193
|
try {
|
|
196
194
|
uploadOption.sourceFile = fileItem.formData.get(props.name);
|
|
197
195
|
} catch (error) {
|
|
@@ -231,9 +229,11 @@ const _sfc_main = create({
|
|
|
231
229
|
if (props.autoUpload) {
|
|
232
230
|
task.upload();
|
|
233
231
|
} else {
|
|
234
|
-
uploadQueue.push(
|
|
235
|
-
resolve
|
|
236
|
-
|
|
232
|
+
uploadQueue.push(
|
|
233
|
+
new Promise((resolve, reject) => {
|
|
234
|
+
resolve(task);
|
|
235
|
+
})
|
|
236
|
+
);
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
239
|
const clearUploadQueue = (index2 = -1) => {
|
|
@@ -472,11 +472,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
472
472
|
key: 1,
|
|
473
473
|
class: normalizeClass(["nut-uploader__upload", [_ctx.listType]])
|
|
474
474
|
}, [
|
|
475
|
-
createVNode(_component_nut_icon, {
|
|
475
|
+
createVNode(_component_nut_icon, mergeProps(_ctx.$attrs, {
|
|
476
476
|
size: _ctx.uploadIconSize,
|
|
477
477
|
color: "#808080",
|
|
478
478
|
name: _ctx.uploadIcon
|
|
479
|
-
}, null,
|
|
479
|
+
}), null, 16, ["size", "name"]),
|
|
480
480
|
_ctx.capture ? (openBlock(), createElementBlock("input", {
|
|
481
481
|
key: 0,
|
|
482
482
|
class: "nut-uploader__input",
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -95,16 +76,23 @@ const _sfc_main = create({
|
|
|
95
76
|
const isDisabled = computed(() => {
|
|
96
77
|
return props.options.disabled;
|
|
97
78
|
});
|
|
98
|
-
watch(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
79
|
+
watch(
|
|
80
|
+
() => props.source,
|
|
81
|
+
(newValue) => {
|
|
82
|
+
if (newValue.src) {
|
|
83
|
+
nextTick(() => {
|
|
84
|
+
state.videoElm.load();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
103
87
|
}
|
|
104
|
-
|
|
105
|
-
watch(
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
);
|
|
89
|
+
watch(
|
|
90
|
+
() => props.options,
|
|
91
|
+
(newValue) => {
|
|
92
|
+
state.state.isMuted = newValue ? newValue.muted : false;
|
|
93
|
+
},
|
|
94
|
+
{ immediate: true }
|
|
95
|
+
);
|
|
108
96
|
const init = () => {
|
|
109
97
|
state.videoElm = root.value;
|
|
110
98
|
if (props.options.autoplay) {
|
|
@@ -233,9 +221,10 @@ const _sfc_main = create({
|
|
|
233
221
|
onMounted(() => {
|
|
234
222
|
init();
|
|
235
223
|
});
|
|
236
|
-
return
|
|
237
|
-
root
|
|
238
|
-
|
|
224
|
+
return {
|
|
225
|
+
root,
|
|
226
|
+
...toRefs(props),
|
|
227
|
+
...toRefs(state),
|
|
239
228
|
handleError,
|
|
240
229
|
isDisabled,
|
|
241
230
|
play,
|
|
@@ -246,7 +235,7 @@ const _sfc_main = create({
|
|
|
246
235
|
retry,
|
|
247
236
|
fullScreen,
|
|
248
237
|
translate
|
|
249
|
-
}
|
|
238
|
+
};
|
|
250
239
|
}
|
|
251
240
|
});
|
|
252
241
|
const _hoisted_1 = {
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -123,7 +104,6 @@ const _sfc_main = create({
|
|
|
123
104
|
const init = () => {
|
|
124
105
|
const canvas = document.createElement("canvas");
|
|
125
106
|
const ratio = window.devicePixelRatio;
|
|
126
|
-
console.log(ratio);
|
|
127
107
|
const ctx = canvas.getContext("2d");
|
|
128
108
|
const canvasWidth = `${(gapX + width) * ratio}px`;
|
|
129
109
|
const canvasHeight = `${(gapY + height) * ratio}px`;
|
|
@@ -140,10 +120,15 @@ const _sfc_main = create({
|
|
|
140
120
|
img.referrerPolicy = "no-referrer";
|
|
141
121
|
img.src = image;
|
|
142
122
|
img.onload = () => {
|
|
143
|
-
ctx.drawImage(
|
|
123
|
+
ctx.drawImage(
|
|
124
|
+
img,
|
|
125
|
+
-imageWidth * ratio / 2,
|
|
126
|
+
-imageHeight * ratio / 2,
|
|
127
|
+
imageWidth * ratio,
|
|
128
|
+
imageHeight * ratio
|
|
129
|
+
);
|
|
144
130
|
ctx.restore();
|
|
145
131
|
state.base64Url = canvas.toDataURL();
|
|
146
|
-
console.log(state.base64Url);
|
|
147
132
|
};
|
|
148
133
|
} else if (content) {
|
|
149
134
|
ctx.textBaseline = "middle";
|
|
@@ -156,32 +141,34 @@ const _sfc_main = create({
|
|
|
156
141
|
ctx.fillText(content, 0, 0);
|
|
157
142
|
ctx.restore();
|
|
158
143
|
state.base64Url = canvas.toDataURL();
|
|
159
|
-
console.log(state.base64Url);
|
|
160
144
|
}
|
|
161
145
|
} else {
|
|
162
146
|
throw new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas");
|
|
163
147
|
}
|
|
164
148
|
};
|
|
165
149
|
init();
|
|
166
|
-
watch(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
150
|
+
watch(
|
|
151
|
+
() => [
|
|
152
|
+
zIndex,
|
|
153
|
+
gapX,
|
|
154
|
+
gapY,
|
|
155
|
+
width,
|
|
156
|
+
height,
|
|
157
|
+
rotate,
|
|
158
|
+
image,
|
|
159
|
+
imageWidth,
|
|
160
|
+
imageHeight,
|
|
161
|
+
content,
|
|
162
|
+
fontStyle,
|
|
163
|
+
fontWeight,
|
|
164
|
+
fontColor,
|
|
165
|
+
fontSize,
|
|
166
|
+
fontFamily
|
|
167
|
+
],
|
|
168
|
+
() => {
|
|
169
|
+
init();
|
|
170
|
+
}
|
|
171
|
+
);
|
|
185
172
|
const classes = computed(() => {
|
|
186
173
|
const prefixCls = componentName;
|
|
187
174
|
return {
|
|
@@ -189,7 +176,7 @@ const _sfc_main = create({
|
|
|
189
176
|
[`${prefixCls}-full-page`]: props.fullPage
|
|
190
177
|
};
|
|
191
178
|
});
|
|
192
|
-
return
|
|
179
|
+
return { ...toRefs(state), classes };
|
|
193
180
|
}
|
|
194
181
|
});
|
|
195
182
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.
|
|
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 {
|
|
6
|
+
import { shallowReactive, getCurrentInstance, provide, markRaw, isVNode, computed, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
9
|
function flattenVNodes(children, childName) {
|
|
@@ -54,11 +54,17 @@ function useProvide(key, childName) {
|
|
|
54
54
|
};
|
|
55
55
|
const extend = Object.assign;
|
|
56
56
|
return (value) => {
|
|
57
|
-
provide(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
provide(
|
|
58
|
+
key,
|
|
59
|
+
extend(
|
|
60
|
+
{
|
|
61
|
+
add,
|
|
62
|
+
remove,
|
|
63
|
+
internalChildren
|
|
64
|
+
},
|
|
65
|
+
value
|
|
66
|
+
)
|
|
67
|
+
);
|
|
62
68
|
return {
|
|
63
69
|
internalChildren
|
|
64
70
|
};
|
|
@@ -126,10 +132,14 @@ const component = {
|
|
|
126
132
|
});
|
|
127
133
|
return () => {
|
|
128
134
|
var _a;
|
|
129
|
-
return h(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
return h(
|
|
136
|
+
"view",
|
|
137
|
+
{
|
|
138
|
+
class: rootClass.value,
|
|
139
|
+
style: rootStyle.value
|
|
140
|
+
},
|
|
141
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
142
|
+
);
|
|
133
143
|
};
|
|
134
144
|
}
|
|
135
145
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.
|
|
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
6
|
import { defineComponent } from "vue";
|
|
7
7
|
import locale from "../locale/lang";
|
|
8
8
|
const TypeOfFun = (value) => {
|
|
9
|
-
if (
|
|
9
|
+
if (null === value) {
|
|
10
10
|
return "null";
|
|
11
11
|
}
|
|
12
12
|
const type = typeof value;
|
|
13
|
-
if (
|
|
13
|
+
if ("undefined" === type || "string" === type) {
|
|
14
14
|
return type;
|
|
15
15
|
}
|
|
16
16
|
const typeString = toString.call(value);
|
|
@@ -28,8 +28,8 @@ const TypeOfFun = (value) => {
|
|
|
28
28
|
case "[object RegExp]":
|
|
29
29
|
return "regexp";
|
|
30
30
|
case "[object Object]":
|
|
31
|
-
if (value.nodeType
|
|
32
|
-
if (value.nodeType
|
|
31
|
+
if (void 0 !== value.nodeType) {
|
|
32
|
+
if (3 == value.nodeType) {
|
|
33
33
|
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
34
34
|
} else {
|
|
35
35
|
return "element";
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.
|
|
2
|
+
* @nutui/nutui v3.2.2-beta.1 Mon Aug 22 2022 15:19:47 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -403,11 +384,17 @@ const _sfc_main = create({
|
|
|
403
384
|
}
|
|
404
385
|
monthInfo.cssScrollHeight = cssScrollHeight;
|
|
405
386
|
if (type == "next") {
|
|
406
|
-
if (!state.endData || !Utils.compareDate(
|
|
387
|
+
if (!state.endData || !Utils.compareDate(
|
|
388
|
+
`${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`,
|
|
389
|
+
`${curData[0]}-${curData[1]}-${curData[2]}`
|
|
390
|
+
)) {
|
|
407
391
|
state.monthsData.push(monthInfo);
|
|
408
392
|
}
|
|
409
393
|
} else {
|
|
410
|
-
if (!state.startData || !Utils.compareDate(
|
|
394
|
+
if (!state.startData || !Utils.compareDate(
|
|
395
|
+
`${curData[0]}-${curData[1]}-${curData[2]}`,
|
|
396
|
+
`${state.startData[0]}-${state.startData[1]}-01`
|
|
397
|
+
)) {
|
|
411
398
|
state.monthsData.unshift(monthInfo);
|
|
412
399
|
} else {
|
|
413
400
|
state.unLoadPrev = true;
|
|
@@ -459,9 +446,9 @@ const _sfc_main = create({
|
|
|
459
446
|
if (state.currDate.length > 0) {
|
|
460
447
|
let defaultArr = [];
|
|
461
448
|
let obj = {};
|
|
462
|
-
state.currDate.forEach((item
|
|
449
|
+
state.currDate.forEach((item) => {
|
|
463
450
|
if (propStartDate && !Utils.compareDate(item, propStartDate) && propEndDate && !Utils.compareDate(propEndDate, item)) {
|
|
464
|
-
if (!
|
|
451
|
+
if (!Object.hasOwnProperty.call(obj, item)) {
|
|
465
452
|
defaultArr.push(item);
|
|
466
453
|
obj[item] = item;
|
|
467
454
|
}
|
|
@@ -590,7 +577,7 @@ const _sfc_main = create({
|
|
|
590
577
|
}
|
|
591
578
|
return false;
|
|
592
579
|
};
|
|
593
|
-
const rangeTip = (
|
|
580
|
+
const rangeTip = () => {
|
|
594
581
|
if (state.currDate.length >= 2) {
|
|
595
582
|
return Utils.isEqual(state.currDate[0], state.currDate[1]);
|
|
596
583
|
}
|
|
@@ -640,14 +627,17 @@ const _sfc_main = create({
|
|
|
640
627
|
initData();
|
|
641
628
|
};
|
|
642
629
|
initData();
|
|
643
|
-
watch(
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
630
|
+
watch(
|
|
631
|
+
() => props.defaultValue,
|
|
632
|
+
(val) => {
|
|
633
|
+
if (val) {
|
|
634
|
+
if (props.poppable) {
|
|
635
|
+
resetRender();
|
|
636
|
+
}
|
|
647
637
|
}
|
|
648
638
|
}
|
|
649
|
-
|
|
650
|
-
return
|
|
639
|
+
);
|
|
640
|
+
return {
|
|
651
641
|
weeks,
|
|
652
642
|
compConthsData,
|
|
653
643
|
showTopBtn,
|
|
@@ -664,10 +654,11 @@ const _sfc_main = create({
|
|
|
664
654
|
monthsPanel,
|
|
665
655
|
months,
|
|
666
656
|
weeksPanel,
|
|
667
|
-
viewArea
|
|
668
|
-
|
|
657
|
+
viewArea,
|
|
658
|
+
...toRefs(state),
|
|
659
|
+
...toRefs(props),
|
|
669
660
|
translate
|
|
670
|
-
}
|
|
661
|
+
};
|
|
671
662
|
}
|
|
672
663
|
});
|
|
673
664
|
const _hoisted_1 = {
|
|
@@ -785,7 +776,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
785
776
|
!_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(day) ? (openBlock(), createElementBlock("view", _hoisted_12, toDisplayString(_ctx.translate("today")), 1)) : createCommentVNode("", true),
|
|
786
777
|
_ctx.isStartTip(day, month) ? (openBlock(), createElementBlock("view", {
|
|
787
778
|
key: 3,
|
|
788
|
-
class: normalizeClass(["calendar-day-tip", { "calendar-curr-tips-top": _ctx.rangeTip(
|
|
779
|
+
class: normalizeClass(["calendar-day-tip", { "calendar-curr-tips-top": _ctx.rangeTip() }])
|
|
789
780
|
}, toDisplayString(_ctx.startText || _ctx.translate("start")), 3)) : createCommentVNode("", true),
|
|
790
781
|
_ctx.isEndTip(day, month) ? (openBlock(), createElementBlock("view", _hoisted_13, toDisplayString(_ctx.endText || _ctx.translate("end")), 1)) : createCommentVNode("", true)
|
|
791
782
|
], 10, _hoisted_8);
|
package/dist/packages/_es/raf.js
CHANGED