@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,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var N = Object.defineProperty;
|
|
2
|
+
var b = Object.getOwnPropertySymbols;
|
|
3
|
+
var V = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var k = (o, s, r) => s in o ? N(o, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[s] = r, w = (o, s) => {
|
|
5
|
+
for (var r in s || (s = {}))
|
|
6
|
+
V.call(s, r) && k(o, r, s[r]);
|
|
7
|
+
if (b)
|
|
8
|
+
for (var r of b(s))
|
|
9
|
+
A.call(s, r) && k(o, r, s[r]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
import { toRefs as I, inject as O, ref as R, reactive as M, onMounted as T, computed as g, openBlock as L, createElementBlock as B, normalizeStyle as j, normalizeClass as D, renderSlot as E, createCommentVNode as h, Fragment as F, createTextVNode as q, toDisplayString as H } from "vue";
|
|
13
|
+
import { c as J } from "./component-234624bc.js";
|
|
14
|
+
import { _ as K } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
15
|
import "../locale/lang";
|
|
5
|
-
const { componentName, create } =
|
|
6
|
-
const _sfc_main = create({
|
|
16
|
+
const { componentName: P, create: Q } = J("avatar"), U = Q({
|
|
7
17
|
props: {
|
|
8
18
|
size: {
|
|
9
19
|
type: String,
|
|
@@ -22,94 +32,76 @@ const _sfc_main = create({
|
|
|
22
32
|
default: "#666"
|
|
23
33
|
}
|
|
24
34
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const { size, shape, bgColor
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const avatarRef = ref(null);
|
|
30
|
-
const visible = reactive({
|
|
31
|
-
lightTheme: false
|
|
32
|
-
});
|
|
33
|
-
const state = reactive({
|
|
35
|
+
setup(o) {
|
|
36
|
+
const { size: s, shape: r, bgColor: $, color: y } = I(o), C = ["large", "normal", "small"], e = O("avatarGroup", null), i = R(null), m = M({
|
|
37
|
+
lightTheme: !1
|
|
38
|
+
}), l = M({
|
|
34
39
|
index: 1,
|
|
35
|
-
showMax:
|
|
40
|
+
showMax: !1,
|
|
36
41
|
// 是否显示的最大头像个数
|
|
37
42
|
maxIndex: 0
|
|
38
43
|
// avatarGroup里的avatar的个数
|
|
39
44
|
});
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
avatarLength(children);
|
|
45
|
-
}
|
|
45
|
+
T(() => {
|
|
46
|
+
var n, a;
|
|
47
|
+
const t = (a = (n = e == null ? void 0 : e.avatarGroupRef) == null ? void 0 : n.value) == null ? void 0 : a.children;
|
|
48
|
+
t && c(t);
|
|
46
49
|
});
|
|
47
|
-
const
|
|
48
|
-
var
|
|
49
|
-
const prefixCls = componentName;
|
|
50
|
+
const d = g(() => {
|
|
51
|
+
var n, a;
|
|
50
52
|
return {
|
|
51
|
-
[
|
|
52
|
-
[`nut-avatar-${
|
|
53
|
-
[`nut-avatar-${
|
|
53
|
+
[P]: !0,
|
|
54
|
+
[`nut-avatar-${s.value || ((n = e == null ? void 0 : e.props) == null ? void 0 : n.size) || "normal"}`]: !0,
|
|
55
|
+
[`nut-avatar-${r.value || ((a = e == null ? void 0 : e.props) == null ? void 0 : a.shape) || "normal"}`]: !0
|
|
54
56
|
};
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
var _a, _b, _c;
|
|
57
|
+
}), x = g(() => {
|
|
58
|
+
var t, n, a;
|
|
58
59
|
return {
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
61
|
-
backgroundColor: `${
|
|
62
|
-
color: `${
|
|
63
|
-
marginLeft:
|
|
64
|
-
zIndex: ((
|
|
60
|
+
width: C.indexOf(s.value) > -1 ? "" : `${s.value}px`,
|
|
61
|
+
height: C.indexOf(s.value) > -1 ? "" : `${s.value}px`,
|
|
62
|
+
backgroundColor: `${$.value}`,
|
|
63
|
+
color: `${y.value}`,
|
|
64
|
+
marginLeft: l.index != 1 && ((t = e == null ? void 0 : e.props) != null && t.span ? `${(n = e == null ? void 0 : e.props) == null ? void 0 : n.span}px` : ""),
|
|
65
|
+
zIndex: ((a = e == null ? void 0 : e.props) == null ? void 0 : a.zIndex) == "right" ? `${Math.abs(l.maxIndex - l.index)}` : ""
|
|
65
66
|
};
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
var _a, _b;
|
|
67
|
+
}), f = g(() => {
|
|
68
|
+
var t, n;
|
|
69
69
|
return {
|
|
70
|
-
backgroundColor: `${(
|
|
71
|
-
color: `${(
|
|
70
|
+
backgroundColor: `${(t = e == null ? void 0 : e.props) == null ? void 0 : t.maxBgColor}`,
|
|
71
|
+
color: `${(n = e == null ? void 0 : e.props) == null ? void 0 : n.maxColor}`
|
|
72
72
|
};
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
children[i].setAttribute("data-index", i + 1);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
state.index = (_b = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index;
|
|
83
|
-
if (state.index == state.maxIndex && state.index != ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.maxCount)) {
|
|
84
|
-
state.showMax = true;
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
return {
|
|
88
|
-
classes,
|
|
89
|
-
styles,
|
|
90
|
-
maxStyles,
|
|
91
|
-
avatarGroup,
|
|
92
|
-
visible,
|
|
93
|
-
avatarRef,
|
|
94
|
-
...toRefs(state)
|
|
73
|
+
}), c = (t) => {
|
|
74
|
+
var n, a, u;
|
|
75
|
+
l.maxIndex = t.length;
|
|
76
|
+
for (let p = 0; p < t.length; p++)
|
|
77
|
+
t[p] && t[p].classList && t[p].classList[0] == "nut-avatar" && t[p].setAttribute("data-index", p + 1);
|
|
78
|
+
l.index = (a = (n = i == null ? void 0 : i.value) == null ? void 0 : n.dataset) == null ? void 0 : a.index, l.index == l.maxIndex && l.index != ((u = e == null ? void 0 : e.props) == null ? void 0 : u.maxCount) && (l.showMax = !0);
|
|
95
79
|
};
|
|
80
|
+
return w({
|
|
81
|
+
classes: d,
|
|
82
|
+
styles: x,
|
|
83
|
+
maxStyles: f,
|
|
84
|
+
avatarGroup: e,
|
|
85
|
+
visible: m,
|
|
86
|
+
avatarRef: i
|
|
87
|
+
}, I(l));
|
|
96
88
|
}
|
|
97
89
|
});
|
|
98
|
-
function
|
|
99
|
-
var
|
|
100
|
-
return
|
|
90
|
+
function W(o, s, r, $, y, C) {
|
|
91
|
+
var e, i, m, l, d, x, f, c, t, n, a, u, p, v, S, z;
|
|
92
|
+
return o.showMax || !((i = (e = o.avatarGroup) == null ? void 0 : e.props) != null && i.maxCount) || o.index <= ((l = (m = o.avatarGroup) == null ? void 0 : m.props) == null ? void 0 : l.maxCount) ? (L(), B("view", {
|
|
101
93
|
key: 0,
|
|
102
|
-
style:
|
|
103
|
-
class:
|
|
94
|
+
style: j(o.showMax ? o.maxStyles : o.styles),
|
|
95
|
+
class: D(o.classes),
|
|
104
96
|
ref: "avatarRef"
|
|
105
97
|
}, [
|
|
106
|
-
!((
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
], 64)) :
|
|
110
|
-
], 6)) :
|
|
98
|
+
!((x = (d = o.avatarGroup) == null ? void 0 : d.props) != null && x.maxCount) || o.index <= ((c = (f = o.avatarGroup) == null ? void 0 : f.props) == null ? void 0 : c.maxCount) ? E(o.$slots, "default", { key: 0 }) : h("", !0),
|
|
99
|
+
o.showMax && ((n = (t = o.avatarGroup) == null ? void 0 : t.props) != null && n.maxCount) ? (L(), B(F, { key: 1 }, [
|
|
100
|
+
q(H((u = (a = o.avatarGroup) == null ? void 0 : a.props) != null && u.maxContent ? (v = (p = o.avatarGroup) == null ? void 0 : p.props) == null ? void 0 : v.maxContent : `+ ${o.maxIndex - ((z = (S = o.avatarGroup) == null ? void 0 : S.props) == null ? void 0 : z.maxCount)}`), 1)
|
|
101
|
+
], 64)) : h("", !0)
|
|
102
|
+
], 6)) : h("", !0);
|
|
111
103
|
}
|
|
112
|
-
const
|
|
104
|
+
const ee = /* @__PURE__ */ K(U, [["render", W]]);
|
|
113
105
|
export {
|
|
114
|
-
|
|
106
|
+
ee as default
|
|
115
107
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { toRefs, ref, computed, onMounted, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { toRefs as p, ref as a, computed as l, onMounted as u, provide as f, openBlock as i, createElementBlock as c, normalizeClass as d, renderSlot as m } from "vue";
|
|
2
|
+
import { c as g } from "./component-234624bc.js";
|
|
3
|
+
import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName, create } =
|
|
6
|
-
const _sfc_main = create({
|
|
5
|
+
const { componentName: S, create: y } = g("avatar-group"), C = y({
|
|
7
6
|
props: {
|
|
8
7
|
maxContent: {
|
|
9
8
|
type: String,
|
|
@@ -38,39 +37,32 @@ const _sfc_main = create({
|
|
|
38
37
|
default: "left"
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
|
-
setup(
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
provide("avatarGroup", {
|
|
54
|
-
props,
|
|
55
|
-
avatarGroupRef,
|
|
56
|
-
index: index2
|
|
57
|
-
});
|
|
58
|
-
return {
|
|
59
|
-
classes,
|
|
40
|
+
setup(e, { emit: n, slots: s }) {
|
|
41
|
+
p(e);
|
|
42
|
+
const t = a(null), r = a(0), o = l(() => ({
|
|
43
|
+
[S]: !0
|
|
44
|
+
}));
|
|
45
|
+
return u(() => {
|
|
46
|
+
}), f("avatarGroup", {
|
|
47
|
+
props: e,
|
|
48
|
+
avatarGroupRef: t,
|
|
49
|
+
index: r
|
|
50
|
+
}), {
|
|
51
|
+
classes: o,
|
|
60
52
|
// styles,
|
|
61
|
-
avatarGroupRef
|
|
53
|
+
avatarGroupRef: t
|
|
62
54
|
};
|
|
63
55
|
}
|
|
64
56
|
});
|
|
65
|
-
function
|
|
66
|
-
return
|
|
67
|
-
class:
|
|
57
|
+
function _(e, n, s, t, r, o) {
|
|
58
|
+
return i(), c("view", {
|
|
59
|
+
class: d(e.classes),
|
|
68
60
|
ref: "avatarGroupRef"
|
|
69
61
|
}, [
|
|
70
|
-
|
|
62
|
+
m(e.$slots, "default")
|
|
71
63
|
], 2);
|
|
72
64
|
}
|
|
73
|
-
const
|
|
65
|
+
const R = /* @__PURE__ */ x(C, [["render", _]]);
|
|
74
66
|
export {
|
|
75
|
-
|
|
67
|
+
R as default
|
|
76
68
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { reactive, computed, onMounted, onUnmounted, onActivated, onDeactivated, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createVNode } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { r as
|
|
4
|
-
import { Top } from "@nutui/icons-vue";
|
|
5
|
-
import { _ as
|
|
1
|
+
import { reactive as k, computed as u, onMounted as b, onUnmounted as y, onActivated as w, onDeactivated as x, resolveComponent as A, openBlock as I, createElementBlock as g, normalizeClass as h, normalizeStyle as z, withModifiers as L, renderSlot as N, createVNode as $ } from "vue";
|
|
2
|
+
import { c as C } from "./component-234624bc.js";
|
|
3
|
+
import { r as p, c as B } from "./raf-a74f1a06.js";
|
|
4
|
+
import { Top as _ } from "@nutui/icons-vue";
|
|
5
|
+
import { _ as D } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
6
|
import "../locale/lang";
|
|
7
|
-
const { componentName, create } =
|
|
8
|
-
const _sfc_main = create({
|
|
7
|
+
const { componentName: M, create: S } = C("backtop"), W = S({
|
|
9
8
|
components: {
|
|
10
|
-
Top
|
|
9
|
+
Top: _
|
|
11
10
|
},
|
|
12
11
|
props: {
|
|
13
12
|
bottom: {
|
|
@@ -32,7 +31,7 @@ const _sfc_main = create({
|
|
|
32
31
|
},
|
|
33
32
|
isAnimation: {
|
|
34
33
|
type: Boolean,
|
|
35
|
-
default:
|
|
34
|
+
default: !0
|
|
36
35
|
},
|
|
37
36
|
duration: {
|
|
38
37
|
type: Number,
|
|
@@ -40,109 +39,70 @@ const _sfc_main = create({
|
|
|
40
39
|
}
|
|
41
40
|
},
|
|
42
41
|
emits: ["click"],
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
45
|
-
backTop:
|
|
42
|
+
setup(t, { emit: n }) {
|
|
43
|
+
const e = k({
|
|
44
|
+
backTop: !1,
|
|
46
45
|
scrollTop: 0,
|
|
47
46
|
scrollEl: window,
|
|
48
47
|
startTime: 0,
|
|
49
|
-
keepAlive:
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
right: `${props.right}px`,
|
|
61
|
-
bottom: `${props.bottom}px`,
|
|
62
|
-
zIndex: props.zIndex
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
function scrollListener() {
|
|
66
|
-
if (state.scrollEl instanceof Window) {
|
|
67
|
-
state.scrollTop = state.scrollEl.pageYOffset;
|
|
68
|
-
} else {
|
|
69
|
-
state.scrollTop = state.scrollEl.scrollTop;
|
|
70
|
-
}
|
|
71
|
-
state.backTop = state.scrollTop >= props.distance;
|
|
48
|
+
keepAlive: !1
|
|
49
|
+
}), s = u(() => ({
|
|
50
|
+
[M]: !0,
|
|
51
|
+
show: e.backTop
|
|
52
|
+
})), c = u(() => ({
|
|
53
|
+
right: `${t.right}px`,
|
|
54
|
+
bottom: `${t.bottom}px`,
|
|
55
|
+
zIndex: t.zIndex
|
|
56
|
+
}));
|
|
57
|
+
function l() {
|
|
58
|
+
e.scrollEl instanceof Window ? e.scrollTop = e.scrollEl.pageYOffset : e.scrollTop = e.scrollEl.scrollTop, e.backTop = e.scrollTop >= t.distance;
|
|
72
59
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
window.scrollTo(0, y);
|
|
76
|
-
} else {
|
|
77
|
-
state.scrollEl.scrollTop = y;
|
|
78
|
-
}
|
|
60
|
+
function i(o = 0) {
|
|
61
|
+
e.scrollEl instanceof Window ? window.scrollTo(0, o) : e.scrollEl.scrollTop = o;
|
|
79
62
|
}
|
|
80
|
-
function
|
|
81
|
-
let
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
scroll(y);
|
|
85
|
-
cid = requestAniFrame(fn);
|
|
86
|
-
if (t == props.duration || y == 0) {
|
|
87
|
-
cancelRaf(cid);
|
|
88
|
-
}
|
|
63
|
+
function r() {
|
|
64
|
+
let o = p(function T() {
|
|
65
|
+
var f = t.duration - Math.max(0, e.startTime - +/* @__PURE__ */ new Date() + t.duration), m = f * -e.scrollTop / t.duration + e.scrollTop;
|
|
66
|
+
i(m), o = p(T), (f == t.duration || m == 0) && B(o);
|
|
89
67
|
});
|
|
90
68
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
state.scrollEl.addEventListener("resize", scrollListener, false);
|
|
69
|
+
function v() {
|
|
70
|
+
e.scrollEl.addEventListener("scroll", l, !1), e.scrollEl.addEventListener("resize", l, !1);
|
|
94
71
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
state.scrollEl.removeEventListener("resize", scrollListener, false);
|
|
72
|
+
function a() {
|
|
73
|
+
e.scrollEl.removeEventListener("scroll", l, !1), e.scrollEl.removeEventListener("resize", l, !1);
|
|
98
74
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
101
|
-
props.isAnimation && props.duration > 0 ? scrollAnimation() : scroll();
|
|
102
|
-
emit("click", e);
|
|
75
|
+
function E(o) {
|
|
76
|
+
e.startTime = +/* @__PURE__ */ new Date(), t.isAnimation && t.duration > 0 ? r() : i(), n("click", o);
|
|
103
77
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
state.scrollEl = document.getElementById(props.elId);
|
|
107
|
-
}
|
|
108
|
-
addEventListener();
|
|
78
|
+
function d() {
|
|
79
|
+
t.elId && document.getElementById(t.elId) && (e.scrollEl = document.getElementById(t.elId)), v();
|
|
109
80
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
onDeactivated(() => {
|
|
126
|
-
state.keepAlive = true;
|
|
127
|
-
removeEventListener();
|
|
128
|
-
});
|
|
129
|
-
return {
|
|
130
|
-
state,
|
|
131
|
-
classes,
|
|
132
|
-
style,
|
|
133
|
-
click
|
|
81
|
+
return b(() => {
|
|
82
|
+
t.distance == 0 && (e.backTop = !0), d();
|
|
83
|
+
}), y(() => {
|
|
84
|
+
a();
|
|
85
|
+
}), w(() => {
|
|
86
|
+
e.keepAlive && (e.keepAlive = !1, d());
|
|
87
|
+
}), x(() => {
|
|
88
|
+
e.keepAlive = !0, a();
|
|
89
|
+
}), {
|
|
90
|
+
state: e,
|
|
91
|
+
classes: s,
|
|
92
|
+
style: c,
|
|
93
|
+
click: E
|
|
134
94
|
};
|
|
135
95
|
}
|
|
136
96
|
});
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
141
|
-
style:
|
|
142
|
-
onClick:
|
|
97
|
+
function q(t, n, e, s, c, l) {
|
|
98
|
+
const i = A("Top");
|
|
99
|
+
return I(), g("div", {
|
|
100
|
+
class: h(t.classes),
|
|
101
|
+
style: z(t.style),
|
|
102
|
+
onClick: n[0] || (n[0] = L((...r) => t.click && t.click(...r), ["stop"]))
|
|
143
103
|
}, [
|
|
144
|
-
|
|
145
|
-
|
|
104
|
+
N(t.$slots, "default", {}, () => [
|
|
105
|
+
$(i, {
|
|
146
106
|
width: "19px",
|
|
147
107
|
height: "19px",
|
|
148
108
|
class: "nut-backtop-main"
|
|
@@ -150,7 +110,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
150
110
|
])
|
|
151
111
|
], 6);
|
|
152
112
|
}
|
|
153
|
-
const
|
|
113
|
+
const j = /* @__PURE__ */ D(W, [["render", q]]);
|
|
154
114
|
export {
|
|
155
|
-
|
|
115
|
+
j as default
|
|
156
116
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { reactive, computed, openBlock, createElementBlock, withDirectives, createElementVNode, normalizeStyle, renderSlot, vShow, toDisplayString, normalizeClass } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { reactive as f, computed as r, openBlock as b, createElementBlock as m, withDirectives as d, createElementVNode as s, normalizeStyle as u, renderSlot as i, vShow as c, toDisplayString as p, normalizeClass as g } from "vue";
|
|
2
|
+
import { c as y } from "./component-234624bc.js";
|
|
3
|
+
import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { create } =
|
|
6
|
-
const _sfc_main = create({
|
|
5
|
+
const { create: $ } = y("badge"), v = $({
|
|
7
6
|
props: {
|
|
8
7
|
value: {
|
|
9
8
|
type: [String, Number]
|
|
@@ -14,11 +13,15 @@ const _sfc_main = create({
|
|
|
14
13
|
},
|
|
15
14
|
dot: {
|
|
16
15
|
type: Boolean,
|
|
17
|
-
default:
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
bubble: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
18
21
|
},
|
|
19
22
|
hidden: {
|
|
20
23
|
type: Boolean,
|
|
21
|
-
default:
|
|
24
|
+
default: !1
|
|
22
25
|
},
|
|
23
26
|
top: {
|
|
24
27
|
type: String,
|
|
@@ -37,56 +40,46 @@ const _sfc_main = create({
|
|
|
37
40
|
default: ""
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
const content = computed(() => {
|
|
51
|
-
if (props.dot)
|
|
43
|
+
setup(e) {
|
|
44
|
+
const o = f({}), a = r(() => ({
|
|
45
|
+
top: `${e.top}px`,
|
|
46
|
+
right: `${e.right}px`,
|
|
47
|
+
zIndex: e.zIndex,
|
|
48
|
+
background: e.color
|
|
49
|
+
})), l = r(() => {
|
|
50
|
+
if (e.dot)
|
|
52
51
|
return;
|
|
53
|
-
const value =
|
|
54
|
-
|
|
55
|
-
if (typeof value === "number" && typeof max === "number") {
|
|
56
|
-
return max < value ? `${max}+` : value;
|
|
57
|
-
}
|
|
58
|
-
return value;
|
|
52
|
+
const t = e.value, n = e.max;
|
|
53
|
+
return typeof t == "number" && typeof n == "number" && n < t ? `${n}+` : t;
|
|
59
54
|
});
|
|
60
55
|
return {
|
|
61
|
-
state,
|
|
62
|
-
stl,
|
|
63
|
-
content
|
|
56
|
+
state: o,
|
|
57
|
+
stl: a,
|
|
58
|
+
content: l
|
|
64
59
|
};
|
|
65
60
|
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
71
|
-
withDirectives(createElementVNode("view", {
|
|
61
|
+
}), _ = { class: "nut-badge" }, S = ["textContent"];
|
|
62
|
+
function B(e, o, a, l, t, n) {
|
|
63
|
+
return b(), m("view", _, [
|
|
64
|
+
d(s("view", {
|
|
72
65
|
class: "nut-badge__icon",
|
|
73
|
-
style:
|
|
66
|
+
style: u(e.stl)
|
|
74
67
|
}, [
|
|
75
|
-
|
|
68
|
+
i(e.$slots, "icon")
|
|
76
69
|
], 4), [
|
|
77
|
-
[
|
|
70
|
+
[c, !e.hidden && !e.dot && e.$slots.icon]
|
|
78
71
|
]),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
textContent:
|
|
82
|
-
class:
|
|
83
|
-
style:
|
|
84
|
-
}, null, 14,
|
|
85
|
-
[
|
|
72
|
+
i(e.$slots, "default"),
|
|
73
|
+
d(s("view", {
|
|
74
|
+
textContent: p(e.content),
|
|
75
|
+
class: g(["nut-badge__content nut-badge__content--sup", { "nut-badge__content--dot": e.dot, "nut-badge__content--bubble": !e.dot && e.bubble }]),
|
|
76
|
+
style: u(e.stl)
|
|
77
|
+
}, null, 14, S), [
|
|
78
|
+
[c, !e.hidden && (e.content || e.dot)]
|
|
86
79
|
])
|
|
87
80
|
]);
|
|
88
81
|
}
|
|
89
|
-
const
|
|
82
|
+
const k = /* @__PURE__ */ h(v, [["render", B]]);
|
|
90
83
|
export {
|
|
91
|
-
|
|
84
|
+
k as default
|
|
92
85
|
};
|