Comments (2)
我也有这样的返回格式,是给` enum 设置了 空数组,然后接口拿到数据 通过 prop 做 key 统一处理的
onMounted(async () => {
const { data } = await getReportInitDataApi()
// 不需要从 initData 接口里面获取
const notInitData = ['useUnit', 'auditUser']
columns.forEach(col => {
if (col.prop && data[col.prop] && !notInitData.includes(col.prop)) {
col.enum = data[col.prop].map(item => ({ label: item.text, value: item.id }))
}
})
})
let columnsData: ColumnProps[] = [
{ type: 'selection', fixed: 'left', width: 70 },
{ prop: 'operation', label: '操作', width: props.pageStatus !== 4 ? 220 : 100, fixed: 'left' },
{
prop: 'type',
label: '报告类型',
width: 200,
enum: [],
search: {
el: 'select',
},
},
{
prop: 'process',
label: '办理环节',
enum: [],
width: 100,
search: {
el: 'select',
},
},
{
prop: 'testResult',
label: '检测结论',
width: 100,
enum: [],
search: {
el: 'select',
},
},
]
from geeker-admin.
Enum 支持动态更新的
from geeker-admin.
Related Issues (20)
- 打包之后放在服务器上进不去
- v-copy 在复制失败时,仍提示复制成功 HOT 1
- 本地调试mock接口500 服务器异常
- 感觉这里封装的太复杂了,Geeker-Admin-master\src\api\index.ts HOT 2
- 鼠标文字光标颜色是白色的以及收缩边框图标
- 官方最新的DevTools7插件安装后无法与vite插件兼容,望作者大大优化下 HOT 2
- 剩余待完善功能还会更新吗 HOT 2
- Protable如何在SearchColumns中添加关键字搜索的input? HOT 3
- 你能不能有一个通用的方法, 将 table 的属性导出或传入 HOT 1
- 有无编辑单元格的功能 HOT 3
- 右键菜单是否支持?
- 手机移动端适配 HOT 3
- ElementPlusError: [el-input] [API] label is about to be deprecated in version 2.8.0, please use aria-label instead.
- protable,搜索条件中,defaultValue 有值的时候, 无法清除默认值, 就是说search配置项中的defaultValue 有值, clearable设置为true, 虽然可以清除页面上显示的值, 但是搜索的时候, 默认值还会带上, HOT 4
- 修改prettier配置后,如何格式化全局代码
- proTable 使用:show-overflow-tooltip="false" 无法生效,需要在columns每一项单独配置才生效 HOT 1
- 使用 npm build:dev出现错误
- 使用 npm run build:dev 出现'vue-tsc' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- Geeker-Admin 后端配套框架 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geeker-admin.