@aplus-frontend/ui
Version:
102 lines (101 loc) • 2.72 kB
JavaScript
import { defineComponent as B, useSlots as x, ref as S, computed as _, createBlock as F, openBlock as k, normalizeProps as s, guardReactiveProps as n, unref as l, createSlots as u, withCtx as p, createVNode as R, mergeProps as C, renderList as f, renderSlot as c } from "vue";
import "../../item/index.vue2.mjs";
import { ApField as P } from "../../../ap-field/index.mjs";
import { omit as m, pick as A } from "lodash-unified";
import { apFormItemSlotNames as v } from "../../constant.mjs";
import N from "../../item/index.vue.mjs";
const E = /* @__PURE__ */ B({
name: "ApFormItemText",
__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(b, { expose: h }) {
const { Text: g } = P, i = x(), y = b, o = S();
return h({
focus: (e) => {
o.value?.focus(e);
},
blur: () => {
o.value?.blur();
},
setSelectionRange: (e, d, a) => {
o.value?.setSelectionRange(e, d, a);
},
select: () => {
o.value?.select();
},
input: _(() => o.value?.input)
}), (e, d) => (k(), F(N, s(n(l(m)(y, ["field", "placeholder"]))), u({
default: p(() => [
R(l(g), C({
ref_key: "inputRef",
ref: o,
disabled: e.disabled,
placeholder: e.placeholder
}, e.field), u({ _: 2 }, [
f(l(m)(i, l(v)), (a, t) => ({
name: t,
fn: p((r) => [
c(e.$slots, t, s(n(r || {})))
])
}))
]), 1040, ["disabled", "placeholder"])
]),
_: 2
}, [
f(l(A)(i, l(v)), (a, t) => ({
name: t,
fn: p((r) => [
c(e.$slots, t, s(n(r || {})))
])
}))
]), 1040));
}
});
export {
E as default
};