@nutui/nutui 3.1.18 → 3.1.19-beta.2
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/README.md +9 -8
- package/dist/nutui.es.js +12360 -12238
- package/dist/nutui.umd.js +12367 -12245
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +125 -0
- 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 +8 -684
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.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 +13 -3
- 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 +1 -1
- package/dist/packages/_es/Dialog.js +10 -9
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Elevator.js +2 -2
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +6 -7
- package/dist/packages/_es/Form.js +2 -6
- 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/ImagePreview.js +2 -2
- package/dist/packages/_es/Indicator.js +1 -1
- 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/List.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +9 -4
- package/dist/packages/_es/OldPicker.js +484 -0
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +8 -7
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +13 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +2 -2
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +6 -5
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +2 -3
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +2 -2
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -2
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +7 -3
- package/dist/packages/_es/Table.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 +1 -1
- package/dist/packages/_es/Uploader.js +1 -1
- package/dist/packages/_es/Video.js +7 -6
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +135 -3
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +8 -31
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +692 -0
- 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/uploader/index.scss +2 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +65 -65
- package/dist/styles/themes/jdt.scss +65 -65
- package/dist/styles/variables-jdt.scss +2 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/__VUE/actionsheet/index.d.ts +269 -0
- package/dist/types/__VUE/address/index.d.ts +386 -0
- package/dist/types/__VUE/audio/index.d.ts +92 -0
- package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
- package/dist/types/__VUE/avatar/index.d.ts +66 -0
- package/dist/types/__VUE/backtop/index.d.ts +105 -0
- package/dist/types/__VUE/badge/index.d.ts +94 -0
- package/dist/types/__VUE/barrage/index.d.ts +80 -0
- package/dist/types/__VUE/button/index.d.ts +116 -0
- package/dist/types/__VUE/calendar/index.d.ts +155 -0
- package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
- package/dist/types/__VUE/card/index.d.ts +81 -0
- package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
- package/dist/types/__VUE/cascader/helper.d.ts +8 -0
- package/dist/types/__VUE/cascader/index.d.ts +76 -0
- package/dist/types/__VUE/cascader/tree.d.ts +17 -0
- package/dist/types/__VUE/cascader/types.d.ts +30 -0
- package/dist/types/__VUE/cell/index.d.ts +109 -0
- package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
- package/dist/types/__VUE/checkbox/index.d.ts +102 -0
- package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
- package/dist/types/__VUE/col/index.d.ts +42 -0
- package/dist/types/__VUE/collapse/index.d.ts +104 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
- package/dist/types/__VUE/countdown/index.d.ts +90 -0
- package/dist/types/__VUE/countup/index.d.ts +216 -0
- package/dist/types/__VUE/datepicker/index.d.ts +347 -0
- package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
- package/dist/types/__VUE/dialog/index.d.ts +306 -0
- package/dist/types/__VUE/divider/index.d.ts +47 -0
- package/dist/types/__VUE/drag/index.d.ts +61 -0
- package/dist/types/__VUE/elevator/index.d.ts +71 -0
- package/dist/types/__VUE/empty/index.d.ts +46 -0
- package/dist/types/__VUE/fixednav/index.d.ts +96 -0
- package/dist/types/__VUE/form/common.d.ts +20 -0
- package/dist/types/__VUE/form/index.d.ts +32 -0
- package/dist/types/__VUE/form/types.d.ts +13 -0
- package/dist/types/__VUE/formitem/index.d.ts +120 -0
- package/dist/types/__VUE/formitem/types.d.ts +10 -0
- package/dist/types/__VUE/grid/common.d.ts +91 -0
- package/dist/types/__VUE/grid/index.d.ts +100 -0
- package/dist/types/__VUE/griditem/index.d.ts +80 -0
- package/dist/types/__VUE/icon/index.d.ts +74 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
- package/dist/types/__VUE/indicator/index.d.ts +70 -0
- package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
- package/dist/types/__VUE/input/index.d.ts +336 -0
- package/dist/types/__VUE/input/util.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
- package/dist/types/__VUE/layout/index.d.ts +13 -0
- package/dist/types/__VUE/list/index.d.ts +48 -0
- package/dist/types/__VUE/menu/index.d.ts +51 -0
- package/dist/types/__VUE/menuitem/index.d.ts +77 -0
- package/dist/types/__VUE/navbar/index.d.ts +84 -0
- package/dist/types/__VUE/noticebar/index.d.ts +209 -0
- package/dist/types/__VUE/notify/index.d.ts +103 -0
- package/dist/types/__VUE/numberkeyboard/index.d.ts +123 -0
- package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
- package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
- package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
- package/dist/types/__VUE/overlay/index.d.ts +1614 -0
- package/dist/types/__VUE/pagination/index.d.ts +112 -0
- package/dist/types/__VUE/picker/Column.d.ts +90 -0
- package/dist/types/__VUE/picker/index.d.ts +342 -0
- package/dist/types/__VUE/picker/types.d.ts +26 -0
- package/dist/types/__VUE/popover/index.d.ts +233 -0
- package/dist/types/__VUE/popup/index.d.ts +1734 -0
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
- package/dist/types/__VUE/price/index.d.ts +87 -0
- package/dist/types/__VUE/progress/index.d.ts +137 -0
- package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
- package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
- package/dist/types/__VUE/radio/index.d.ts +90 -0
- package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
- package/dist/types/__VUE/range/index.d.ts +156 -0
- package/dist/types/__VUE/rate/index.d.ts +142 -0
- package/dist/types/__VUE/row/index.d.ts +63 -0
- package/dist/types/__VUE/searchbar/index.d.ts +100 -0
- package/dist/types/__VUE/shortpassword/index.d.ts +136 -0
- package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
- package/dist/types/__VUE/signature/index.d.ts +73 -0
- package/dist/types/__VUE/skeleton/common.d.ts +63 -0
- package/dist/types/__VUE/skeleton/index.d.ts +117 -0
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
- package/dist/types/__VUE/sku/index.d.ts +300 -0
- package/dist/types/__VUE/step/index.d.ts +70 -0
- package/dist/types/__VUE/steps/index.d.ts +47 -0
- package/dist/types/__VUE/sticky/index.d.ts +63 -0
- package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
- package/dist/types/__VUE/swipe/index.d.ts +69 -0
- package/dist/types/__VUE/swiper/index.d.ts +163 -0
- package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
- package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
- package/dist/types/__VUE/switch/index.d.ts +136 -0
- package/dist/types/__VUE/tabbar/index.d.ts +84 -0
- package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
- package/dist/types/__VUE/table/common.d.ts +54 -0
- package/dist/types/__VUE/table/index.d.ts +75 -0
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
- package/dist/types/__VUE/table/types.d.ts +19 -0
- package/dist/types/__VUE/tabpane/index.d.ts +47 -0
- package/dist/types/__VUE/tabs/index.d.ts +128 -0
- package/dist/types/__VUE/tag/index.d.ts +89 -0
- package/dist/types/__VUE/textarea/index.d.ts +120 -0
- package/dist/types/__VUE/timedetail/index.d.ts +48 -0
- package/dist/types/__VUE/timepannel/index.d.ts +43 -0
- package/dist/types/__VUE/timeselect/index.d.ts +82 -0
- package/dist/types/__VUE/toast/index.d.ts +149 -0
- package/dist/types/__VUE/uploader/index.d.ts +258 -0
- package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
- package/dist/types/__VUE/video/index.d.ts +123 -0
- package/dist/{index.d.ts → types/index.d.ts} +0 -0
- package/dist/types/nutui.d.ts +92 -0
- package/package.json +14 -5
- package/dist/nutui.d.ts +0 -103
- package/dist/packages/_es/util.js +0 -47
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import { u as useRouter } from "./index.js";
|
|
8
|
-
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
8
|
+
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { create } = createComponent("tabbar-item");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -111,6 +111,7 @@ const _hoisted_4 = {
|
|
|
111
111
|
class: "nut-tabbar-item_icon-box_dot"
|
|
112
112
|
};
|
|
113
113
|
const _hoisted_5 = { key: 2 };
|
|
114
|
+
const _hoisted_6 = { key: 0 };
|
|
114
115
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
115
116
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
116
117
|
return openBlock(), createElementBlock("div", {
|
|
@@ -145,7 +146,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
145
146
|
}, null, 4)) : createCommentVNode("", true),
|
|
146
147
|
createElementVNode("view", {
|
|
147
148
|
class: normalizeClass(["nut-tabbar-item_icon-box_nav-word", { "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg }])
|
|
148
|
-
},
|
|
149
|
+
}, [
|
|
150
|
+
_ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true),
|
|
151
|
+
!_ctx.tabTitle ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true)
|
|
152
|
+
], 2)
|
|
149
153
|
])
|
|
150
154
|
], 6);
|
|
151
155
|
}
|
|
@@ -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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2022 @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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -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.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2022 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
|
@@ -18,14 +18,14 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
|
-
const { create } = createComponent("video");
|
|
28
|
+
const { create, translate } = createComponent("video");
|
|
29
29
|
const _sfc_main = create({
|
|
30
30
|
props: {
|
|
31
31
|
source: {
|
|
@@ -243,7 +243,8 @@ const _sfc_main = create({
|
|
|
243
243
|
touchSlidMove,
|
|
244
244
|
touchSlidEnd,
|
|
245
245
|
retry,
|
|
246
|
-
fullScreen
|
|
246
|
+
fullScreen,
|
|
247
|
+
translate
|
|
247
248
|
});
|
|
248
249
|
}
|
|
249
250
|
});
|
|
@@ -269,7 +270,7 @@ const _hoisted_9 = {
|
|
|
269
270
|
};
|
|
270
271
|
const _hoisted_10 = { class: "duration-time" };
|
|
271
272
|
const _hoisted_11 = { class: "nut-video-error" };
|
|
272
|
-
const _hoisted_12 =
|
|
273
|
+
const _hoisted_12 = { class: "lose" };
|
|
273
274
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
274
275
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
275
276
|
createElementVNode("video", {
|
|
@@ -341,11 +342,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
341
342
|
[vShow, _ctx.showToolbox && !_ctx.isDisabled]
|
|
342
343
|
]),
|
|
343
344
|
withDirectives(createElementVNode("div", _hoisted_11, [
|
|
344
|
-
_hoisted_12,
|
|
345
|
+
createElementVNode("p", _hoisted_12, toDisplayString(_ctx.translate("errorTip")), 1),
|
|
345
346
|
createElementVNode("p", {
|
|
346
347
|
class: "retry",
|
|
347
348
|
onClick: _cache[9] || (_cache[9] = (...args) => _ctx.retry && _ctx.retry(...args))
|
|
348
|
-
}, "
|
|
349
|
+
}, toDisplayString(_ctx.translate("clickRetry")), 1)
|
|
349
350
|
], 512), [
|
|
350
351
|
[vShow, _ctx.state.isError]
|
|
351
352
|
])
|
|
@@ -1,13 +1,145 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { defineComponent } from "vue";
|
|
6
|
+
import { ref, reactive, defineComponent } from "vue";
|
|
7
|
+
const lang$1 = {
|
|
8
|
+
name: "\u59D3\u540D",
|
|
9
|
+
tel: "\u7535\u8BDD",
|
|
10
|
+
save: "\u4FDD\u5B58",
|
|
11
|
+
confirm: "\u786E\u5B9A",
|
|
12
|
+
cancel: "\u53D6\u6D88",
|
|
13
|
+
delete: "\u5220\u9664",
|
|
14
|
+
loading: "\u52A0\u8F7D\u4E2D...",
|
|
15
|
+
video: {
|
|
16
|
+
errorTip: "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25",
|
|
17
|
+
clickRetry: "\u70B9\u51FB\u91CD\u8BD5"
|
|
18
|
+
},
|
|
19
|
+
searchbar: {
|
|
20
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
21
|
+
},
|
|
22
|
+
fixednav: {
|
|
23
|
+
activeText: "\u6536\u8D77\u5BFC\u822A",
|
|
24
|
+
unActiveText: "\u5FEB\u901F\u5BFC\u822A"
|
|
25
|
+
},
|
|
26
|
+
pagination: {
|
|
27
|
+
prev: "\u4E0A\u4E00\u9875",
|
|
28
|
+
next: "\u4E0B\u4E00\u9875"
|
|
29
|
+
},
|
|
30
|
+
calendaritem: {
|
|
31
|
+
weekdays: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
|
|
32
|
+
confirm: "\u786E\u8BA4",
|
|
33
|
+
end: "\u7ED3\u675F",
|
|
34
|
+
start: "\u5F00\u59CB",
|
|
35
|
+
title: "\u65E5\u5386\u9009\u62E9",
|
|
36
|
+
monthTitle: (year, month) => `${year}\u5E74${month}\u6708`,
|
|
37
|
+
today: "\u4ECA\u5929"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const lang = {
|
|
41
|
+
name: "Name",
|
|
42
|
+
tel: "Phone",
|
|
43
|
+
save: "Save",
|
|
44
|
+
confirm: "Confirm",
|
|
45
|
+
cancel: "Cancel",
|
|
46
|
+
delete: "Delete",
|
|
47
|
+
loading: "Loading...",
|
|
48
|
+
video: {
|
|
49
|
+
errorTip: "Error Tip",
|
|
50
|
+
clickRetry: "Click Retry"
|
|
51
|
+
},
|
|
52
|
+
searchbar: {
|
|
53
|
+
placeholder: "Placeholder"
|
|
54
|
+
},
|
|
55
|
+
fixednav: {
|
|
56
|
+
activeText: "Close Nav",
|
|
57
|
+
unActiveText: "Open Nav"
|
|
58
|
+
},
|
|
59
|
+
pagination: {
|
|
60
|
+
prev: "Previous",
|
|
61
|
+
next: "Next"
|
|
62
|
+
},
|
|
63
|
+
calendaritem: {
|
|
64
|
+
weekdays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
65
|
+
confirm: "Confirm",
|
|
66
|
+
end: "End",
|
|
67
|
+
start: "Start",
|
|
68
|
+
title: "Calendar",
|
|
69
|
+
monthTitle: (year, month) => `${year}/${month}`,
|
|
70
|
+
today: "Today"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const currentLang = ref("en-US");
|
|
74
|
+
const langs = reactive({
|
|
75
|
+
"zh-CN": lang$1,
|
|
76
|
+
"en-US": lang
|
|
77
|
+
});
|
|
78
|
+
class Locale {
|
|
79
|
+
static languages() {
|
|
80
|
+
return langs[currentLang.value];
|
|
81
|
+
}
|
|
82
|
+
static use(lang2) {
|
|
83
|
+
currentLang.value = lang2;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const TypeOfFun = (value) => {
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return "null";
|
|
89
|
+
}
|
|
90
|
+
const type = typeof value;
|
|
91
|
+
if (type === "undefined" || type === "string") {
|
|
92
|
+
return type;
|
|
93
|
+
}
|
|
94
|
+
const typeString = toString.call(value);
|
|
95
|
+
switch (typeString) {
|
|
96
|
+
case "[object Array]":
|
|
97
|
+
return "array";
|
|
98
|
+
case "[object Date]":
|
|
99
|
+
return "date";
|
|
100
|
+
case "[object Boolean]":
|
|
101
|
+
return "boolean";
|
|
102
|
+
case "[object Number]":
|
|
103
|
+
return "number";
|
|
104
|
+
case "[object Function]":
|
|
105
|
+
return "function";
|
|
106
|
+
case "[object RegExp]":
|
|
107
|
+
return "regexp";
|
|
108
|
+
case "[object Object]":
|
|
109
|
+
if (value.nodeType !== void 0) {
|
|
110
|
+
if (value.nodeType == 3) {
|
|
111
|
+
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
112
|
+
} else {
|
|
113
|
+
return "element";
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
return "object";
|
|
117
|
+
}
|
|
118
|
+
default:
|
|
119
|
+
return "unknow";
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const isFunction = (val) => typeof val === "function";
|
|
123
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
124
|
+
const isPromise = (val) => {
|
|
125
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
126
|
+
};
|
|
127
|
+
const getPropByPath = (obj, keyPath) => {
|
|
128
|
+
try {
|
|
129
|
+
return keyPath.split(".").reduce((prev, curr) => prev[curr], obj);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
};
|
|
7
134
|
function createComponent(name) {
|
|
135
|
+
const languages = Locale.languages();
|
|
8
136
|
const componentName = "nut-" + name;
|
|
9
137
|
return {
|
|
10
138
|
componentName,
|
|
139
|
+
translate(keyPath, ...args) {
|
|
140
|
+
const text = getPropByPath(languages, `${name.replace("-", "")}.${keyPath}`) || getPropByPath(languages, keyPath);
|
|
141
|
+
return isFunction(text) ? text(...args) : text;
|
|
142
|
+
},
|
|
11
143
|
create: function(_component) {
|
|
12
144
|
_component.baseName = name;
|
|
13
145
|
_component.name = componentName;
|
|
@@ -23,4 +155,4 @@ function createComponent(name) {
|
|
|
23
155
|
}
|
|
24
156
|
};
|
|
25
157
|
}
|
|
26
|
-
export { createComponent as c };
|
|
158
|
+
export { TypeOfFun as T, createComponent as c, getPropByPath as g, isPromise as i };
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
if (instance) {
|
|
10
|
-
Object.assign(instance.proxy, apis);
|
|
11
|
-
}
|
|
6
|
+
import { unref } from "vue";
|
|
7
|
+
function isWindow(val) {
|
|
8
|
+
return val === window;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
const useRect = (elementRef) => {
|
|
11
|
+
const element = unref(elementRef);
|
|
12
|
+
if (isWindow(element)) {
|
|
13
|
+
const width = element.innerWidth;
|
|
14
|
+
const height = element.innerHeight;
|
|
15
|
+
return {
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
right: width,
|
|
19
|
+
bottom: height,
|
|
20
|
+
width,
|
|
21
|
+
height
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (element && element.getBoundingClientRect) {
|
|
25
|
+
return element.getBoundingClientRect();
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
top: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
bottom: 0,
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export { useRect as u };
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const element = unref(elementRef);
|
|
12
|
-
if (isWindow(element)) {
|
|
13
|
-
const width = element.innerWidth;
|
|
14
|
-
const height = element.innerHeight;
|
|
15
|
-
return {
|
|
16
|
-
top: 0,
|
|
17
|
-
left: 0,
|
|
18
|
-
right: width,
|
|
19
|
-
bottom: height,
|
|
20
|
-
width,
|
|
21
|
-
height
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
if (element && element.getBoundingClientRect) {
|
|
25
|
-
return element.getBoundingClientRect();
|
|
6
|
+
import { getCurrentInstance } from "vue";
|
|
7
|
+
function useExpose(apis) {
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
if (instance) {
|
|
10
|
+
Object.assign(instance.proxy, apis);
|
|
26
11
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
left: 0,
|
|
30
|
-
right: 0,
|
|
31
|
-
bottom: 0,
|
|
32
|
-
width: 0,
|
|
33
|
-
height: 0
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export { useRect as u };
|
|
12
|
+
}
|
|
13
|
+
export { useExpose as u };
|