mirror of https://github.com/halo-dev/halo
chore: bump vue version to 3.5 (#6696)
#### What type of PR is this? /area ui /kind improvement /milestone 2.20.x #### What this PR does / why we need it: 升级 UI 项目的 Vue 版本至 3.5.x。 #### Does this PR introduce a user-facing change? ```release-note 升级 UI 项目的 Vue 版本至 3.5.x。 ```pull/6708/head
parent
f6409a0cb0
commit
fd40770ebc
|
@ -27,7 +27,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
category?: Category;
|
category?: Category;
|
||||||
parentCategory?: Category;
|
parentCategory?: Category;
|
||||||
isChildLevelCategory: boolean;
|
isChildLevelCategory?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
category: undefined,
|
category: undefined,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import StickyBlock from "@/components/sticky-block/StickyBlock.vue";
|
||||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||||
import { useThemeStore } from "@console/stores/theme";
|
import { useThemeStore } from "@console/stores/theme";
|
||||||
import type {
|
import type {
|
||||||
|
@ -28,7 +29,6 @@ import { storeToRefs } from "pinia";
|
||||||
import { computed, markRaw, onMounted, ref, toRaw } from "vue";
|
import { computed, markRaw, onMounted, ref, toRaw } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import ThemePreviewListItem from "./ThemePreviewListItem.vue";
|
import ThemePreviewListItem from "./ThemePreviewListItem.vue";
|
||||||
import StickyBlock from "@/components/sticky-block/StickyBlock.vue";
|
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
@ -304,6 +304,7 @@ const iframeClasses = computed(() => {
|
||||||
@after-leave="switching = false"
|
@after-leave="switching = false"
|
||||||
>
|
>
|
||||||
<div v-show="settingsVisible" class="mb-20">
|
<div v-show="settingsVisible" class="mb-20">
|
||||||
|
<!-- @vue-skip -->
|
||||||
<VTabbar
|
<VTabbar
|
||||||
v-model:active-id="activeSettingTab"
|
v-model:active-id="activeSettingTab"
|
||||||
:items="settingTabs"
|
:items="settingTabs"
|
||||||
|
|
|
@ -66,6 +66,7 @@ const handleChangePassword = async () => {
|
||||||
:title="$t('core.user.change_password_modal.title')"
|
:title="$t('core.user.change_password_modal.title')"
|
||||||
@close="emit('close')"
|
@close="emit('close')"
|
||||||
>
|
>
|
||||||
|
<!-- @vue-ignore -->
|
||||||
<FormKit
|
<FormKit
|
||||||
id="password-form"
|
id="password-form"
|
||||||
v-model="formState"
|
v-model="formState"
|
||||||
|
|
|
@ -50,6 +50,7 @@ const inputClasses = {
|
||||||
<IconLogo class="mb-8 flex-none" />
|
<IconLogo class="mb-8 flex-none" />
|
||||||
|
|
||||||
<div class="flex w-72 flex-col">
|
<div class="flex w-72 flex-col">
|
||||||
|
<!-- @vue-ignore -->
|
||||||
<FormKit
|
<FormKit
|
||||||
id="setup-form"
|
id="setup-form"
|
||||||
v-model="formState"
|
v-model="formState"
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
"short-unique-id": "^5.0.2",
|
"short-unique-id": "^5.0.2",
|
||||||
"transliteration": "^2.3.5",
|
"transliteration": "^2.3.5",
|
||||||
"ua-parser-js": "^1.0.38",
|
"ua-parser-js": "^1.0.38",
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.5.8",
|
||||||
"vue-demi": "^0.14.7",
|
"vue-demi": "^0.14.7",
|
||||||
"vue-draggable-plus": "^0.4.1",
|
"vue-draggable-plus": "^0.4.1",
|
||||||
"vue-grid-layout": "3.0.0-beta1",
|
"vue-grid-layout": "3.0.0-beta1",
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@types/randomstring": "^1.1.8",
|
"@types/randomstring": "^1.1.8",
|
||||||
"@types/ua-parser-js": "^0.7.39",
|
"@types/ua-parser-js": "^0.7.39",
|
||||||
"@vitejs/plugin-vue": "^5.1.2",
|
"@vitejs/plugin-vue": "^5.1.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||||
"@vitest/ui": "^0.34.1",
|
"@vitest/ui": "^0.34.1",
|
||||||
"@vue/compiler-sfc": "^3.4.27",
|
"@vue/compiler-sfc": "^3.4.27",
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
"tailwindcss": "^3.2.7",
|
"tailwindcss": "^3.2.7",
|
||||||
"tailwindcss-safe-area": "^0.2.2",
|
"tailwindcss-safe-area": "^0.2.2",
|
||||||
"tailwindcss-themer": "^2.0.3",
|
"tailwindcss-themer": "^2.0.3",
|
||||||
"typescript": "~5.5.4",
|
"typescript": "~5.6.2",
|
||||||
"unplugin-icons": "^0.19.2",
|
"unplugin-icons": "^0.19.2",
|
||||||
"vite": "^5.4.1",
|
"vite": "^5.4.1",
|
||||||
"vite-plugin-externals": "^0.6.2",
|
"vite-plugin-externals": "^0.6.2",
|
||||||
|
@ -160,6 +160,6 @@
|
||||||
"vite-plugin-static-copy": "^1.0.6",
|
"vite-plugin-static-copy": "^1.0.6",
|
||||||
"vite-plugin-vue-devtools": "^7.3.8",
|
"vite-plugin-vue-devtools": "^7.3.8",
|
||||||
"vitest": "^0.34.1",
|
"vitest": "^0.34.1",
|
||||||
"vue-tsc": "^2.0.29"
|
"vue-tsc": "^2.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"rimraf": "^5.0.7",
|
"rimraf": "^5.0.7",
|
||||||
"typescript": "~5.5.4",
|
"typescript": "~5.5.4",
|
||||||
"unbuild": "^0.7.6",
|
"unbuild": "^0.7.6",
|
||||||
"vite-plugin-dts": "^4.0.3"
|
"vite-plugin-dts": "^4.2.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"axios": "^1.7.x"
|
"axios": "^1.7.x"
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"storybook": "^7.6.3",
|
"storybook": "^7.6.3",
|
||||||
"unplugin-icons": "^0.14.15",
|
"unplugin-icons": "^0.14.15",
|
||||||
"vite-plugin-dts": "^4.0.3"
|
"vite-plugin-dts": "^4.2.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.5.8",
|
||||||
"vue-router": "^4.3.2"
|
"vue-router": "^4.3.2"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
|
@ -12,6 +12,7 @@ const meta: Meta<typeof VDialog> = {
|
||||||
height: 400,
|
height: 400,
|
||||||
setup() {
|
setup() {
|
||||||
const showDialog = () => {
|
const showDialog = () => {
|
||||||
|
// @ts-ignore
|
||||||
args.visible = true;
|
args.visible = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,12 @@ const meta: Meta<typeof VDropdown> = {
|
||||||
template: `
|
template: `
|
||||||
<div style="height: 300px">
|
<div style="height: 300px">
|
||||||
<VDropdown>
|
<VDropdown>
|
||||||
${args.default}
|
<VButton>Hello</VButton>
|
||||||
<template #popper>
|
<template #popper>
|
||||||
${args.popper}
|
<VDropdownItem>删除</VDropdownItem>
|
||||||
|
<VDropdownDivider></VDropdownDivider>
|
||||||
|
<VDropdownItem>删除</VDropdownItem>
|
||||||
|
<VDropdownItem>编辑</VDropdownItem>
|
||||||
</template>
|
</template>
|
||||||
</VDropdown>
|
</VDropdown>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,13 +37,5 @@ export default meta;
|
||||||
type Story = StoryObj<typeof VDropdown>;
|
type Story = StoryObj<typeof VDropdown>;
|
||||||
|
|
||||||
export const Default: Story = {
|
export const Default: Story = {
|
||||||
args: {
|
args: {},
|
||||||
default: `<VButton>Hello</VButton>`,
|
|
||||||
popper: `
|
|
||||||
<VDropdownItem>删除</VDropdownItem>
|
|
||||||
<VDropdownDivider></VDropdownDivider>
|
|
||||||
<VDropdownItem>删除</VDropdownItem>
|
|
||||||
<VDropdownItem>编辑</VDropdownItem>
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- @vue-ignore -->
|
<!-- @vue-skip -->
|
||||||
<FloatingDropdown
|
<FloatingDropdown
|
||||||
ref="dropdownRef"
|
ref="dropdownRef"
|
||||||
:placement="placement"
|
:placement="placement"
|
||||||
|
|
|
@ -6,7 +6,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
selected?: boolean;
|
selected?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
type: "default" | "danger";
|
type?: "default" | "danger";
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
selected: false,
|
selected: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||||
"exclude": ["src/**/__tests__/*"],
|
"exclude": ["src/**/__tests__/*", "node_modules"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
|
|
@ -87,9 +87,9 @@
|
||||||
"@iconify/json": "^2.2.117",
|
"@iconify/json": "^2.2.117",
|
||||||
"@types/linkifyjs": "^2.1.7",
|
"@types/linkifyjs": "^2.1.7",
|
||||||
"release-it": "^16.1.5",
|
"release-it": "^16.1.5",
|
||||||
"vite-plugin-dts": "^4.0.3"
|
"vite-plugin-dts": "^4.2.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.4.27"
|
"vue": "^3.5.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
"homepage": "https://github.com/halo-dev/halo/tree/main/ui/packages/shared#readme",
|
"homepage": "https://github.com/halo-dev/halo/tree/main/ui/packages/shared#readme",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vite-plugin-dts": "^4.0.3"
|
"vite-plugin-dts": "^4.2.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.5.8",
|
||||||
"vue-router": "^4.3.2"
|
"vue-router": "^4.3.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,12 +3,12 @@ import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
src: string;
|
src?: string;
|
||||||
alt?: string;
|
alt?: string;
|
||||||
classes?: string | string[];
|
classes?: string | string[];
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
src: "",
|
src: undefined,
|
||||||
alt: "",
|
alt: "",
|
||||||
classes: "",
|
classes: "",
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,12 @@ const isLoading = ref(false);
|
||||||
const error = ref(false);
|
const error = ref(false);
|
||||||
|
|
||||||
const loadImage = async () => {
|
const loadImage = async () => {
|
||||||
|
if (!props.src) {
|
||||||
|
throw new Error("src is required");
|
||||||
|
}
|
||||||
|
|
||||||
const image = new Image();
|
const image = new Image();
|
||||||
image.src = props.src;
|
image.src = props.src || "";
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
image.onload = () => resolve(image);
|
image.onload = () => resolve(image);
|
||||||
image.onerror = (err) => reject(err);
|
image.onerror = (err) => reject(err);
|
||||||
|
|
|
@ -3,11 +3,11 @@ import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
src: string;
|
src?: string;
|
||||||
classes?: string | string[];
|
classes?: string | string[];
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
src: "",
|
src: undefined,
|
||||||
classes: "",
|
classes: "",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -16,6 +16,10 @@ const isLoading = ref(false);
|
||||||
const error = ref(false);
|
const error = ref(false);
|
||||||
|
|
||||||
const loadVideo = async () => {
|
const loadVideo = async () => {
|
||||||
|
if (!props.src) {
|
||||||
|
throw new Error("src is required");
|
||||||
|
}
|
||||||
|
|
||||||
const video = document.createElement("video");
|
const video = document.createElement("video");
|
||||||
video.src = props.src;
|
video.src = props.src;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
"@uc/*": ["./uc-src/*"],
|
"@uc/*": ["./uc-src/*"],
|
||||||
"@console/*": ["./console-src/*"]
|
"@console/*": ["./console-src/*"]
|
||||||
},
|
},
|
||||||
"noStrictGenericChecks": true,
|
|
||||||
"ignoreDeprecations": "5.0",
|
"ignoreDeprecations": "5.0",
|
||||||
"types": ["unplugin-icons/types/vue"]
|
"types": ["unplugin-icons/types/vue"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ const publishTimeHelp = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<!-- @vue-ignore -->
|
||||||
<FormKit
|
<FormKit
|
||||||
id="post-setting-form"
|
id="post-setting-form"
|
||||||
v-model="internalFormState"
|
v-model="internalFormState"
|
||||||
|
|
|
@ -56,6 +56,7 @@ const handleChangePassword = async () => {
|
||||||
:title="$t('core.uc_profile.change_password_modal.title')"
|
:title="$t('core.uc_profile.change_password_modal.title')"
|
||||||
@close="emit('close')"
|
@close="emit('close')"
|
||||||
>
|
>
|
||||||
|
<!-- @vue-ignore -->
|
||||||
<FormKit
|
<FormKit
|
||||||
id="password-form"
|
id="password-form"
|
||||||
v-model="formState"
|
v-model="formState"
|
||||||
|
|
|
@ -120,6 +120,7 @@ const { mutate, isLoading } = useMutation({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 divide-y divide-gray-100 md:col-span-3 md:mt-0">
|
<div class="mt-5 divide-y divide-gray-100 md:col-span-3 md:mt-0">
|
||||||
|
<!-- @vue-ignore -->
|
||||||
<FormKit
|
<FormKit
|
||||||
id="pat-creation-form"
|
id="pat-creation-form"
|
||||||
v-model="formState.spec"
|
v-model="formState.spec"
|
||||||
|
|
Loading…
Reference in New Issue