💩 分享图生成错误

This commit is contained in:
BTMuli
2023-11-25 17:15:52 +08:00
parent b1424fb582
commit 5f3f6640a4
4 changed files with 67 additions and 8 deletions

View File

@@ -14,15 +14,30 @@
</div>
</template>
<script lang="ts" setup>
import { computed } from "vue";
import { onMounted, onUpdated, reactive } from "vue";
import { saveImgLocal } from "../../utils/TGShare";
interface DucDetailOlbProps {
modelValue: TGApp.Sqlite.Character.RoleConstellation[];
}
const props = defineProps<DucDetailOlbProps>();
const constellations = computed(() => {
return props.modelValue ?? [];
let constellations = reactive<TGApp.Sqlite.Character.RoleConstellation[]>([]);
function loadData() {
constellations = props.modelValue;
constellations.map(
async (constellation) => (constellation.icon = await saveImgLocal(constellation.icon)),
);
}
onMounted(() => {
loadData();
});
onUpdated(() => {
loadData();
});
</script>
<style>