@tuoyuan/web
Version:
46 lines (45 loc) • 1.54 kB
JavaScript
import { defineComponent as a, ref as s, resolveComponent as i, openBlock as p, createBlock as u, unref as f, createSlots as N, renderList as m, withCtx as c, renderSlot as v, normalizeProps as h, guardReactiveProps as k, createVNode as _ } from "vue";
import { Tree as g } from "@tuoyuan/arco";
const T = /* @__PURE__ */ a({
name: "Tree",
__name: "tree",
setup(x, { expose: r }) {
const o = s();
return r({
scrollIntoView: (e) => o.value.scrollIntoView(e),
getSelectedNodes: () => o.value.getSelectedNodes(),
getCheckedNodes: (e) => o.value.getCheckedNodes(e),
getHalfCheckedNodes: () => o.value.getHalfCheckedNodes(),
getExpandedNodes: () => o.value.getExpandedNodes(),
checkAll: (e) => o.value.checkAll(e),
checkNode: (e, l, t) => o.value.checkNode(e, l, t),
selectAll: (e) => o.value.selectAll(e),
selectNode: (e, l) => o.value.selectNode(e, l),
expandAll: (e) => o.value.expandAll(e),
expandNode: (e, l) => o.value.expandNode(e, l)
}), (e, l) => {
const t = i("icon-down");
return p(), u(f(g), {
ref_key: "arcoTreeRef",
ref: o
}, N({ _: 2 }, [
m(e.$slots, (w, n, C) => ({
name: n,
fn: c((d) => [
v(e.$slots, n, h(k(d || {})))
])
})),
e.$slots["switcher-icon"] ? void 0 : {
name: "switcher-icon",
fn: c(() => [
_(t)
]),
key: "0"
}
]), 1536);
};
}
});
export {
T as default
};