diff --git a/src/components/AccountListTable/index.vue b/src/components/AccountListTable/index.vue index c9420bebc..40134de82 100644 --- a/src/components/AccountListTable/index.vue +++ b/src/components/AccountListTable/index.vue @@ -100,10 +100,10 @@ export default { name: 'View', title: this.$t('common.View'), type: 'primary', - callback: ({ row }) => { - this.account = row || {} + callback: function({ row }) { + this.account = row this.showViewSecretDialog = true - } + }.bind(this) }, { name: 'Delete', @@ -132,10 +132,10 @@ export default { name: 'Update', title: this.$t('common.Update'), can: !this.$store.getters.currentOrgIsRoot, - callback: ({ row }) => { - this.account = row || {} + callback: function({ row }) { + this.account = row this.showUpdateSecretDialog = true - } + }.bind(this) } ] } diff --git a/vue.config.js b/vue.config.js index 4f0c89ff9..e548d1a41 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,6 @@ 'use strict' const path = require('path') -// const defaultSettings = require('./src/settings.js') +const defaultSettings = require('./src/settings.js') const CompressionWebpackPlugin = require('compression-webpack-plugin') const productionGzipExtensions = /\.(js|css|json|txt|ico|svg)(\?.*)?$/i @@ -34,7 +34,7 @@ module.exports = { outputDir: 'lina', assetsDir: 'assets', lintOnSave: process.env.NODE_ENV === 'development', - // productionSourceMap: false, + productionSourceMap: false, devServer: { port: port, host: '0.0.0.0', @@ -134,7 +134,10 @@ module.exports = { .end() config - .devtool('cheap-source-map') + // https://webpack.js.org/configuration/devtool/#development + .when(process.env.NODE_ENV === 'development', + config => config.devtool('cheap-source-map') + ) config .when(process.env.NODE_ENV !== 'development',