Fix pixverse (#241)
This commit is contained in:
1 parent
1c686b3dc3
commit
0f80cbd2c0
3 files changed
+23
-9
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "patch",
|
||||||
|
"comment": "fix setting and pix bugs",
|
||||||
|
"packageName": "@acedatacloud/nexior",
|
||||||
|
"email": "cqc@cuiqingcai.com",
|
||||||
|
"dependentChangeType": "patch"
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { ElSelect, ElOption } from 'element-plus';
|
import { ElSelect, ElOption } from 'element-plus';
|
||||||
import { PIXVERSE_DEFAULT_MODEL } from '@/constants';
|
import { PIXVERSE_DEFAULT_STYLE } from '@/constants';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'StyleSelector',
|
name: 'StyleSelector',
|
||||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.value) {
|
if (!this.value) {
|
||||||
this.value = PIXVERSE_DEFAULT_MODEL;
|
this.value = PIXVERSE_DEFAULT_STYLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
:index="item.key"
|
:index="item.key"
|
||||||
:class="[
|
:class="[
|
||||||
'flex w-[160px] truncate items-center px-2 cursor-pointer py-2',
|
'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"
|
@click="activeTab = item.key"
|
||||||
>
|
>
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
<div v-if="activeTab === 'general'">
|
<div v-if="activeTab === 'general'">
|
||||||
<general-setting />
|
<general-setting />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="activeTab === 'site' && isSiteAdmin">
|
<div v-else-if="activeTab === 'site'">
|
||||||
<site-setting />
|
<site-setting />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="activeTab === 'seo' && isSiteAdmin">
|
<div v-else-if="activeTab === 'seo' && isSiteAdmin">
|
||||||
@@ -79,14 +80,20 @@ export default defineComponent({
|
|||||||
computed: {
|
computed: {
|
||||||
navItems() {
|
navItems() {
|
||||||
return [
|
return [
|
||||||
{ key: 'general', label: this.$t('common.settings.general'), icon: faCog },
|
{ key: 'general', label: this.$t('common.settings.general'), icon: faCog, visible: true },
|
||||||
{ key: 'site', label: this.$t('common.settings.site'), icon: faBell },
|
{ key: 'site', label: this.$t('common.settings.site'), icon: faBell, visible: this.isSiteAdmin },
|
||||||
{ key: 'seo', label: this.$t('common.settings.seo'), icon: faUserShield },
|
{ key: 'seo', label: this.$t('common.settings.seo'), icon: faUserShield, visible: this.isSiteAdmin },
|
||||||
{ key: 'distribution', label: this.$t('common.settings.distribution'), icon: faMoneyBill },
|
{
|
||||||
{ key: 'function', label: this.$t('common.settings.function'), icon: faMagic }
|
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() {
|
currentTabTitle() {
|
||||||
|
console.debug('activeTab', this.activeTab);
|
||||||
const current = this.navItems.find((item) => item.key === this.activeTab);
|
const current = this.navItems.find((item) => item.key === this.activeTab);
|
||||||
return current ? current.label : '';
|
return current ? current.label : '';
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user