mirror of https://github.com/halo-dev/halo
refactor: ignore case when matching editor raw types (#5602)
#### What type of PR is this? /area ui /kind improvement /milestone 2.14.x #### What this PR does / why we need it: 编辑文章匹配编辑器类型时,忽略大小写。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/5597 #### Does this PR introduce a user-facing change? ```release-note None ```pull/5599/head^2
parent
1a19bdcb54
commit
c2a71545aa
|
@ -1,26 +1,26 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
VPageHeader,
|
||||
IconPages,
|
||||
IconSettings,
|
||||
IconSendPlaneFill,
|
||||
VSpace,
|
||||
VButton,
|
||||
IconSave,
|
||||
Toast,
|
||||
Dialog,
|
||||
IconEye,
|
||||
IconPages,
|
||||
IconSave,
|
||||
IconSendPlaneFill,
|
||||
IconSettings,
|
||||
Toast,
|
||||
VButton,
|
||||
VPageHeader,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import SinglePageSettingModal from "./components/SinglePageSettingModal.vue";
|
||||
import type { SinglePage, SinglePageRequest } from "@halo-dev/api-client";
|
||||
import {
|
||||
computed,
|
||||
type ComputedRef,
|
||||
nextTick,
|
||||
onMounted,
|
||||
provide,
|
||||
ref,
|
||||
toRef,
|
||||
type ComputedRef,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
|
@ -271,7 +271,8 @@ const handleFetchContent = async () => {
|
|||
const provider =
|
||||
preferredEditor ||
|
||||
editorProviders.value.find(
|
||||
(provider) => provider.rawType === data.rawType
|
||||
(provider) =>
|
||||
provider.rawType.toLowerCase() === data.rawType?.toLowerCase()
|
||||
);
|
||||
if (provider) {
|
||||
currentEditorProvider.value = provider;
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
Dialog,
|
||||
IconBookRead,
|
||||
IconEye,
|
||||
IconSave,
|
||||
IconSettings,
|
||||
IconSendPlaneFill,
|
||||
IconSettings,
|
||||
Toast,
|
||||
VButton,
|
||||
VPageHeader,
|
||||
VSpace,
|
||||
Toast,
|
||||
Dialog,
|
||||
IconEye,
|
||||
} from "@halo-dev/components";
|
||||
import PostSettingModal from "./components/PostSettingModal.vue";
|
||||
import type { Post, PostRequest } from "@halo-dev/api-client";
|
||||
import {
|
||||
computed,
|
||||
type ComputedRef,
|
||||
nextTick,
|
||||
onMounted,
|
||||
provide,
|
||||
ref,
|
||||
toRef,
|
||||
type ComputedRef,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
|
@ -291,7 +291,8 @@ const handleFetchContent = async () => {
|
|||
const provider =
|
||||
preferredEditor ||
|
||||
editorProviders.value.find(
|
||||
(provider) => provider.rawType === data.rawType
|
||||
(provider) =>
|
||||
provider.rawType.toLowerCase() === data.rawType?.toLowerCase()
|
||||
);
|
||||
|
||||
if (provider) {
|
||||
|
|
|
@ -234,7 +234,8 @@ async function handleSetEditorProviderFromRemote() {
|
|||
const provider =
|
||||
preferredEditor ||
|
||||
editorProviders.value.find(
|
||||
(provider) => provider.rawType === content.value.rawType
|
||||
(provider) =>
|
||||
provider.rawType.toLowerCase() === content.value.rawType?.toLowerCase()
|
||||
);
|
||||
|
||||
if (provider) {
|
||||
|
|
Loading…
Reference in New Issue