You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/09/16 04:02:16 UTC
[incubator-streampark] branch dev updated: [lint] lint fix (#1615)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new c8333fa26 [lint] lint fix (#1615)
c8333fa26 is described below
commit c8333fa268283e1ef032a6e239357ca8cccb2153
Author: wql <we...@analysys.com.cn>
AuthorDate: Fri Sep 16 12:02:10 2022 +0800
[lint] lint fix (#1615)
Co-authored-by: sparkwql <we...@gmail>
---
streampark-console/streampark-console-webapp/package.json | 3 ++-
.../streampark-console-webapp/src/views/system/menu/Menu.vue | 10 ++++------
.../streampark-console-webapp/src/views/system/token/Token.vue | 9 ++++-----
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/streampark-console/streampark-console-webapp/package.json b/streampark-console/streampark-console-webapp/package.json
index 377e5db32..37ce7950c 100644
--- a/streampark-console/streampark-console-webapp/package.json
+++ b/streampark-console/streampark-console-webapp/package.json
@@ -7,7 +7,8 @@
"build:mix": "cross-env VUE_APP_ENV=mixin vue-cli-service build",
"build": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint",
- "lint:nofix": "vue-cli-service lint --no-fix"
+ "lint:nofix": "vue-cli-service lint --no-fix",
+ "prepare": "cd ../../ && husky install"
},
"dependencies": {
"ant-design-vue": "^1.7.8",
diff --git a/streampark-console/streampark-console-webapp/src/views/system/menu/Menu.vue b/streampark-console/streampark-console-webapp/src/views/system/menu/Menu.vue
index de222042b..0394812c2 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/menu/Menu.vue
+++ b/streampark-console/streampark-console-webapp/src/views/system/menu/Menu.vue
@@ -167,7 +167,7 @@ export default {
advanced: false,
key: +new Date(),
queryParams: {},
- filteredInfo: null,
+ filteredInfo: {},
dataSource: [],
pagination: {
defaultPageSize: 10000000,
@@ -183,8 +183,6 @@ export default {
},
computed: {
columns () {
- let { filteredInfo } = this
- filteredInfo = filteredInfo || {}
return [{
title: 'Name',
dataIndex: 'text',
@@ -197,7 +195,7 @@ export default {
}, {
title: 'Type',
dataIndex: 'type',
- customRender: (text, row, index) => {
+ customRender: (text) => {
switch (text) {
case '0': return <a-tag color = "cyan" >菜单</a-tag>
case '1': return <a-tag color = "pink"> 按钮 </a-tag>
@@ -300,7 +298,7 @@ export default {
},
reset () {
// 重置列过滤器规则
- this.filteredInfo = null
+ this.filteredInfo = {}
// 重置查询参数
this.queryParams = {}
// 清空时间选择
@@ -309,7 +307,7 @@ export default {
},
handleTableChange (pagination, filters, sorter) {
// 将这两个个参数赋值给Vue data,用于后续使用
- this.filteredInfo = filters
+ this.filteredInfo = filters || {}
this.fetch({
sortField: sorter.field,
sortOrder: sorter.order,
diff --git a/streampark-console/streampark-console-webapp/src/views/system/token/Token.vue b/streampark-console/streampark-console-webapp/src/views/system/token/Token.vue
index 9039b4693..c42814edf 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/token/Token.vue
+++ b/streampark-console/streampark-console-webapp/src/views/system/token/Token.vue
@@ -159,7 +159,7 @@ export default {
visible: false
},
queryParams: {},
- filteredInfo: null,
+ filteredInfo: {},
sortedInfo: null,
paginationInfo: null,
dataSource: [],
@@ -177,9 +177,8 @@ export default {
computed: {
columns() {
- let {sortedInfo, filteredInfo} = this
+ let {sortedInfo} = this
sortedInfo = sortedInfo || {}
- filteredInfo = filteredInfo || {}
return [{
title: 'User Name',
dataIndex: 'username',
@@ -307,7 +306,7 @@ export default {
this.paginationInfo.pageSize = this.pagination.defaultPageSize
}
// 重置列过滤器规则
- this.filteredInfo = null
+ this.filteredInfo = {}
// 重置列排序规则
this.sortedInfo = null
// 重置查询参数
@@ -318,7 +317,7 @@ export default {
handleTableChange(pagination, filters, sorter) {
// 将这三个参数赋值给Vue data,用于后续使用
this.paginationInfo = pagination
- this.filteredInfo = filters
+ this.filteredInfo = filters || {}
this.sortedInfo = sorter
this.fetch({
sortField: sorter.field,