feat: 接口返回数据需要根据多个枚举值动态计算结果渲染(多个枚举值是接口返回,并且不知道具体返回时间)

master
LCJ-MinYa 2 months ago
parent f2fa2e4efa
commit 737d0fa94b

@ -146,6 +146,10 @@ const titleArr = [
key: 'computedRules', key: 'computedRules',
title: 'ElementUI的form组件使用rules时动态计算并传入组件实例', title: 'ElementUI的form组件使用rules时动态计算并传入组件实例',
}, },
{
key: 'computedWithEnumList',
title: '接口返回数据需要根据多个枚举值动态计算结果渲染(多个枚举值是接口返回,并且不知道具体返回时间)',
},
]; ];
// @/views/demo/**/*.vue // @/views/demo/**/*.vue

@ -0,0 +1,40 @@
<template>
<div class="p-5 space-y-5 !bg-gray-100">
<el-card
header="页面请求一个初始化数据初始化数据中只返回了枚举值的key, 需要异步获取所有枚举列表多个枚举值是接口返回并且不知道具体返回时间然后根据key获取对应的value再进行渲染"
>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
pageInfo: {},
enumList: [
{
//
sexOptions: [],
//
eduList: [],
//
marriageList: [],
//
idTypeList: [],
//
jobList: [],
//
nationList: [],
},
],
};
},
created() {
this.getPageInfo();
this.getEnumList();
},
};
</script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save