@nutui/nutui 4.0.10-beta.1 → 4.0.11
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 +23 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6316 -7237
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- 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 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- 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 +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -437
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +123 -174
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- 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/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +148 -45
- package/dist/styles/themes/jdb.scss +148 -45
- package/dist/styles/themes/jddkh.scss +148 -45
- package/dist/styles/themes/jdt.scss +148 -45
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- 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-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-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- 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/mountComponent-8b24c346.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
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
1
|
+
var V = Object.defineProperty, z = Object.defineProperties;
|
|
2
|
+
var A = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var C = Object.getOwnPropertySymbols;
|
|
4
|
+
var D = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var H = (e, l, o) => l in e ? V(e, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[l] = o, v = (e, l) => {
|
|
6
|
+
for (var o in l || (l = {}))
|
|
7
|
+
D.call(l, o) && H(e, o, l[o]);
|
|
8
|
+
if (C)
|
|
9
|
+
for (var o of C(l))
|
|
10
|
+
I.call(l, o) && H(e, o, l[o]);
|
|
11
|
+
return e;
|
|
12
|
+
}, w = (e, l) => z(e, A(l));
|
|
13
|
+
import { ref as S, reactive as L, computed as O, watch as R, onMounted as j, toRefs as q, openBlock as r, createElementBlock as u, normalizeClass as F, toDisplayString as m, createCommentVNode as x, createTextVNode as p, withModifiers as M } from "vue";
|
|
14
|
+
import { c as G } from "./component-234624bc.js";
|
|
15
|
+
import { _ as J } from "./_plugin-vue_export-helper-dad06003.js";
|
|
23
16
|
import "../locale/lang";
|
|
24
|
-
const { componentName, create } =
|
|
25
|
-
const _sfc_main = create({
|
|
17
|
+
const { componentName: K, create: Q } = G("ellipsis"), U = Q({
|
|
26
18
|
props: {
|
|
27
19
|
content: {
|
|
28
20
|
type: String,
|
|
@@ -54,178 +46,103 @@ const _sfc_main = create({
|
|
|
54
46
|
}
|
|
55
47
|
},
|
|
56
48
|
emits: ["click", "change"],
|
|
57
|
-
setup(
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const state = reactive({
|
|
63
|
-
exceeded: false,
|
|
49
|
+
setup(e, { emit: l }) {
|
|
50
|
+
const o = S(null);
|
|
51
|
+
let n = null, y = 0;
|
|
52
|
+
const g = S(), s = L({
|
|
53
|
+
exceeded: !1,
|
|
64
54
|
//是否超出
|
|
65
|
-
expanded:
|
|
55
|
+
expanded: !1
|
|
66
56
|
//是否折叠
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
watch(
|
|
75
|
-
() => props.content,
|
|
76
|
-
(newV, oldVal) => {
|
|
77
|
-
if (newV != oldVal) {
|
|
78
|
-
createContainer();
|
|
79
|
-
}
|
|
57
|
+
}), N = O(() => ({
|
|
58
|
+
[K]: !0
|
|
59
|
+
}));
|
|
60
|
+
R(
|
|
61
|
+
() => e.content,
|
|
62
|
+
(t, i) => {
|
|
63
|
+
t != i && T();
|
|
80
64
|
}
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
createContainer();
|
|
65
|
+
), j(() => {
|
|
66
|
+
T();
|
|
84
67
|
});
|
|
85
|
-
const
|
|
86
|
-
if (!
|
|
68
|
+
const T = () => {
|
|
69
|
+
if (!o.value)
|
|
87
70
|
return;
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
container.style.webkitLineClamp = "unset";
|
|
104
|
-
container.style.display = "block";
|
|
105
|
-
const lineHeight = pxToNumber(originStyle.lineHeight === "normal" ? props.lineHeight : originStyle.lineHeight);
|
|
106
|
-
maxHeight = Math.floor(
|
|
107
|
-
lineHeight * (Number(props.rows) + 0.5) + pxToNumber(originStyle.paddingTop) + pxToNumber(originStyle.paddingBottom)
|
|
108
|
-
);
|
|
109
|
-
container.innerText = props.content;
|
|
110
|
-
document.body.appendChild(container);
|
|
111
|
-
calcEllipse();
|
|
112
|
-
};
|
|
113
|
-
const calcEllipse = () => {
|
|
114
|
-
if (container.offsetHeight <= maxHeight) {
|
|
115
|
-
state.exceeded = false;
|
|
116
|
-
document.body.removeChild(container);
|
|
117
|
-
} else {
|
|
118
|
-
state.exceeded = true;
|
|
119
|
-
const end = props.content.length;
|
|
120
|
-
const middle = Math.floor((0 + end) / 2);
|
|
121
|
-
const ellipsised = props.direction === "middle" ? tailorMiddle([0, middle], [middle, end]) : tailor(0, end);
|
|
122
|
-
ellipsis.value = ellipsised;
|
|
123
|
-
document.body.removeChild(container);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const tailor = (left, right) => {
|
|
127
|
-
const actionText = state.expanded ? props.collapseText : props.expandText;
|
|
128
|
-
const end = props.content.length;
|
|
129
|
-
if (right - left <= 1) {
|
|
130
|
-
if (props.direction === "end") {
|
|
131
|
-
return {
|
|
132
|
-
leading: props.content.slice(0, left) + props.symbol
|
|
133
|
-
};
|
|
134
|
-
} else {
|
|
135
|
-
return {
|
|
136
|
-
tailing: props.symbol + props.content.slice(right, end)
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const middle = Math.round((left + right) / 2);
|
|
141
|
-
if (props.direction === "end") {
|
|
142
|
-
container.innerText = props.content.slice(0, middle) + props.symbol + actionText;
|
|
143
|
-
} else {
|
|
144
|
-
container.innerText = actionText + props.symbol + props.content.slice(middle, end);
|
|
145
|
-
}
|
|
146
|
-
if (container.offsetHeight <= maxHeight) {
|
|
147
|
-
if (props.direction === "end") {
|
|
148
|
-
return tailor(middle, right);
|
|
149
|
-
} else {
|
|
150
|
-
return tailor(left, middle);
|
|
151
|
-
}
|
|
152
|
-
} else {
|
|
153
|
-
if (props.direction === "end") {
|
|
154
|
-
return tailor(left, middle);
|
|
155
|
-
} else {
|
|
156
|
-
return tailor(middle, right);
|
|
157
|
-
}
|
|
71
|
+
const t = window.getComputedStyle(o.value);
|
|
72
|
+
n = document.createElement("div"), Array.prototype.slice.apply(t).forEach((a) => {
|
|
73
|
+
n.style.setProperty(a, t.getPropertyValue(a));
|
|
74
|
+
}), n.style.position = "fixed", n.style.left = "999999px", n.style.top = "999999px", n.style.zIndex = "-1000", n.style.height = "auto", n.style.minHeight = "auto", n.style.maxHeight = "auto", n.style.textOverflow = "clip", n.style.whiteSpace = "normal", n.style.webkitLineClamp = "unset", n.style.display = "block";
|
|
75
|
+
const c = k(t.lineHeight === "normal" ? e.lineHeight : t.lineHeight);
|
|
76
|
+
y = Math.floor(
|
|
77
|
+
c * (Number(e.rows) + 0.5) + k(t.paddingTop) + k(t.paddingBottom)
|
|
78
|
+
), n.innerText = e.content, document.body.appendChild(n), $();
|
|
79
|
+
}, $ = () => {
|
|
80
|
+
if (n.offsetHeight <= y)
|
|
81
|
+
s.exceeded = !1, document.body.removeChild(n);
|
|
82
|
+
else {
|
|
83
|
+
s.exceeded = !0;
|
|
84
|
+
const t = e.content.length, i = Math.floor((0 + t) / 2), c = e.direction === "middle" ? h([0, i], [i, t]) : f(0, t);
|
|
85
|
+
g.value = c, document.body.removeChild(n);
|
|
158
86
|
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
87
|
+
}, f = (t, i) => {
|
|
88
|
+
const c = s.expanded ? e.collapseText : e.expandText, a = e.content.length;
|
|
89
|
+
if (i - t <= 1)
|
|
90
|
+
return e.direction === "end" ? {
|
|
91
|
+
leading: e.content.slice(0, t) + e.symbol
|
|
92
|
+
} : {
|
|
93
|
+
tailing: e.symbol + e.content.slice(i, a)
|
|
94
|
+
};
|
|
95
|
+
const d = Math.round((t + i) / 2);
|
|
96
|
+
return e.direction === "end" ? n.innerText = e.content.slice(0, d) + e.symbol + c : n.innerText = c + e.symbol + e.content.slice(d, a), n.offsetHeight <= y ? e.direction === "end" ? f(d, i) : f(t, d) : e.direction === "end" ? f(t, d) : f(d, i);
|
|
97
|
+
}, h = (t, i) => {
|
|
98
|
+
const c = s.expanded ? e.collapseText : e.expandText, a = e.content.length;
|
|
99
|
+
if (t[1] - t[0] <= 1 && i[1] - i[0] <= 1)
|
|
164
100
|
return {
|
|
165
|
-
leading:
|
|
166
|
-
tailing:
|
|
101
|
+
leading: e.content.slice(0, t[0]) + e.symbol,
|
|
102
|
+
tailing: e.symbol + e.content.slice(i[1], a)
|
|
167
103
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (container.offsetHeight <= maxHeight) {
|
|
173
|
-
return tailorMiddle([leftPartMiddle, leftPart[1]], [rightPart[0], rightPartMiddle]);
|
|
174
|
-
} else {
|
|
175
|
-
return tailorMiddle([leftPart[0], leftPartMiddle], [rightPartMiddle, rightPart[1]]);
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const pxToNumber = (value) => {
|
|
179
|
-
if (!value)
|
|
104
|
+
const d = Math.floor((t[0] + t[1]) / 2), b = Math.ceil((i[0] + i[1]) / 2);
|
|
105
|
+
return n.innerText = e.content.slice(0, d) + e.symbol + c + e.symbol + e.content.slice(b, a), n.offsetHeight <= y ? h([d, t[1]], [i[0], b]) : h([t[0], d], [b, i[1]]);
|
|
106
|
+
}, k = (t) => {
|
|
107
|
+
if (!t)
|
|
180
108
|
return 0;
|
|
181
|
-
const
|
|
182
|
-
return
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
emit("change", "expand");
|
|
188
|
-
} else {
|
|
189
|
-
state.expanded = false;
|
|
190
|
-
emit("change", "collapse");
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
const handleClick = () => {
|
|
194
|
-
emit("click");
|
|
109
|
+
const i = t.match(/^\d*(\.\d*)?/);
|
|
110
|
+
return i ? Number(i[0]) : 0;
|
|
111
|
+
}, E = (t) => {
|
|
112
|
+
t == 1 ? (s.expanded = !0, l("change", "expand")) : (s.expanded = !1, l("change", "collapse"));
|
|
113
|
+
}, B = () => {
|
|
114
|
+
l("click");
|
|
195
115
|
};
|
|
196
|
-
return
|
|
116
|
+
return w(v({}, q(s)), { root: o, ellipsis: g, classes: N, clickHandle: E, handleClick: B });
|
|
197
117
|
}
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return openBlock(), createElementBlock("view", {
|
|
204
|
-
class: normalizeClass(_ctx.classes),
|
|
205
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
118
|
+
}), W = { key: 0 }, X = { key: 1 }, Y = { key: 2 };
|
|
119
|
+
function Z(e, l, o, n, y, g) {
|
|
120
|
+
return r(), u("view", {
|
|
121
|
+
class: F(e.classes),
|
|
122
|
+
onClick: l[2] || (l[2] = (...s) => e.handleClick && e.handleClick(...s)),
|
|
206
123
|
ref: "root"
|
|
207
124
|
}, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
125
|
+
e.exceeded ? x("", !0) : (r(), u("view", W, m(e.content), 1)),
|
|
126
|
+
e.exceeded && !e.expanded ? (r(), u("view", X, [
|
|
127
|
+
p(m(e.ellipsis && e.ellipsis.leading), 1),
|
|
128
|
+
e.expandText ? (r(), u("span", {
|
|
212
129
|
key: 0,
|
|
213
130
|
class: "nut-ellipsis__text",
|
|
214
|
-
onClick:
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
])) :
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
131
|
+
onClick: l[0] || (l[0] = M((s) => e.clickHandle(1), ["stop"]))
|
|
132
|
+
}, m(e.expandText), 1)) : x("", !0),
|
|
133
|
+
p(m(e.ellipsis && e.ellipsis.tailing), 1)
|
|
134
|
+
])) : x("", !0),
|
|
135
|
+
e.exceeded && e.expanded ? (r(), u("view", Y, [
|
|
136
|
+
p(m(e.content) + " ", 1),
|
|
137
|
+
e.expandText ? (r(), u("span", {
|
|
221
138
|
key: 0,
|
|
222
139
|
class: "nut-ellipsis__text",
|
|
223
|
-
onClick:
|
|
224
|
-
},
|
|
225
|
-
])) :
|
|
140
|
+
onClick: l[1] || (l[1] = M((s) => e.clickHandle(2), ["stop"]))
|
|
141
|
+
}, m(e.collapseText), 1)) : x("", !0)
|
|
142
|
+
])) : x("", !0)
|
|
226
143
|
], 2);
|
|
227
144
|
}
|
|
228
|
-
const
|
|
145
|
+
const le = /* @__PURE__ */ J(U, [["render", Z]]);
|
|
229
146
|
export {
|
|
230
|
-
|
|
147
|
+
le as default
|
|
231
148
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { toRefs as m, computed as c, openBlock as r, createElementBlock as a, createElementVNode as u, normalizeStyle as d, renderSlot as o, Fragment as f, createCommentVNode as n, toDisplayString 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 { componentName, create, translate } =
|
|
6
|
-
const defaultStatus = {
|
|
5
|
+
const { componentName: B, create: v, translate: $ } = y("empty"), S = {
|
|
7
6
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
8
7
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
9
8
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
10
|
-
}
|
|
11
|
-
const _sfc_main = create({
|
|
9
|
+
}, _ = v({
|
|
12
10
|
props: {
|
|
13
11
|
image: {
|
|
14
12
|
type: String,
|
|
@@ -26,51 +24,37 @@ const _sfc_main = create({
|
|
|
26
24
|
default: ""
|
|
27
25
|
}
|
|
28
26
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const { image, imageSize } =
|
|
31
|
-
const imgStyle = computed(() => {
|
|
32
|
-
if (!imageSize.value) {
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
if (typeof imageSize.value === "number") {
|
|
36
|
-
return `width:${imageSize.value}px;height:${imageSize.value}px`;
|
|
37
|
-
}
|
|
38
|
-
return `width:${imageSize.value};height:${imageSize.value}`;
|
|
39
|
-
});
|
|
40
|
-
const isHttpUrl = image.value.startsWith("https://") || image.value.startsWith("http://") || image.value.startsWith("//");
|
|
41
|
-
const imageUrl = isHttpUrl ? image.value : defaultStatus[image.value];
|
|
27
|
+
setup(e) {
|
|
28
|
+
const { image: s, imageSize: t } = m(e), i = c(() => t.value ? typeof t.value == "number" ? `width:${t.value}px;height:${t.value}px` : `width:${t.value};height:${t.value}` : "");
|
|
42
29
|
return {
|
|
43
|
-
imageUrl,
|
|
44
|
-
imgStyle,
|
|
45
|
-
translate
|
|
30
|
+
imageUrl: s.value.startsWith("https://") || s.value.startsWith("http://") || s.value.startsWith("//") ? s.value : S[s.value],
|
|
31
|
+
imgStyle: i,
|
|
32
|
+
translate: $
|
|
46
33
|
};
|
|
47
34
|
}
|
|
48
|
-
})
|
|
49
|
-
const _hoisted_1 = { class: "nut-empty" };
|
|
50
|
-
const _hoisted_2 = ["src"];
|
|
51
|
-
const _hoisted_3 = {
|
|
35
|
+
}), k = { class: "nut-empty" }, b = ["src"], w = {
|
|
52
36
|
key: 1,
|
|
53
37
|
class: "nut-empty__description"
|
|
54
38
|
};
|
|
55
|
-
function
|
|
56
|
-
return
|
|
57
|
-
|
|
39
|
+
function U(e, s, t, i, l, p) {
|
|
40
|
+
return r(), a("view", k, [
|
|
41
|
+
u("view", {
|
|
58
42
|
class: "nut-empty__box",
|
|
59
|
-
style:
|
|
43
|
+
style: d(e.imgStyle)
|
|
60
44
|
}, [
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
e.$slots.image ? o(e.$slots, "image", { key: 0 }) : (r(), a(f, { key: 1 }, [
|
|
46
|
+
e.imageUrl ? (r(), a("img", {
|
|
63
47
|
key: 0,
|
|
64
48
|
class: "nut-empty__box--img",
|
|
65
|
-
src:
|
|
66
|
-
}, null, 8,
|
|
49
|
+
src: e.imageUrl
|
|
50
|
+
}, null, 8, b)) : n("", !0)
|
|
67
51
|
], 64))
|
|
68
52
|
], 4),
|
|
69
|
-
|
|
70
|
-
|
|
53
|
+
e.$slots.description ? o(e.$slots, "description", { key: 0 }) : (r(), a("view", w, g(e.description || e.translate("noData")), 1)),
|
|
54
|
+
e.$slots.default ? o(e.$slots, "default", { key: 2 }) : n("", !0)
|
|
71
55
|
]);
|
|
72
56
|
}
|
|
73
|
-
const
|
|
57
|
+
const C = /* @__PURE__ */ h(_, [["render", U]]);
|
|
74
58
|
export {
|
|
75
|
-
|
|
59
|
+
C as default
|
|
76
60
|
};
|
|
@@ -1,135 +1,112 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { computed, ref
|
|
3
|
-
import
|
|
4
|
-
import { Left } from "@nutui/icons-vue";
|
|
5
|
-
import { _ as
|
|
1
|
+
import { c as b } from "./component-234624bc.js";
|
|
2
|
+
import { computed as g, ref as $, resolveComponent as p, openBlock as s, createElementBlock as i, normalizeClass as v, normalizeStyle as S, createBlock as V, createCommentVNode as f, renderSlot as m, createElementVNode as l, Fragment as w, renderList as L, toDisplayString as u, createVNode as T } from "vue";
|
|
3
|
+
import y from "./Overlay.js";
|
|
4
|
+
import { Left as B } from "@nutui/icons-vue";
|
|
5
|
+
import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
6
|
import "../locale/lang";
|
|
7
|
-
const { componentName, translate } =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
},
|
|
16
|
-
overlay: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: true
|
|
19
|
-
},
|
|
20
|
-
navList: {
|
|
21
|
-
default: () => [],
|
|
22
|
-
type: Array
|
|
23
|
-
},
|
|
24
|
-
activeColor: {
|
|
25
|
-
default: "",
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
activeText: {
|
|
29
|
-
default: "",
|
|
30
|
-
type: String
|
|
31
|
-
},
|
|
32
|
-
unActiveText: {
|
|
33
|
-
default: "",
|
|
34
|
-
type: String
|
|
35
|
-
},
|
|
36
|
-
position: {
|
|
37
|
-
default: () => {
|
|
38
|
-
return {
|
|
39
|
-
top: "auto",
|
|
40
|
-
bottom: "auto"
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
type: Object
|
|
44
|
-
},
|
|
45
|
-
type: {
|
|
46
|
-
default: "right",
|
|
47
|
-
type: String
|
|
48
|
-
}
|
|
7
|
+
const { componentName: x, translate: A } = b("fixed-nav"), N = (e) => ({
|
|
8
|
+
components: e,
|
|
9
|
+
props: {
|
|
10
|
+
visible: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
49
13
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
14
|
+
overlay: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
navList: {
|
|
19
|
+
default: () => [],
|
|
20
|
+
type: Array
|
|
21
|
+
},
|
|
22
|
+
activeColor: {
|
|
23
|
+
default: "",
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
activeText: {
|
|
27
|
+
default: "",
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
unActiveText: {
|
|
31
|
+
default: "",
|
|
32
|
+
type: String
|
|
33
|
+
},
|
|
34
|
+
position: {
|
|
35
|
+
default: () => ({
|
|
36
|
+
top: "auto",
|
|
37
|
+
bottom: "auto"
|
|
38
|
+
}),
|
|
39
|
+
type: Object
|
|
40
|
+
},
|
|
41
|
+
type: {
|
|
42
|
+
default: "right",
|
|
43
|
+
type: String
|
|
72
44
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:visible", "selected"],
|
|
47
|
+
setup(n, { emit: a }) {
|
|
48
|
+
const c = g(() => ({
|
|
49
|
+
[x]: !0,
|
|
50
|
+
active: n.visible,
|
|
51
|
+
[n.type]: !0
|
|
52
|
+
})), r = $(-1);
|
|
53
|
+
return { classes: c, updateValue: (o = !n.visible) => {
|
|
54
|
+
a("update:visible", o);
|
|
55
|
+
}, selected: (o, t) => {
|
|
56
|
+
a("selected", {
|
|
57
|
+
item: o,
|
|
58
|
+
event: t
|
|
59
|
+
}), r.value = o.id;
|
|
60
|
+
}, translate: A, current: r };
|
|
61
|
+
}
|
|
62
|
+
}), { create: z } = b("fixed-nav"), E = z(
|
|
63
|
+
N({
|
|
64
|
+
[y.name]: y,
|
|
65
|
+
Left: B
|
|
80
66
|
})
|
|
81
|
-
)
|
|
82
|
-
const _hoisted_1 = { class: "nut-fixed-nav__list" };
|
|
83
|
-
const _hoisted_2 = ["onClick"];
|
|
84
|
-
const _hoisted_3 = ["src"];
|
|
85
|
-
const _hoisted_4 = { class: "span" };
|
|
86
|
-
const _hoisted_5 = {
|
|
67
|
+
), O = { class: "nut-fixed-nav__list" }, j = ["onClick"], D = ["src"], F = { class: "span" }, q = {
|
|
87
68
|
key: 0,
|
|
88
69
|
class: "b"
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class: normalizeClass(_ctx.classes),
|
|
96
|
-
style: normalizeStyle(_ctx.position)
|
|
70
|
+
}, G = { class: "text" };
|
|
71
|
+
function H(e, n, a, c, r, C) {
|
|
72
|
+
const d = p("nut-overlay"), o = p("Left");
|
|
73
|
+
return s(), i("view", {
|
|
74
|
+
class: v(e.classes),
|
|
75
|
+
style: S(e.position)
|
|
97
76
|
}, [
|
|
98
|
-
|
|
77
|
+
e.overlay ? (s(), V(d, {
|
|
99
78
|
key: 0,
|
|
100
|
-
visible:
|
|
79
|
+
visible: e.visible,
|
|
101
80
|
"z-index": 200,
|
|
102
|
-
onClick:
|
|
103
|
-
}, null, 8, ["visible"])) :
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
], 10, _hoisted_2);
|
|
118
|
-
}), 128))
|
|
81
|
+
onClick: n[0] || (n[0] = (t) => e.updateValue(!1))
|
|
82
|
+
}, null, 8, ["visible"])) : f("", !0),
|
|
83
|
+
m(e.$slots, "list", {}, () => [
|
|
84
|
+
l("view", O, [
|
|
85
|
+
(s(!0), i(w, null, L(e.navList, (t, k) => (s(), i("view", {
|
|
86
|
+
class: v(["nut-fixed-nav__list-item", { active: t.id == e.current }]),
|
|
87
|
+
onClick: (_) => e.selected(t, _),
|
|
88
|
+
key: t.id || k
|
|
89
|
+
}, [
|
|
90
|
+
l("img", {
|
|
91
|
+
src: t.icon
|
|
92
|
+
}, null, 8, D),
|
|
93
|
+
l("view", F, u(t.text), 1),
|
|
94
|
+
t.num ? (s(), i("view", q, u(t.num), 1)) : f("", !0)
|
|
95
|
+
], 10, j))), 128))
|
|
119
96
|
])
|
|
120
97
|
]),
|
|
121
|
-
|
|
98
|
+
l("div", {
|
|
122
99
|
class: "nut-fixed-nav__btn",
|
|
123
|
-
onClick:
|
|
100
|
+
onClick: n[1] || (n[1] = (t) => e.updateValue())
|
|
124
101
|
}, [
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
m(e.$slots, "btn", {}, () => [
|
|
103
|
+
T(o, { color: "#fff" }),
|
|
104
|
+
l("view", G, u(e.visible ? e.activeText || e.translate("activeText") : e.unActiveText || e.translate("unActiveText")), 1)
|
|
128
105
|
])
|
|
129
106
|
])
|
|
130
107
|
], 6);
|
|
131
108
|
}
|
|
132
|
-
const
|
|
109
|
+
const R = /* @__PURE__ */ h(E, [["render", H]]);
|
|
133
110
|
export {
|
|
134
|
-
|
|
111
|
+
R as default
|
|
135
112
|
};
|