优化查询
This commit is contained in:
@@ -329,6 +329,13 @@ function CRUD(options) {
|
||||
* 获取查询参数
|
||||
*/
|
||||
getQueryParams: function() {
|
||||
// 清楚 参数无值的情况
|
||||
Object.keys(crud.query).length !== 0 && Object.keys(crud.query).forEach(item => {
|
||||
if (!crud.query[item]) crud.query[item] = undefined
|
||||
})
|
||||
Object.keys(crud.params).length !== 0 && Object.keys(crud.params).forEach(item => {
|
||||
if (!crud.params[item]) crud.params[item] = undefined
|
||||
})
|
||||
return {
|
||||
page: crud.page.page - 1,
|
||||
size: crud.page.size,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<section class="app-main">
|
||||
<CodeFund />
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<keep-alive :include="cachedViews">
|
||||
<router-view :key="key" />
|
||||
@@ -15,12 +14,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CodeFund from '@/components/CodeFund'
|
||||
export default {
|
||||
name: 'AppMain',
|
||||
components: {
|
||||
CodeFund
|
||||
},
|
||||
computed: {
|
||||
cachedViews() {
|
||||
return this.$store.state.tagsView.cachedViews
|
||||
|
||||
Reference in New Issue
Block a user