yanzhen-design-vue
Version:
50 lines (49 loc) • 1.26 kB
JavaScript
import { propsSeparate, buildProps, buildEmits } from "@yanzhen-libs/utils-vue";
import { apiProviderBaseProps } from "@yanzhen-lowcode/core";
import { selectProps as selectProps$1 } from "ant-design-vue/es/select";
import "../../../hooks/index.mjs";
import { optionsProps } from "./hooks/select-common-props.mjs";
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
const ns = useNamespace("select");
const selectOptions = {
ns,
class: ns.b(),
name: ns.defineVNodeName()
};
const selectName = selectOptions.name;
const AntSelect = propsSeparate(selectProps$1());
const selectExtraProps = buildProps({
max: Number,
maxMsg: String,
showTag: Boolean,
fetching: Boolean,
showCreateOption: Boolean,
dataSource: String,
params: Object,
id: String,
bizObjectModelCode: String,
tswColumnCode: String,
tswColumnBizType: String,
createOptionMaxLength: {
type: Number,
default: 36
}
});
const selectProps = buildProps({
...apiProviderBaseProps,
...AntSelect.props,
...optionsProps(),
...selectExtraProps
});
const selectEmits = buildEmits({
...AntSelect.emits,
addOption: (value) => true
});
export {
AntSelect,
selectEmits,
selectExtraProps,
selectName,
selectOptions,
selectProps
};