🚨 Fix somewhere affected due refactored realm store
This commit is contained in:
parent
c14d3f70a3
commit
a61da4f65e
@ -121,12 +121,14 @@
|
|||||||
import { request } from "@/scripts/request"
|
import { request } from "@/scripts/request"
|
||||||
import { useEditor } from "@/stores/editor"
|
import { useEditor } from "@/stores/editor"
|
||||||
import { getAtk } from "@/stores/userinfo"
|
import { getAtk } from "@/stores/userinfo"
|
||||||
|
import { useRealms } from "@/stores/realms";
|
||||||
import { computed, reactive, ref, watch } from "vue";
|
import { computed, reactive, ref, watch } from "vue";
|
||||||
import { useRouter } from "vue-router"
|
import { useRouter } from "vue-router"
|
||||||
import PlannedPublish from "@/components/publish/parts/PlannedPublish.vue"
|
import PlannedPublish from "@/components/publish/parts/PlannedPublish.vue"
|
||||||
import Media from "@/components/publish/parts/Media.vue"
|
import Media from "@/components/publish/parts/Media.vue"
|
||||||
import PublishArea from "@/components/publish/parts/PublishArea.vue";
|
import PublishArea from "@/components/publish/parts/PublishArea.vue";
|
||||||
|
|
||||||
|
const realms = useRealms()
|
||||||
const editor = useEditor()
|
const editor = useEditor()
|
||||||
|
|
||||||
const dialogs = reactive({
|
const dialogs = reactive({
|
||||||
@ -147,7 +149,7 @@ const data = ref<any>({
|
|||||||
|
|
||||||
const currentRealm = computed(() => {
|
const currentRealm = computed(() => {
|
||||||
if(data.value.realm_id) {
|
if(data.value.realm_id) {
|
||||||
return editor.availableRealms.find((e) => e.id === data.value.realm_id)
|
return realms.available.find((e: any) => e.id === data.value.realm_id)
|
||||||
} else {
|
} else {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
variant="solo-filled"
|
variant="solo-filled"
|
||||||
item-title="name"
|
item-title="name"
|
||||||
item-value="id"
|
item-value="id"
|
||||||
:items="editor.availableRealms"
|
:items="realms.available"
|
||||||
:model-value="props.value"
|
:model-value="props.value"
|
||||||
@update:model-value="(val) => emits('update:value', val)"
|
@update:model-value="(val) => emits('update:value', val)"
|
||||||
/>
|
/>
|
||||||
@ -29,7 +29,9 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useEditor } from "@/stores/editor";
|
import { useEditor } from "@/stores/editor";
|
||||||
|
import { useRealms } from "@/stores/realms";
|
||||||
|
|
||||||
|
const realms = useRealms();
|
||||||
const editor = useEditor();
|
const editor = useEditor();
|
||||||
|
|
||||||
const props = defineProps<{ show: boolean; value: string | null }>();
|
const props = defineProps<{ show: boolean; value: string | null }>();
|
||||||
|
Loading…
Reference in New Issue
Block a user