UNPKG

yanzhen-design-vue

Version:

93 lines (92 loc) 2.84 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const core = require("@yanzhen-lowcode/core"); const utilsVue = require("@yanzhen-libs/utils-vue"); const lodashEs = require("lodash-es"); require("../../../hooks/index.cjs"); require("./enum/index.cjs"); const usually = require("./constants/usually.cjs"); const useContactsModelValue = require("./hook/use-contacts-model-value.cjs"); const useContactsCommomProps = require("./hook/use-contacts-commom-props.cjs"); const useContactsOptions = require("./hook/use-contacts-options.cjs"); const index = require("../../../hooks/use-namespace/index.cjs"); const contacts = require("./enum/contacts.cjs"); const ns = index.useNamespace("contacts"); const triggerTypes = ["click", "hover"]; const contactsOptions = { ns, class: ns.b(), name: ns.defineVNodeName(), triggerTypes }; const contactsName = contactsOptions.name; const contactsProps = utilsVue.buildProps({ ...core.apiProviderBaseProps, ...useContactsOptions.contactsOptionsProps(), ...useContactsModelValue.contactsModelValueProps(), ...useContactsCommomProps.showTabKeysProps, selfId: String, title: { type: String, default: "通讯录" }, /** * 常用联系人的类型 */ usuallyUserRequestType: { type: utilsVue.definePropType(String), values: Object.values(usually.usuallyType), default: usually.Usually.ALL }, // 可选用户 optionalList: { type: utilsVue.definePropType(Array), default: () => [] }, // 是否需要外部用户 needOutUser: { type: [String, Boolean, Number], values: ["0", "1", 0, 1, "Y", "N", false, true], default: false }, multiple: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, placeholder: { type: String, default: "请选择" }, /** * @description 翻页功能 每页条数 */ pageSize: { type: Number, default: 100 }, allExpand: { type: Boolean, default: true }, // 禁用的id列表(不区分类型);从外部传入,内部只参与判断; disableIds: utilsVue.definePropType(Array), onChange: utilsVue.definePropType(Function), onClick: utilsVue.definePropType(Function), onSearch: utilsVue.definePropType(Function), ["onUpdate:selectedValue"]: utilsVue.definePropType(Function) }); const contactsApis = contacts.getApiSymbol(); const contactsEmits = utilsVue.buildEmits(utilsVue.propsSeparate(contactsProps).emits); const contactsPickProps = (props) => { return lodashEs.pick(props, ...Object.keys(contactsProps)); }; exports.contactsApis = contactsApis; exports.contactsEmits = contactsEmits; exports.contactsName = contactsName; exports.contactsOptions = contactsOptions; exports.contactsPickProps = contactsPickProps; exports.contactsProps = contactsProps;