mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 04:46:31 +08:00
fix(setting): update setting
This commit is contained in:
parent
04932ec0f5
commit
09d4ee51ea
|
@ -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';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user