Vue监听系统深色模式切换主题
mounted() {
const { brandTheme, brandLightTheme, mode } = config;
let theme = mode;
if (mode === 'auto') {
const media = window.matchMedia('(prefers-color-scheme:dark)');
if (media.matches) {
theme = 'dark';
} else {
theme = 'light';
}
media.addEventListener('change', e => {
// 深色模式
if (e.matches) {
// 设置主题
this.$store.dispatch('setting/changeTheme', { ...config, mode: 'dark', brandTheme });
} else {
// 设置主题
this.$store.dispatch('setting/changeTheme', { ...config, mode: 'light', brandTheme: brandLightTheme });
}
});
}
if (theme === 'light')
config.brandTheme = brandLightTheme;
// 设置主题
this.$store.dispatch('setting/changeTheme', { ...config });
}
Composer PHP版本要求过高
"config": {
"platform-check": false
},
composer update
composer dump-autoload
安装PHP Tidy扩展
yum install libtidy libtidy-devel -y
cd /www/server/php/73/src/ext/tidy
/www/server/php/73/bin/phpize
./configure --with-php-config=/www/server/php/73/bin/php-config
make && make install
# 解开php.ini的tidy扩展注释, 或执行以下命令添加配置
echo "extension = tidy.so" >> /www/server/php/73/etc/php.ini
Mac安装Win11
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
slmgr /skms zh.us.to
slmgr /ato