|
- <!--
- * @Date: 2021-07-08 11:02:40
- * @LastEditTime: 2022-07-27 10:48:43
- * @Description: 列表查询demo
- -->
- <template>
- <div class="app-container">
- <!--工具栏-->
- <div class="head-container">
- <div>
- <el-button class="filter-item" size="mini" type="primary" icon="el-icon-plus"
- @click="openSave()">新增</el-button>
- </div>
- </div>
-
- <!--表格渲染-->
- <el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column :show-overflow-tooltip="true" prop="newsId" label="序号" />
- <el-table-column :show-overflow-tooltip="true" prop="标题" label="newsTitle" />
- <el-table-column :show-overflow-tooltip="true" prop="createDate" label="创建时间" />
- </el-table>
- <!--分页组件-->
- <pagination />
- </div>
- </template>
- <script>
- import CRUD, { presenter, header, crud } from '@crud/crud'
- import pagination from '@crud/Pagination'
-
- export default {
- name: 'Demo',
- components: { pagination },
- mixins: [presenter(), header(), crud()],
- data() {
- return {
- releaseSourceList: [],
- dialogVisible: false,
- id: '',
- multipleSelection: []
- }
- },
- cruds() {
- return CRUD({ title: '列表', url: '/index/carNewsHotList', query: {}})
- },
- methods: {
- /* 刷新前操作 */
- [CRUD.HOOK.beforeRefresh]() {
- this.query.videHas = 1
- },
- handleSelectionChange(val) {
- this.multipleSelection = val
- }
- }
- }
- </script>
|