vue2-client 1.8.6 → 1.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue'
2
- import { initRouter } from '@vue2-client/router'
2
+ import { initRouter } from '@vue2-client/router/index.js'
3
3
  import { initI18n } from '@vue2-client/utils/i18n'
4
4
  import bootstrap from '@vue2-client/bootstrap'
5
5
  import { modules } from '@vue2-client/store'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
package/src/App.vue CHANGED
@@ -42,15 +42,23 @@ export default {
42
42
  'theme.mode': {
43
43
  immediate: true,
44
44
  handler: function (val) {
45
- const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
46
- themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
45
+ if (process.env.NODE_ENV === 'production') {
46
+ const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
47
+ themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
48
+ } else {
49
+ this.$message.info('为保证构建性能,关闭开发环境下的主题模式切换')
50
+ }
47
51
  }
48
52
  },
49
53
  'theme.color': {
50
54
  immediate: true,
51
55
  handler: function (val) {
52
- const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
53
- themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
56
+ if (process.env.NODE_ENV === 'production') {
57
+ const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
58
+ themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
59
+ } else {
60
+ this.$message.info('为保证构建性能,关闭开发环境下的主题色切换')
61
+ }
54
62
  }
55
63
  },
56
64
  layout: function () {
@@ -97,6 +105,6 @@ export default {
97
105
  </script>
98
106
 
99
107
  <style lang="less" scoped>
100
- #id{
101
- }
108
+ #id{
109
+ }
102
110
  </style>
@@ -44,9 +44,9 @@
44
44
  </template>
45
45
 
46
46
  <script>
47
- import XAddNativeForm from '@/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
48
- import { post } from '@/services/api'
49
- import XTable from '@/base-client/components/common/XTable/XTable.vue'
47
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
48
+ import { post } from '@vue2-client/services/api'
49
+ import XTable from '@vue2-client/base-client/components/common/XTable/XTable.vue'
50
50
 
51
51
  export default {
52
52
  name: 'XStepView',
@@ -43,7 +43,7 @@ module.exports = {
43
43
  // 旧系统路径
44
44
  iframeSrc: '/singlepage/index.html',
45
45
  // 兼容旧版本 V4(最新产品) V3(V3产品) OA(公司OA)
46
- // compatible: 'V4',
46
+ compatible: 'V3',
47
47
  // 路由资源名称
48
48
  routeName: '智慧燃气',
49
49
  // 自定义组件集合 格式为组件名: 组件路径(不需要带@/)
package/vue.config.js CHANGED
@@ -76,14 +76,16 @@ module.exports = {
76
76
  config.performance = {
77
77
  hints: false
78
78
  }
79
- config.plugins.push(
80
- new ThemeColorReplacer({
81
- fileName: 'css/theme-colors-[contenthash:8].css',
82
- matchColors: getThemeColors(),
83
- injectCss: true,
84
- resolveCss
85
- })
86
- )
79
+ if (isProd) {
80
+ config.plugins.push(
81
+ new ThemeColorReplacer({
82
+ fileName: 'css/theme-colors-[contenthash:8].css',
83
+ matchColors: getThemeColors(),
84
+ injectCss: true,
85
+ resolveCss
86
+ })
87
+ )
88
+ }
87
89
  // Ignore all locale files of moment.js
88
90
  config.plugins.push(new webpack.IgnorePlugin({
89
91
  resourceRegExp: /^\.\/locale$/,