Files
kengee-data-screen/src/views/AppSelect.vue

57 lines
1.1 KiB
Vue
Raw Normal View History

2024-06-18 17:09:25 +08:00
<template>
2024-06-21 16:42:57 +08:00
<section class="AppSelect" >
<div class="label">类型</div>
<el-select v-model="value" placeholder="全部" size="small" @change="handleSearch">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</section>
2024-06-18 17:09:25 +08:00
</template>
<script>
export default {
name: "AppSelect",
label: "下拉菜单",
data() {
return {
2024-06-21 16:42:57 +08:00
options: $dicts.类型,
2024-06-18 17:09:25 +08:00
value: ''
}
2024-06-21 16:42:57 +08:00
},
computed: {
refs: v => v.$parent.getItemRefs(),
},
methods: {
handleSearch(v) {
const list = this.refs['6e6c93d7-5b24-4d75-a0d0-4beb130045ed'].$refs.main
list.search.type = v
list.getData()
}
2024-06-18 17:09:25 +08:00
}
}
</script>
<style scoped>
2024-06-21 16:42:57 +08:00
.AppSelect {
display: flex;
align-items: center;
gap: 8px;
}
.AppSelect .el-input__inner {
2024-06-18 17:09:25 +08:00
background: linear-gradient(180deg, rgba(12, 53, 111, 0) 0%, #0C356F 100%);
border: 1px solid #1760AE;
2024-06-21 16:42:57 +08:00
border-radius: 0;
}
.AppSelect .label {
white-space: nowrap;
color: #fff;
font-size: 14px;
2024-06-18 17:09:25 +08:00
}
</style>