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 +1 -1
- package/package.json +1 -1
- package/src/App.vue +3 -3
- package/src/utils/waterMark.js +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
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
|
|
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
|
-
|
|
34
|
+
waterMark('开发环境')
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
// 设置系统版本
|
package/src/utils/waterMark.js
CHANGED
|
@@ -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')
|