Merge pull request #85 from Tencent/fix/page/setting

fix(setting): fix setting page
This commit is contained in:
yuyang 2022-03-03 17:07:03 +08:00 committed by GitHub
commit 0c67eaa6fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 14 deletions

View File

@ -65,7 +65,7 @@
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-svg-loader": "^3.1.0", "vite-svg-loader": "^3.1.0",
"vue-clipboard3": "^1.0.1", "vue-clipboard3": "^1.0.1",
"vue-tsc": "^0.32.0" "vue-tsc": "^0.29.8"
}, },
"config": { "config": {
"commitizen": { "commitizen": {

View File

@ -50,7 +50,6 @@ const useComputed = (props) => {
export default defineComponent({ export default defineComponent({
name: 'SideNav', name: 'SideNav',
components: { components: {
MenuContent,
tLogoFull, tLogoFull,
tLogo, tLogo,
}, },
@ -120,12 +119,6 @@ export default defineComponent({
.join(''); .join('');
}; };
const routerChange = (path: string) => {
router.push({
path,
});
};
const goHome = () => { const goHome = () => {
router.push('/dashboard/base'); router.push('/dashboard/base');
}; };
@ -136,7 +129,6 @@ export default defineComponent({
autoCollapsed, autoCollapsed,
changeCollapsed, changeCollapsed,
getActiveName, getActiveName,
routerChange,
goHome, goHome,
}; };
}, },
@ -167,7 +159,7 @@ export default defineComponent({
), ),
}} }}
> >
<menu-content navData={this.menu} /> <MenuContent navData={this.menu} />
</t-menu> </t-menu>
<div class={`${prefix}-side-nav-placeholder${this.collapsed ? '-hidden' : ''}`}></div> <div class={`${prefix}-side-nav-placeholder${this.collapsed ? '-hidden' : ''}`}></div>
</div> </div>

View File

@ -49,7 +49,7 @@
:value="COLOR_OPTIONS[COLOR_OPTIONS.length - 1]" :value="COLOR_OPTIONS[COLOR_OPTIONS.length - 1]"
class="setting-layout-color-group dynamic-color-btn" class="setting-layout-color-group dynamic-color-btn"
> >
<color-container :value="COLOR_OPTIONS[COLOR_OPTIONS.length - 1]" /> <ColorContainer :value="COLOR_OPTIONS[COLOR_OPTIONS.length - 1]" />
</t-radio-button> </t-radio-button>
</t-popup> </t-popup>
</div> </div>
@ -59,7 +59,7 @@
<t-radio-group v-model="formData.layout" default-vaule="top"> <t-radio-group v-model="formData.layout" default-vaule="top">
<div v-for="(item, index) in LAYOUT_OPTION" :key="index" class="setting-layout-drawer"> <div v-for="(item, index) in LAYOUT_OPTION" :key="index" class="setting-layout-drawer">
<t-radio-button :key="index" :value="item"> <t-radio-button :key="index" :value="item">
<thumbnail :src="getThumbnailUrl(item)" /> <Thumbnail :src="getThumbnailUrl(item)" />
</t-radio-button> </t-radio-button>
</div> </div>
</t-radio-group> </t-radio-group>
@ -97,6 +97,8 @@ import { MessagePlugin, PopupVisibleChangeContext } from 'tdesign-vue-next';
import { Color } from 'tvision-color'; import { Color } from 'tvision-color';
import useClipboard from 'vue-clipboard3'; import useClipboard from 'vue-clipboard3';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
import Thumbnail from '@/components/thumbnail/index.vue';
import ColorContainer from '@/components/color/index.vue';
import 'vue-color-kit/dist/vue-color-kit.css'; import 'vue-color-kit/dist/vue-color-kit.css';

View File

@ -142,7 +142,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { ValidateResultContext } from 'tdesign-vue-next';
import Card from '@/components/card/index.vue'; import Card from '@/components/card/index.vue';
import { import {
@ -173,7 +172,7 @@ const amount = computed(() => {
return '--'; return '--';
}); });
const onSubmit = (result: ValidateResultContext<FormData>, val: number) => { const onSubmit = (result, val: number) => {
if (result.validateResult === true) { if (result.validateResult === true) {
activeForm.value = val; activeForm.value = val;
} }