1. 为CRUD.operation注入curd,免去属性传递 2. 表格界面零配置实现“表格列过滤显示”功能,弃用v-if方式 (#59)
⚡ CRUD优化
为CRUD.operation注入curd,免去属性传递
表格界面零配置实现“表格列过滤显示”功能,弃用v-if方式
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<!-- 上传 -->
|
||||
@@ -66,9 +66,9 @@
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="columns.visible('filename')" width="200" prop="filename" label="文件名" />
|
||||
<el-table-column v-if="columns.visible('username')" prop="username" label="上传者" />
|
||||
<el-table-column v-if="columns.visible('url')" ref="table" :show-overflow-tooltip="true" prop="url" label="缩略图">
|
||||
<el-table-column width="200" prop="filename" label="文件名" />
|
||||
<el-table-column prop="username" label="上传者" />
|
||||
<el-table-column ref="table" :show-overflow-tooltip="true" prop="url" label="缩略图">
|
||||
<template slot-scope="{row}">
|
||||
<el-image
|
||||
:src="row.url"
|
||||
@@ -79,10 +79,10 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="columns.visible('size')" prop="size" label="文件大小" />
|
||||
<el-table-column v-if="columns.visible('height')" prop="height" label="高度" />
|
||||
<el-table-column v-if="columns.visible('width')" prop="width" label="宽度" />
|
||||
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="创建日期">
|
||||
<el-table-column prop="size" label="文件大小" />
|
||||
<el-table-column prop="height" label="高度" />
|
||||
<el-table-column prop="width" label="宽度" />
|
||||
<el-table-column prop="createTime" label="创建日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user