@opensig/opendesign
Version:
124 lines (123 loc) • 2.53 kB
JavaScript
const dropdownProps = {
/**
* @zh-CN 弹出框是否可见
* @en-US Is the pop-up box visible
*/
visible: {
type: Boolean
},
/**
* @zh-CN 非受控模式,弹出框是否默认可见
* @en-US In uncontrolled mode, is the pop-up box visible by default
* @default false
*/
defaultVisible: {
type: Boolean,
default: false
},
/**
* @zh-CN 大小
* @en-US Size
* @default 'large'
*/
size: {
type: String,
default: "large"
},
/**
* @zh-CN 圆角值
* @en-US Round
*/
round: {
type: String
},
/**
* @zh-CN 下拉选项触发方式
* @en-US The triggering method of the drop-down option
* @default 'click'
*/
trigger: {
type: String,
default: "click"
},
/**
* @zh-CN 下拉选项位置
* @en-US Drop-down option position
* @default 'bl'
*/
optionPosition: {
type: String,
default: "bl"
},
/**
* @zh-CN 下拉选项宽度自适应规则 'auto':自动 | 'min-width':最小宽度与选择框一致 | 'width': 宽度与选择框一致
* @en-US Drop-down option width adaptation rules: 'auto': automatic; 'min-width': minimum width consistent with the selection box; 'width': width consistent with the selection box
* @default 'min-width'
*/
optionWidthMode: {
type: String,
default: "min-width"
},
/**
* @zh-CN 挂载容器,默认为body
* @en-US Mount the container, with the default being body
* @default 'body'
*/
optionsWrapper: {
type: [String, Object],
default: "body"
},
/**
* @zh-CN 下拉容器自定义类
* @en-US Drop-down container custom class
*/
optionWrapClass: {
type: [String, Array, Object]
},
/**
* @zh-CN 是否在结束选择时,卸载下拉选项
* @en-US Whether to uninstall the drop-down options when ending the selection
* @default true
*/
unmountOnHide: {
type: Boolean,
default: true
},
/**
* @zh-CN 过渡名称
* @en-US Transitional name
*/
transition: {
type: String
}
};
const dropdownItemProps = {
/**
* @zh-CN 选项显示文本
* @en-US The option displays text.
*/
label: {
type: String,
default: ""
},
/**
* @zh-CN 选项选中值
* @en-US Selected value of the option
*/
value: {
type: [String, Number],
default: ""
},
/**
* @zh-CN 是否禁用
* @en-US Whether to disable
*/
disabled: {
type: Boolean,
default: false
}
};
export {
dropdownItemProps,
dropdownProps
};