Skip to content

Commit

Permalink
🐛 fix ui bugs about theme idx
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanwn committed Dec 17, 2023
1 parent 608f7cb commit 4a1dc75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/themes/mi/mi.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { defineRender } from "@/store/defineRender";
import { getIconSrc } from "@/utils/getIcon";
import { readSettings } from "@/store/defineSettings";
import { ConvertConfig2Exif } from "@/utils/readExif";
import { defineThemeParameter } from "@/store/defineThemes";
import { defineThemeParameter, themeIdx } from "@/store/defineThemes";

const { iconInfoConfig, verticalBarInfoConfig } = defineCanvasConfig();
const { currentRenderUid, marshal, unMarshal } = defineRender();
Expand All @@ -31,7 +31,6 @@ function PreviewRenderMi(uid) {
const factor = imgScaleInfo.imgH > imgScaleInfo.imgW ? 0.1 : 0.125;
const genMarkInfo = getMarkInfo(exifData, img, iconImg, factor, imgScaleInfo);
const renderItem = genRenderItem(img, genMarkInfo, factor, imgScaleInfo);

const { privacyMode, whiteBoard } = defineThemeParameter();
// whiteBoard.value = false;
return renderItem;
Expand Down
7 changes: 5 additions & 2 deletions src/themes/renderReouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import {
const { currentRenderUid, marshal, unMarshal } = defineRender();
import { allCanvasConfigMap } from "@/store/defineCanvasConfig";
import { defineRender } from "@/store/defineRender";
import { uid2Src } from "@/store/defineImg";

function PreviewRender(uid) {
const themeIdxValue = themeIdx.value;
// const themeIdxValue = themeIdx.value;
const themeIdxValue = uid2Src.get(uid).renderThemeIdx;
let renderItem = {};
switch (themeIdxValue) {
case 1:
Expand All @@ -31,7 +33,8 @@ function PreviewRender(uid) {
}

async function SelectIcon(iconSrc) {
const themeIdxValue = themeIdx.value;
// const themeIdxValue = themeIdx.value;
const themeIdxValue = uid2Src.get(uid).renderThemeIdx;
switch (themeIdxValue) {
case 1:
await SelectIconForMiTheme(iconSrc);
Expand Down
2 changes: 1 addition & 1 deletion src/views/PreviewCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<el-pagination
background
layout="prev, pager, next"
:total="30"
:total="20"
@current-change="sizeChange"
:disabled="parameterDisable"
:current-page="themeIdx"
Expand Down

0 comments on commit 4a1dc75

Please sign in to comment.