want to get the value of cusOptions.vue on the cusSelect.vue page
/* cusSelect.vue */
<template>
<div>
<input type="text" v-model="value">
<ul class="select-list" v-show="isopen">
<slot @get-value="handleSelect"></slot>
</ul>
</div>
</template>
<script>
methods: {
// value
handleSelect (value) {
this.value = value
}
}
</script>
/* cusOptions.vue */
<template>
<li @click.stop="handleSelect">{{label}}</li>
</template>
<script>
props: {
value: String,
label: String
},
methods: {
handleSelect () {
this.$emit("getValue", this.value)
}
}
</script>
/* pageA */
<cus-select :list="list">
<cus-option
v-for="item in warehouseGroup"
:key="item.value"
:label="item.label"
:value="item.value">
</cus-option>
</cus-select>