refactor(frontend): 非推奨となったReactivity Transformを使わないように (#12539)
* refactor(frontend): 非推奨となったReactivity Transformを使わないように * refactor: 不要な括弧を除去 * fix: 不要なアノテーションを除去 * fix: Refの配列をrefしている部分の対応 * refactor: 不要な括弧を除去 * fix: lint * refactor: Ref、ShallowRef、ComputedRefの変数の宣言をletからconstに置換 * fix: type error * chore: drop reactivity transform from eslint configuration * refactor: remove unnecessary import * fix: 対応漏れ
This commit is contained in:
@@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue';
|
||||
import { watch, computed, ref } from 'vue';
|
||||
import JSON5 from 'json5';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
@@ -49,16 +49,16 @@ const props = defineProps<{
|
||||
domain: string;
|
||||
}>();
|
||||
|
||||
const scope = $computed(() => props.path ? props.path.split('/') : []);
|
||||
const scope = computed(() => props.path ? props.path.split('/') : []);
|
||||
|
||||
let keys = $ref(null);
|
||||
const keys = ref(null);
|
||||
|
||||
function fetchKeys() {
|
||||
os.api('i/registry/keys-with-type', {
|
||||
scope: scope,
|
||||
scope: scope.value,
|
||||
domain: props.domain === '@' ? null : props.domain,
|
||||
}).then(res => {
|
||||
keys = Object.entries(res).sort((a, b) => a[0].localeCompare(b[0]));
|
||||
keys.value = Object.entries(res).sort((a, b) => a[0].localeCompare(b[0]));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ async function createKey() {
|
||||
scope: {
|
||||
type: 'string',
|
||||
label: i18n.ts._registry.scope,
|
||||
default: scope.join('/'),
|
||||
default: scope.value.join('/'),
|
||||
},
|
||||
});
|
||||
if (canceled) return;
|
||||
@@ -91,9 +91,9 @@ async function createKey() {
|
||||
|
||||
watch(() => props.path, fetchKeys, { immediate: true });
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
title: i18n.ts.registry,
|
||||
|
Reference in New Issue
Block a user