# h select custom 下拉框(李新星)

# 基础用法

<template>
	<div>
		标题不为空:
		<h-select-custom v-model="title" :propData="selectData[0]" style="margin: 20px"></h-select-custom>
		标题为空:
		<h-select-custom v-model="title2" :propData="selectData[1]" style="margin: 20px"></h-select-custom>
	</div>
</template>

<script>
export default {
	name: 'HselectCustom',
	data() {
		return {
			title: '',
			title2: '',
			selectData: [
				{
					labelName: '测试标题:',
					style: {
						width: '300px'
					},
					clearable: true,
					options: [
						{
							value: '',
							label: '全部'
						},
						{
							value: 0,
							label: '已下架',
							disabled: true
						},
						{
							value: 1,
							label: '已发布已发布已发布已发布已发布已发布已发布已发布已发布已发布'
						},
						{
							value: 2,
							label: '未发布'
						},
						{
							value: 3,
							label: '待审核'
						},
						{
							value: 4,
							label: '审核不通过'
						}
					]
				},
				{
					labelName: '',
					style: {
						width: '300px'
					},
					clearable: true,
					options: [
						{
							value: '',
							label: '全部'
						},
						{
							value: 0,
							label: '已下架',
							disabled: true
						},
						{
							value: 1,
							label: '已发布已发布已发布已发布已发布已发布已发布已发布已发布已发布'
						},
						{
							value: 2,
							label: '未发布'
						},
						{
							value: 3,
							label: '待审核'
						},
						{
							value: 4,
							label: '审核不通过'
						}
					]
				}
			]
		}
	},
	methods: {}
}
</script>
显示代码

# Attributes

参数 说明 类型 可选值 默认值
model 组件绑定值 string
propData 组件属性 object { labelName/title: '下拉框名称', style: '样式相关', options: [{value: '', label: ''}] } 支持elementui el-select组件的原有参数