@aplus-frontend/ui
Version:
102 lines (101 loc) • 2.74 kB
JavaScript
import { defineComponent as B, useSlots as x, ref as S, computed as g, createBlock as F, openBlock as k, normalizeProps as s, guardReactiveProps as d, unref as o, createSlots as u, withCtx as n, createVNode as C, mergeProps as P, renderList as f, renderSlot as c } from "vue";
import "../../item/index.vue2.mjs";
import "../../../ap-field/index.mjs";
import { isUndefined as q, omit as m, pick as $ } from "lodash-unified";
import { apFormItemSlotNames as b } from "../../constant.mjs";
import N from "../../item/index.vue.mjs";
import R from "../../../ap-field/tree-select/index.vue.mjs";
const E = /* @__PURE__ */ B({
name: "ApFormItemTreeSelect",
__name: "index",
props: {
htmlFor: {},
prefixCls: {},
label: {},
help: {},
extra: {},
labelCol: {},
wrapperCol: {},
hasFeedback: { type: Boolean, default: !1 },
colon: { type: Boolean, default: void 0 },
labelAlign: {},
prop: {},
name: {},
rules: {},
autoLink: { type: Boolean, default: !0 },
required: { type: Boolean, default: void 0 },
validateFirst: { type: Boolean, default: void 0 },
validateStatus: {},
validateTrigger: {},
messageVariables: {},
hidden: { type: Boolean },
noStyle: { type: Boolean },
tooltip: {},
span: {},
order: {},
offset: {},
push: {},
pull: {},
xs: {},
sm: {},
md: {},
lg: {},
xl: {},
xxl: {},
flex: {},
bordered: { type: Boolean },
valuePropName: {},
initialValue: {},
_signal: {},
transform: {},
description: {},
customFilled: {},
disabled: { type: Boolean, default: void 0 },
field: { default: () => ({}) },
placeholder: {}
},
setup(_, { expose: v }) {
const e = _, i = x(), r = S(), h = g(() => ({
placeholder: e.placeholder,
disabled: e.disabled,
...e.field || {},
bordered: e.bordered ? !1 : q(e.field?.bordered) ? !0 : e.field?.bordered
}));
return v({
focus: () => {
r.value?.focus();
},
blur: () => {
r.value?.blur();
},
request: (t, p) => {
r.value?.request(t, p);
}
}), (t, p) => (k(), F(N, s(d(o(m)(e, ["field", "placeholder"]))), u({
default: n(() => [
C(o(R), P(h.value, {
ref_key: "treeSelectRef",
ref: r
}), u({ _: 2 }, [
f(o(m)(i, o(b)), (y, l) => ({
name: l,
fn: n((a) => [
c(t.$slots, l, s(d(a || {})))
])
}))
]), 1040)
]),
_: 2
}, [
f(o($)(i, o(b)), (y, l) => ({
name: l,
fn: n((a) => [
c(t.$slots, l, s(d(a || {})))
])
}))
]), 1040));
}
});
export {
E as default
};