<template>
    <div class="ht-base-select-hide-selected-demo">
        <ht-base-select
                multiple
                @on-change="handleChange"
                v-model="selectedItems"
        >
            <ht-base-option v-for="item in options" :value="item.value" :key="item.value" v-show="handleShow(item.value)">{{item.label}}
            </ht-base-option>
        </ht-base-select>
    </div>
</template>

<script>
    export default {
        name: 'HtBaseSelectHideSelectedDemo',
        data() {
            return {
                selectedItems: [],
                options: [{
                    value: '选项1',
                    label: '黄金糕'
                }, {
                    value: '选项2',
                    label: '双皮奶'
                }, {
                    value: '选项3',
                    label: '蚵仔煎'
                }, {
                    value: '选项4',
                    label: '龙须面'
                }, {
                    value: '选项5',
                    label: '北京烤鸭'
                }],
            }
        },
        methods: {
            handleChange(selectedItems) {
                this.selectedItems = selectedItems;
            },
            handleShow(v){
                return this.selectedItems.indexOf(v) == -1
            }
        }
    }
</script>
<style>
    .ht-base-select-hide-selected-demo {

    }
</style>

