diff --git a/src/store/index.ts b/src/store/index.ts index fbdc7cea..d79750de 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -4,12 +4,22 @@ const isDark = ref(false) function setDark(dark: boolean) { isDark.value = dark + // #ifdef H5 process.env.NODE_ENV === 'development' && uni.setStorageSync('isDark', dark) + // #endif + // #ifndef H5 + uni.setStorageSync('isDark', dark) + // #endif } export function useDark() { + // #ifdef H5 process.env.NODE_ENV === 'development' ? setDark(Boolean(uni.getStorageSync('isDark'))) : setDark(localStorage.getItem('vitepress-theme-appearance') === 'dark') + // #endif + // #ifndef H5 + setDark(Boolean(uni.getStorageSync('isDark'))) + // #endif return { isDark, setDark } } diff --git a/src/uni_modules/wot-design-uni/changelog.md b/src/uni_modules/wot-design-uni/changelog.md index 19fc0da9..e9210ce0 100644 --- a/src/uni_modules/wot-design-uni/changelog.md +++ b/src/uni_modules/wot-design-uni/changelog.md @@ -4,22 +4,7 @@ ### 0.0.1 (2023-08-16) -### 🐛 Bug Fixes | Bug 修复 - -* 🐛 修复日历选择器滚动到视图内的问题 ([8e2e310](https://github.com/Moonofweisheng/wot-design-uni/commit/8e2e310c89721bd517ba82ee8da327f7984ee3da)) -* 🐛 修复tabs组件中使用sticky组件offset-top参数名错误的问题 ([707b355](https://github.com/Moonofweisheng/wot-design-uni/commit/707b355e841fd05c0c47b98dea619044794963b0)) - - ### ✨ Features | 新功能 -* ✨ 继续调整一些组件 ([0b2df6e](https://github.com/Moonofweisheng/wot-design-uni/commit/0b2df6e7b2e3f2196e3345999ce6c5df74a41347)) * ✨ 适配暗黑模式 ([f5946a4](https://github.com/Moonofweisheng/wot-design-uni/commit/f5946a4b7134fed161bc123d66485e7bc91cdc68)) -* ✨ 新增Collpase组件 ([02d34fe](https://github.com/Moonofweisheng/wot-design-uni/commit/02d34fe081c34d789cca0485f12b4e6b84558586)) -* ✨ 新增tag组件 ([62d3c53](https://github.com/Moonofweisheng/wot-design-uni/commit/62d3c535758ec013c080d7676b55f15526ce8d68)) -* ✨ 修复支付宝钉钉平台部分组件不兼容的问题 ([ed5bad1](https://github.com/Moonofweisheng/wot-design-uni/commit/ed5bad129a2296abdae445231e3c8066cb837e54)) -* ✨ 增加日期选择器和表单页面 ([915574d](https://github.com/Moonofweisheng/wot-design-uni/commit/915574da878018c2027ddcc0fe9747de303d76d5)) -* ✨ 增加Calendar和CalendarView组件 ([8fffcf7](https://github.com/Moonofweisheng/wot-design-uni/commit/8fffcf7e7c6a09d18c426695437c7c35082c92dd)) -* ✨ 增加message-box组件 ([26c5bc9](https://github.com/Moonofweisheng/wot-design-uni/commit/26c5bc9074925fd6338d968451b1f27fc2e11223)) -* ✨ 增加SelectPicker和ColPicker组件 ([7c0055a](https://github.com/Moonofweisheng/wot-design-uni/commit/7c0055a1c95d9ad8a4f088f2579ebc7f981a7ac6)) -* ✨ 增加step、upload、swipe-cation等组件 ([79d4ee4](https://github.com/Moonofweisheng/wot-design-uni/commit/79d4ee42688478126d2461b9bcec79f275483c1d)) -* ✨ 增加Tab等组件 ([b7dad0f](https://github.com/Moonofweisheng/wot-design-uni/commit/b7dad0fb01d49ba8bbebfecffb9dabe1cd4eef44)) +* ✨ 新增 50+ 组件