fix(setting): update setting

This commit is contained in:
pengYYY 2022-02-19 16:23:32 +08:00
parent 04932ec0f5
commit 09d4ee51ea

View File

@ -91,7 +91,7 @@
</t-drawer> </t-drawer>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch, onMounted, watchEffect } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { ColorPicker } from 'vue-color-kit'; import { ColorPicker } from 'vue-color-kit';
import { MessagePlugin, PopupVisibleChangeContext } from 'tdesign-vue-next'; import { MessagePlugin, PopupVisibleChangeContext } from 'tdesign-vue-next';
@ -219,12 +219,9 @@ const getThumbnailUrl = (name: string): string => {
return `https://tdesign.gtimg.com/tdesign-pro/setting/${name}.png`; return `https://tdesign.gtimg.com/tdesign-pro/setting/${name}.png`;
}; };
watch( watchEffect(() => {
() => formData.value, store.dispatch('setting/changeTheme', formData.value);
(newVal) => { });
store.dispatch('setting/changeTheme', newVal);
},
);
</script> </script>
<style lang="less"> <style lang="less">
@import '@/style/variables'; @import '@/style/variables';