Commit 3311634a by Elune

crud.js 清除参数无值优化

parent 4ddeb5a4
......@@ -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()
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment