需求功能前后端代码实现

This commit is contained in:
pfl
2025-04-17 17:13:33 +08:00
parent 7645801fcb
commit 62f9dd359f
10 changed files with 885 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<template>
<div class="options">
<el-option
v-for="(option, i) in options"
:key="getKey(option, i)"
:label="getLabel(option, i)"
:value="getValue(option, i)"
:disabled="option.disabled"
></el-option>
</div>
</template>
<script>
export default {
name: 'SimpleOptions',
props: {
options: Array,
label: String,
value: String,
},
methods: {
getKey(option, i) {
return 'option_' + i
},
getLabel(option) {
return this.label ? option[this.label] : option.label
},
getValue(option) {
return this.value ? option[this.value] : option.value
},
},
}
</script>