@nutui/nutui 4.0.0 → 4.0.1-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 +226 -0
- package/README.md +34 -65
- package/dist/nutui.es.js +10 -17
- package/dist/nutui.js +16202 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +79 -94
- package/dist/packages/_es/Address.js +260 -345
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +46 -38
- package/dist/packages/_es/Audio.js +128 -180
- package/dist/packages/_es/AudioOperate.js +60 -52
- package/dist/packages/_es/Avatar.js +67 -75
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +39 -46
- package/dist/packages/_es/Barrage.js +68 -145
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -152
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +323 -433
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -138
- package/dist/packages/_es/CheckboxGroup.js +38 -61
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +37 -67
- package/dist/packages/_es/CollapseItem.js +91 -184
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +38 -56
- package/dist/packages/_es/Countdown.js +100 -194
- package/dist/packages/_es/Countup.js +232 -428
- package/dist/packages/_es/DatePicker.js +169 -245
- package/dist/packages/_es/Dialog.js +163 -188
- package/dist/packages/_es/Divider.js +42 -40
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +144 -201
- package/dist/packages/_es/Ellipsis.js +95 -159
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +108 -164
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +98 -88
- package/dist/packages/_es/ImagePreview.js +262 -392
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -117
- package/dist/packages/_es/Input.js +176 -223
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +105 -113
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +147 -89
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -153
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +207 -273
- package/dist/packages/_es/Notify.js +110 -147
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +53 -66
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +276 -425
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +47 -80
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +96 -157
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +205 -329
- package/dist/packages/_es/Rate.js +93 -122
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -160
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -59
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -128
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +251 -326
- package/dist/packages/_es/Step.js +60 -69
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -56
- package/dist/packages/_es/Swipe.js +84 -137
- package/dist/packages/_es/Swiper.js +175 -310
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -67
- package/dist/packages/_es/TabPane.js +32 -20
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -81
- package/dist/packages/_es/Table.js +110 -148
- package/dist/packages/_es/Tabs.js +284 -205
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -57
- package/dist/packages/_es/TimePannel.js +35 -31
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +150 -203
- package/dist/packages/_es/Tour.js +139 -175
- package/dist/packages/_es/TrendArrow.js +57 -58
- package/dist/packages/_es/Uploader.js +235 -359
- package/dist/packages/_es/Video.js +191 -298
- package/dist/packages/_es/Watermark.js +84 -98
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/packages/actionsheet/index.scss +2 -0
- package/dist/packages/actionsheet/style.mjs +0 -2
- package/dist/packages/address/index.scss +5 -2
- package/dist/packages/address/style.mjs +0 -3
- package/dist/packages/addresslist/index.scss +3 -0
- package/dist/packages/addresslist/style.mjs +0 -2
- package/dist/packages/audio/index.scss +2 -0
- package/dist/packages/audio/style.mjs +0 -1
- package/dist/packages/audiooperate/index.scss +2 -0
- package/dist/packages/audiooperate/style.mjs +0 -1
- package/dist/packages/badge/index.scss +3 -0
- package/dist/packages/button/index.scss +1 -1
- package/dist/packages/calendar/index.scss +3 -0
- package/dist/packages/calendar/style.mjs +0 -3
- package/dist/packages/card/index.scss +3 -0
- package/dist/packages/card/style.mjs +0 -2
- package/dist/packages/cascader/index.scss +4 -0
- package/dist/packages/cascader/style.mjs +0 -5
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/checkbox/index.scss +41 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/comment/index.scss +2 -0
- package/dist/packages/comment/style.mjs +0 -1
- package/dist/packages/datepicker/index.scss +1 -2
- package/dist/packages/datepicker/style.mjs +0 -3
- package/dist/packages/dialog/index.scss +11 -0
- package/dist/packages/dialog/style.mjs +0 -3
- package/dist/packages/ecard/index.scss +2 -0
- package/dist/packages/ecard/style.mjs +0 -1
- package/dist/packages/fixednav/index.scss +2 -0
- package/dist/packages/fixednav/style.mjs +0 -1
- package/dist/packages/form/index.scss +1 -2
- package/dist/packages/form/style.mjs +0 -1
- package/dist/packages/formitem/index.scss +3 -0
- package/dist/packages/formitem/style.mjs +0 -1
- package/dist/packages/imagepreview/index.scss +5 -5
- package/dist/packages/imagepreview/style.mjs +0 -5
- package/dist/packages/input/index.scss +13 -13
- package/dist/packages/invoice/index.scss +6 -0
- package/dist/packages/invoice/style.mjs +0 -7
- package/dist/packages/list/index.scss +8 -8
- package/dist/packages/menuitem/index.scss +9 -10
- package/dist/packages/menuitem/style.mjs +0 -2
- package/dist/packages/navbar/index.scss +0 -1
- package/dist/packages/noticebar/index.scss +12 -2
- package/dist/packages/notify/index.scss +2 -0
- package/dist/packages/notify/style.mjs +0 -2
- package/dist/packages/numberkeyboard/index.scss +2 -0
- package/dist/packages/numberkeyboard/style.mjs +0 -2
- package/dist/packages/picker/index.scss +4 -9
- package/dist/packages/picker/style.mjs +0 -2
- package/dist/packages/popover/index.scss +2 -0
- package/dist/packages/popover/style.mjs +0 -2
- package/dist/packages/popup/index.scss +2 -0
- package/dist/packages/popup/style.mjs +0 -1
- package/dist/packages/price/index.scss +5 -10
- package/dist/packages/rate/index.scss +6 -9
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/shortpassword/index.scss +18 -0
- package/dist/packages/shortpassword/style.mjs +0 -2
- package/dist/packages/signature/index.scss +2 -0
- package/dist/packages/signature/style.mjs +0 -1
- package/dist/packages/skeleton/index.scss +2 -0
- package/dist/packages/skeleton/style.mjs +0 -1
- package/dist/packages/sku/index.scss +4 -0
- package/dist/packages/sku/style.mjs +0 -4
- package/dist/packages/tabbaritem/index.scss +2 -0
- package/dist/packages/tabbaritem/style.mjs +0 -1
- package/dist/packages/tabs/index.scss +36 -2
- package/dist/packages/tabs/style.mjs +0 -1
- package/dist/packages/textarea/index.scss +2 -0
- package/dist/packages/timeselect/index.scss +2 -0
- package/dist/packages/timeselect/style.mjs +0 -2
- package/dist/packages/tour/index.scss +2 -0
- package/dist/packages/tour/style.mjs +0 -3
- package/dist/packages/uploader/index.scss +10 -2
- package/dist/packages/uploader/style.mjs +0 -2
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/resolver/index.mjs +24 -0
- package/dist/resolver/package.json +20 -0
- package/dist/smartips/web-types.json +114 -15
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +155 -52
- package/dist/styles/themes/jdb.scss +155 -52
- package/dist/styles/themes/jddkh.scss +155 -52
- package/dist/styles/themes/jdt.scss +155 -52
- package/dist/styles/variables-jdb.scss +9 -1
- package/dist/styles/variables-jddkh.scss +9 -1
- package/dist/styles/variables-jdt.scss +9 -1
- package/dist/styles/variables.scss +8 -0
- package/dist/types/__VUE/address/index.vue.d.ts +2 -1
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
- package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
- package/dist/types/__VUE/button/type.d.ts +1 -0
- package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
- package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
- package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +14 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +27 -2
- package/dist/types/__VUE/list/index.vue.d.ts +42 -13
- package/dist/types/__VUE/list/type.d.ts +13 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
- package/dist/types/__VUE/picker/common.d.ts +2 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
- package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
- package/dist/types/__VUE/tabs/types.d.ts +12 -0
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/resolver/index.d.ts +6 -0
- package/dist/types/utils/date.d.ts +4 -0
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/util.d.ts +1 -1
- package/package.json +13 -6
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-2ae3ae87.js +0 -846
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-991c279f.js +0 -244
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/mountComponent-1ece4110.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
- /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var B = Object.defineProperty, D = Object.defineProperties;
|
|
2
|
+
var z = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var L = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var g = (e, o, t) => o in e ? B(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, d = (e, o) => {
|
|
6
|
+
for (var t in o || (o = {}))
|
|
7
|
+
L.call(o, t) && g(e, t, o[t]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var t of w(o))
|
|
10
|
+
U.call(o, t) && g(e, t, o[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, m = (e, o) => D(e, z(o));
|
|
13
|
+
import { reactive as j, computed as P, inject as A, getCurrentInstance as F, onUnmounted as I, resolveComponent as S, withDirectives as V, openBlock as r, createElementBlock as i, normalizeStyle as p, createElementVNode as v, vShow as b, createVNode as $, mergeProps as T, withCtx as q, Fragment as G, renderList as H, normalizeClass as f, renderSlot as O, createCommentVNode as J, toDisplayString as K } from "vue";
|
|
14
|
+
import { c as M } from "./component-234624bc.js";
|
|
15
|
+
import { P as E } from "./index-360c5092.js";
|
|
16
|
+
import { Check as Q } from "@nutui/icons-vue";
|
|
17
|
+
import { _ as R } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
18
|
import "../locale/lang";
|
|
7
19
|
import "./Overlay.js";
|
|
8
|
-
const {
|
|
9
|
-
const _sfc_main = create({
|
|
20
|
+
const { create: X } = M("menu-item"), Y = X({
|
|
10
21
|
props: {
|
|
11
22
|
title: String,
|
|
12
23
|
options: {
|
|
@@ -15,7 +26,7 @@ const _sfc_main = create({
|
|
|
15
26
|
},
|
|
16
27
|
disabled: {
|
|
17
28
|
type: Boolean,
|
|
18
|
-
default:
|
|
29
|
+
default: !1
|
|
19
30
|
},
|
|
20
31
|
modelValue: null,
|
|
21
32
|
cols: {
|
|
@@ -23,168 +34,121 @@ const _sfc_main = create({
|
|
|
23
34
|
default: 1
|
|
24
35
|
},
|
|
25
36
|
activeTitleClass: String,
|
|
26
|
-
inactiveTitleClass: String
|
|
27
|
-
optionIcon: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "Check"
|
|
30
|
-
}
|
|
37
|
+
inactiveTitleClass: String
|
|
31
38
|
},
|
|
32
39
|
components: {
|
|
33
|
-
[
|
|
34
|
-
Check
|
|
40
|
+
[E.name]: E,
|
|
41
|
+
Check: Q
|
|
35
42
|
},
|
|
36
43
|
emits: ["update:modelValue", "change", "open", "close"],
|
|
37
|
-
setup(
|
|
38
|
-
const
|
|
39
|
-
showPopup:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const { link, removeLink } = parent2;
|
|
49
|
-
link(instance);
|
|
50
|
-
onUnmounted(() => {
|
|
51
|
-
removeLink(instance);
|
|
52
|
-
});
|
|
53
|
-
return {
|
|
54
|
-
parent: parent2
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const { parent } = useParent();
|
|
59
|
-
const classes = computed(() => {
|
|
60
|
-
const prefixCls = componentName;
|
|
61
|
-
return {
|
|
62
|
-
[prefixCls]: true
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
const placeholderElementStyle = computed(() => {
|
|
66
|
-
const heightStyle = { height: parent.offset.value + "px" };
|
|
67
|
-
if (parent.props.direction === "down") {
|
|
68
|
-
return heightStyle;
|
|
69
|
-
} else {
|
|
70
|
-
return { ...heightStyle, top: "auto" };
|
|
44
|
+
setup(e, { emit: o }) {
|
|
45
|
+
const t = j({
|
|
46
|
+
showPopup: !1,
|
|
47
|
+
showWrapper: !1
|
|
48
|
+
}), h = () => {
|
|
49
|
+
const l = A("menuParent", null);
|
|
50
|
+
if (l) {
|
|
51
|
+
const a = F(), { link: c, removeLink: W } = l;
|
|
52
|
+
return c(a), I(() => {
|
|
53
|
+
W(a);
|
|
54
|
+
}), { parent: l };
|
|
71
55
|
}
|
|
56
|
+
}, { parent: s } = h(), C = P(() => s.props.direction === "down" ? {
|
|
57
|
+
top: s.offset.value + "px"
|
|
58
|
+
} : {
|
|
59
|
+
bottom: s.offset.value + "px"
|
|
60
|
+
}), u = P(() => {
|
|
61
|
+
const l = { height: s.offset.value + "px" };
|
|
62
|
+
return s.props.direction === "down" ? m(d({}, l), { top: "0px" }) : m(d({}, l), { bottom: "0px" });
|
|
72
63
|
});
|
|
73
|
-
const toggle = (show = !state.showPopup, options = {}) => {
|
|
74
|
-
if (show === state.showPopup) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
state.showPopup = show;
|
|
78
|
-
state.isShowPlaceholderElement = show;
|
|
79
|
-
if (show) {
|
|
80
|
-
state.showWrapper = true;
|
|
81
|
-
emit("open");
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const renderTitle = () => {
|
|
85
|
-
var _a;
|
|
86
|
-
if (props.title) {
|
|
87
|
-
return props.title;
|
|
88
|
-
}
|
|
89
|
-
const match = (_a = props.options) == null ? void 0 : _a.find((option) => option.value === props.modelValue);
|
|
90
|
-
return match ? match.text : "";
|
|
91
|
-
};
|
|
92
|
-
const onClick = (option) => {
|
|
93
|
-
state.showPopup = false;
|
|
94
|
-
state.isShowPlaceholderElement = false;
|
|
95
|
-
if (option.value !== props.modelValue) {
|
|
96
|
-
emit("update:modelValue", option.value);
|
|
97
|
-
emit("change", option.value);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const handleClose = () => {
|
|
101
|
-
emit("close");
|
|
102
|
-
state.showWrapper = false;
|
|
103
|
-
state.isShowPlaceholderElement = false;
|
|
104
|
-
};
|
|
105
|
-
const handleClickOutside = () => {
|
|
106
|
-
state.showPopup = false;
|
|
107
|
-
emit("close");
|
|
108
|
-
};
|
|
109
64
|
return {
|
|
110
|
-
|
|
111
|
-
placeholderElementStyle,
|
|
112
|
-
renderTitle
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
65
|
+
style: C,
|
|
66
|
+
placeholderElementStyle: u,
|
|
67
|
+
renderTitle: () => {
|
|
68
|
+
var a;
|
|
69
|
+
if (e.title)
|
|
70
|
+
return e.title;
|
|
71
|
+
const l = (a = e.options) == null ? void 0 : a.find((c) => c.value === e.modelValue);
|
|
72
|
+
return l ? l.text : "";
|
|
73
|
+
},
|
|
74
|
+
state: t,
|
|
75
|
+
parent: s,
|
|
76
|
+
toggle: (l = !t.showPopup) => {
|
|
77
|
+
l !== t.showPopup && (t.showPopup = l, l && (t.showWrapper = !0, o("open")));
|
|
78
|
+
},
|
|
79
|
+
onClick: (l) => {
|
|
80
|
+
t.showPopup = !1, l.value !== e.modelValue && (o("update:modelValue", l.value), o("change", l.value));
|
|
81
|
+
},
|
|
82
|
+
handleClose: () => {
|
|
83
|
+
o("close"), t.showWrapper = !1;
|
|
84
|
+
},
|
|
85
|
+
handleClickOutside: () => {
|
|
86
|
+
t.showPopup = !1, o("close");
|
|
87
|
+
}
|
|
119
88
|
};
|
|
120
89
|
}
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return withDirectives((openBlock(), createElementBlock("view", {
|
|
128
|
-
class: normalizeClass(_ctx.classes)
|
|
90
|
+
}), Z = { class: "nut-menu-item__content nut-menu-item__overflow" }, _ = ["onClick"];
|
|
91
|
+
function x(e, o, t, h, s, C) {
|
|
92
|
+
const u = S("Check"), y = S("nut-popup");
|
|
93
|
+
return V((r(), i("view", {
|
|
94
|
+
class: "nut-menu-item",
|
|
95
|
+
style: p(e.style)
|
|
129
96
|
}, [
|
|
130
|
-
|
|
131
|
-
onClick:
|
|
132
|
-
class:
|
|
133
|
-
style:
|
|
134
|
-
}, null,
|
|
135
|
-
[
|
|
97
|
+
V(v("div", {
|
|
98
|
+
onClick: o[0] || (o[0] = (...n) => e.handleClickOutside && e.handleClickOutside(...n)),
|
|
99
|
+
class: "nut-menu-item-placeholder-element",
|
|
100
|
+
style: p(e.placeholderElementStyle)
|
|
101
|
+
}, null, 4), [
|
|
102
|
+
[b, e.state.showPopup]
|
|
136
103
|
]),
|
|
137
|
-
|
|
138
|
-
style:
|
|
139
|
-
overlayStyle:
|
|
140
|
-
},
|
|
141
|
-
visible:
|
|
142
|
-
"onUpdate:visible":
|
|
143
|
-
position:
|
|
144
|
-
duration:
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"close-on-click-overlay": _ctx.parent.props.closeOnClickOverlay
|
|
104
|
+
$(y, T({
|
|
105
|
+
style: { position: "absolute" },
|
|
106
|
+
overlayStyle: { position: "absolute" }
|
|
107
|
+
}, e.$attrs, {
|
|
108
|
+
visible: e.state.showPopup,
|
|
109
|
+
"onUpdate:visible": o[1] || (o[1] = (n) => e.state.showPopup = n),
|
|
110
|
+
position: e.parent.props.direction === "down" ? "top" : "bottom",
|
|
111
|
+
duration: e.parent.props.duration,
|
|
112
|
+
"destroy-on-close": !1,
|
|
113
|
+
overlay: e.parent.props.overlay,
|
|
114
|
+
onClosed: e.handleClose,
|
|
115
|
+
lockScroll: e.parent.props.lockScroll,
|
|
116
|
+
teleportDisable: !1,
|
|
117
|
+
"close-on-click-overlay": e.parent.props.closeOnClickOverlay
|
|
152
118
|
}), {
|
|
153
|
-
default:
|
|
154
|
-
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
119
|
+
default: q(() => [
|
|
120
|
+
v("view", Z, [
|
|
121
|
+
(r(!0), i(G, null, H(e.options, (n, k) => (r(), i("view", {
|
|
122
|
+
key: k,
|
|
123
|
+
class: f(["nut-menu-item__option", [{ active: n.value === e.modelValue }]]),
|
|
124
|
+
style: p({ "flex-basis": 100 / e.cols + "%" }),
|
|
125
|
+
onClick: (N) => e.onClick(n)
|
|
126
|
+
}, [
|
|
127
|
+
n.value === e.modelValue ? (r(), i("span", {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: f(["nut-menu-item__span", [n.value === e.modelValue ? e.activeTitleClass : e.inactiveTitleClass]])
|
|
161
130
|
}, [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
style: normalizeStyle({ color: option.value === _ctx.modelValue ? _ctx.parent.props.activeColor : "" })
|
|
175
|
-
}, toDisplayString(option.text), 7)
|
|
176
|
-
], 14, _hoisted_2);
|
|
177
|
-
}), 128)),
|
|
178
|
-
renderSlot(_ctx.$slots, "default")
|
|
131
|
+
O(e.$slots, "icon", {}, () => [
|
|
132
|
+
$(u, T(e.$attrs, {
|
|
133
|
+
color: e.parent.props.activeColor
|
|
134
|
+
}), null, 16, ["color"])
|
|
135
|
+
])
|
|
136
|
+
], 2)) : J("", !0),
|
|
137
|
+
v("view", {
|
|
138
|
+
class: f([n.value === e.modelValue ? e.activeTitleClass : e.inactiveTitleClass]),
|
|
139
|
+
style: p({ color: n.value === e.modelValue ? e.parent.props.activeColor : "" })
|
|
140
|
+
}, K(n.text), 7)
|
|
141
|
+
], 14, _))), 128)),
|
|
142
|
+
O(e.$slots, "default")
|
|
179
143
|
])
|
|
180
144
|
]),
|
|
181
145
|
_: 3
|
|
182
|
-
}, 16, ["
|
|
183
|
-
],
|
|
184
|
-
[
|
|
146
|
+
}, 16, ["visible", "position", "duration", "overlay", "onClosed", "lockScroll", "close-on-click-overlay"])
|
|
147
|
+
], 4)), [
|
|
148
|
+
[b, e.state.showWrapper]
|
|
185
149
|
]);
|
|
186
150
|
}
|
|
187
|
-
const
|
|
151
|
+
const pe = /* @__PURE__ */ R(Y, [["render", x]]);
|
|
188
152
|
export {
|
|
189
|
-
|
|
153
|
+
pe as default
|
|
190
154
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { toRefs, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { Left } from "@nutui/icons-vue";
|
|
4
|
-
import { _ as
|
|
1
|
+
import { toRefs as T, ref as v, computed as C, onMounted as R, nextTick as z, resolveComponent as N, openBlock as l, createElementBlock as o, createElementVNode as r, normalizeClass as g, normalizeStyle as m, renderSlot as s, createVNode as w, createCommentVNode as a, toDisplayString as d } from "vue";
|
|
2
|
+
import { c as V } from "./component-234624bc.js";
|
|
3
|
+
import { Left as A } from "@nutui/icons-vue";
|
|
4
|
+
import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
const { componentName, create } =
|
|
7
|
-
|
|
8
|
-
components: { Left },
|
|
6
|
+
const { componentName: W, create: D } = V("navbar"), H = D({
|
|
7
|
+
components: { Left: A },
|
|
9
8
|
props: {
|
|
10
|
-
leftShow: { type: Boolean, default:
|
|
9
|
+
leftShow: { type: Boolean, default: !1 },
|
|
11
10
|
//左侧 是否显示返回icon
|
|
12
11
|
title: { type: String, default: "" },
|
|
13
12
|
//中间 文字标题
|
|
14
|
-
titleIcon: { type: Boolean, default:
|
|
13
|
+
titleIcon: { type: Boolean, default: !1 },
|
|
15
14
|
//中间
|
|
16
15
|
leftText: { type: String, default: "" },
|
|
17
16
|
//左侧文字
|
|
@@ -19,20 +18,20 @@ const _sfc_main = create({
|
|
|
19
18
|
//右侧 按钮文字
|
|
20
19
|
fixed: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: !1
|
|
23
22
|
},
|
|
24
23
|
safeAreaInsetTop: {
|
|
25
24
|
type: Boolean,
|
|
26
|
-
default:
|
|
25
|
+
default: !1
|
|
27
26
|
},
|
|
28
27
|
border: {
|
|
29
28
|
type: Boolean,
|
|
30
|
-
default:
|
|
29
|
+
default: !1
|
|
31
30
|
},
|
|
32
31
|
placeholder: {
|
|
33
32
|
// 生成一个等高的占位元素
|
|
34
33
|
type: Boolean,
|
|
35
|
-
default:
|
|
34
|
+
default: !0
|
|
36
35
|
},
|
|
37
36
|
zIndex: {
|
|
38
37
|
type: [Number, String],
|
|
@@ -40,172 +39,157 @@ const _sfc_main = create({
|
|
|
40
39
|
}
|
|
41
40
|
},
|
|
42
41
|
emits: ["on-click-back", "on-click-title", "on-click-icon", "on-click-right"],
|
|
43
|
-
setup(
|
|
44
|
-
const { border, fixed, safeAreaInsetTop, placeholder, zIndex } =
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const classes = computed(() => {
|
|
49
|
-
const prefixCls = componentName;
|
|
42
|
+
setup(e, { emit: t }) {
|
|
43
|
+
const { border: h, fixed: p, safeAreaInsetTop: k, placeholder: c, zIndex: f } = T(e), n = v(null), u = v(null);
|
|
44
|
+
let y = v();
|
|
45
|
+
const b = C(() => {
|
|
46
|
+
const i = W;
|
|
50
47
|
return {
|
|
51
|
-
[
|
|
52
|
-
[`${
|
|
53
|
-
[`${
|
|
54
|
-
[`${
|
|
48
|
+
[i]: !0,
|
|
49
|
+
[`${i}--border`]: h.value,
|
|
50
|
+
[`${i}--fixed`]: p.value,
|
|
51
|
+
[`${i}--safe-area-inset-top`]: k.value
|
|
55
52
|
};
|
|
53
|
+
}), I = C(() => ({
|
|
54
|
+
zIndex: f.value
|
|
55
|
+
}));
|
|
56
|
+
R(() => {
|
|
57
|
+
p.value && c.value && z(() => {
|
|
58
|
+
var i;
|
|
59
|
+
y.value = (i = u == null ? void 0 : u.value) == null ? void 0 : i.getBoundingClientRect().height, n.value.style.height = y.value + "px";
|
|
60
|
+
});
|
|
56
61
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
zIndex: zIndex.value
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
onMounted(() => {
|
|
63
|
-
if (fixed.value && placeholder.value) {
|
|
64
|
-
nextTick(() => {
|
|
65
|
-
var _a;
|
|
66
|
-
navHeight.value = (_a = navBarHtml == null ? void 0 : navBarHtml.value) == null ? void 0 : _a.getBoundingClientRect().height;
|
|
67
|
-
navBarWrap.value.style.height = navHeight.value + "px";
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
function handleLeft() {
|
|
72
|
-
emit("on-click-back");
|
|
62
|
+
function $() {
|
|
63
|
+
t("on-click-back");
|
|
73
64
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
65
|
+
function B() {
|
|
66
|
+
t("on-click-title");
|
|
76
67
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
68
|
+
function S() {
|
|
69
|
+
t("on-click-icon");
|
|
79
70
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
71
|
+
function L() {
|
|
72
|
+
t("on-click-right");
|
|
82
73
|
}
|
|
83
74
|
return {
|
|
84
|
-
navBarWrap,
|
|
85
|
-
navBarHtml,
|
|
86
|
-
classes,
|
|
87
|
-
styles,
|
|
88
|
-
handleLeft
|
|
89
|
-
handleCenter,
|
|
90
|
-
handleCenterIcon,
|
|
91
|
-
handleRight
|
|
75
|
+
navBarWrap: n,
|
|
76
|
+
navBarHtml: u,
|
|
77
|
+
classes: b,
|
|
78
|
+
styles: I,
|
|
79
|
+
handleLeft: $,
|
|
80
|
+
handleCenter: B,
|
|
81
|
+
handleCenterIcon: S,
|
|
82
|
+
handleRight: L
|
|
92
83
|
};
|
|
93
84
|
}
|
|
94
|
-
})
|
|
95
|
-
const _hoisted_1 = {
|
|
85
|
+
}), M = {
|
|
96
86
|
key: 0,
|
|
97
87
|
class: "nut-navbar--placeholder",
|
|
98
88
|
ref: "navBarWrap"
|
|
99
|
-
}
|
|
100
|
-
const _hoisted_2 = {
|
|
89
|
+
}, j = {
|
|
101
90
|
key: 1,
|
|
102
91
|
class: "nut-navbar__text"
|
|
103
|
-
}
|
|
104
|
-
const _hoisted_3 = { class: "nut-navbar__title" };
|
|
105
|
-
const _hoisted_4 = {
|
|
92
|
+
}, q = { class: "nut-navbar__title" }, F = {
|
|
106
93
|
key: 0,
|
|
107
94
|
class: "nut-navbar__text"
|
|
108
|
-
}
|
|
109
|
-
const _hoisted_5 = {
|
|
95
|
+
}, G = {
|
|
110
96
|
key: 1,
|
|
111
97
|
class: "nut-navbar__text"
|
|
112
|
-
}
|
|
113
|
-
const _hoisted_6 = { class: "nut-navbar__title" };
|
|
114
|
-
const _hoisted_7 = {
|
|
98
|
+
}, J = { class: "nut-navbar__title" }, K = {
|
|
115
99
|
key: 0,
|
|
116
100
|
class: "nut-navbar__text"
|
|
117
101
|
};
|
|
118
|
-
function
|
|
119
|
-
const
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
class:
|
|
123
|
-
style:
|
|
102
|
+
function O(e, t, h, p, k, c) {
|
|
103
|
+
const f = N("Left");
|
|
104
|
+
return e.fixed && e.placeholder ? (l(), o("view", M, [
|
|
105
|
+
r("view", {
|
|
106
|
+
class: g(e.classes),
|
|
107
|
+
style: m(e.styles),
|
|
124
108
|
ref: "navBarHtml"
|
|
125
109
|
}, [
|
|
126
|
-
|
|
110
|
+
r("view", {
|
|
127
111
|
class: "nut-navbar__left",
|
|
128
|
-
onClick:
|
|
112
|
+
onClick: t[0] || (t[0] = (...n) => e.handleLeft && e.handleLeft(...n))
|
|
129
113
|
}, [
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
e.leftShow ? s(e.$slots, "left-show", { key: 0 }, () => [
|
|
115
|
+
w(f, {
|
|
132
116
|
height: "12px",
|
|
133
117
|
color: "#979797"
|
|
134
118
|
})
|
|
135
|
-
]) :
|
|
136
|
-
|
|
137
|
-
|
|
119
|
+
]) : a("", !0),
|
|
120
|
+
e.leftText ? (l(), o("view", j, d(e.leftText), 1)) : a("", !0),
|
|
121
|
+
s(e.$slots, "left")
|
|
138
122
|
]),
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
r("view", q, [
|
|
124
|
+
e.title ? (l(), o("view", {
|
|
141
125
|
key: 0,
|
|
142
126
|
class: "title",
|
|
143
|
-
onClick:
|
|
144
|
-
},
|
|
145
|
-
|
|
127
|
+
onClick: t[1] || (t[1] = (...n) => e.handleCenter && e.handleCenter(...n))
|
|
128
|
+
}, d(e.title), 1)) : a("", !0),
|
|
129
|
+
e.titleIcon ? (l(), o("view", {
|
|
146
130
|
key: 1,
|
|
147
131
|
class: "icon",
|
|
148
|
-
onClick:
|
|
132
|
+
onClick: t[3] || (t[3] = (...n) => e.handleCenterIcon && e.handleCenterIcon(...n))
|
|
149
133
|
}, [
|
|
150
|
-
|
|
151
|
-
onClick:
|
|
134
|
+
s(e.$slots, "title-icon", {
|
|
135
|
+
onClick: t[2] || (t[2] = (...n) => e.handleCenterIcon && e.handleCenterIcon(...n))
|
|
152
136
|
})
|
|
153
|
-
])) :
|
|
154
|
-
|
|
137
|
+
])) : a("", !0),
|
|
138
|
+
s(e.$slots, "content")
|
|
155
139
|
]),
|
|
156
|
-
|
|
140
|
+
r("view", {
|
|
157
141
|
class: "nut-navbar__right",
|
|
158
|
-
onClick:
|
|
142
|
+
onClick: t[4] || (t[4] = (...n) => e.handleRight && e.handleRight(...n))
|
|
159
143
|
}, [
|
|
160
|
-
|
|
161
|
-
|
|
144
|
+
e.desc ? (l(), o("view", F, d(e.desc), 1)) : a("", !0),
|
|
145
|
+
s(e.$slots, "right")
|
|
162
146
|
])
|
|
163
147
|
], 6)
|
|
164
|
-
], 512)) : (
|
|
148
|
+
], 512)) : (l(), o("view", {
|
|
165
149
|
key: 1,
|
|
166
|
-
class:
|
|
167
|
-
style:
|
|
150
|
+
class: g(e.classes),
|
|
151
|
+
style: m(e.styles)
|
|
168
152
|
}, [
|
|
169
|
-
|
|
153
|
+
r("view", {
|
|
170
154
|
class: "nut-navbar__left",
|
|
171
|
-
onClick:
|
|
155
|
+
onClick: t[5] || (t[5] = (...n) => e.handleLeft && e.handleLeft(...n))
|
|
172
156
|
}, [
|
|
173
|
-
|
|
174
|
-
|
|
157
|
+
e.leftShow ? s(e.$slots, "left-show", { key: 0 }, () => [
|
|
158
|
+
w(f, {
|
|
175
159
|
height: "12px",
|
|
176
160
|
color: "#979797"
|
|
177
161
|
})
|
|
178
|
-
]) :
|
|
179
|
-
|
|
180
|
-
|
|
162
|
+
]) : a("", !0),
|
|
163
|
+
e.leftText ? (l(), o("view", G, d(e.leftText), 1)) : a("", !0),
|
|
164
|
+
s(e.$slots, "left")
|
|
181
165
|
]),
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
r("view", J, [
|
|
167
|
+
e.title ? (l(), o("view", {
|
|
184
168
|
key: 0,
|
|
185
169
|
class: "title",
|
|
186
|
-
onClick:
|
|
187
|
-
},
|
|
188
|
-
|
|
170
|
+
onClick: t[6] || (t[6] = (...n) => e.handleCenter && e.handleCenter(...n))
|
|
171
|
+
}, d(e.title), 1)) : a("", !0),
|
|
172
|
+
e.titleIcon ? (l(), o("view", {
|
|
189
173
|
key: 1,
|
|
190
174
|
class: "icon",
|
|
191
|
-
onClick:
|
|
175
|
+
onClick: t[8] || (t[8] = (...n) => e.handleCenterIcon && e.handleCenterIcon(...n))
|
|
192
176
|
}, [
|
|
193
|
-
|
|
194
|
-
onClick:
|
|
177
|
+
s(e.$slots, "title-icon", {
|
|
178
|
+
onClick: t[7] || (t[7] = (...n) => e.handleCenterIcon && e.handleCenterIcon(...n))
|
|
195
179
|
})
|
|
196
|
-
])) :
|
|
197
|
-
|
|
180
|
+
])) : a("", !0),
|
|
181
|
+
s(e.$slots, "content")
|
|
198
182
|
]),
|
|
199
|
-
|
|
183
|
+
r("view", {
|
|
200
184
|
class: "nut-navbar__right",
|
|
201
|
-
onClick:
|
|
185
|
+
onClick: t[9] || (t[9] = (...n) => e.handleRight && e.handleRight(...n))
|
|
202
186
|
}, [
|
|
203
|
-
|
|
204
|
-
|
|
187
|
+
e.desc ? (l(), o("view", K, d(e.desc), 1)) : a("", !0),
|
|
188
|
+
s(e.$slots, "right")
|
|
205
189
|
])
|
|
206
190
|
], 6));
|
|
207
191
|
}
|
|
208
|
-
const
|
|
192
|
+
const Z = /* @__PURE__ */ E(H, [["render", O]]);
|
|
209
193
|
export {
|
|
210
|
-
|
|
194
|
+
Z as default
|
|
211
195
|
};
|