web-component-gallery 1.1.11 → 1.1.12
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 +1 -1
- package/plugins/method/Theme.js +10 -3
package/package.json
CHANGED
package/plugins/method/Theme.js
CHANGED
|
@@ -25,18 +25,25 @@ export default {
|
|
|
25
25
|
* @extract 是否提取
|
|
26
26
|
* @publicPath 资源输出路径
|
|
27
27
|
* @outputDir 提取的 css 文件存放目录
|
|
28
|
-
*/
|
|
28
|
+
*/
|
|
29
29
|
toggleTheme({
|
|
30
30
|
scopeName: `theme-${scopeName}`,
|
|
31
31
|
multipleScopeVars: themeConfig.multipleScopeVars,
|
|
32
32
|
extract: themeConfig.extract,
|
|
33
33
|
publicPath: themeConfig.publicPath,
|
|
34
34
|
outputDir: themeConfig.extractCssOutputDir
|
|
35
|
-
})
|
|
35
|
+
})
|
|
36
36
|
const loadingTimer=setTimeout(() => {
|
|
37
37
|
hideMessage()
|
|
38
38
|
clearTimeout(loadingTimer)
|
|
39
|
-
}, 10)
|
|
39
|
+
}, 10)
|
|
40
|
+
|
|
41
|
+
/** 加载主题对应样式文件 */
|
|
42
|
+
// const requireLess = require.context('@/theme/styles', false, /\.less$/)
|
|
43
|
+
// requireLess(`./${scopeName}.less`)
|
|
44
|
+
let themeLink = document.getElementById('theme-stylesheet')
|
|
45
|
+
themeLink.href = `${process.env.BASE_URL}static/style/${scopeName}.css`
|
|
46
|
+
|
|
40
47
|
Vue.prototype.$store.commit('SET_THEME',scopeName)
|
|
41
48
|
}
|
|
42
49
|
|