From b6e6a7c47e4d585b0c6bed20d72309853675a903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Thu, 24 Jun 2021 16:03:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96css=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=89=93=E5=8C=85=E6=B2=A1=E6=8A=8A?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=89=93=E8=BF=9B=E5=8E=BB=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 12 ++++-------- tailwind.config.js | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index ae87937..3246e33 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,27 +20,26 @@ export default { created() { this.setHtmlTitle(); this.setLanguage(this.lang); - enquireScreen((isMobile) => this.setDevice(isMobile)); + enquireScreen(isMobile => this.setDevice(isMobile)); }, mounted() {}, watch: { lang(val) { - this.setLanguage(val); this.setHtmlTitle(); }, $route() { this.setHtmlTitle(); }, - 'theme.mode': function (val) { + 'theme.mode': function(val) { let closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`); changeThemeColor(this.theme.color, val).then(closeMessage); }, - 'theme.color': function (val) { + 'theme.color': function(val) { let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`); changeThemeColor(val, this.theme.mode).then(closeMessage); }, - layout: function () { + layout: function() { window.dispatchEvent(new Event('resize')); }, }, @@ -77,6 +76,3 @@ export default { }, }; - - diff --git a/tailwind.config.js b/tailwind.config.js index f5a3194..780ba6b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +1,5 @@ module.exports = { - purge: ['./src/*.vue'], + purge: ['./src/**/*.vue'], darkMode: false, // or 'media' or 'class' theme: { extend: {}, -- GitLab