vue2-client 1.8.38 → 1.8.40

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/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.8.37 -2024-1-30 @江超**
4
+ **1.8.37 - 1.8.40 -2024-1-30 @江超**
5
5
  - 开发环境增加水印
6
6
 
7
7
  **1.8.36 -2024-1-25 @江超**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.38",
3
+ "version": "1.8.40",
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
@@ -10,7 +10,7 @@ import { mapState, mapMutations } from 'vuex'
10
10
  import themeUtil from '@vue2-client/utils/themeUtil'
11
11
  import { getI18nKey } from '@vue2-client/utils/routerUtil'
12
12
  import { setSystemVersion } from '@vue2-client/utils/request'
13
- import createWaterMark from '@vue2-client/utils/waterMark'
13
+ import waterMark from '@vue2-client/utils/waterMark'
14
14
 
15
15
  export default {
16
16
  name: 'App',
@@ -28,10 +28,10 @@ export default {
28
28
  this.setWeekModeTheme(this.weekMode)
29
29
  const configStr = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
30
30
  if (configStr) {
31
- const config = JSON.parse()
31
+ const config = JSON.parse(configStr)
32
32
  if (config.$globalProp.environment === 'dev') {
33
33
  // 设置水印
34
- createWaterMark('开发环境')
34
+ waterMark('开发环境')
35
35
  }
36
36
  }
37
37
  // 设置系统版本
@@ -15,8 +15,8 @@ export default function createWaterMark (waterMarkName) {
15
15
  if (!waterMarkName) {
16
16
  return
17
17
  }
18
- const width = document.body.clientWidth
19
- const canvasWidth = width / width / 320
18
+ const width = window.parseInt(document.body.clientWidth)
19
+ const canvasWidth = width / window.parseInt(width / 320)
20
20
  const fontFamily = window.getComputedStyle(document.body)['font-family']
21
21
  const fragment = document.createDocumentFragment()
22
22
  waterMarkDOM = document.createElement('div')