x-next 1.13.0 → 1.15.0
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/AI_CODING.md +6 -5
- package/AI_USAGE/catalog.md +108 -105
- package/AI_USAGE/components/alert-api.md +48 -0
- package/AI_USAGE/components/alert.md +222 -3
- package/AI_USAGE/components/bar-chart-api.md +177 -0
- package/AI_USAGE/components/bar-chart.md +297 -3
- package/AI_USAGE/components/boxicons.md +147 -0
- package/AI_USAGE/components/button-api.md +144 -0
- package/AI_USAGE/components/button.md +447 -3
- package/AI_USAGE/components/charts.md +81 -0
- package/AI_USAGE/components/checkbox-api.md +145 -0
- package/AI_USAGE/components/checkbox.md +365 -3
- package/AI_USAGE/components/color-picker-api.md +52 -0
- package/AI_USAGE/components/color-picker.md +211 -3
- package/AI_USAGE/components/config-provider-api.md +38 -0
- package/AI_USAGE/components/config-provider.md +250 -3
- package/AI_USAGE/components/date-picker-api.md +1114 -0
- package/AI_USAGE/components/date-picker.md +378 -3
- package/AI_USAGE/components/dialog-api.md +142 -0
- package/AI_USAGE/components/dialog.md +284 -3
- package/AI_USAGE/components/draggable-api.md +146 -0
- package/AI_USAGE/components/draggable.md +259 -0
- package/AI_USAGE/components/drawer-api.md +78 -0
- package/AI_USAGE/components/drawer.md +256 -0
- package/AI_USAGE/components/dropdown-api.md +529 -0
- package/AI_USAGE/components/dropdown.md +392 -3
- package/AI_USAGE/components/empty-api.md +36 -0
- package/AI_USAGE/components/empty.md +227 -3
- package/AI_USAGE/components/finicon.md +88 -0
- package/AI_USAGE/components/form-api.md +524 -0
- package/AI_USAGE/components/form.md +454 -0
- package/AI_USAGE/components/grid-api.md +527 -0
- package/AI_USAGE/components/grid.md +224 -0
- package/AI_USAGE/components/heatmap-api.md +122 -0
- package/AI_USAGE/components/heatmap.md +220 -0
- package/AI_USAGE/components/icon-api.md +4707 -0
- package/AI_USAGE/components/icon.md +257 -0
- package/AI_USAGE/components/image-api.md +440 -0
- package/AI_USAGE/components/image.md +465 -0
- package/AI_USAGE/components/input-api.md +184 -0
- package/AI_USAGE/components/input-number-api.md +66 -0
- package/AI_USAGE/components/input-number.md +294 -0
- package/AI_USAGE/components/input-tag-api.md +114 -0
- package/AI_USAGE/components/input-tag.md +482 -0
- package/AI_USAGE/components/input.md +293 -3
- package/AI_USAGE/components/layout-api.md +147 -0
- package/AI_USAGE/components/layout.md +230 -0
- package/AI_USAGE/components/line-chart-api.md +197 -0
- package/AI_USAGE/components/line-chart.md +306 -3
- package/AI_USAGE/components/link-api.md +42 -0
- package/AI_USAGE/components/link.md +197 -0
- package/AI_USAGE/components/menu-api.md +516 -0
- package/AI_USAGE/components/menu.md +268 -0
- package/AI_USAGE/components/message-api.md +215 -0
- package/AI_USAGE/components/message-box-api.md +108 -0
- package/AI_USAGE/components/message-box.md +268 -3
- package/AI_USAGE/components/message.md +231 -3
- package/AI_USAGE/components/network-api.md +91 -0
- package/AI_USAGE/components/network.md +378 -0
- package/AI_USAGE/components/notification-api.md +236 -0
- package/AI_USAGE/components/notification.md +275 -3
- package/AI_USAGE/components/pagination-api.md +62 -0
- package/AI_USAGE/components/pagination.md +380 -3
- package/AI_USAGE/components/pie-chart-api.md +109 -0
- package/AI_USAGE/components/pie-chart.md +245 -3
- package/AI_USAGE/components/popconfirm-api.md +75 -0
- package/AI_USAGE/components/popconfirm.md +231 -3
- package/AI_USAGE/components/popover-api.md +75 -0
- package/AI_USAGE/components/popover.md +208 -3
- package/AI_USAGE/components/popup-api.md +75 -0
- package/AI_USAGE/components/popup.md +52 -0
- package/AI_USAGE/components/progress-api.md +44 -0
- package/AI_USAGE/components/progress.md +248 -3
- package/AI_USAGE/components/radio-api.md +165 -0
- package/AI_USAGE/components/radio.md +259 -3
- package/AI_USAGE/components/rate-api.md +54 -0
- package/AI_USAGE/components/rate.md +233 -3
- package/AI_USAGE/components/resize-box-api.md +56 -0
- package/AI_USAGE/components/resize-box.md +231 -0
- package/AI_USAGE/components/scrollbar-api.md +77 -0
- package/AI_USAGE/components/scrollbar.md +218 -0
- package/AI_USAGE/components/select-api.md +758 -0
- package/AI_USAGE/components/select.md +640 -3
- package/AI_USAGE/components/skeleton-api.md +85 -0
- package/AI_USAGE/components/skeleton.md +150 -0
- package/AI_USAGE/components/slider-api.md +51 -0
- package/AI_USAGE/components/slider.md +233 -3
- package/AI_USAGE/components/space-api.md +38 -0
- package/AI_USAGE/components/space.md +145 -0
- package/AI_USAGE/components/spin-api.md +43 -0
- package/AI_USAGE/components/spin.md +205 -0
- package/AI_USAGE/components/steps-api.md +111 -0
- package/AI_USAGE/components/steps.md +201 -3
- package/AI_USAGE/components/switch-api.md +58 -0
- package/AI_USAGE/components/switch.md +290 -3
- package/AI_USAGE/components/table-api.md +2919 -0
- package/AI_USAGE/components/table.md +1457 -0
- package/AI_USAGE/components/tabs-api.md +135 -0
- package/AI_USAGE/components/tabs.md +308 -3
- package/AI_USAGE/components/tag-api.md +124 -0
- package/AI_USAGE/components/tag.md +292 -0
- package/AI_USAGE/components/textarea-api.md +55 -0
- package/AI_USAGE/components/textarea.md +326 -3
- package/AI_USAGE/components/time-picker-api.md +137 -0
- package/AI_USAGE/components/time-picker.md +271 -3
- package/AI_USAGE/components/time-range-selector-api.md +44 -0
- package/AI_USAGE/components/time-range-selector.md +355 -0
- package/AI_USAGE/components/timeline-api.md +93 -0
- package/AI_USAGE/components/timeline.md +312 -0
- package/AI_USAGE/components/tooltip-api.md +77 -0
- package/AI_USAGE/components/tooltip.md +182 -0
- package/AI_USAGE/components/tree-select-api.md +498 -0
- package/AI_USAGE/components/tree-select.md +744 -0
- package/AI_USAGE/components/trend-chart-api.md +119 -0
- package/AI_USAGE/components/trend-chart.md +335 -0
- package/AI_USAGE/components/trigger-api.md +124 -0
- package/AI_USAGE/components/trigger.md +185 -0
- package/AI_USAGE/components/upload-api.md +200 -0
- package/AI_USAGE/components/upload.md +711 -3
- package/AI_USAGE/components/watermark-api.md +87 -0
- package/AI_USAGE/components/watermark.md +200 -0
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +36 -7
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +34972 -5
- package/CHANGELOG.md +39 -0
- package/dist/_props/css.d.ts +2 -1
- package/dist/_utils/inherit-component-type.d.ts +11 -0
- package/dist/components/bar-chart/BarChart.d.ts +1 -1
- package/dist/components/bar-chart/index.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +420 -5
- package/dist/components/form-input/index.d.ts +617 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts +689 -1
- package/dist/components/line-chart/LineChart.d.ts +1 -1
- package/dist/components/line-chart/index.d.ts +3 -3
- package/dist/components/line-chart/interface.d.ts +2 -2
- package/dist/components/menu/index.d.ts +786 -1
- package/dist/components/tree-select/TreeNode.vue.d.ts +478 -0
- package/dist/components/tree-select/TreeSelect.d.ts +1549 -0
- package/dist/components/tree-select/TreeSelectDropdown.vue.d.ts +569 -0
- package/dist/components/tree-select/hooks/use-tree-select.d.ts +92 -0
- package/dist/components/tree-select/index.d.ts +3321 -0
- package/dist/components/tree-select/interface.d.ts +203 -0
- package/dist/components/tree-select/utils.d.ts +64 -0
- package/dist/es/_styles/palette-aliases.js +3 -0
- package/dist/es/_utils/inherit-component-type.js +6 -0
- package/dist/es/components/_components/feedback-icon/index.vue2.js +10 -10
- package/dist/es/components/button/Button.js +9 -9
- package/dist/es/components/date-picker/index.js +18 -17
- package/dist/es/components/drawer/src/Drawer.vue.js +6 -6
- package/dist/es/components/form-input/index.js +12 -11
- package/dist/es/components/form-switch/Switch.vue2.js +18 -18
- package/dist/es/components/image/Image.vue2.js +13 -13
- package/dist/es/components/image/ImagePreview.vue2.js +33 -33
- package/dist/es/components/index.js +55 -52
- package/dist/es/components/layout/index.js +10 -9
- package/dist/es/components/link/Link.vue2.js +12 -12
- package/dist/es/components/menu/hooks/use-level.js +5 -5
- package/dist/es/components/menu/index.js +13 -10
- package/dist/es/components/message/message.vue2.js +13 -13
- package/dist/es/components/spin/Spin.js +28 -28
- package/dist/es/components/tag/Tag.vue2.js +22 -22
- package/dist/es/components/timeline/src/Timeline.js +7 -7
- package/dist/es/components/tree-select/TreeNode.vue.js +91 -0
- package/dist/es/components/tree-select/TreeNode.vue2.js +162 -0
- package/dist/es/components/tree-select/TreeSelect.js +865 -0
- package/dist/es/components/tree-select/TreeSelectDropdown.vue.js +57 -0
- package/dist/es/components/tree-select/TreeSelectDropdown.vue2.js +79 -0
- package/dist/es/components/tree-select/hooks/use-tree-select.js +376 -0
- package/dist/es/components/tree-select/index.js +13 -0
- package/dist/es/components/tree-select/utils.js +181 -0
- package/dist/es/icons/animation/animation-loading.js +2 -2
- package/dist/es/index.js +71 -68
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/style/base.css +1 -1
- package/dist/style/dependencies.json +10 -0
- package/dist/style/drawer.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/tree-select.css +1 -0
- package/dist/style/tree-select.js +8 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +11 -5
- package/volar.d.ts +2 -0
|
@@ -12,7 +12,7 @@ import { isBoolean as ne } from "../../_utils/is.js";
|
|
|
12
12
|
import { getClassNameMixin as ue } from "../../_utils/config.js";
|
|
13
13
|
import { useLocale as se } from "../../locale/index.js";
|
|
14
14
|
let ve = 0;
|
|
15
|
-
const
|
|
15
|
+
const Be = q({
|
|
16
16
|
name: "Image",
|
|
17
17
|
components: {
|
|
18
18
|
IconImageClose: $,
|
|
@@ -184,13 +184,13 @@ const Le = q({
|
|
|
184
184
|
previewVisible: N,
|
|
185
185
|
preview: h,
|
|
186
186
|
previewProps: b
|
|
187
|
-
} = H(o), t = J(le, void 0), { t: z } = se(), l = ue("image"), v = Q(), { isLoaded: S, isError: P, isLoading:
|
|
187
|
+
} = H(o), t = J(le, void 0), { t: z } = se(), l = ue("image"), v = Q(), { isLoaded: S, isError: P, isLoading: B, setLoadStatus: f } = ie(), m = i(() => ({
|
|
188
188
|
width: F(d == null ? void 0 : d.value),
|
|
189
189
|
height: F(p == null ? void 0 : p.value)
|
|
190
|
-
})),
|
|
190
|
+
})), E = i(() => o.fit ? { objectFit: o.fit } : {}), O = i(() => [
|
|
191
191
|
l.block,
|
|
192
192
|
{
|
|
193
|
-
[l.element("loading")]:
|
|
193
|
+
[l.element("loading")]: B.value,
|
|
194
194
|
[l.element("loading-error")]: P.value,
|
|
195
195
|
// isLoaded / showFooter 是 ref,这里必须解引用;
|
|
196
196
|
// 直接写对象引用会让条件恒为真,没有 footer 的图片也带上定位类
|
|
@@ -198,7 +198,7 @@ const Le = q({
|
|
|
198
198
|
[l.element("with-footer-outer")]: u.value && s.value === "outer"
|
|
199
199
|
},
|
|
200
200
|
c.class
|
|
201
|
-
]),
|
|
201
|
+
]), A = i(() => [
|
|
202
202
|
{
|
|
203
203
|
...m.value,
|
|
204
204
|
height: u.value && s.value === "outer" ? void 0 : m.value.height
|
|
@@ -206,7 +206,7 @@ const Le = q({
|
|
|
206
206
|
c.style
|
|
207
207
|
]), K = i(() => ({
|
|
208
208
|
height: u.value && s.value === "outer" ? m.value.height : void 0
|
|
209
|
-
})), u = i(() => w != null && w.value || y != null && y.value || j.extra ? ne(g.value) ? !g.value && S.value : g.value === "never" : !1), M = i(() => oe(c, ["class", "style", "src"])), [T,
|
|
209
|
+
})), u = i(() => w != null && w.value || y != null && y.value || j.extra ? ne(g.value) ? !g.value && S.value : g.value === "never" : !1), M = i(() => oe(c, ["class", "style", "src"])), [T, L] = ae(
|
|
210
210
|
k.value,
|
|
211
211
|
X({
|
|
212
212
|
value: N
|
|
@@ -243,27 +243,27 @@ const Le = q({
|
|
|
243
243
|
e.target === v.value && (f("error"), a("error", e));
|
|
244
244
|
}
|
|
245
245
|
function _() {
|
|
246
|
-
I.value && (t != null && t.preview ? t.preview(V) : (a("preview-visible-change", !0), a("update:previewVisible", !0),
|
|
246
|
+
I.value && (t != null && t.preview ? t.preview(V) : (a("preview-visible-change", !0), a("update:previewVisible", !0), L(!0)));
|
|
247
247
|
}
|
|
248
248
|
function G(e) {
|
|
249
249
|
!I.value || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), _());
|
|
250
250
|
}
|
|
251
251
|
function R() {
|
|
252
|
-
a("preview-visible-change", !1), a("update:previewVisible", !1),
|
|
252
|
+
a("preview-visible-change", !1), a("update:previewVisible", !1), L(!1);
|
|
253
253
|
}
|
|
254
254
|
return {
|
|
255
255
|
t: z,
|
|
256
256
|
refImg: v,
|
|
257
257
|
className: l,
|
|
258
|
-
wrapperClassNames:
|
|
259
|
-
wrapperStyles:
|
|
258
|
+
wrapperClassNames: O,
|
|
259
|
+
wrapperStyles: A,
|
|
260
260
|
overlayStyles: K,
|
|
261
261
|
showFooter: u,
|
|
262
262
|
imgProps: M,
|
|
263
263
|
imgStyle: m,
|
|
264
264
|
isLoaded: S,
|
|
265
265
|
isError: P,
|
|
266
|
-
isLoading:
|
|
266
|
+
isLoading: B,
|
|
267
267
|
mergedPreviewVisible: T,
|
|
268
268
|
mergePreview: U,
|
|
269
269
|
canOpenPreview: I,
|
|
@@ -272,10 +272,10 @@ const Le = q({
|
|
|
272
272
|
onImgClick: _,
|
|
273
273
|
onImgKeydown: G,
|
|
274
274
|
onPreviewClose: R,
|
|
275
|
-
fitStyle:
|
|
275
|
+
fitStyle: E
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
});
|
|
279
279
|
export {
|
|
280
|
-
|
|
280
|
+
Be as default
|
|
281
281
|
};
|
|
@@ -4,8 +4,8 @@ import { useLocale as Re } from "../../locale/index.js";
|
|
|
4
4
|
import { getClassNameMixin as Te } from "../../_utils/config.js";
|
|
5
5
|
import { throttleByRaf as Oe } from "../../_utils/throttle-by-raf.js";
|
|
6
6
|
import { KEYBOARD_KEY as c } from "../../_utils/keyboard.js";
|
|
7
|
-
import { isServerRendering as m, on as ze, off as
|
|
8
|
-
import
|
|
7
|
+
import { isServerRendering as m, on as ze, off as Pe } from "../../_utils/dom.js";
|
|
8
|
+
import Ae from "./preview-arrow.vue.js";
|
|
9
9
|
import Ee from "./preview-toolbar.vue.js";
|
|
10
10
|
import Ne from "./hooks/use-image-load-status.js";
|
|
11
11
|
import Be from "./hooks/use-image-drag.js";
|
|
@@ -26,7 +26,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
26
26
|
name: "ImagePreview",
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
components: {
|
|
29
|
-
PreviewArrow:
|
|
29
|
+
PreviewArrow: Ae,
|
|
30
30
|
PreviewToolbar: Ee,
|
|
31
31
|
IconLoading: Le,
|
|
32
32
|
IconClose: xe,
|
|
@@ -170,7 +170,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
170
170
|
actionsLayout: ee,
|
|
171
171
|
defaultScale: F,
|
|
172
172
|
zoomRate: O
|
|
173
|
-
} = he(r),
|
|
173
|
+
} = he(r), n = g(), f = g(), K = g(!1);
|
|
174
174
|
we(() => {
|
|
175
175
|
K.value = !0;
|
|
176
176
|
});
|
|
@@ -180,15 +180,15 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
180
180
|
[z.modifier("hide")]: !i.value
|
|
181
181
|
}]), ae = m ? void 0 : document.body, S = je(ae, D({
|
|
182
182
|
popupContainer: q
|
|
183
|
-
})), ie = y(() => !m && S.value === document.body),
|
|
184
|
-
zIndex:
|
|
183
|
+
})), ie = y(() => !m && S.value === document.body), le = y(() => m || !r.renderToBody || !S.value), {
|
|
184
|
+
zIndex: ne,
|
|
185
185
|
isLastDialog: C,
|
|
186
186
|
close: re
|
|
187
187
|
} = Ye("dialog", {
|
|
188
188
|
visible: i
|
|
189
189
|
}), se = y(() => ({
|
|
190
190
|
...ie.value ? {
|
|
191
|
-
zIndex:
|
|
191
|
+
zIndex: ne.value,
|
|
192
192
|
position: "fixed"
|
|
193
193
|
} : {
|
|
194
194
|
zIndex: "inherit",
|
|
@@ -198,16 +198,16 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
198
198
|
isLoading: ue,
|
|
199
199
|
isLoaded: d,
|
|
200
200
|
isError: ce,
|
|
201
|
-
setLoadStatus:
|
|
202
|
-
} = Ne(), v = g(0),
|
|
201
|
+
setLoadStatus: P
|
|
202
|
+
} = Ne(), v = g(0), A = (e) => Number.isFinite(e) ? Math.max(G, Math.min(Y, e)) : 1, l = g(A(F.value)), {
|
|
203
203
|
translate: I,
|
|
204
204
|
moving: me,
|
|
205
205
|
resetTranslate: fe
|
|
206
206
|
} = Be(D({
|
|
207
|
-
wrapperEl:
|
|
207
|
+
wrapperEl: n,
|
|
208
208
|
imageEl: f,
|
|
209
209
|
visible: i,
|
|
210
|
-
scale:
|
|
210
|
+
scale: l
|
|
211
211
|
})), h = g(!1);
|
|
212
212
|
let p;
|
|
213
213
|
const E = () => {
|
|
@@ -226,7 +226,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
226
226
|
immediate: !0
|
|
227
227
|
});
|
|
228
228
|
function pe() {
|
|
229
|
-
v.value = 0,
|
|
229
|
+
v.value = 0, l.value = A(F.value), fe(), E();
|
|
230
230
|
}
|
|
231
231
|
const N = (e) => ee.value.includes(e), W = (e) => {
|
|
232
232
|
if (!i.value || !r.keyboard || !C()) return;
|
|
@@ -256,7 +256,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
256
256
|
o && (e.stopPropagation(), e.preventDefault());
|
|
257
257
|
}, B = Oe((e) => {
|
|
258
258
|
if (e.preventDefault(), e.stopPropagation(), !r.wheelZoom || !d.value || !i.value || !C()) return;
|
|
259
|
-
const a = (e.deltaY || e.deltaX) > 0 ? "zoomOut" : "zoomIn", o = Number.isFinite(O.value) && O.value > 1 ? O.value : 1.1, s = He(
|
|
259
|
+
const a = (e.deltaY || e.deltaX) > 0 ? "zoomOut" : "zoomIn", o = Number.isFinite(O.value) && O.value > 1 ? O.value : 1.1, s = He(l.value, o, a);
|
|
260
260
|
w(s);
|
|
261
261
|
});
|
|
262
262
|
let L = null;
|
|
@@ -270,33 +270,33 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
270
270
|
e ? m || (L = document.activeElement) : (m || B.cancel(), E(), ke(j));
|
|
271
271
|
}, {
|
|
272
272
|
immediate: !0
|
|
273
|
-
}), k(
|
|
273
|
+
}), k(n, (e) => {
|
|
274
274
|
e && C() && e.focus({
|
|
275
275
|
preventScroll: !0
|
|
276
276
|
});
|
|
277
277
|
}, {
|
|
278
278
|
flush: "post"
|
|
279
279
|
}), k([i, () => r.keyboard, S], ([e, t, a], o, s) => {
|
|
280
|
-
!e || !t || !a || m || (ze(a, "keydown", W), s(() =>
|
|
280
|
+
!e || !t || !a || m || (ze(a, "keydown", W), s(() => Pe(a, "keydown", W)));
|
|
281
281
|
}, {
|
|
282
282
|
immediate: !0
|
|
283
283
|
});
|
|
284
284
|
const ge = (e) => {
|
|
285
285
|
var H;
|
|
286
|
-
if (e.key !== "Tab" || !C() || !
|
|
287
|
-
const t = Array.from(
|
|
286
|
+
if (e.key !== "Tab" || !C() || !n.value) return;
|
|
287
|
+
const t = Array.from(n.value.querySelectorAll("button:not([disabled]), a[href], input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]")).filter((T) => T.tabIndex >= 0 && !T.closest('[hidden], [inert], [aria-hidden="true"]') && getComputedStyle(T).display !== "none" && getComputedStyle(T).visibility !== "hidden"), a = t[0], o = t.at(-1), s = document.activeElement;
|
|
288
288
|
a ? t.includes(s) ? e.shiftKey && s === a ? (e.preventDefault(), o == null || o.focus({
|
|
289
289
|
preventScroll: !0
|
|
290
290
|
})) : !e.shiftKey && s === o && (e.preventDefault(), a.focus({
|
|
291
291
|
preventScroll: !0
|
|
292
292
|
})) : (e.preventDefault(), (H = e.shiftKey ? o : a) == null || H.focus({
|
|
293
293
|
preventScroll: !0
|
|
294
|
-
})) : (e.preventDefault(),
|
|
294
|
+
})) : (e.preventDefault(), n.value.focus({
|
|
295
295
|
preventScroll: !0
|
|
296
296
|
}));
|
|
297
297
|
};
|
|
298
298
|
k([V, i], () => {
|
|
299
|
-
i.value && (pe(),
|
|
299
|
+
i.value && (pe(), P(V.value ? "loading" : "error"));
|
|
300
300
|
}, {
|
|
301
301
|
immediate: !0
|
|
302
302
|
});
|
|
@@ -305,17 +305,17 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
305
305
|
}
|
|
306
306
|
function ye(e) {
|
|
307
307
|
var t;
|
|
308
|
-
(t =
|
|
308
|
+
(t = n == null ? void 0 : n.value) == null || t.focus(), $.value && e.target === e.currentTarget && x();
|
|
309
309
|
}
|
|
310
310
|
function w(e) {
|
|
311
|
-
if (e =
|
|
312
|
-
const t =
|
|
313
|
-
I.value = [I.value[0] * t / e, I.value[1] * t / e],
|
|
311
|
+
if (e = A(e), l.value !== e) {
|
|
312
|
+
const t = l.value;
|
|
313
|
+
I.value = [I.value[0] * t / e, I.value[1] * t / e], l.value = e, de();
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
function be() {
|
|
317
|
-
if (!
|
|
318
|
-
const e =
|
|
317
|
+
if (!n.value || !f.value || !d.value) return;
|
|
318
|
+
const e = n.value.getBoundingClientRect(), t = f.value.getBoundingClientRect(), a = e.height / (t.height / l.value), o = e.width / (t.width / l.value);
|
|
319
319
|
if (t.width <= 0 || t.height <= 0) return;
|
|
320
320
|
const s = Math.min(a, o);
|
|
321
321
|
w(s);
|
|
@@ -325,7 +325,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
325
325
|
v.value = a;
|
|
326
326
|
}
|
|
327
327
|
function R(e) {
|
|
328
|
-
const t = Ze(
|
|
328
|
+
const t = Ze(l.value, e);
|
|
329
329
|
w(t);
|
|
330
330
|
}
|
|
331
331
|
return Ce(() => {
|
|
@@ -336,9 +336,9 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
336
336
|
className: z,
|
|
337
337
|
classNames: oe,
|
|
338
338
|
container: S,
|
|
339
|
-
teleportDisabled:
|
|
339
|
+
teleportDisabled: le,
|
|
340
340
|
wrapperStyles: se,
|
|
341
|
-
scale:
|
|
341
|
+
scale: l,
|
|
342
342
|
translate: I,
|
|
343
343
|
rotate: v,
|
|
344
344
|
moving: me,
|
|
@@ -347,7 +347,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
347
347
|
isLoaded: d,
|
|
348
348
|
isError: ce,
|
|
349
349
|
scaleValueVisible: h,
|
|
350
|
-
refWrapper:
|
|
350
|
+
refWrapper: n,
|
|
351
351
|
refImage: f,
|
|
352
352
|
mounted: K,
|
|
353
353
|
onWheel: B,
|
|
@@ -355,10 +355,10 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
355
355
|
onCloseClick: x,
|
|
356
356
|
onDialogKeydown: ge,
|
|
357
357
|
onImgLoad(e) {
|
|
358
|
-
e.target === f.value &&
|
|
358
|
+
e.target === f.value && P("loaded");
|
|
359
359
|
},
|
|
360
360
|
onImgError(e) {
|
|
361
|
-
e.target === f.value &&
|
|
361
|
+
e.target === f.value && P("error");
|
|
362
362
|
},
|
|
363
363
|
actions: y(() => [
|
|
364
364
|
/** 满屏 */
|
|
@@ -388,7 +388,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
388
388
|
name: u("imagePreview.zoomIn"),
|
|
389
389
|
content: () => b(Me),
|
|
390
390
|
onClick: () => R("zoomIn"),
|
|
391
|
-
disabled:
|
|
391
|
+
disabled: l.value === Y
|
|
392
392
|
},
|
|
393
393
|
/** 缩小 */
|
|
394
394
|
{
|
|
@@ -396,7 +396,7 @@ const _ = 90, bt = /* @__PURE__ */ Se({
|
|
|
396
396
|
name: u("imagePreview.zoomOut"),
|
|
397
397
|
content: () => b(_e),
|
|
398
398
|
onClick: () => R("zoomOut"),
|
|
399
|
-
disabled:
|
|
399
|
+
disabled: l.value === G
|
|
400
400
|
},
|
|
401
401
|
/** 缩放到100% */
|
|
402
402
|
{
|
|
@@ -3,9 +3,9 @@ import { Button as p, ButtonGroup as m } from "./button/index.js";
|
|
|
3
3
|
import { ConfigProvider as x } from "./config-provider/index.js";
|
|
4
4
|
import { Dialog as n } from "./dialog/index.js";
|
|
5
5
|
import { Drawer as u } from "./drawer/index.js";
|
|
6
|
-
import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as
|
|
6
|
+
import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as S, DropdownSubmenu as P } from "./dropdown/index.js";
|
|
7
7
|
import { Empty as I } from "./empty/index.js";
|
|
8
|
-
import { DatePicker as
|
|
8
|
+
import { DatePicker as w, MonthPicker as L, QuarterPicker as b, RangePicker as s, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
|
|
9
9
|
import { Form as y, FormItem as G } from "./form/index.js";
|
|
10
10
|
import { Checkbox as B, CheckboxGroup as M } from "./form-checkbox/index.js";
|
|
11
11
|
import { Input as A, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
|
|
@@ -21,8 +21,8 @@ import { BarChart as mo } from "./bar-chart/index.js";
|
|
|
21
21
|
import { Draggable as xo } from "./draggable/index.js";
|
|
22
22
|
import { Col as no, Grid as io, GridItem as uo, Row as lo } from "./grid/index.js";
|
|
23
23
|
import { Heatmap as To } from "./heatmap/index.js";
|
|
24
|
-
import { Image as
|
|
25
|
-
import { Layout as
|
|
24
|
+
import { Image as Po, ImagePreview as go, ImagePreviewAction as Io, ImagePreviewGroup as ko } from "./image/index.js";
|
|
25
|
+
import { Layout as Lo, LayoutContent as bo, LayoutFooter as so, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
|
|
26
26
|
import { LineChart as yo } from "./line-chart/index.js";
|
|
27
27
|
import { Link as vo } from "./link/index.js";
|
|
28
28
|
import { Menu as Mo, MenuItem as Ro, MenuItemGroup as Ao, MenuSubMenu as Eo } from "./menu/index.js";
|
|
@@ -41,29 +41,30 @@ import { Scrollbar as mr } from "./scrollbar-v2/index.js";
|
|
|
41
41
|
import { Skeleton as xr, SkeletonLine as ar, SkeletonShape as nr } from "./skeleton/index.js";
|
|
42
42
|
import { Space as ur } from "./space/index.js";
|
|
43
43
|
import { Spin as cr } from "./spin/index.js";
|
|
44
|
-
import { Step as Tr, Steps as
|
|
44
|
+
import { Step as Tr, Steps as Sr } from "./steps/index.js";
|
|
45
45
|
import { Table as gr, TableColumn as Ir } from "./table/index.js";
|
|
46
|
-
import { TabPane as
|
|
47
|
-
import { Tag as
|
|
46
|
+
import { TabPane as wr, Tabs as Lr } from "./tabs/index.js";
|
|
47
|
+
import { Tag as sr } from "./tag/index.js";
|
|
48
48
|
import { TimePicker as hr } from "./time-picker/index.js";
|
|
49
49
|
import { TimeRangeSelector as yr } from "./time-range-selector/index.js";
|
|
50
50
|
import { Timeline as vr } from "./timeline/index.js";
|
|
51
51
|
import { TimelineItem as Mr } from "./timeline-item/index.js";
|
|
52
52
|
import { Tooltip as Ar } from "./tooltip/index.js";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
53
|
+
import { TreeSelect as _r, TreeSelectDropdown as Nr } from "./tree-select/index.js";
|
|
54
|
+
import { TrendChart as jr } from "./trend-chart/index.js";
|
|
55
|
+
import { Trigger as Hr } from "./trigger/index.js";
|
|
56
|
+
import { Upload as Wr } from "./upload/index.js";
|
|
57
|
+
import { Watermark as zr } from "./watermark/index.js";
|
|
58
|
+
import { TABLE_LOCALE_EN_US as Yr, TABLE_LOCALE_ZH_CN as Zr, formatLocaleText as qr } from "./table/locale.js";
|
|
59
|
+
import { default as Vr } from "./table/table-tbody.js";
|
|
60
|
+
import { default as $r } from "./table/table-td.js";
|
|
61
|
+
import { default as re } from "./table/table-th.js";
|
|
62
|
+
import { default as te } from "./table/table-thead.js";
|
|
63
|
+
import { default as me } from "./table/table-tr.js";
|
|
64
|
+
import { configProviderInjectionKey as xe } from "./config-provider/context.js";
|
|
65
|
+
import { formInjectionKey as ne, formItemInjectionKey as ie } from "./form/context.js";
|
|
66
|
+
import { vDraggable as le } from "./draggable/directive.js";
|
|
67
|
+
import { vWatermark as de } from "./watermark/directive.js";
|
|
67
68
|
export {
|
|
68
69
|
e as Alert,
|
|
69
70
|
mo as BarChart,
|
|
@@ -74,22 +75,22 @@ export {
|
|
|
74
75
|
no as Col,
|
|
75
76
|
to as ColorPicker,
|
|
76
77
|
x as ConfigProvider,
|
|
77
|
-
|
|
78
|
+
w as DatePicker,
|
|
78
79
|
n as Dialog,
|
|
79
80
|
xo as Draggable,
|
|
80
81
|
u as Drawer,
|
|
81
82
|
c as Dropdown,
|
|
82
83
|
d as DropdownButton,
|
|
83
84
|
T as DropdownGroup,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
S as DropdownOption,
|
|
86
|
+
P as DropdownSubmenu,
|
|
86
87
|
I as Empty,
|
|
87
88
|
y as Form,
|
|
88
89
|
G as FormItem,
|
|
89
90
|
io as Grid,
|
|
90
91
|
uo as GridItem,
|
|
91
92
|
To as Heatmap,
|
|
92
|
-
|
|
93
|
+
Po as Image,
|
|
93
94
|
go as ImagePreview,
|
|
94
95
|
Io as ImagePreviewAction,
|
|
95
96
|
ko as ImagePreviewGroup,
|
|
@@ -99,9 +100,9 @@ export {
|
|
|
99
100
|
_ as InputPassword,
|
|
100
101
|
N as InputSearch,
|
|
101
102
|
H as InputTag,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
Lo as Layout,
|
|
104
|
+
bo as LayoutContent,
|
|
105
|
+
so as LayoutFooter,
|
|
105
106
|
Co as LayoutHeader,
|
|
106
107
|
ho as LayoutSidebar,
|
|
107
108
|
yo as LineChart,
|
|
@@ -111,7 +112,7 @@ export {
|
|
|
111
112
|
Ao as MenuItemGroup,
|
|
112
113
|
Eo as MenuSubMenu,
|
|
113
114
|
No as Message,
|
|
114
|
-
|
|
115
|
+
L as MonthPicker,
|
|
115
116
|
jo as Network,
|
|
116
117
|
Ho as Notification,
|
|
117
118
|
Wo as Pagination,
|
|
@@ -120,10 +121,10 @@ export {
|
|
|
120
121
|
qo as Popover,
|
|
121
122
|
Vo as Popup,
|
|
122
123
|
$o as Progress,
|
|
123
|
-
|
|
124
|
+
b as QuarterPicker,
|
|
124
125
|
W as Radio,
|
|
125
126
|
U as RadioGroup,
|
|
126
|
-
|
|
127
|
+
s as RangePicker,
|
|
127
128
|
rr as Rate,
|
|
128
129
|
tr as ResizeBox,
|
|
129
130
|
lo as Row,
|
|
@@ -139,36 +140,38 @@ export {
|
|
|
139
140
|
ur as Space,
|
|
140
141
|
cr as Spin,
|
|
141
142
|
Tr as Step,
|
|
142
|
-
|
|
143
|
+
Sr as Steps,
|
|
143
144
|
$ as Switch,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
Yr as TABLE_LOCALE_EN_US,
|
|
146
|
+
Zr as TABLE_LOCALE_ZH_CN,
|
|
147
|
+
wr as TabPane,
|
|
147
148
|
gr as Table,
|
|
148
149
|
Ir as TableColumn,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
Lr as Tabs,
|
|
151
|
+
sr as Tag,
|
|
152
|
+
Vr as Tbody,
|
|
153
|
+
$r as Td,
|
|
153
154
|
ro as Textarea,
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
re as Th,
|
|
156
|
+
te as Thead,
|
|
156
157
|
hr as TimePicker,
|
|
157
158
|
yr as TimeRangeSelector,
|
|
158
159
|
vr as Timeline,
|
|
159
160
|
Mr as TimelineItem,
|
|
160
161
|
Ar as Tooltip,
|
|
161
|
-
|
|
162
|
-
_r as
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
me as Tr,
|
|
163
|
+
_r as TreeSelect,
|
|
164
|
+
Nr as TreeSelectDropdown,
|
|
165
|
+
jr as TrendChart,
|
|
166
|
+
Hr as Trigger,
|
|
167
|
+
Wr as Upload,
|
|
168
|
+
zr as Watermark,
|
|
166
169
|
C as WeekPicker,
|
|
167
170
|
h as YearPicker,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
xe as configProviderInjectionKey,
|
|
172
|
+
ne as formInjectionKey,
|
|
173
|
+
ie as formItemInjectionKey,
|
|
174
|
+
qr as formatLocaleText,
|
|
175
|
+
le as vDraggable,
|
|
176
|
+
de as vWatermark
|
|
174
177
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import r from "./Layout.vue.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import e from "./LayoutHeader.vue.js";
|
|
3
|
+
import a from "./LayoutContent.vue.js";
|
|
4
4
|
import m from "./LayoutFooter.vue.js";
|
|
5
5
|
import n from "./LayoutSidebar.vue.js";
|
|
6
6
|
import { generateComponent as o } from "../../_utils/vue-eco.js";
|
|
7
7
|
import { getComponentPrefix as t } from "../../_utils/config.js";
|
|
8
|
-
|
|
8
|
+
import { inheritComponentType as u } from "../../_utils/inherit-component-type.js";
|
|
9
|
+
const c = o(t("Layout"), r), _ = o(t("LayoutHeader"), e), b = o(t("LayoutContent"), a), F = o(t("LayoutFooter"), m), H = o(t("LayoutSidebar"), u(n));
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
c as Layout,
|
|
12
|
+
b as LayoutContent,
|
|
13
|
+
F as LayoutFooter,
|
|
14
|
+
_ as LayoutHeader,
|
|
15
|
+
H as LayoutSidebar,
|
|
16
|
+
c as default
|
|
16
17
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as v, computed as t } from "vue";
|
|
2
|
+
import g from "../../icons/default/link.js";
|
|
3
3
|
import h from "../../icons/animation/animation-loading.js";
|
|
4
4
|
import { hasPropOrSlot as b } from "../../_utils/use-prop-or-slot.js";
|
|
5
5
|
import { getClassNameMixin as k } from "../../_utils/config.js";
|
|
6
|
-
const
|
|
6
|
+
const D = v({
|
|
7
7
|
name: "Link",
|
|
8
|
-
components: { IconLink:
|
|
8
|
+
components: { IconLink: g, IconLoading: h },
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
|
11
11
|
* @zh 链接地址
|
|
@@ -61,18 +61,18 @@ const C = g({
|
|
|
61
61
|
*/
|
|
62
62
|
click: (e) => !0
|
|
63
63
|
},
|
|
64
|
-
setup(e, { slots:
|
|
65
|
-
const o = k("link"), r = b(e,
|
|
66
|
-
if (
|
|
64
|
+
setup(e, { slots: c, emit: l }) {
|
|
65
|
+
const o = k("link"), r = b(e, c, "icon"), i = t(() => e.disabled || e.loading), d = t(() => i.value ? void 0 : e.href), a = t(() => !e.href), s = t(() => a.value ? "button" : void 0), u = t(() => i.value ? -1 : a.value ? 0 : void 0), f = (n) => {
|
|
66
|
+
if (i.value) {
|
|
67
67
|
n.preventDefault();
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
l("click", n);
|
|
71
71
|
}, m = (n) => {
|
|
72
|
-
a.value && (n.key !== "Enter" && n.key !== " " || (n.preventDefault(), !
|
|
72
|
+
a.value && (n.key !== "Enter" && n.key !== " " || (n.preventDefault(), !i.value && l("click", n)));
|
|
73
73
|
};
|
|
74
74
|
return {
|
|
75
|
-
cls:
|
|
75
|
+
cls: t(() => [
|
|
76
76
|
o.block,
|
|
77
77
|
o.modifier(`status-${e.status}`),
|
|
78
78
|
{
|
|
@@ -84,8 +84,8 @@ const C = g({
|
|
|
84
84
|
}
|
|
85
85
|
]),
|
|
86
86
|
className: o,
|
|
87
|
-
isUnavailable:
|
|
88
|
-
mergedHref:
|
|
87
|
+
isUnavailable: i,
|
|
88
|
+
mergedHref: d,
|
|
89
89
|
role: s,
|
|
90
90
|
showIcon: r,
|
|
91
91
|
tabIndex: u,
|
|
@@ -95,5 +95,5 @@ const C = g({
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
D as default
|
|
99
99
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed as n, isRef as r, provide as l, reactive as u, inject as p } from "vue";
|
|
2
2
|
import { LevelInjectionKey as i } from "../context.js";
|
|
3
3
|
function s(e) {
|
|
4
|
-
const o = n(() =>
|
|
5
|
-
|
|
4
|
+
const o = n(() => r(e) ? e.value : e);
|
|
5
|
+
l(
|
|
6
6
|
i,
|
|
7
|
-
|
|
7
|
+
u({
|
|
8
8
|
level: o
|
|
9
9
|
})
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
12
|
function m(e) {
|
|
13
|
-
const { provideNextLevel: o } = e || {}, t =
|
|
13
|
+
const { provideNextLevel: o } = e || {}, t = p(i), c = n(() => (t == null ? void 0 : t.level) || 1);
|
|
14
14
|
if (o) {
|
|
15
15
|
const v = n(() => c.value + 1);
|
|
16
16
|
s(v);
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./Menu.js";
|
|
2
2
|
import t from "./MenuItem.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import m from "./MenuSubMenu.js";
|
|
4
|
+
import u from "./item-group.vue.js";
|
|
5
5
|
import { generateComponent as e } from "../../_utils/vue-eco.js";
|
|
6
|
-
import { getComponentPrefix as
|
|
7
|
-
|
|
6
|
+
import { getComponentPrefix as o } from "../../_utils/config.js";
|
|
7
|
+
import { inheritComponentType as r } from "../../_utils/inherit-component-type.js";
|
|
8
|
+
const a = e(o("Menu"), r(
|
|
9
|
+
n
|
|
10
|
+
)), b = e(o("MenuItem"), t), C = e(o("MenuItemGroup"), u), G = e(o("MenuSubMenu"), m);
|
|
8
11
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
a as Menu,
|
|
13
|
+
b as MenuItem,
|
|
14
|
+
C as MenuItemGroup,
|
|
15
|
+
G as MenuSubMenu,
|
|
16
|
+
a as default
|
|
14
17
|
};
|