@nutui/nutui 3.1.22-beta.3 → 3.1.22-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +2074 -1902
- package/dist/nutui.umd.js +1024 -852
- package/dist/packages/_es/ActionSheet.js +2 -21
- package/dist/packages/_es/Address.js +5 -24
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +3 -22
- package/dist/packages/_es/AudioOperate.js +2 -21
- package/dist/packages/_es/Avatar.js +3 -19
- 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 +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +13 -7
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +7 -39
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +31 -22
- package/dist/packages/_es/CollapseItem.js +40 -62
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +4 -23
- package/dist/packages/_es/CountUp.js +3 -22
- package/dist/packages/_es/DatePicker.js +5 -24
- package/dist/packages/_es/Dialog.js +2 -21
- package/dist/packages/_es/Divider.js +2 -21
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +16 -35
- package/dist/packages/_es/Ellipsis.js +64 -0
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +2 -2
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +66 -74
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +3 -22
- package/dist/packages/_es/Input.js +2 -2
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +3 -22
- package/dist/packages/_es/Menu.js +37 -22
- package/dist/packages/_es/MenuItem.js +27 -24
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +3 -22
- package/dist/packages/_es/Notify.js +4 -23
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OldPicker.js +6 -25
- package/dist/packages/_es/OverLay.js +3 -19
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +6 -25
- package/dist/packages/_es/Popover.js +2 -21
- package/dist/packages/_es/Popup.js +5 -24
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +3 -19
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +4 -23
- package/dist/packages/_es/Rate.js +35 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +3 -22
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +2 -21
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +3 -22
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +2 -21
- package/dist/packages/_es/Step.js +3 -22
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +3 -22
- package/dist/packages/_es/Swipe.js +3 -22
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +3 -22
- package/dist/packages/_es/Tabs.js +2 -18
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +3 -22
- package/dist/packages/_es/TimePannel.js +3 -22
- package/dist/packages/_es/TimeSelect.js +12 -12
- package/dist/packages/_es/Toast.js +4 -23
- package/dist/packages/_es/Uploader.js +5 -21
- package/dist/packages/_es/Video.js +3 -22
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +8 -8
- package/dist/packages/_es/index5.js +123 -86
- 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/animate/index.scss +299 -0
- package/dist/packages/cell/index.scss +7 -1
- package/dist/packages/checkbox/index.scss +10 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/ellipsis/index.scss +12 -0
- package/dist/packages/formitem/index.scss +12 -0
- package/dist/packages/griditem/index.scss +11 -0
- package/dist/packages/image/index.scss +39 -0
- package/dist/packages/imagepreview/index.scss +21 -2
- package/dist/packages/input/index.scss +13 -0
- package/dist/packages/inputnumber/index.scss +21 -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 +45 -36
- package/dist/packages/menuitem/index.scss +4 -0
- package/dist/packages/navbar/index.scss +9 -0
- package/dist/packages/pagination/index.scss +19 -0
- package/dist/packages/radio/index.scss +18 -0
- package/dist/packages/range/index.scss +19 -0
- package/dist/packages/rate/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +21 -0
- package/dist/packages/switch/index.scss +1 -0
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +5 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +132 -4
- package/dist/smartips/tags.json +53 -6
- package/dist/smartips/web-types.json +6945 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +49 -3
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +15 -15
- package/dist/styles/font/iconfont.json +14 -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 +53 -49
- package/dist/styles/themes/jdb.scss +53 -49
- package/dist/styles/themes/jdt.scss +53 -49
- package/dist/styles/variables-jdb.scss +9 -0
- package/dist/styles/variables-jdt.scss +9 -0
- package/dist/styles/variables.scss +12 -0
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
- package/dist/types/__VUE/animate/type.d.ts +6 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
- package/dist/types/__VUE/configprovider/common.d.ts +20 -0
- package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
- package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/image/index.vue.d.ts +105 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +19 -9
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +5 -3
|
@@ -1,21 +1,5 @@
|
|
|
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 = (a2, b2) => {
|
|
7
|
-
for (var prop in b2 || (b2 = {}))
|
|
8
|
-
if (__hasOwnProp.call(b2, prop))
|
|
9
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
12
|
-
if (__propIsEnum.call(b2, prop))
|
|
13
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a2;
|
|
16
|
-
};
|
|
17
1
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
19
3
|
* (c) 2022 @jdf2e.
|
|
20
4
|
* Released under the MIT License.
|
|
21
5
|
*/
|
|
@@ -25,7 +9,7 @@ import { _ as h } from "./plugin-vue_export-helper.js";
|
|
|
25
9
|
import "../locale/lang";
|
|
26
10
|
class y {
|
|
27
11
|
constructor() {
|
|
28
|
-
this.url = "", this.name = "file", this.method = "post", this.xhrState = 200, this.timeout = 3e4, this.headers = {}, this.withCredentials = false;
|
|
12
|
+
this.url = "", this.name = "file", this.fileType = "image", this.method = "post", this.xhrState = 200, this.timeout = 3e4, this.headers = {}, this.withCredentials = false;
|
|
29
13
|
}
|
|
30
14
|
}
|
|
31
15
|
class _ {
|
|
@@ -54,7 +38,7 @@ class _ {
|
|
|
54
38
|
if (t2 === "WEB")
|
|
55
39
|
this.upload();
|
|
56
40
|
else {
|
|
57
|
-
const t3 = e2({ url: a2.url, filePath: a2.taroFilePath, header:
|
|
41
|
+
const t3 = e2({ url: a2.url, filePath: a2.taroFilePath, fileType: a2.fileType, header: { "Content-Type": "multipart/form-data", ...a2.headers }, formData: a2.formData, name: a2.name, success(e3) {
|
|
58
42
|
var _a2, _b;
|
|
59
43
|
a2.xhrState == e3.statusCode ? (_a2 = a2.onSuccess) == null ? void 0 : _a2.call(a2, e3, a2) : (_b = a2.onFailure) == null ? void 0 : _b.call(a2, e3, a2);
|
|
60
44
|
}, fail(e3) {
|
|
@@ -139,9 +123,9 @@ const { componentName: b, create: C, translate: k } = g("uploader"), S = C({ pro
|
|
|
139
123
|
e2.forEach((e3) => e3.upload());
|
|
140
124
|
});
|
|
141
125
|
} };
|
|
142
|
-
} }), x = { key: 0, class: "nut-uploader__slot" }, D = ["accept", "multiple", "name", "disabled"],
|
|
126
|
+
} }), x = { key: 0, class: "nut-uploader__slot" }, D = ["accept", "multiple", "name", "disabled"], T = ["accept", "multiple", "name", "disabled"], L = { key: 0, class: "nut-uploader__preview-img" }, I = { key: 0, class: "nut-uploader__preview__progress" }, F = { class: "nut-uploader__preview__progress__msg" }, z = { key: 1, class: "nut-uploader__preview__progress" }, U = { class: "nut-uploader__preview__progress__msg" }, B = ["onClick", "src"], P = { key: 4, class: "nut-uploader__preview-img__file" }, A = ["onClick"], N = { class: "tips" }, j = { key: 1, class: "nut-uploader__preview-list" }, E = ["onClick"], O = ["accept", "multiple", "name", "disabled"], R = ["accept", "multiple", "name", "disabled"];
|
|
143
127
|
var $ = h(S, [["render", function(e2, t2, g2, h2, y2, _2) {
|
|
144
128
|
const w2 = a("nut-icon"), v2 = a("nut-progress");
|
|
145
|
-
return l(), s("view", { class: i(e2.classes) }, [e2.$slots.default ? (l(), s("view", x, [n(e2.$slots, "default"), e2.maximum - e2.fileList.length ? (l(), s(o, { key: 0 }, [e2.capture ? (l(), s("input", { key: 0, class: "nut-uploader__input", type: "file", capture: "camera", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[0] || (t2[0] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40, D)) : (l(), s("input", { key: 1, class: "nut-uploader__input", type: "file", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[1] || (t2[1] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40,
|
|
129
|
+
return l(), s("view", { class: i(e2.classes) }, [e2.$slots.default ? (l(), s("view", x, [n(e2.$slots, "default"), e2.maximum - e2.fileList.length ? (l(), s(o, { key: 0 }, [e2.capture ? (l(), s("input", { key: 0, class: "nut-uploader__input", type: "file", capture: "camera", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[0] || (t2[0] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40, D)) : (l(), s("input", { key: 1, class: "nut-uploader__input", type: "file", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[1] || (t2[1] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40, T))], 64)) : r("", true)])) : r("", true), (l(true), s(o, null, u(e2.fileList, (t3, a2) => (l(), s("view", { class: i(["nut-uploader__preview", [e2.listType]]), key: t3.uid }, [e2.listType != "picture" || e2.$slots.default ? e2.listType == "list" ? (l(), s("view", j, [p("view", { onClick: (a3) => e2.fileItemClick(t3), class: i(["nut-uploader__preview-img__file__name", [t3.status]]) }, [d(w2, { name: "link" }), f("\xA0" + c(t3.name), 1)], 10, E), d(w2, { class: "nut-uploader__preview-img__file__del", onClick: (l2) => e2.onDelete(t3, a2), color: "#808080", name: "del" }, null, 8, ["onClick"]), t3.status == "uploading" ? (l(), m(v2, { key: 0, size: "small", percentage: t3.percentage, "stroke-color": "linear-gradient(270deg, rgba(18,126,255,1) 0%,rgba(32,147,255,1) 32.815625%,rgba(13,242,204,1) 100%)", "show-text": false }, null, 8, ["percentage"])) : r("", true)])) : r("", true) : (l(), s("view", L, [t3.status == "ready" ? (l(), s("view", I, [p("view", F, c(t3.message), 1)])) : t3.status != "success" ? (l(), s("view", z, [d(w2, { color: "#fff", name: t3.status == "error" ? "failure" : "loading" }, null, 8, ["name"]), p("view", U, c(t3.message), 1)])) : r("", true), e2.isDeletable ? (l(), m(w2, { key: 2, color: "rgba(0,0,0,0.6)", onClick: (l2) => e2.onDelete(t3, a2), class: "close", name: "failure" }, null, 8, ["onClick"])) : r("", true), t3.type.includes("image") && t3.url ? (l(), s("img", { key: 3, class: "nut-uploader__preview-img__c", onClick: (a3) => e2.fileItemClick(t3), src: t3.url }, null, 8, B)) : (l(), s("view", P, [p("view", { onClick: (a3) => e2.fileItemClick(t3), class: "nut-uploader__preview-img__file__name" }, [d(w2, { color: "#808080", name: "link" }), f("\xA0" + c(t3.name), 1)], 8, A)])), p("view", N, c(t3.name), 1)]))], 2))), 128)), e2.listType == "picture" && !e2.$slots.default && e2.maximum - e2.fileList.length ? (l(), s("view", { key: 1, class: i(["nut-uploader__upload", [e2.listType]]) }, [d(w2, { size: e2.uploadIconSize, color: "#808080", name: e2.uploadIcon }, null, 8, ["size", "name"]), e2.capture ? (l(), s("input", { key: 0, class: "nut-uploader__input", type: "file", capture: "camera", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[2] || (t2[2] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40, O)) : (l(), s("input", { key: 1, class: "nut-uploader__input", type: "file", accept: e2.accept, multiple: e2.multiple, name: e2.name, disabled: e2.disabled, onChange: t2[3] || (t2[3] = (...t3) => e2.onChange && e2.onChange(...t3)) }, null, 40, R))], 2)) : r("", true)], 2);
|
|
146
130
|
}]]);
|
|
147
131
|
export { $ as default };
|
|
@@ -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 = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -59,7 +40,7 @@ const { create: S, translate: f } = g("video"), b = S({ props: { source: { type:
|
|
|
59
40
|
};
|
|
60
41
|
return r(() => {
|
|
61
42
|
c2();
|
|
62
|
-
}),
|
|
43
|
+
}), { root: p2, ...i(a2), ...i(n2), handleError: E2, isDisabled: u2, play: () => {
|
|
63
44
|
if (a2.options.autoplay && a2.options.disabled)
|
|
64
45
|
return n2.state.playing = true, false;
|
|
65
46
|
if (n2.state.playing = !n2.state.playing, n2.videoElm)
|
|
@@ -92,7 +73,7 @@ const { create: S, translate: f } = g("video"), b = S({ props: { source: { type:
|
|
|
92
73
|
n2.state.isError = false, c2();
|
|
93
74
|
}, fullScreen: () => {
|
|
94
75
|
n2.state.fullScreen ? (n2.state.fullScreen = false, document.webkitCancelFullScreen()) : (n2.state.fullScreen = true, n2.videoElm.webkitRequestFullScreen());
|
|
95
|
-
}, translate: f }
|
|
76
|
+
}, translate: f };
|
|
96
77
|
} }), T = { class: "nut-video", ref: "videocon" }, w = ["muted", "autoplay", "loop", "poster", "controls", "preload"], k = ["src", "type"], M = { class: "current-time" }, B = { class: "progress-container" }, x = { class: "progress", ref: "progressBar" }, C = [n("div", { class: "move-handle" }, null, -1)], L = { class: "played", ref: "playedBar" }, j = { class: "duration-time" }, A = { class: "nut-video-error" }, D = { class: "lose" };
|
|
97
78
|
var R = h(b, [["render", function(e2, o2, t2, l2, s2, r2) {
|
|
98
79
|
return a(), d("div", T, [n("video", { ref: "root", class: "nut-video-player", muted: e2.options.muted, autoplay: e2.options.autoplay, loop: e2.options.loop, poster: e2.options.poster, controls: e2.options.controls, preload: e2.options.preload, onError: o2[0] || (o2[0] = (...o3) => e2.handleError && e2.handleError(...o3)) }, [n("source", { src: e2.source.src, type: e2.source.type }, null, 8, k)], 40, w), e2.showToolbox && !e2.isDisabled ? (a(), d("div", { key: 0, class: "playing-mask", ref: "touchMask", onClick: o2[1] || (o2[1] = (...o3) => e2.play && e2.play(...o3)) }, null, 512)) : p("", true), e2.showToolbox && !e2.isDisabled ? u((a(), d("div", { key: 1, class: "nut-video-play-btn", ref: "palyBtn", onClick: o2[2] || (o2[2] = (...o3) => e2.play && e2.play(...o3)) }, null, 512)), [[c, !e2.state.playing]]) : p("", true), u(n("div", { class: v(["nut-video-controller", { "show-control": !e2.state.playing, "hide-control": e2.state.playing }]) }, [n("div", { class: "control-play-btn", onClick: o2[3] || (o2[3] = (...o3) => e2.play && e2.play(...o3)) }), n("div", M, m(e2.videoSet.displayTime), 1), n("div", B, [n("div", x, [n("div", { class: "buffered", style: y({ width: `${e2.videoSet.loaded}%` }) }, null, 4), n("div", { class: "video-ball", style: y({ transform: `translate3d(${e2.videoSet.progress.current}px, -50%, 0)` }), onTouchmove: o2[4] || (o2[4] = E((o3) => e2.touchSlidMove(o3), ["stop", "prevent"])), onTouchstart: o2[5] || (o2[5] = E((o3) => e2.touchSlidSrart(o3), ["stop"])), onTouchend: o2[6] || (o2[6] = E((o3) => e2.touchSlidEnd(o3), ["stop"])) }, C, 36), n("div", L, null, 512)], 512)]), n("div", j, m(e2.videoSet.totalTime), 1), n("div", { class: v(["volume", { muted: e2.state.isMuted }]), onClick: o2[7] || (o2[7] = (...o3) => e2.handleMuted && e2.handleMuted(...o3)) }, null, 2), n("div", { class: "fullscreen-icon", onClick: o2[8] || (o2[8] = (...o3) => e2.fullScreen && e2.fullScreen(...o3)) })], 2), [[c, e2.showToolbox && !e2.isDisabled]]), u(n("div", A, [n("p", D, m(e2.translate("errorTip")), 1), n("p", { class: "retry", onClick: o2[9] || (o2[9] = (...o3) => e2.retry && e2.retry(...o3)) }, m(e2.translate("clickRetry")), 1)], 512), [[c, e2.state.isError]])], 512);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref as e } from "vue";
|
|
7
7
|
function a() {
|
|
8
|
-
const a2 = e(0), l = e(0), t = e(0), u = e(0), v = e(0), o = e(0), r = e(""),
|
|
9
|
-
|
|
8
|
+
const a2 = e(0), l = e(0), t = e(0), u = e(0), v = e(0), o = e(0), i = e(0), r = e(0), c = e(""), s = () => {
|
|
9
|
+
v.value = 0, o.value = 0, i.value = 0, r.value = 0, c.value = "";
|
|
10
10
|
};
|
|
11
11
|
return { move: (e2) => {
|
|
12
|
-
const
|
|
13
|
-
var
|
|
14
|
-
|
|
12
|
+
const s2 = e2.touches[0];
|
|
13
|
+
var n, h;
|
|
14
|
+
v.value = s2.clientX - a2.value, o.value = s2.clientY - l.value, t.value = s2.clientX, u.value = s2.clientY, i.value = Math.abs(v.value), r.value = Math.abs(o.value), c.value || (c.value = (n = i.value, h = r.value, n > h && n > 10 ? "horizontal" : h > n && h > 10 ? "vertical" : ""));
|
|
15
15
|
}, start: (e2) => {
|
|
16
|
-
|
|
17
|
-
}, reset:
|
|
16
|
+
s(), a2.value = e2.touches[0].clientX, l.value = e2.touches[0].clientY;
|
|
17
|
+
}, reset: s, startX: a2, startY: l, moveX: t, moveY: u, deltaX: v, deltaY: o, offsetX: i, offsetY: r, direction: c, isVertical: () => c.value === "vertical", isHorizontal: () => c.value === "horizontal" };
|
|
18
18
|
}
|
|
19
19
|
export { a as u };
|
|
@@ -1,32 +1,14 @@
|
|
|
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 = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { ref as t, computed as e, reactive as a, watch as r, toRefs as n, openBlock as
|
|
6
|
+
import { ref as t, computed as e, reactive as a, watch as r, toRefs as n, openBlock as l, createElementBlock as o, normalizeClass as s, createElementVNode as c, toDisplayString as u, createCommentVNode as i, renderSlot as D, Fragment as h, renderList as p, normalizeStyle as m, createTextVNode as d } from "vue";
|
|
26
7
|
import { c as y } from "./component.js";
|
|
27
|
-
import { r as
|
|
28
|
-
import {
|
|
29
|
-
|
|
8
|
+
import { r as f } from "./raf.js";
|
|
9
|
+
import { u as g } from "./index3.js";
|
|
10
|
+
import { _ as w } from "./plugin-vue_export-helper.js";
|
|
11
|
+
const v = { isLeapYear: function(t2) {
|
|
30
12
|
return t2 % 4 == 0 && t2 % 100 != 0 || t2 % 400 == 0;
|
|
31
13
|
}, getWhatDay: function(t2, e2, a2) {
|
|
32
14
|
return ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"][new Date(t2 + "/" + e2 + "/" + a2).getDay()];
|
|
@@ -49,19 +31,37 @@ const w = { isLeapYear: function(t2) {
|
|
|
49
31
|
return !(new Date(t2.replace("-", "/").replace("-", "/")) >= new Date(e2.replace("-", "/").replace("-", "/")));
|
|
50
32
|
}, isEqual: function(t2, e2) {
|
|
51
33
|
return new Date(t2).getTime() == new Date(e2).getTime();
|
|
52
|
-
} }, { create:
|
|
53
|
-
const c2 = t(
|
|
54
|
-
const
|
|
55
|
-
return t2.type == "curr" ?
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
34
|
+
} }, { create: T, translate: S } = y("calendar-item"), b = T({ props: { type: { type: String, default: "one" }, isAutoBackFill: { type: Boolean, default: false }, toDateAnimation: { type: Boolean, default: true }, poppable: { type: Boolean, default: true }, showTitle: { type: Boolean, default: true }, showSubTitle: { type: Boolean, default: true }, showToday: { type: Boolean, default: true }, title: { type: String, default: "" }, confirmText: { type: String, default: "" }, startText: { type: String, default: "" }, endText: { type: String, default: "" }, defaultValue: { type: [String, Array], default: null }, startDate: { type: String, default: v.getDay(0) }, endDate: { type: String, default: v.getDay(365) } }, emits: ["choose", "update", "close", "select"], setup(l2, { emit: o2, slots: s2 }) {
|
|
35
|
+
const c2 = t(S("weekdays")), u2 = t(null), i2 = t(null), D2 = t(null), h2 = t(null), p2 = t(0), m2 = e(() => T2.monthsData.slice(T2.defaultRange[0], T2.defaultRange[1])), d2 = e(() => s2.btn), y2 = e(() => s2.topInfo), w2 = e(() => s2.bottomInfo), T2 = a({ yearMonthTitle: "", defaultRange: [], currDate: "", propStartDate: "", propEndDate: "", unLoadPrev: false, touchParams: { startY: 0, endY: 0, startTime: 0, endTime: 0, lastY: 0, lastTime: 0 }, transformY: 0, translateY: 0, scrollDistance: 0, defaultData: [], chooseData: [], monthsData: [], dayPrefix: "calendar-month-day", startData: "", endData: "", isRange: l2.type === "range", timer: 0, currentIndex: 0, avgHeight: 0, monthsNum: 0 }), b2 = (t2) => t2.split("-"), x2 = (t2) => v.isEqual(T2.currDate[0], t2), $2 = (t2) => v.isEqual(T2.currDate[1], t2), k2 = (t2, e2) => e2.curData[0] + "-" + e2.curData[1] + "-" + v.getNumTwoBit(+t2.day), A2 = (t2, e2) => {
|
|
36
|
+
const a2 = k2(t2, e2), { type: r2 } = l2;
|
|
37
|
+
return t2.type == "curr" ? v.isEqual(T2.currDate, a2) || r2 == "range" && (x2(a2) || $2(a2)) || r2 == "multiple" && ((t3) => T2.currDate.length > 0 && T2.currDate.some((e3) => v.isEqual(e3, t3)))(a2) ? `${T2.dayPrefix}-active` : T2.propStartDate && v.compareDate(a2, T2.propStartDate) || T2.propEndDate && v.compareDate(T2.propEndDate, a2) ? `${T2.dayPrefix}-disabled` : r2 == "range" && Array.isArray(T2.currDate) && Object.values(T2.currDate).length == 2 && v.compareDate(T2.currDate[0], a2) && v.compareDate(a2, T2.currDate[1]) ? `${T2.dayPrefix}-choose` : null : `${T2.dayPrefix}-disabled`;
|
|
38
|
+
}, H2 = () => {
|
|
39
|
+
const { type: t2 } = l2;
|
|
40
|
+
if (t2 == "range" && T2.chooseData.length == 2 || t2 != "range") {
|
|
41
|
+
let t3 = T2.chooseData.slice(0);
|
|
42
|
+
o2("choose", t3), l2.poppable && o2("update");
|
|
43
|
+
}
|
|
44
|
+
}, I2 = (t2, e2, a2) => {
|
|
45
|
+
if (A2(t2, e2) != `${T2.dayPrefix}-disabled`) {
|
|
46
|
+
const { type: r2 } = l2;
|
|
47
|
+
let n2 = [...e2.curData];
|
|
48
|
+
if (n2[2] = typeof t2.day == "number" ? v.getNumTwoBit(t2.day) : t2.day, n2[3] = `${n2[0]}-${n2[1]}-${n2[2]}`, n2[4] = v.getWhatDay(+n2[0], +n2[1], +n2[2]), r2 == "multiple")
|
|
49
|
+
if (T2.currDate.length > 0) {
|
|
50
|
+
let t3 = "";
|
|
51
|
+
T2.currDate.forEach((e3, a3) => {
|
|
52
|
+
e3 == n2[3] && (t3 = a3);
|
|
53
|
+
}), a2 ? T2.chooseData.push([...n2]) : t3 !== "" ? (T2.currDate.splice(t3, 1), T2.chooseData.splice(t3, 1)) : (T2.currDate.push(n2[3]), T2.chooseData.push([...n2]));
|
|
54
|
+
} else
|
|
55
|
+
T2.currDate = [n2[3]], T2.chooseData = [[...n2]];
|
|
56
|
+
else if (r2 == "range") {
|
|
57
|
+
let t3 = Object.values(T2.currDate).length;
|
|
58
|
+
t3 == 2 || t3 == 0 ? T2.currDate = [n2[3]] : v.compareDate(T2.currDate[0], n2[3]) ? Array.isArray(T2.currDate) && T2.currDate.push(n2[3]) : Array.isArray(T2.currDate) && T2.currDate.unshift(n2[3]), T2.chooseData.length != 2 && T2.chooseData.length ? v.compareDate(T2.chooseData[0][3], n2[3]) ? T2.chooseData = [...T2.chooseData, [...n2]] : T2.chooseData = [[...n2], ...T2.chooseData] : T2.chooseData = [[...n2]];
|
|
59
|
+
} else
|
|
60
|
+
T2.currDate = n2[3], T2.chooseData = [...n2];
|
|
61
|
+
a2 || (o2("select", T2.chooseData), !l2.isAutoBackFill && l2.poppable || H2());
|
|
62
62
|
}
|
|
63
|
-
},
|
|
64
|
-
const e2 = t2 == "prev" ?
|
|
63
|
+
}, E2 = (t2) => {
|
|
64
|
+
const e2 = t2 == "prev" ? T2.monthsData[0] : T2.monthsData[T2.monthsData.length - 1];
|
|
65
65
|
let a2 = parseInt(e2.curData[0]), r2 = parseInt(e2.curData[1].toString().replace(/^0/, ""));
|
|
66
66
|
switch (t2) {
|
|
67
67
|
case "prev":
|
|
@@ -70,68 +70,105 @@ const w = { isLeapYear: function(t2) {
|
|
|
70
70
|
case "next":
|
|
71
71
|
r2 == 12 && (a2 += 1), r2 = r2 == 12 ? 1 : ++r2;
|
|
72
72
|
}
|
|
73
|
-
return [a2,
|
|
74
|
-
},
|
|
73
|
+
return [a2, v.getNumTwoBit(r2), v.getMonthDays(String(a2), String(r2))];
|
|
74
|
+
}, B2 = (t2, e2, a2) => {
|
|
75
75
|
let { year: r2, month: n2 } = a2;
|
|
76
76
|
return e2 == "prev" && t2 >= 7 && (t2 -= 7), Array.from(Array(t2), (t3, a3) => ({ day: a3 + 1, type: e2, year: r2, month: n2 }));
|
|
77
|
-
},
|
|
78
|
-
let { year: n2, month:
|
|
79
|
-
return e2 == "prev" && t2 >= 7 && (t2 -= 7), Array.from(Array(r2), (t3, a3) => ({ day: a3 + 1, type: e2, year: n2, month:
|
|
80
|
-
},
|
|
81
|
-
const a2 =
|
|
77
|
+
}, N2 = (t2, e2, a2, r2) => {
|
|
78
|
+
let { year: n2, month: l3 } = a2;
|
|
79
|
+
return e2 == "prev" && t2 >= 7 && (t2 -= 7), Array.from(Array(r2), (t3, a3) => ({ day: a3 + 1, type: e2, year: n2, month: l3 })).slice(r2 - t2);
|
|
80
|
+
}, P2 = (t2, e2) => {
|
|
81
|
+
const a2 = v.getMonthPreDay(+t2[0], +t2[1]);
|
|
82
82
|
let r2 = t2[1] - 1, n2 = t2[0];
|
|
83
83
|
r2 <= 0 && (r2 = 12, n2 += 1);
|
|
84
|
-
const
|
|
84
|
+
const l3 = v.getMonthDays(t2[0], t2[1]), o3 = v.getMonthDays(n2 + "", r2 + ""), s3 = { year: t2[0], month: t2[1] }, c3 = { curData: t2, title: S("monthTitle", s3.year, s3.month), monthData: [...N2(a2, "prev", { month: r2, year: n2 }, o3), ...B2(l3, "curr", s3)] };
|
|
85
85
|
c3.cssHeight = 39 + (c3.monthData.length > 35 ? 384 : 320);
|
|
86
|
-
let
|
|
87
|
-
|
|
86
|
+
let u3 = 0;
|
|
87
|
+
T2.monthsData.length > 0 && (u3 = T2.monthsData[T2.monthsData.length - 1].cssScrollHeight + T2.monthsData[T2.monthsData.length - 1].cssHeight), c3.cssScrollHeight = u3, e2 == "next" ? T2.endData && v.compareDate(`${T2.endData[0]}-${T2.endData[1]}-${v.getMonthDays(T2.endData[0], T2.endData[1])}`, `${t2[0]}-${t2[1]}-${t2[2]}`) || T2.monthsData.push(c3) : T2.startData && v.compareDate(`${t2[0]}-${t2[1]}-${t2[2]}`, `${T2.startData[0]}-${T2.startData[1]}-01`) ? T2.unLoadPrev = true : T2.monthsData.unshift(c3);
|
|
88
88
|
}, M2 = () => {
|
|
89
|
-
let t2 =
|
|
90
|
-
|
|
91
|
-
const a2 = Number(
|
|
92
|
-
let o3 = Number(
|
|
93
|
-
n2 - a2 > 0 && (o3 += 12 * (n2 - a2)),
|
|
94
|
-
let
|
|
89
|
+
let t2 = l2.startDate ? l2.startDate : v.getDay(0), e2 = l2.endDate ? l2.endDate : v.getDay(365);
|
|
90
|
+
T2.propStartDate = t2, T2.propEndDate = e2, T2.startData = b2(t2), T2.endData = b2(e2), (l2.defaultValue || Array.isArray(l2.defaultValue) && l2.defaultValue.length > 0) && (T2.currDate = l2.type != "one" ? [...l2.defaultValue] : l2.defaultValue);
|
|
91
|
+
const a2 = Number(T2.startData[0]), r2 = Number(T2.startData[1]), n2 = Number(T2.endData[0]);
|
|
92
|
+
let o3 = Number(T2.endData[1]) - r2;
|
|
93
|
+
n2 - a2 > 0 && (o3 += 12 * (n2 - a2)), o3 <= 0 && (o3 = 1), P2(T2.startData, "next");
|
|
94
|
+
let s3 = 1;
|
|
95
95
|
do {
|
|
96
|
-
|
|
97
|
-
} while (
|
|
98
|
-
|
|
96
|
+
P2(E2("next"), "next");
|
|
97
|
+
} while (s3++ < o3);
|
|
98
|
+
if (T2.monthsNum = o3, l2.type == "range" && Array.isArray(T2.currDate))
|
|
99
|
+
T2.currDate.length > 0 && (t2 && v.compareDate(T2.currDate[0], t2) && T2.currDate.splice(0, 1, t2), e2 && v.compareDate(e2, T2.currDate[1]) && T2.currDate.splice(1, 1, e2), T2.defaultData = [...b2(T2.currDate[0]), ...b2(T2.currDate[1])]);
|
|
100
|
+
else if (l2.type == "multiple" && Array.isArray(T2.currDate)) {
|
|
101
|
+
if (T2.currDate.length > 0) {
|
|
102
|
+
let a3 = [], r3 = {};
|
|
103
|
+
T2.currDate.forEach((n3, l3) => {
|
|
104
|
+
t2 && !v.compareDate(n3, t2) && e2 && !v.compareDate(e2, n3) && (r3.hasOwnProperty(n3) || (a3.push(n3), r3[n3] = n3));
|
|
105
|
+
}), T2.currDate = [...a3], T2.defaultData = [...b2(a3[0])];
|
|
106
|
+
}
|
|
107
|
+
} else
|
|
108
|
+
T2.currDate && (t2 && v.compareDate(T2.currDate, t2) ? T2.currDate = t2 : e2 && !v.compareDate(T2.currDate, e2) && (T2.currDate = e2), T2.defaultData = [...b2(T2.currDate)]);
|
|
99
109
|
let c3 = 0, D3 = 0;
|
|
100
|
-
|
|
101
|
-
t3.title ==
|
|
102
|
-
}),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
T2.defaultData.length > 0 && T2.monthsData.forEach((t3, e3) => {
|
|
111
|
+
t3.title == S("monthTitle", T2.defaultData[0], T2.defaultData[1]) && (c3 = e3), l2.type == "range" && t3.title == S("monthTitle", T2.defaultData[3], T2.defaultData[4]) && (D3 = e3);
|
|
112
|
+
}), Y2(o3, c3), T2.currentIndex = c3, T2.yearMonthTitle = T2.monthsData[T2.currentIndex].title, T2.defaultData.length > 0 && (l2.type == "range" ? (I2({ day: T2.defaultData[2], type: "curr" }, T2.monthsData[T2.currentIndex], true), I2({ day: T2.defaultData[5], type: "curr" }, T2.monthsData[D3], true)) : l2.type == "multiple" ? [...T2.currDate].forEach((t3) => {
|
|
113
|
+
let e3 = b2(t3), a3 = T2.currentIndex;
|
|
114
|
+
T2.monthsData.forEach((t4, r3) => {
|
|
115
|
+
t4.title == S("monthTitle", e3[0], e3[1]) && (a3 = r3);
|
|
116
|
+
}), I2({ day: e3[2], type: "curr" }, T2.monthsData[a3], true);
|
|
117
|
+
}) : I2({ day: T2.defaultData[2], type: "curr" }, T2.monthsData[T2.currentIndex], true));
|
|
118
|
+
let m3 = T2.monthsData[T2.monthsData.length - 1], d3 = m3.cssHeight + m3.cssScrollHeight;
|
|
119
|
+
f(() => {
|
|
120
|
+
(u2 == null ? void 0 : u2.value) && (i2 == null ? void 0 : i2.value) && (h2 == null ? void 0 : h2.value) && (p2.value = u2.value.clientHeight, i2.value.style.height = `${d3}px`, u2.value.scrollTop = T2.monthsData[T2.currentIndex].cssScrollHeight);
|
|
121
|
+
}), T2.avgHeight = Math.floor(d3 / (o3 + 1));
|
|
122
|
+
};
|
|
123
|
+
g({ scrollToDate: (t2) => {
|
|
124
|
+
v.compareDate(t2, T2.propStartDate) ? t2 = T2.propStartDate : v.compareDate(t2, T2.propEndDate) || (t2 = T2.propEndDate);
|
|
125
|
+
let e2 = b2(t2);
|
|
126
|
+
T2.monthsData.forEach((t3, a2) => {
|
|
127
|
+
if (t3.title == S("monthTitle", e2[0], e2[1]) && u2.value) {
|
|
128
|
+
let t4 = T2.monthsData[a2].cssScrollHeight - u2.value.scrollTop;
|
|
129
|
+
if (l2.toDateAnimation) {
|
|
130
|
+
let e3 = 0, r2 = setInterval(() => {
|
|
131
|
+
if (e3++, u2.value) {
|
|
132
|
+
let e4 = t4 / 10;
|
|
133
|
+
u2.value.scrollTop = u2.value.scrollTop + e4;
|
|
134
|
+
}
|
|
135
|
+
e3 >= 10 && (clearInterval(r2), u2.value && (u2.value.scrollTop = T2.monthsData[a2].cssScrollHeight));
|
|
136
|
+
}, 40);
|
|
137
|
+
} else
|
|
138
|
+
u2.value.scrollTop = T2.monthsData[a2].cssScrollHeight;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
} });
|
|
142
|
+
const Y2 = (t2, e2) => {
|
|
143
|
+
t2 >= 3 ? e2 > 0 && e2 < t2 ? T2.defaultRange = [e2 - 1, e2 + 3] : e2 == 0 ? T2.defaultRange = [e2, e2 + 4] : e2 == t2 && (T2.defaultRange = [e2 - 2, e2 + 2]) : T2.defaultRange = [0, t2 + 2];
|
|
144
|
+
let a2 = T2.monthsData[T2.defaultRange[0]].cssScrollHeight;
|
|
145
|
+
T2.translateY = a2;
|
|
146
|
+
}, C2 = (t2, e2) => l2.type == "range" && t2.type == "curr" && A2(t2, e2) == "calendar-month-day-active";
|
|
147
|
+
return M2(), r(() => l2.defaultValue, (t2) => {
|
|
148
|
+
t2 && l2.poppable && (T2.chooseData.splice(0), T2.monthsData.splice(0), M2());
|
|
149
|
+
}), { weeks: c2, compConthsData: m2, showTopBtn: d2, topInfo: y2, bottomInfo: w2, rangeTip: (t2, e2) => {
|
|
150
|
+
if (T2.currDate.length >= 2)
|
|
151
|
+
return v.isEqual(T2.currDate[0], T2.currDate[1]);
|
|
117
152
|
}, mothsViewScroll: (t2) => {
|
|
153
|
+
if (T2.monthsData.length <= 1)
|
|
154
|
+
return;
|
|
118
155
|
const e2 = t2.target.scrollTop;
|
|
119
|
-
let a2 = Math.floor(e2 /
|
|
156
|
+
let a2 = Math.floor(e2 / T2.avgHeight);
|
|
120
157
|
if (a2 == 0)
|
|
121
|
-
e2 >=
|
|
122
|
-
else if (a2 > 0 && a2 <
|
|
123
|
-
e2 >=
|
|
158
|
+
e2 >= T2.monthsData[a2 + 1].cssScrollHeight && (a2 += 1);
|
|
159
|
+
else if (a2 > 0 && a2 < T2.monthsNum - 1)
|
|
160
|
+
e2 >= T2.monthsData[a2 + 1].cssScrollHeight && (a2 += 1), e2 < T2.monthsData[a2].cssScrollHeight && (a2 -= 1);
|
|
124
161
|
else {
|
|
125
|
-
const t3 = Math.round(e2 +
|
|
126
|
-
t3 <
|
|
162
|
+
const t3 = Math.round(e2 + p2.value);
|
|
163
|
+
t3 < T2.monthsData[a2].cssScrollHeight + T2.monthsData[a2].cssHeight && e2 > T2.monthsData[a2 - 1].cssScrollHeight && (a2 -= 1), a2 + 1 <= T2.monthsNum && t3 >= T2.monthsData[a2 + 1].cssScrollHeight + T2.monthsData[a2 + 1].cssHeight && (a2 += 1), a2 >= 1 && e2 < T2.monthsData[a2 - 1].cssScrollHeight && (a2 -= 1);
|
|
127
164
|
}
|
|
128
|
-
|
|
129
|
-
}, getClass:
|
|
165
|
+
T2.currentIndex !== a2 && (T2.currentIndex = a2, Y2(T2.monthsNum, a2)), T2.yearMonthTitle = T2.monthsData[a2].title;
|
|
166
|
+
}, getClass: A2, isStartTip: (t2, e2) => C2(t2, e2) && x2(k2(t2, e2)), isEndTip: (t2, e2) => !!(T2.currDate.length >= 2 && $2(k2(t2, e2))) && C2(t2, e2), chooseDay: I2, isCurrDay: (t2) => {
|
|
130
167
|
const e2 = `${t2.year}-${t2.month}-${t2.day < 10 ? "0" + t2.day : t2.day}`;
|
|
131
|
-
return
|
|
132
|
-
}, confirm:
|
|
133
|
-
} }),
|
|
134
|
-
var
|
|
135
|
-
return
|
|
168
|
+
return v.isEqual(e2, v.date2Str(new Date()));
|
|
169
|
+
}, confirm: H2, monthsPanel: i2, months: u2, weeksPanel: D2, viewArea: h2, ...n(T2), ...n(l2), translate: S };
|
|
170
|
+
} }), x = { key: 0, class: "calendar-title" }, $ = { key: 1, class: "calendar-top-slot" }, k = { key: 2, class: "calendar-curr-month" }, A = { class: "calendar-weeks", ref: "weeksPanel" }, H = { class: "calendar-months-panel", ref: "monthsPanel" }, I = { class: "calendar-month-title" }, E = { class: "calendar-month-con" }, B = ["onClick"], N = { class: "calendar-day" }, P = { key: 0, class: "calendar-curr-tips calendar-curr-tips-top" }, M = { key: 1, class: "calendar-curr-tips calendar-curr-tips-bottom" }, Y = { key: 2, class: "calendar-curr-tip-curr" }, C = { key: 4, class: "calendar-day-tip" }, V = { key: 0, class: "nut-calendar-footer" };
|
|
171
|
+
var R = w(b, [["render", function(t2, e2, a2, r2, n2, y2) {
|
|
172
|
+
return l(), o("view", { class: s(["nut-calendar nut-calendar-taro", { "nut-calendar-tile": !t2.poppable, "nut-calendar-nofooter": t2.isAutoBackFill }]) }, [c("view", { class: s(["nut-calendar-header", { "nut-calendar-header-tile": !t2.poppable }]) }, [t2.showTitle ? (l(), o("view", x, u(t2.title || t2.translate("title")), 1)) : i("", true), t2.showTopBtn ? (l(), o("view", $, [D(t2.$slots, "btn")])) : i("", true), t2.showSubTitle ? (l(), o("view", k, u(t2.yearMonthTitle), 1)) : i("", true), c("view", A, [(l(true), o(h, null, p(t2.weeks, (t3, e3) => (l(), o("view", { class: "calendar-week-item", key: e3 }, u(t3), 1))), 128))], 512)], 2), c("view", { class: "nut-calendar-content", ref: "months", onScroll: e2[0] || (e2[0] = (...e3) => t2.mothsViewScroll && t2.mothsViewScroll(...e3)) }, [c("view", H, [c("view", { class: "viewArea", ref: "viewArea", style: m({ transform: `translateY(${t2.translateY}px)` }) }, [(l(true), o(h, null, p(t2.compConthsData, (e3, a3) => (l(), o("view", { class: "calendar-month", key: a3 }, [c("view", I, u(e3.title), 1), c("view", E, [c("view", { class: s(["calendar-month-item", t2.type === "range" ? "month-item-range" : ""]) }, [(l(true), o(h, null, p(e3.monthData, (a4, r3) => (l(), o("view", { key: r3, class: s(["calendar-month-day", t2.getClass(a4, e3)]), onClick: (r4) => t2.chooseDay(a4, e3) }, [c("view", N, [D(t2.$slots, "day", { date: a4.type == "curr" ? a4 : "" }, () => [d(u(a4.type == "curr" ? a4.day : ""), 1)])]), t2.topInfo ? (l(), o("view", P, [D(t2.$slots, "topInfo", { date: a4.type == "curr" ? a4 : "" })])) : i("", true), t2.bottomInfo ? (l(), o("view", M, [D(t2.$slots, "bottomInfo", { date: a4.type == "curr" ? a4 : "" })])) : i("", true), !t2.bottomInfo && t2.showToday && t2.isCurrDay(a4) ? (l(), o("view", Y, u(t2.translate("today")), 1)) : i("", true), t2.isStartTip(a4, e3) ? (l(), o("view", { key: 3, class: s(["calendar-day-tip", { "calendar-curr-tips-top": t2.rangeTip(a4, e3) }]) }, u(t2.startText || t2.translate("start")), 3)) : i("", true), t2.isEndTip(a4, e3) ? (l(), o("view", C, u(t2.endText || t2.translate("end")), 1)) : i("", true)], 10, B))), 128))], 2)])]))), 128))], 4)], 512)], 544), t2.poppable && !t2.isAutoBackFill ? (l(), o("view", V, [c("view", { class: "calendar-confirm-btn", onClick: e2[1] || (e2[1] = (...e3) => t2.confirm && t2.confirm(...e3)) }, u(t2.confirmText || t2.translate("confirm")), 1)])) : i("", true)], 2);
|
|
136
173
|
}]]);
|
|
137
|
-
export { C,
|
|
174
|
+
export { R as C, v as U };
|
package/dist/packages/_es/raf.js
CHANGED