summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/pages/admin/emojis.vue4
-rw-r--r--src/client/pages/admin/index.vue10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/client/pages/admin/emojis.vue b/src/client/pages/admin/emojis.vue
index 80e0e00ba9..f5952f93b8 100644
--- a/src/client/pages/admin/emojis.vue
+++ b/src/client/pages/admin/emojis.vue
@@ -48,7 +48,7 @@
</template>
<script lang="ts">
-import { computed, defineComponent } from 'vue';
+import { computed, defineComponent, toRef } from 'vue';
import MkButton from '@client/components/ui/button.vue';
import MkInput from '@client/components/form/input.vue';
import MkPagination from '@client/components/ui/pagination.vue';
@@ -112,7 +112,7 @@ export default defineComponent({
},
async mounted() {
- this.$emit('info', this[symbols.PAGE_INFO]);
+ this.$emit('info', toRef(this, symbols.PAGE_INFO));
},
methods: {
diff --git a/src/client/pages/admin/index.vue b/src/client/pages/admin/index.vue
index cda3ab912a..28157ff05a 100644
--- a/src/client/pages/admin/index.vue
+++ b/src/client/pages/admin/index.vue
@@ -26,7 +26,7 @@
</template>
<script lang="ts">
-import { computed, defineAsyncComponent, defineComponent, nextTick, onMounted, reactive, ref, watch } from 'vue';
+import { computed, defineAsyncComponent, defineComponent, isRef, nextTick, onMounted, reactive, ref, watch } from 'vue';
import { i18n } from '@client/i18n';
import MkSuperMenu from '@client/components/ui/super-menu.vue';
import FormGroup from '@client/components/debobigego/group.vue';
@@ -73,7 +73,13 @@ export default defineComponent({
const view = ref(null);
const el = ref(null);
const onInfo = (viewInfo) => {
- childInfo.value = viewInfo;
+ if (isRef(viewInfo)) {
+ watch(viewInfo, () => {
+ childInfo.value = viewInfo.value;
+ }, { immediate: true });
+ } else {
+ childInfo.value = viewInfo;
+ }
};
const pageProps = ref({});