Commit b6e6a7c4 authored by 水落(YangLei)'s avatar 水落(YangLei)

feat: 优化css配置,解决打包没把样式打进去的问题

parent b4d53406
...@@ -20,27 +20,26 @@ export default { ...@@ -20,27 +20,26 @@ export default {
created() { created() {
this.setHtmlTitle(); this.setHtmlTitle();
this.setLanguage(this.lang); this.setLanguage(this.lang);
enquireScreen((isMobile) => this.setDevice(isMobile)); enquireScreen(isMobile => this.setDevice(isMobile));
}, },
mounted() {}, mounted() {},
watch: { watch: {
lang(val) { lang(val) {
this.setLanguage(val); this.setLanguage(val);
this.setHtmlTitle(); this.setHtmlTitle();
}, },
$route() { $route() {
this.setHtmlTitle(); this.setHtmlTitle();
}, },
'theme.mode': function (val) { 'theme.mode': function(val) {
let closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`); let closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`);
changeThemeColor(this.theme.color, val).then(closeMessage); changeThemeColor(this.theme.color, val).then(closeMessage);
}, },
'theme.color': function (val) { 'theme.color': function(val) {
let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`); let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`);
changeThemeColor(val, this.theme.mode).then(closeMessage); changeThemeColor(val, this.theme.mode).then(closeMessage);
}, },
layout: function () { layout: function() {
window.dispatchEvent(new Event('resize')); window.dispatchEvent(new Event('resize'));
}, },
}, },
...@@ -77,6 +76,3 @@ export default { ...@@ -77,6 +76,3 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped>
</style>
module.exports = { module.exports = {
purge: ['./src/*.vue'], purge: ['./src/**/*.vue'],
darkMode: false, // or 'media' or 'class' darkMode: false, // or 'media' or 'class'
theme: { theme: {
extend: {}, extend: {},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment