Fix pixverse (#241)

This commit is contained in:
Germey authored and GitHub committed 2025-08-01 20:28:14 +08:00
1 parent 1c686b3dc3
commit 0f80cbd2c0
3 files changed
+23 -9

No files matched your search

@@ -10,7 +10,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { PIXVERSE_DEFAULT_MODEL } from '@/constants';
import { PIXVERSE_DEFAULT_STYLE } from '@/constants';
export default defineComponent({
name: 'StyleSelector',
@@ -66,7 +66,7 @@ export default defineComponent({
},
mounted() {
if (!this.value) {
this.value = PIXVERSE_DEFAULT_MODEL;
this.value = PIXVERSE_DEFAULT_STYLE;
}
}
});
+14 -7
View File
@@ -9,7 +9,8 @@
:index="item.key"
:class="[
'flex w-[160px] truncate items-center px-2 cursor-pointer py-2',
activeTab === item.key ? 'active' : ''
activeTab === item.key ? 'active' : '',
item.visible ? '' : 'hidden'
]"
@click="activeTab = item.key"
>
@@ -22,7 +23,7 @@
<div v-if="activeTab === 'general'">
<general-setting />
</div>
<div v-else-if="activeTab === 'site' && isSiteAdmin">
<div v-else-if="activeTab === 'site'">
<site-setting />
</div>
<div v-else-if="activeTab === 'seo' && isSiteAdmin">
@@ -79,14 +80,20 @@ export default defineComponent({
computed: {
navItems() {
return [
{ key: 'general', label: this.$t('common.settings.general'), icon: faCog },
{ key: 'site', label: this.$t('common.settings.site'), icon: faBell },
{ key: 'seo', label: this.$t('common.settings.seo'), icon: faUserShield },
{ key: 'distribution', label: this.$t('common.settings.distribution'), icon: faMoneyBill },
{ key: 'function', label: this.$t('common.settings.function'), icon: faMagic }
{ key: 'general', label: this.$t('common.settings.general'), icon: faCog, visible: true },
{ key: 'site', label: this.$t('common.settings.site'), icon: faBell, visible: this.isSiteAdmin },
{ key: 'seo', label: this.$t('common.settings.seo'), icon: faUserShield, visible: this.isSiteAdmin },
{
key: 'distribution',
label: this.$t('common.settings.distribution'),
icon: faMoneyBill,
visible: this.isSiteAdmin
},
{ key: 'function', label: this.$t('common.settings.function'), icon: faMagic, visible: this.isSiteAdmin }
];
},
currentTabTitle() {
console.debug('activeTab', this.activeTab);
const current = this.navItems.find((item) => item.key === this.activeTab);
return current ? current.label : '';
},