feat:完善功能
This commit is contained in:
48
src/components/Select/index.vue
Normal file
48
src/components/Select/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="select">
|
||||
<el-select v-model="modelValue" clearable :placeholder="label" @change="onChange">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.ssname" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
label: {
|
||||
type: String,
|
||||
default: '选择排队景区'
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
let modelValue = defineModel()
|
||||
let emit = defineEmits(['on-change'])
|
||||
const onChange = (e) => {
|
||||
emit('on-change', e)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.select {
|
||||
:deep(.el-select__wrapper) {
|
||||
width: vw(240);
|
||||
padding: vh(10) vw(20);
|
||||
border-radius: vw(54);
|
||||
box-shadow: none;
|
||||
border: 1px solid rgba(0, 114, 220, 0.3);
|
||||
background: linear-gradient(270deg, rgba(8, 41, 86, 0.16) 0%, #0b61b4 100%);
|
||||
}
|
||||
:deep(.el-select__placeholder) {
|
||||
font-weight: 400;
|
||||
font-size: vw(20);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: 400;
|
||||
font-size: vw(24);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user