@rhino-design/vue 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -18
- package/README.zh-CN.md +115 -0
- package/dist/arco.less +95 -76
- package/dist/components/XButton.vue.js +2 -2
- package/dist/components/XConfigProvider.vue.js +1 -1
- package/dist/components/XMenuOverflowWrap.vue.js +66 -59
- package/dist/components/XScrollbar.vue.js +1 -1
- package/dist/components/XSubMenuPop.vue.js +1 -1
- package/dist/components/XTable.vue.d.ts +1 -0
- package/dist/components/XTable.vue.js +3 -3
- package/dist/components/XTable.vue2.js +774 -614
- package/dist/components/XToast.vue.d.ts +25 -0
- package/dist/components/XToast.vue.js +7 -0
- package/dist/components/XToast.vue2.js +27 -0
- package/dist/components/XTour.vue.d.ts +2 -0
- package/dist/components/XTour.vue.js +69 -61
- package/dist/components/XTree.vue.d.ts +2 -0
- package/dist/components/XTree.vue.js +1 -1
- package/dist/components/XTree.vue2.js +124 -121
- package/dist/components/XTreeNode.vue.d.ts +1 -0
- package/dist/components/XTreeNode.vue.js +2 -2
- package/dist/components/XTreeNode.vue2.js +21 -20
- package/dist/components/XTreeSelect.vue.js +4 -4
- package/dist/components/XTreeSelect.vue2.js +314 -291
- package/dist/components/XWatermark.vue.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +55 -53
- package/dist/index.cjs +9 -9
- package/dist/index.css +95 -76
- package/dist/index.js +62 -60
- package/dist/index.less +95 -76
- package/dist/index.scss +14853 -0
- package/dist/style.css +95 -76
- package/dist/style.less +95 -76
- package/dist/style.scss +14853 -0
- package/package.json +14 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type ToastStatus = 'info' | 'success' | 'warning' | 'error';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
status?: ToastStatus;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
visible: boolean;
|
|
17
|
+
status: ToastStatus;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as i, computed as a, openBlock as s, createBlock as n, Transition as u, withCtx as c, createElementBlock as d, normalizeClass as m, renderSlot as f, createCommentVNode as v } from "vue";
|
|
2
|
+
const p = ["role", "aria-live"], B = /* @__PURE__ */ i({
|
|
3
|
+
__name: "XToast",
|
|
4
|
+
props: {
|
|
5
|
+
visible: { type: Boolean, default: !1 },
|
|
6
|
+
status: { default: "success" }
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const t = e, o = a(() => t.status === "error" ? "alert" : "status"), r = a(() => t.status === "error" ? "assertive" : "polite");
|
|
10
|
+
return (l, x) => (s(), n(u, { name: "x-toast-fade" }, {
|
|
11
|
+
default: c(() => [
|
|
12
|
+
e.visible ? (s(), d("div", {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: m(["x-toast", `x-toast--${e.status}`]),
|
|
15
|
+
role: o.value,
|
|
16
|
+
"aria-live": r.value
|
|
17
|
+
}, [
|
|
18
|
+
f(l.$slots, "default", {}, void 0, !0)
|
|
19
|
+
], 10, p)) : v("", !0)
|
|
20
|
+
]),
|
|
21
|
+
_: 3
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
B as default
|
|
27
|
+
};
|
|
@@ -9,6 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
current?: number;
|
|
10
10
|
steps?: XTourStep[];
|
|
11
11
|
mask?: boolean;
|
|
12
|
+
arrow?: boolean;
|
|
12
13
|
};
|
|
13
14
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
15
|
change: (value: number) => any;
|
|
@@ -23,6 +24,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
23
24
|
}>, {
|
|
24
25
|
mask: boolean;
|
|
25
26
|
open: boolean;
|
|
27
|
+
arrow: boolean;
|
|
26
28
|
current: number;
|
|
27
29
|
steps: XTourStep[];
|
|
28
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1,120 +1,128 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useXI18n as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as q, ref as g, computed as d, watch as D, nextTick as I, onMounted as U, onBeforeUnmount as j, openBlock as y, createBlock as A, Teleport as F, createElementBlock as k, createCommentVNode as _, createElementVNode as r, normalizeStyle as G, normalizeClass as J, toDisplayString as a } from "vue";
|
|
2
|
+
import { useXI18n as K } from "../composables/i18n.js";
|
|
3
|
+
const O = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "x-tour"
|
|
6
|
-
},
|
|
6
|
+
}, Q = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "x-tour__mask"
|
|
9
|
-
},
|
|
9
|
+
}, Y = { class: "x-tour__counter" }, Z = { class: "x-tour__footer" }, tt = ["disabled"], ot = /* @__PURE__ */ q({
|
|
10
10
|
__name: "XTour",
|
|
11
11
|
props: {
|
|
12
12
|
open: { type: Boolean, default: !1 },
|
|
13
13
|
current: { default: 0 },
|
|
14
14
|
steps: { default: () => [] },
|
|
15
|
-
mask: { type: Boolean, default: !0 }
|
|
15
|
+
mask: { type: Boolean, default: !0 },
|
|
16
|
+
arrow: { type: Boolean, default: !0 }
|
|
16
17
|
},
|
|
17
18
|
emits: ["update:open", "update:current", "change", "finish"],
|
|
18
|
-
setup(o, { emit:
|
|
19
|
-
const n = o,
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
if (!n.open || !
|
|
23
|
-
const t = ((
|
|
24
|
-
|
|
25
|
-
left: `${N(
|
|
26
|
-
top: `${
|
|
19
|
+
setup(o, { emit: S }) {
|
|
20
|
+
const n = o, s = S, b = g(null), T = g({}), c = g("bottom"), f = g(!1), { t: h } = K(), H = d(() => h("tour.prevStep", void 0, "上一步")), L = d(() => h("tour.skip", void 0, "跳过")), z = d(() => h("tour.nextStep", void 0, "下一步")), P = d(() => h("tour.finish", void 0, "完成")), u = d(() => n.steps[n.current] ?? null);
|
|
21
|
+
function B() {
|
|
22
|
+
var W, E;
|
|
23
|
+
if (!n.open || !u.value) return;
|
|
24
|
+
const t = ((W = b.value) == null ? void 0 : W.offsetWidth) ?? Math.min(360, window.innerWidth - 32), i = ((E = b.value) == null ? void 0 : E.offsetHeight) ?? 220, v = 16, N = (p) => Math.min(Math.max(v, p), window.innerWidth - t - v), V = (p) => Math.min(Math.max(v, p), window.innerHeight - i - v), l = (p, X) => {
|
|
25
|
+
T.value = {
|
|
26
|
+
left: `${N(p)}px`,
|
|
27
|
+
top: `${V(X)}px`,
|
|
27
28
|
transform: "none"
|
|
28
29
|
};
|
|
29
30
|
};
|
|
30
|
-
if (!
|
|
31
|
-
|
|
31
|
+
if (!u.value.target) {
|
|
32
|
+
f.value = !1, c.value = "center", l((window.innerWidth - t) / 2, (window.innerHeight - i) / 2);
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
|
|
35
|
+
const M = document.querySelector(u.value.target);
|
|
36
|
+
if (!M) {
|
|
37
|
+
f.value = !1, c.value = "center", l((window.innerWidth - t) / 2, (window.innerHeight - i) / 2);
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
f.value = !0;
|
|
41
|
+
const e = M.getBoundingClientRect(), w = u.value.placement ?? "bottom";
|
|
42
|
+
c.value = w;
|
|
43
|
+
const x = 16;
|
|
40
44
|
if (w === "top") {
|
|
41
|
-
|
|
45
|
+
l(e.left + e.width / 2 - t / 2, e.top - i - x);
|
|
42
46
|
return;
|
|
43
47
|
}
|
|
44
48
|
if (w === "left") {
|
|
45
|
-
|
|
49
|
+
l(e.left - t - x, e.top + e.height / 2 - i / 2);
|
|
46
50
|
return;
|
|
47
51
|
}
|
|
48
52
|
if (w === "right") {
|
|
49
|
-
|
|
53
|
+
l(e.right + x, e.top + e.height / 2 - i / 2);
|
|
50
54
|
return;
|
|
51
55
|
}
|
|
52
|
-
|
|
56
|
+
l(e.left + e.width / 2 - t / 2, e.bottom + x);
|
|
53
57
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
58
|
+
function m() {
|
|
59
|
+
B();
|
|
56
60
|
}
|
|
57
|
-
|
|
61
|
+
D(
|
|
58
62
|
() => [n.open, n.current, n.steps],
|
|
59
63
|
async () => {
|
|
60
|
-
await
|
|
64
|
+
await I(), B();
|
|
61
65
|
},
|
|
62
66
|
{ deep: !0, immediate: !0 }
|
|
63
|
-
),
|
|
64
|
-
window.addEventListener("resize",
|
|
65
|
-
}),
|
|
66
|
-
window.removeEventListener("resize",
|
|
67
|
+
), U(() => {
|
|
68
|
+
window.addEventListener("resize", m), window.addEventListener("scroll", m, !0);
|
|
69
|
+
}), j(() => {
|
|
70
|
+
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
67
71
|
});
|
|
68
|
-
function
|
|
69
|
-
|
|
72
|
+
function C() {
|
|
73
|
+
s("update:open", !1);
|
|
70
74
|
}
|
|
71
|
-
function
|
|
75
|
+
function R() {
|
|
72
76
|
const t = Math.max(0, n.current - 1);
|
|
73
|
-
|
|
77
|
+
s("update:current", t), s("change", t);
|
|
74
78
|
}
|
|
75
|
-
function
|
|
79
|
+
function $() {
|
|
76
80
|
if (n.current >= n.steps.length - 1) {
|
|
77
|
-
|
|
81
|
+
s("finish"), C();
|
|
78
82
|
return;
|
|
79
83
|
}
|
|
80
84
|
const t = n.current + 1;
|
|
81
|
-
|
|
85
|
+
s("update:current", t), s("change", t);
|
|
82
86
|
}
|
|
83
|
-
return (t,
|
|
84
|
-
o.open &&
|
|
85
|
-
o.mask ? (
|
|
86
|
-
|
|
87
|
+
return (t, i) => (y(), A(F, { to: "body" }, [
|
|
88
|
+
o.open && u.value ? (y(), k("div", O, [
|
|
89
|
+
o.mask ? (y(), k("div", Q)) : _("", !0),
|
|
90
|
+
r("div", {
|
|
87
91
|
ref_key: "popupRef",
|
|
88
|
-
ref:
|
|
92
|
+
ref: b,
|
|
89
93
|
class: "x-tour__popup",
|
|
90
|
-
style:
|
|
94
|
+
style: G(T.value)
|
|
91
95
|
}, [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
o.arrow && f.value && c.value !== "center" ? (y(), k("span", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: J(["x-tour__arrow", `is-${c.value}`])
|
|
99
|
+
}, null, 2)) : _("", !0),
|
|
100
|
+
r("div", Y, a(o.current + 1) + " / " + a(o.steps.length), 1),
|
|
101
|
+
r("strong", null, a(u.value.title), 1),
|
|
102
|
+
r("p", null, a(u.value.description), 1),
|
|
103
|
+
r("div", Z, [
|
|
104
|
+
r("button", {
|
|
97
105
|
type: "button",
|
|
98
106
|
class: "x-button",
|
|
99
107
|
disabled: o.current === 0,
|
|
100
|
-
onClick:
|
|
101
|
-
},
|
|
102
|
-
|
|
108
|
+
onClick: R
|
|
109
|
+
}, a(H.value), 9, tt),
|
|
110
|
+
r("button", {
|
|
103
111
|
type: "button",
|
|
104
112
|
class: "x-button x-button--outline",
|
|
105
|
-
onClick:
|
|
106
|
-
},
|
|
107
|
-
|
|
113
|
+
onClick: C
|
|
114
|
+
}, a(L.value), 1),
|
|
115
|
+
r("button", {
|
|
108
116
|
type: "button",
|
|
109
117
|
class: "x-button x-button--primary",
|
|
110
|
-
onClick:
|
|
111
|
-
},
|
|
118
|
+
onClick: $
|
|
119
|
+
}, a(o.current >= o.steps.length - 1 ? P.value : z.value), 1)
|
|
112
120
|
])
|
|
113
121
|
], 4)
|
|
114
|
-
])) :
|
|
122
|
+
])) : _("", !0)
|
|
115
123
|
]));
|
|
116
124
|
}
|
|
117
125
|
});
|
|
118
126
|
export {
|
|
119
|
-
|
|
127
|
+
ot as default
|
|
120
128
|
};
|
|
@@ -44,6 +44,7 @@ type __VLS_Props = {
|
|
|
44
44
|
}) => boolean;
|
|
45
45
|
filterTreeNode?: (node: TreeNodeData) => boolean;
|
|
46
46
|
searchValue?: string;
|
|
47
|
+
actionOnNodeClick?: 'expand';
|
|
47
48
|
fieldNames?: {
|
|
48
49
|
key?: string;
|
|
49
50
|
title?: string;
|
|
@@ -227,6 +228,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
227
228
|
selectable: boolean;
|
|
228
229
|
showLine: boolean;
|
|
229
230
|
blockNode: boolean;
|
|
231
|
+
actionOnNodeClick: "expand";
|
|
230
232
|
checkedStrategy: CheckedStrategy;
|
|
231
233
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
232
234
|
treeViewportRef: HTMLDivElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./XTree.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9572f80b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|