diff --git a/package.json b/package.json index 6ca31673e75b8b8e6e99cce188e165ef1b248666..d3a2b9c64be0074c7074a63404d2000e0b846c52 100644 --- a/package.json +++ b/package.json @@ -11,19 +11,18 @@ }, "dependencies": { "normalize.css": "^8.0.1", - "vue": "^3.4.21", - "vue-router": "^4.3.0" + "vue": "^3.5.13", + "vue-router": "^4.5.0" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.7.2", - "@types/node": "^20.11.22", - "@vitejs/plugin-vue": "^5.0.4", + "@rushstack/eslint-patch": "^1.10.5", + "@types/node": "^22.13.1", + "@vitejs/plugin-vue": "^5.2.1", "@vue/eslint-config-typescript": "^12.0.0", - "eslint": "^8.57.0", - "eslint-plugin-vue": "^9.22.0", - "sass": "^1.71.1", + "eslint": "^8.57.1", + "eslint-plugin-vue": "^9.32.0", "typescript": "~5.3.3", - "vite": "^5.1.4", + "vite": "^6.1.0", "vue-tsc": "^1.8.27" } } diff --git a/packages/opendesign/package.json b/packages/opendesign/package.json index c4564f83332cf58a183d7407442e5ff05bf8552b..c5fb0bf192935596263e5ff843e646e3581e6b8a 100644 --- a/packages/opendesign/package.json +++ b/packages/opendesign/package.json @@ -22,7 +22,9 @@ "clean:svg": "open-scripts clean:svg --config ./icons/cleansvg.config.ts", "build:component": "open-scripts build:component", "build:style": "open-scripts build:style", - "build": "pnpm gen:icon && pnpm build:component && pnpm build:style" + "build": "pnpm gen:icon && pnpm build:component && pnpm build:style", + "lint": "eslint ./src", + "type-check": "vue-tsc --build" }, "peerDependencies": { "vue": "^3.1.0" diff --git a/packages/opendesign/src/_components/in-input/types.ts b/packages/opendesign/src/_components/in-input/types.ts index 5883adcd5aba3d3049432585b50b33fd2647166b..f04cd651a1ae832e8aaf0389fcf7982249c681a9 100644 --- a/packages/opendesign/src/_components/in-input/types.ts +++ b/packages/opendesign/src/_components/in-input/types.ts @@ -90,7 +90,7 @@ export const inInputProps = { type: Function as PropType<(value: string) => boolean>, }, /** - * 输入为无效值时,在blur + * 输入为无效值时,在blur时的回调,返回值为纠正后的值 */ onInvalidChange: { type: Function as PropType<(inputValue: string, lastValidInputValue: string, lastValue: string) => string>, diff --git a/packages/opendesign/src/_headless/use-date.ts b/packages/opendesign/src/_headless/use-date.ts index 29efc4b1221dc01e9930ef9e240639ae2bbc6641..a9e8737e9e820b5c55e5fa07b012d36a47cc6c7e 100644 --- a/packages/opendesign/src/_headless/use-date.ts +++ b/packages/opendesign/src/_headless/use-date.ts @@ -6,5 +6,7 @@ import { ref } from 'vue'; */ export function useDate() { const value = ref(); - return {}; + return { + value, + }; } diff --git a/packages/opendesign/src/_utils/vue-utils.ts b/packages/opendesign/src/_utils/vue-utils.ts index 1e5496ed31890d9a7f3e3dc7c7f26ea24039effc..4f727b825714fcbf02328e2c91afb768f7465951 100644 --- a/packages/opendesign/src/_utils/vue-utils.ts +++ b/packages/opendesign/src/_utils/vue-utils.ts @@ -143,7 +143,7 @@ export const getFirstElement = (vn: VNode | VNode[]): HTMLElement | null => { export function useSlotFirstElement(): { setSlot: (nodes: VNode[] | undefined) => void; firstElement: Ref } { let children: VNode[] | null = null; - const firstElement = ref(null); + const firstElement: Ref = ref(null); onMounted(() => { if (children) { @@ -233,7 +233,7 @@ export const isEmptySlot = (slot?: Slot) => { /** * 过滤插槽 */ -export const filterSlots = (slots: Slots, slotNames: { [key: string]: string }): string[] => { +export function filterSlots(slots: Slots, slotNames: { [key: string]: string }) { const names = Object.values(slotNames); return Object.keys(slots).filter((item) => names.includes(item)); -}; +} diff --git a/packages/opendesign/src/card/OCard.vue b/packages/opendesign/src/card/OCard.vue index 4556c76d5cb7514c2e558ba25f6e4365702fca09..bbfcf4ff27cbb1f47f2962f28e95e4995f77c669 100644 --- a/packages/opendesign/src/card/OCard.vue +++ b/packages/opendesign/src/card/OCard.vue @@ -1,5 +1,5 @@