crud.js 清除参数无值优化
This commit is contained in:
@@ -335,12 +335,12 @@ 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
|
||||
if (crud.query[item] === null || 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
|
||||
if (crud.params[item] === null || crud.params[item] === '') crud.params[item] = undefined
|
||||
})
|
||||
return {
|
||||
page: crud.page.page - 1,
|
||||
|
||||
@@ -37,14 +37,6 @@ export default {
|
||||
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
||||
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
||||
|
||||
const $message = this.$message({
|
||||
message: ' Compiling the theme',
|
||||
customClass: 'theme-message',
|
||||
type: 'success',
|
||||
duration: 0,
|
||||
iconClass: 'el-icon-loading'
|
||||
})
|
||||
|
||||
const getHandler = (variable, id) => {
|
||||
return () => {
|
||||
const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))
|
||||
@@ -81,8 +73,6 @@ export default {
|
||||
})
|
||||
|
||||
this.$emit('change', val)
|
||||
|
||||
$message.close()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user