@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./XButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9770ba6f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import { provideXI18n as C } from "../composables/i18n.js";
|
|
|
5
5
|
const P = /* @__PURE__ */ m({
|
|
6
6
|
__name: "XConfigProvider",
|
|
7
7
|
props: {
|
|
8
|
-
prefixCls: { default: "
|
|
8
|
+
prefixCls: { default: "rhino" },
|
|
9
9
|
locale: {},
|
|
10
10
|
size: {},
|
|
11
11
|
global: { type: Boolean, default: !1 },
|
|
@@ -1,100 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as $, ref as x, onMounted as A, onUpdated as E, onUnmounted as B, h, cloneVNode as g, Comment as V, Fragment as k } from "vue";
|
|
2
|
+
import N from "./XSubMenu.vue.js";
|
|
3
3
|
import F from "../composables/menu-hooks/use-menu-context.js";
|
|
4
4
|
const H = 10;
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function O(n) {
|
|
6
|
+
return n ? Number(n.getBoundingClientRect().width.toFixed(2)) : 0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return Number.isNaN(
|
|
8
|
+
function S(n) {
|
|
9
|
+
const e = Number(n.replace("px", ""));
|
|
10
|
+
return Number.isNaN(e) ? 0 : e;
|
|
11
11
|
}
|
|
12
|
-
function P(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function P(n) {
|
|
13
|
+
const e = getComputedStyle(n);
|
|
14
|
+
return O(n) + S(e.marginLeft) + S(e.marginRight);
|
|
15
|
+
}
|
|
16
|
+
function W(n, e) {
|
|
17
|
+
return n.classList.contains(e) ? n : n.querySelector(`.${e}`);
|
|
18
|
+
}
|
|
19
|
+
function T(n) {
|
|
20
|
+
const e = [], i = (u) => {
|
|
21
|
+
u.forEach((t) => {
|
|
22
|
+
if (!t) return;
|
|
23
|
+
if (Array.isArray(t)) {
|
|
24
|
+
i(t);
|
|
18
25
|
return;
|
|
19
26
|
}
|
|
20
|
-
if (typeof
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
24
|
-
|
|
27
|
+
if (typeof t != "object") return;
|
|
28
|
+
const r = t;
|
|
29
|
+
if (r.type !== V) {
|
|
30
|
+
if (r.type === k && Array.isArray(r.children)) {
|
|
31
|
+
i(r.children);
|
|
25
32
|
return;
|
|
26
33
|
}
|
|
27
|
-
|
|
34
|
+
e.push(r);
|
|
28
35
|
}
|
|
29
36
|
});
|
|
30
37
|
};
|
|
31
|
-
return
|
|
38
|
+
return i(n), e;
|
|
32
39
|
}
|
|
33
|
-
const
|
|
40
|
+
const q = $({
|
|
34
41
|
name: "XMenuOverflowWrap",
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
const
|
|
42
|
+
setup(n, { slots: e }) {
|
|
43
|
+
const i = F(), u = x(null), t = x(null);
|
|
44
|
+
let r = null;
|
|
45
|
+
const f = `${i.prefixCls || "x-menu"}-overflow`, R = `${f}-wrap`, y = `${f}-sub-menu`, _ = `${f}-hidden-menu-item`, C = `${f}-sub-menu-mirror`, w = () => {
|
|
39
46
|
const l = u.value;
|
|
40
47
|
if (!l) return;
|
|
41
|
-
const
|
|
42
|
-
let d = 0,
|
|
48
|
+
const a = O(l), m = Array.from(l.children);
|
|
49
|
+
let d = 0, s = 0, v = 0;
|
|
43
50
|
for (let o = 0; o < m.length; o += 1) {
|
|
44
|
-
const c = m[o],
|
|
45
|
-
if (
|
|
51
|
+
const c = m[o], b = W(c, y), p = W(c, C), I = !!b, L = !!p;
|
|
52
|
+
if (I)
|
|
46
53
|
continue;
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
|
|
54
|
+
const M = P(p || c);
|
|
55
|
+
if (L) {
|
|
56
|
+
v = M;
|
|
50
57
|
continue;
|
|
51
58
|
}
|
|
52
|
-
if (
|
|
53
|
-
|
|
59
|
+
if (s += M, s + v + H > a) {
|
|
60
|
+
t.value = d - 1;
|
|
54
61
|
return;
|
|
55
62
|
}
|
|
56
63
|
d += 1;
|
|
57
64
|
}
|
|
58
|
-
|
|
65
|
+
t.value = null;
|
|
59
66
|
};
|
|
60
|
-
return
|
|
61
|
-
w(), !(typeof ResizeObserver > "u" || !u.value) && (
|
|
67
|
+
return A(() => {
|
|
68
|
+
w(), !(typeof ResizeObserver > "u" || !u.value) && (r = new ResizeObserver(() => {
|
|
62
69
|
w();
|
|
63
|
-
}),
|
|
64
|
-
}), $(() => {
|
|
65
|
-
w();
|
|
70
|
+
}), r.observe(u.value));
|
|
66
71
|
}), E(() => {
|
|
67
|
-
|
|
72
|
+
w();
|
|
73
|
+
}), B(() => {
|
|
74
|
+
r == null || r.disconnect(), r = null;
|
|
68
75
|
}), () => {
|
|
69
|
-
var
|
|
70
|
-
const l =
|
|
71
|
-
let
|
|
76
|
+
var s;
|
|
77
|
+
const l = T(((s = e.default) == null ? void 0 : s.call(e)) || []);
|
|
78
|
+
let a = null;
|
|
72
79
|
const m = h(
|
|
73
|
-
|
|
80
|
+
N,
|
|
74
81
|
{
|
|
75
82
|
key: "__x-menu-overflow-sub-menu-mirror",
|
|
76
|
-
class:
|
|
83
|
+
class: C
|
|
77
84
|
},
|
|
78
85
|
{
|
|
79
86
|
title: () => "...",
|
|
80
87
|
default: () => null
|
|
81
88
|
}
|
|
82
|
-
), d = l.map((
|
|
83
|
-
const c =
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
), d = l.map((v, o) => {
|
|
90
|
+
const c = g(
|
|
91
|
+
v,
|
|
92
|
+
t.value !== null && o > t.value ? { class: _ } : { class: "" }
|
|
86
93
|
);
|
|
87
|
-
if (
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
if (t.value !== null && o === t.value + 1) {
|
|
95
|
+
const b = l.slice(o).map((p) => g(p));
|
|
96
|
+
a = h(
|
|
97
|
+
N,
|
|
91
98
|
{
|
|
92
99
|
key: "__x-menu-overflow-sub-menu",
|
|
93
|
-
class:
|
|
100
|
+
class: y
|
|
94
101
|
},
|
|
95
102
|
{
|
|
96
103
|
title: () => "...",
|
|
97
|
-
default: () =>
|
|
104
|
+
default: () => b
|
|
98
105
|
}
|
|
99
106
|
);
|
|
100
107
|
}
|
|
@@ -104,13 +111,13 @@ const j = A({
|
|
|
104
111
|
"div",
|
|
105
112
|
{
|
|
106
113
|
ref: u,
|
|
107
|
-
class:
|
|
114
|
+
class: R
|
|
108
115
|
},
|
|
109
|
-
[m, ...d,
|
|
116
|
+
[m, ...d, a]
|
|
110
117
|
);
|
|
111
118
|
};
|
|
112
119
|
}
|
|
113
120
|
});
|
|
114
121
|
export {
|
|
115
|
-
|
|
122
|
+
q as default
|
|
116
123
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as J, useAttrs as Q, ref as c, computed as m, onMounted as Y, nextTick as k, onBeforeUnmount as ee, watch as le, openBlock as R, createElementBlock as te, normalizeStyle as oe, normalizeClass as ae, createElementVNode as re, mergeProps as ne, unref as se, renderSlot as ce, createBlock as E, createCommentVNode as L } from "vue";
|
|
2
2
|
import O from "./XScrollbarThumb.vue.js";
|
|
3
|
-
const ue = 20, p =
|
|
3
|
+
const ue = 20, p = 2, de = /* @__PURE__ */ J({
|
|
4
4
|
name: "XScrollbar",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "XScrollbar",
|
|
@@ -7,7 +7,7 @@ function y(e, l, V, B, P, w) {
|
|
|
7
7
|
return i(), t(f, a({
|
|
8
8
|
trigger: "hover",
|
|
9
9
|
class: e.triggerClassNames,
|
|
10
|
-
position: e.needPopOnBottom ? "bottom
|
|
10
|
+
position: e.needPopOnBottom ? "bottom" : "right-start",
|
|
11
11
|
offset: 0,
|
|
12
12
|
"auto-fit-popup-min-width": !0,
|
|
13
13
|
"unmount-on-close": !1,
|
|
@@ -106,6 +106,7 @@ declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNull
|
|
|
106
106
|
columns: XTableColumn<T>[];
|
|
107
107
|
data: T[];
|
|
108
108
|
loading?: boolean;
|
|
109
|
+
loadingAnimation?: boolean;
|
|
109
110
|
pagination?: boolean | XTablePagination;
|
|
110
111
|
rowSelection?: XTableRowSelection<T>;
|
|
111
112
|
expandable?: XTableExpandable<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./XTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-f8afd5ca"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|