@lambo-design/shared 1.0.0-beta.135 → 1.0.0-beta.136

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.135",
3
+ "version": "1.0.0-beta.136",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/utils/theme.js CHANGED
@@ -3,6 +3,8 @@ import cssVars from "css-vars-ponyfill";
3
3
  import lan_navigator from '../styles/image/lan_navigator.png'
4
4
  import lv_navigator from '../styles/image/lv_navigator.png'
5
5
  import {handleSystemColor} from "./util";
6
+ import config from "@lambo-design/shared/config/config";
7
+
6
8
 
7
9
  const changeByThemeKey = (themeKey) => {
8
10
  if (themeKey) {
@@ -49,7 +51,7 @@ const changeByTheme = (theme) => {
49
51
  }
50
52
  };
51
53
 
52
- const changeThemeByThemeId = (themeId, status, filterStatus, systemForm, upmsServerContext) => {
54
+ const changeThemeByThemeId = (themeId, status, filterStatus, systemForm) => {
53
55
  // 主题切换方式(区分新旧两种:1-旧 2-新)
54
56
  localStorage.setItem('themeInStyle', '2')
55
57
  // 一键滤镜功能 - 灰度状态;
@@ -60,7 +62,7 @@ const changeThemeByThemeId = (themeId, status, filterStatus, systemForm, upmsSer
60
62
  // 记录当前主题
61
63
  localStorage.setItem('themeIdCurrent', themeId)
62
64
  // 顶部栏背景图处理
63
- let background_image = upmsServerContext + '/anon/oss/file/getImage/' + systemForm.topBkImg + '?height=64&width=1920'
65
+ let background_image = config.upmsServerContext + '/anon/oss/file/getImage/' + systemForm.topBkImg + '?height=64&width=1920'
64
66
  if (status === '2') {
65
67
  if (background_image.includes('lan_navigator')) {
66
68
  background_image = 'url(' + lan_navigator + ')'
package/utils/util.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // import {changeByThemeKey} from "packages/shared/utils/theme";
2
2
  import {changeByThemeKey} from "./theme";
3
+ import config from "@lambo-design/shared/config/config";
4
+
3
5
 
4
6
  function tintColorDef(hexColor, tintPercentage) {
5
7
  // 转换十六进制颜色到RGB
@@ -218,12 +220,12 @@ export function handleDefineColor() {
218
220
  varStyleTag.innerHTML = `:root {${_}}`;
219
221
  }
220
222
 
221
- export function initThemeStyle(themeColor) {
223
+ export function initThemeStyle() {
222
224
  let themeInStyleVal = localStorage.getItem('themeInStyle')
223
225
  if (themeInStyleVal === '2') {
224
226
  handleDefineColor()
225
227
  } else {
226
- changeByThemeKey(localStorage.getItem('theme') || themeColor)
228
+ changeByThemeKey(localStorage.getItem('theme') || config.themeColor)
227
229
  }
228
230
  }
229
231