mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 07:28:24 +08:00
fix(setting): update setting
This commit is contained in:
parent
04932ec0f5
commit
09d4ee51ea
|
@ -91,7 +91,7 @@
|
|||
</t-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { ref, computed, watch, onMounted, watchEffect } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
import { ColorPicker } from 'vue-color-kit';
|
||||
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`;
|
||||
};
|
||||
|
||||
watch(
|
||||
() => formData.value,
|
||||
(newVal) => {
|
||||
store.dispatch('setting/changeTheme', newVal);
|
||||
},
|
||||
);
|
||||
watchEffect(() => {
|
||||
store.dispatch('setting/changeTheme', formData.value);
|
||||
});
|
||||
</script>
|
||||
<style lang="less">
|
||||
@import '@/style/variables';
|
||||
|
|
Loading…
Reference in New Issue
Block a user