Commit 3311634a by Elune

crud.js 清除参数无值优化

parent 4ddeb5a4
...@@ -335,12 +335,12 @@ function CRUD(options) { ...@@ -335,12 +335,12 @@ function CRUD(options) {
* 获取查询参数 * 获取查询参数
*/ */
getQueryParams: function() { getQueryParams: function() {
// 清参数无值的情况 // 清参数无值的情况
Object.keys(crud.query).length !== 0 && Object.keys(crud.query).forEach(item => { 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 => { 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 { return {
page: crud.page.page - 1, page: crud.page.page - 1,
......
...@@ -37,14 +37,6 @@ export default { ...@@ -37,14 +37,6 @@ export default {
const themeCluster = this.getThemeCluster(val.replace('#', '')) const themeCluster = this.getThemeCluster(val.replace('#', ''))
const originalCluster = this.getThemeCluster(oldVal.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) => { const getHandler = (variable, id) => {
return () => { return () => {
const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', '')) const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))
...@@ -81,8 +73,6 @@ export default { ...@@ -81,8 +73,6 @@ export default {
}) })
this.$emit('change', val) 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