@rhino-design/vue 0.2.7 → 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 +8 -43
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as a, ref as
|
|
1
|
+
import { defineComponent as oe, computed as a, ref as M, resolveComponent as ae, openBlock as r, createElementBlock as s, normalizeClass as v, createElementVNode as y, normalizeStyle as K, createCommentVNode as x, renderSlot as i, createVNode as I, unref as de, withModifiers as E, toDisplayString as V, Fragment as ie, renderList as re, createSlots as se, withCtx as b, mergeProps as m } from "vue";
|
|
2
2
|
import ce from "./XIcon.js";
|
|
3
3
|
const ue = ["draggable"], fe = {
|
|
4
4
|
key: 1,
|
|
@@ -30,6 +30,7 @@ const ue = ["draggable"], fe = {
|
|
|
30
30
|
draggable: { type: Boolean },
|
|
31
31
|
filterTreeNode: { type: Function },
|
|
32
32
|
searchValue: {},
|
|
33
|
+
actionOnNodeClick: {},
|
|
33
34
|
level: {},
|
|
34
35
|
indentSize: {},
|
|
35
36
|
halfIndentSize: {},
|
|
@@ -37,17 +38,17 @@ const ue = ["draggable"], fe = {
|
|
|
37
38
|
},
|
|
38
39
|
emits: ["select", "check", "expand", "dragStart", "dragEnd", "dragOver", "dragLeave", "drop"],
|
|
39
40
|
setup(n, { emit: X }) {
|
|
40
|
-
const l = n, c = X, h = a(() => l.node[l.fieldKey]), F = a(() => l.node[l.fieldTitle] || ""), z = a(() => l.node[l.fieldChildren] || []), D = a(() => z.value.length > 0),
|
|
41
|
+
const l = n, c = X, h = a(() => l.node[l.fieldKey]), F = a(() => l.node[l.fieldTitle] || ""), z = a(() => l.node[l.fieldChildren] || []), D = a(() => z.value.length > 0), C = a(() => l.node.isLeaf ?? !D.value), N = a(() => l.selectedKeys.includes(h.value)), P = a(() => l.checkedKeys.includes(h.value)), H = a(() => l.halfCheckedKeys.includes(h.value)), g = a(() => l.expandedKeys.includes(h.value)), w = a(() => l.node.disabled === !0), Y = a(() => l.selectable !== !1 && l.node.selectable !== !1), B = a(() => l.checkable === !0 && l.node.checkable !== !1), L = a(() => l.indentSize ?? 18), S = a(() => l.halfIndentSize ?? 9), T = a(() => (l.level || 0) * L.value), j = a(() => ((l.level || 0) - 1) * L.value + S.value), R = a(() => (l.level || 0) * L.value + S.value), u = M(null), $ = M(!1);
|
|
41
42
|
function q(e) {
|
|
42
|
-
|
|
43
|
+
w.value || e.target.closest(".x-tree-node__switcher") || (l.actionOnNodeClick === "expand" && !C.value && O(e, !1), Y.value && c("select", h.value, l.node, e));
|
|
43
44
|
}
|
|
44
45
|
function A(e) {
|
|
45
|
-
if (
|
|
46
|
+
if (w.value || !B.value) return;
|
|
46
47
|
const t = e.target;
|
|
47
48
|
c("check", h.value, l.node, t.checked, e);
|
|
48
49
|
}
|
|
49
50
|
async function G() {
|
|
50
|
-
if (!l.loadMore || D.value ||
|
|
51
|
+
if (!l.loadMore || D.value || C.value || $.value) return !0;
|
|
51
52
|
$.value = !0;
|
|
52
53
|
try {
|
|
53
54
|
return await l.loadMore(l.node), !0;
|
|
@@ -57,16 +58,16 @@ const ue = ["draggable"], fe = {
|
|
|
57
58
|
$.value = !1;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
async function
|
|
61
|
-
if (t && e.stopPropagation(),
|
|
61
|
+
async function O(e, t = !0) {
|
|
62
|
+
if (t && e.stopPropagation(), C.value || $.value) return;
|
|
62
63
|
const d = !g.value;
|
|
63
64
|
d && !await G() || c("expand", h.value, l.node, d, e);
|
|
64
65
|
}
|
|
65
66
|
function J(e) {
|
|
66
|
-
|
|
67
|
+
O(e, !0);
|
|
67
68
|
}
|
|
68
69
|
function Q(e) {
|
|
69
|
-
!l.draggable ||
|
|
70
|
+
!l.draggable || w.value || c("dragStart", e, l.node);
|
|
70
71
|
}
|
|
71
72
|
function U(e) {
|
|
72
73
|
l.draggable && (u.value = null, c("dragEnd", e, l.node));
|
|
@@ -102,15 +103,15 @@ const ue = ["draggable"], fe = {
|
|
|
102
103
|
const d = ae("XTreeNode", !0);
|
|
103
104
|
return r(), s("div", {
|
|
104
105
|
class: v(["x-tree-node", {
|
|
105
|
-
"x-tree-node--selected":
|
|
106
|
-
"x-tree-node--disabled":
|
|
107
|
-
"x-tree-node--leaf":
|
|
106
|
+
"x-tree-node--selected": N.value,
|
|
107
|
+
"x-tree-node--disabled": w.value,
|
|
108
|
+
"x-tree-node--leaf": C.value,
|
|
108
109
|
"x-tree-node--expanded": g.value,
|
|
109
110
|
"x-tree-node--drag-over-before": u.value === "before",
|
|
110
111
|
"x-tree-node--drag-over-inside": u.value === "inside",
|
|
111
112
|
"x-tree-node--drag-over-after": u.value === "after"
|
|
112
113
|
}]),
|
|
113
|
-
draggable: n.draggable && !
|
|
114
|
+
draggable: n.draggable && !w.value,
|
|
114
115
|
onDragstart: Q,
|
|
115
116
|
onDragend: U,
|
|
116
117
|
onDragover: W,
|
|
@@ -127,10 +128,10 @@ const ue = ["draggable"], fe = {
|
|
|
127
128
|
}, [
|
|
128
129
|
n.showLine && n.level && n.level > 0 ? (r(), s("span", {
|
|
129
130
|
key: 0,
|
|
130
|
-
class: v(["x-tree-node__line-horizontal", { "x-tree-node__line-horizontal--leaf":
|
|
131
|
+
class: v(["x-tree-node__line-horizontal", { "x-tree-node__line-horizontal--leaf": C.value }]),
|
|
131
132
|
style: K({ left: `${j.value}px` })
|
|
132
133
|
}, null, 6)) : x("", !0),
|
|
133
|
-
|
|
134
|
+
C.value ? (r(), s("span", {
|
|
134
135
|
key: 2,
|
|
135
136
|
class: v(["x-tree-node__switcher x-tree-node__switcher--leaf", { "x-tree-node__switcher--leaf-no-indent": n.showLine }])
|
|
136
137
|
}, [
|
|
@@ -146,7 +147,7 @@ const ue = ["draggable"], fe = {
|
|
|
146
147
|
key: 0,
|
|
147
148
|
node: n.node
|
|
148
149
|
}, () => [
|
|
149
|
-
|
|
150
|
+
I(de(ce), {
|
|
150
151
|
name: "jiazai",
|
|
151
152
|
spin: "",
|
|
152
153
|
size: 18,
|
|
@@ -170,7 +171,7 @@ const ue = ["draggable"], fe = {
|
|
|
170
171
|
])]))
|
|
171
172
|
], !0)
|
|
172
173
|
], 2)),
|
|
173
|
-
|
|
174
|
+
B.value ? (r(), s("span", {
|
|
174
175
|
key: 3,
|
|
175
176
|
class: "x-tree-node__checkbox",
|
|
176
177
|
onClick: t[0] || (t[0] = E(() => {
|
|
@@ -180,7 +181,7 @@ const ue = ["draggable"], fe = {
|
|
|
180
181
|
type: "checkbox",
|
|
181
182
|
checked: P.value,
|
|
182
183
|
indeterminate: H.value,
|
|
183
|
-
disabled:
|
|
184
|
+
disabled: w.value,
|
|
184
185
|
onChange: A
|
|
185
186
|
}, null, 40, he)
|
|
186
187
|
])) : x("", !0),
|
|
@@ -195,7 +196,7 @@ const ue = ["draggable"], fe = {
|
|
|
195
196
|
], !0)
|
|
196
197
|
])) : x("", !0),
|
|
197
198
|
y("span", {
|
|
198
|
-
class: v(["x-tree-node__title", { "x-tree-node__title--selected":
|
|
199
|
+
class: v(["x-tree-node__title", { "x-tree-node__title--selected": N.value }])
|
|
199
200
|
}, [
|
|
200
201
|
i(e.$slots, "icon", { node: n.node }, () => [
|
|
201
202
|
n.node.icon ? (r(), s("span", ge, V(n.node.icon), 1)) : x("", !0)
|
|
@@ -226,7 +227,7 @@ const ue = ["draggable"], fe = {
|
|
|
226
227
|
"x-tree-node__child-item--last": p === z.value.length - 1
|
|
227
228
|
}])
|
|
228
229
|
}, [
|
|
229
|
-
|
|
230
|
+
I(d, {
|
|
230
231
|
node: f,
|
|
231
232
|
"field-key": n.fieldKey,
|
|
232
233
|
"field-title": n.fieldTitle,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./XTreeSelect.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1eecea3b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|