如何在element-ui中封装select组件
2017-10-12
展开全部
<template>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
2017-10-12
展开全部
<template>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2017-10-12
展开全部
<template>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
<el-select placeholder="" :value="value" :size="size" @input="change($event)">
<el-option :label="showAllTipLabel || '全部'" value="" v-if="showAllTip !== undefined"></el-option>
<el-option label="男" :value="1"></el-option>
<el-option label="女" :value="2"></el-option>
</el-select>
</template>
<script>
export default {
props: ['value', 'size', 'showAllTip', 'showAllTipLabel'],
methods: {
change: function(val) {
this.$emit('input', val);
}
},
}
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询