fix: repeated display of theme tabs. (#3727)

#### What type of PR is this?

/kind bug
/area console

#### What this PR does / why we need it:
获取主题配置时,重复添加了上次已经获取到的主题配置,导致重复显示。并同步修改了 plugin 中可能出现问题的位置。

#### Which issue(s) this PR fixes:

Fixes #3726 

#### Special notes for your reviewer:
1. 打开 Console 端主题页面
2. 点击右上角预览页面
3. 关闭预览页面,选项卡无重复即为正常。


#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端主题设置中,选项卡会重复显示的问题
```
pull/3729/head^2
Li 2023-04-10 15:10:22 +08:00 committed by GitHub
parent 45313a529e
commit cab3432d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ const { data: setting } = useQuery<Setting>({
if (data) {
const { forms } = data.spec;
tabs.value = [
...tabs.value,
...initialTabs,
...forms.map((item: SettingForm) => {
return {
id: item.group,

View File

@ -88,7 +88,7 @@ const { data: setting } = useQuery({
if (data) {
const { forms } = data.spec;
tabs.value = [
...tabs.value,
...initialTabs,
...forms.map((item: SettingForm) => {
return {
id: item.group,