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