diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
new file mode 100644
index 0000000..af1083b
--- /dev/null
+++ b/.eslintrc-auto-import.json
@@ -0,0 +1,76 @@
+{
+ "globals": {
+ "Component": true,
+ "ComponentPublicInstance": true,
+ "ComputedRef": true,
+ "DirectiveBinding": true,
+ "EffectScope": true,
+ "ExtractDefaultPropTypes": true,
+ "ExtractPropTypes": true,
+ "ExtractPublicPropTypes": true,
+ "InjectionKey": true,
+ "MaybeRef": true,
+ "MaybeRefOrGetter": true,
+ "PropType": true,
+ "Ref": true,
+ "Slot": true,
+ "Slots": true,
+ "VNode": true,
+ "WritableComputedRef": true,
+ "computed": true,
+ "createApp": true,
+ "customRef": true,
+ "defineAsyncComponent": true,
+ "defineComponent": true,
+ "effectScope": true,
+ "getCurrentInstance": true,
+ "getCurrentScope": true,
+ "h": true,
+ "inject": true,
+ "isProxy": true,
+ "isReactive": true,
+ "isReadonly": true,
+ "isRef": true,
+ "markRaw": true,
+ "nextTick": true,
+ "onActivated": true,
+ "onBeforeMount": true,
+ "onBeforeUnmount": true,
+ "onBeforeUpdate": true,
+ "onDeactivated": true,
+ "onErrorCaptured": true,
+ "onMounted": true,
+ "onRenderTracked": true,
+ "onRenderTriggered": true,
+ "onScopeDispose": true,
+ "onServerPrefetch": true,
+ "onUnmounted": true,
+ "onUpdated": true,
+ "onWatcherCleanup": true,
+ "provide": true,
+ "reactive": true,
+ "readonly": true,
+ "ref": true,
+ "resolveComponent": true,
+ "shallowReactive": true,
+ "shallowReadonly": true,
+ "shallowRef": true,
+ "toRaw": true,
+ "toRef": true,
+ "toRefs": true,
+ "toValue": true,
+ "triggerRef": true,
+ "unref": true,
+ "useAttrs": true,
+ "useCssModule": true,
+ "useCssVars": true,
+ "useId": true,
+ "useModel": true,
+ "useSlots": true,
+ "useTemplateRef": true,
+ "watch": true,
+ "watchEffect": true,
+ "watchPostEffect": true,
+ "watchSyncEffect": true
+ }
+}
diff --git a/components.d.ts b/components.d.ts
index 851336f..1526913 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -8,10 +8,10 @@ export {};
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
+ ElAside: typeof import('element-plus/es')['ElAside']
ElButton: typeof import('element-plus/es')['ElButton']
- ElForm: typeof import('element-plus/es')['ElForm']
- ElFormItem: typeof import('element-plus/es')['ElFormItem']
- ElInput: typeof import('element-plus/es')['ElInput']
+ ElContainer: typeof import('element-plus/es')['ElContainer']
+ ElMain: typeof import('element-plus/es')['ElMain']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
diff --git a/package.json b/package.json
index 1893c30..2ddf0c9 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,11 @@
},
"dependencies": {
"element-plus": "^2.9.8",
- "hook-fetch": "^0.0.2",
+ "hook-fetch": "^0.0.9-beta",
"reset-css": "^5.0.2",
"vue": "^3.5.13",
- "vue-router": "4"
+ "vue-router": "4",
+ "vue-element-plus-x": "file:../element-plus-x/packages/components"
},
"devDependencies": {
"@antfu/eslint-config": "^4.12.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 798314d..f54ad21 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -12,14 +12,17 @@ importers:
specifier: ^2.9.8
version: 2.9.8(vue@3.5.13(typescript@5.7.3))
hook-fetch:
- specifier: ^0.0.2
- version: 0.0.2
+ specifier: ^0.0.9-beta
+ version: 0.0.9-beta
reset-css:
specifier: ^5.0.2
version: 5.0.2
vue:
specifier: ^3.5.13
version: 3.5.13(typescript@5.7.3)
+ vue-element-plus-x:
+ specifier: file:../element-plus-x/packages/components
+ version: file:../element-plus-x/packages/components(typescript@5.7.3)
vue-router:
specifier: '4'
version: 4.5.0(vue@3.5.13(typescript@5.7.3))
@@ -690,56 +693,67 @@ packages:
resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.40.0':
resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==}
cpu: [arm]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.40.0':
resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.40.0':
resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-loongarch64-gnu@4.40.0':
resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==}
cpu: [loong64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-powerpc64le-gnu@4.40.0':
resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-riscv64-gnu@4.40.0':
resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-riscv64-musl@4.40.0':
resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==}
cpu: [riscv64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-s390x-gnu@4.40.0':
resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.40.0':
resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.40.0':
resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-win32-arm64-msvc@4.40.0':
resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==}
@@ -807,6 +821,9 @@ packages:
'@types/normalize-package-data@2.4.4':
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
+ '@types/trusted-types@2.0.7':
+ resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
+
'@types/unist@3.0.3':
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
@@ -975,36 +992,43 @@ packages:
resolution: {integrity: sha512-FX2FV7vpLE/+Z0NZX9/1pwWud5Wocm/2PgpUXbT5aSV3QEB10kBPJAzssOQylvdj8mOHoKl5pVkXpbCwww/T2g==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@unrs/resolver-binding-linux-arm64-musl@1.5.0':
resolution: {integrity: sha512-+gF97xst1BZb28T3nwwzEtq2ewCoMDGKsenYsZuvpmNrW0019G1iUAunZN+FG55L21y+uP7zsGX06OXDQ/viKw==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@unrs/resolver-binding-linux-ppc64-gnu@1.5.0':
resolution: {integrity: sha512-5bEmVcQw9js8JYM2LkUBw5SeELSIxX+qKf9bFrfFINKAp4noZ//hUxLpbF7u/3gTBN1GsER6xOzIZlw/VTdXtA==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@unrs/resolver-binding-linux-riscv64-gnu@1.5.0':
resolution: {integrity: sha512-GGk/8TPUsf1Q99F+lzMdjE6sGL26uJCwQ9TlvBs8zR3cLQNw/MIumPN7zrs3GFGySjnwXc8gA6J3HKbejywmqA==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@unrs/resolver-binding-linux-s390x-gnu@1.5.0':
resolution: {integrity: sha512-5uRkFYYVNAeVaA4W/CwugjFN3iDOHCPqsBLCCOoJiMfFMMz4evBRsg+498OFa9w6VcTn2bD5aI+RRayaIgk2Sw==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@unrs/resolver-binding-linux-x64-gnu@1.5.0':
resolution: {integrity: sha512-j905CZH3nehYy6NimNqC2B14pxn4Ltd7guKMyPTzKehbFXTUgihQS/ZfHQTdojkMzbSwBOSgq1dOrY+IpgxDsA==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@unrs/resolver-binding-linux-x64-musl@1.5.0':
resolution: {integrity: sha512-dmLevQTuzQRwu5A+mvj54R5aye5I4PVKiWqGxg8tTaYP2k2oTs/3Mo8mgnhPk28VoYCi0fdFYpgzCd4AJndQvQ==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@unrs/resolver-binding-wasm32-wasi@1.5.0':
resolution: {integrity: sha512-LtJMhwu7avhoi+kKfAZOKN773RtzLBVVF90YJbB0wyMpUj9yQPeA+mteVUI9P70OG/opH47FeV5AWeaNWWgqJg==}
@@ -1469,6 +1493,9 @@ packages:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
+ dompurify@3.2.5:
+ resolution: {integrity: sha512-mLPd29uoRe9HpvwP2TxClGQBzGXeEC/we/q+bFlmPPmj2p2Ugl3r6ATu/UU1v77DXNcehiBg9zsr1dREyA/dJQ==}
+
dot-prop@5.3.0:
resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
engines: {node: '>=8'}
@@ -1889,6 +1916,10 @@ packages:
engines: {node: '>=16'}
hasBin: true
+ github-markdown-css@5.8.1:
+ resolution: {integrity: sha512-8G+PFvqigBQSWLQjyzgpa2ThD9bo7+kDsriUIidGcRhXgmcaAWUIpCZf8DavJgc+xifjbCG+GvMyWr0XMXmc7g==}
+ engines: {node: '>=10'}
+
glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
@@ -1958,8 +1989,8 @@ packages:
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
hasBin: true
- hook-fetch@0.0.2:
- resolution: {integrity: sha512-NGvJKbcioBrrr4yo9KYt8um1FpbVjEIJ+5wbztoIyz/i1X33YqG5SgwHPSObzciKTd/Ac+L1uWdpO6pIpqt1vQ==}
+ hook-fetch@0.0.9-beta:
+ resolution: {integrity: sha512-j2RmURH94q013KaEZql8koUKghb1uxJ9B0gZ4D2bD4H7AOSR6MIkVDL4FhjTsHEjWIOwGHhGBtnosW97ILkJoA==}
hookified@1.8.2:
resolution: {integrity: sha512-5nZbBNP44sFCDjSoB//0N7m508APCgbQ4mGGo1KJGBYyCKNHfry1Pvd0JVHZIxjdnqn8nFRBAN/eFB6Rk/4w5w==}
@@ -2180,6 +2211,9 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
lint-staged@15.5.1:
resolution: {integrity: sha512-6m7u8mue4Xn6wK6gZvSCQwBvMBR36xfY24nF5bMTf2MHDYG6S3yhJuOgdYVw99hsjyDt2d4z168b3naI8+NWtQ==}
engines: {node: '>=18.12.0'}
@@ -2261,6 +2295,10 @@ packages:
magic-string@0.30.17:
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
markdown-table@3.0.4:
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
@@ -2310,6 +2348,9 @@ packages:
mdn-data@2.12.2:
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
@@ -2686,6 +2727,14 @@ packages:
engines: {node: '>=14'}
hasBin: true
+ prismjs@1.30.0:
+ resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==}
+ engines: {node: '>=6'}
+
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -3157,6 +3206,9 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
ufo@1.6.1:
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
@@ -3310,6 +3362,9 @@ packages:
'@vue/composition-api':
optional: true
+ vue-element-plus-x@file:../element-plus-x/packages/components:
+ resolution: {directory: ../element-plus-x/packages/components, type: directory}
+
vue-eslint-parser@10.1.3:
resolution: {integrity: sha512-dbCBnd2e02dYWsXoqX5yKUZlOt+ExIpq7hmHKPb5ZqKcjf++Eo0hMseFTZMLKThrUk61m+Uv6A2YSBve6ZvuDQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4175,6 +4230,9 @@ snapshots:
'@types/normalize-package-data@2.4.4': {}
+ '@types/trusted-types@2.0.7':
+ optional: true
+
'@types/unist@3.0.3': {}
'@types/web-bluetooth@0.0.16': {}
@@ -4889,6 +4947,10 @@ snapshots:
dependencies:
esutils: 2.0.3
+ dompurify@3.2.5:
+ optionalDependencies:
+ '@types/trusted-types': 2.0.7
+
dot-prop@5.3.0:
dependencies:
is-obj: 2.0.0
@@ -5442,6 +5504,8 @@ snapshots:
meow: 12.1.1
split2: 4.2.0
+ github-markdown-css@5.8.1: {}
+
glob-parent@5.1.2:
dependencies:
is-glob: 4.0.3
@@ -5501,7 +5565,7 @@ snapshots:
he@1.2.0: {}
- hook-fetch@0.0.2:
+ hook-fetch@0.0.9-beta:
dependencies:
qs: 6.14.0
radash: 12.1.0
@@ -5664,6 +5728,10 @@ snapshots:
lines-and-columns@1.2.4: {}
+ linkify-it@5.0.0:
+ dependencies:
+ uc.micro: 2.1.0
+
lint-staged@15.5.1:
dependencies:
chalk: 5.4.1
@@ -5752,6 +5820,15 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
markdown-table@3.0.4: {}
math-intrinsics@1.1.0: {}
@@ -5873,6 +5950,8 @@ snapshots:
mdn-data@2.12.2: {}
+ mdurl@2.0.0: {}
+
memoize-one@6.0.0: {}
meow@12.1.1: {}
@@ -6314,6 +6393,10 @@ snapshots:
prettier@3.5.3: {}
+ prismjs@1.30.0: {}
+
+ punycode.js@2.3.1: {}
+
punycode@2.3.1: {}
qs@6.14.0:
@@ -6793,6 +6876,8 @@ snapshots:
typescript@5.7.3: {}
+ uc.micro@2.1.0: {}
+
ufo@1.6.1: {}
unconfig@7.3.1:
@@ -6969,6 +7054,20 @@ snapshots:
dependencies:
vue: 3.5.13(typescript@5.7.3)
+ vue-element-plus-x@file:../element-plus-x/packages/components(typescript@5.7.3):
+ dependencies:
+ '@element-plus/icons-vue': 2.3.1(vue@3.5.13(typescript@5.7.3))
+ dompurify: 3.2.5
+ element-plus: 2.9.8(vue@3.5.13(typescript@5.7.3))
+ github-markdown-css: 5.8.1
+ markdown-it: 14.1.0
+ prismjs: 1.30.0
+ radash: 12.1.0
+ vue: 3.5.13(typescript@5.7.3)
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - typescript
+
vue-eslint-parser@10.1.3(eslint@9.25.0(jiti@2.4.2)):
dependencies:
debug: 4.4.0
diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts
new file mode 100644
index 0000000..4d6ea84
--- /dev/null
+++ b/src/auto-imports.d.ts
@@ -0,0 +1,71 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// noinspection JSUnusedGlobalSymbols
+// Generated by unplugin-auto-import
+// biome-ignore lint: disable
+export {}
+declare global {
+ const EffectScope: typeof import('vue')['EffectScope']
+ const computed: typeof import('vue')['computed']
+ const createApp: typeof import('vue')['createApp']
+ const customRef: typeof import('vue')['customRef']
+ const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
+ const defineComponent: typeof import('vue')['defineComponent']
+ const effectScope: typeof import('vue')['effectScope']
+ const getCurrentInstance: typeof import('vue')['getCurrentInstance']
+ const getCurrentScope: typeof import('vue')['getCurrentScope']
+ const h: typeof import('vue')['h']
+ const inject: typeof import('vue')['inject']
+ const isProxy: typeof import('vue')['isProxy']
+ const isReactive: typeof import('vue')['isReactive']
+ const isReadonly: typeof import('vue')['isReadonly']
+ const isRef: typeof import('vue')['isRef']
+ const markRaw: typeof import('vue')['markRaw']
+ const nextTick: typeof import('vue')['nextTick']
+ const onActivated: typeof import('vue')['onActivated']
+ const onBeforeMount: typeof import('vue')['onBeforeMount']
+ const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
+ const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
+ const onDeactivated: typeof import('vue')['onDeactivated']
+ const onErrorCaptured: typeof import('vue')['onErrorCaptured']
+ const onMounted: typeof import('vue')['onMounted']
+ const onRenderTracked: typeof import('vue')['onRenderTracked']
+ const onRenderTriggered: typeof import('vue')['onRenderTriggered']
+ const onScopeDispose: typeof import('vue')['onScopeDispose']
+ const onServerPrefetch: typeof import('vue')['onServerPrefetch']
+ const onUnmounted: typeof import('vue')['onUnmounted']
+ const onUpdated: typeof import('vue')['onUpdated']
+ const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
+ const provide: typeof import('vue')['provide']
+ const reactive: typeof import('vue')['reactive']
+ const readonly: typeof import('vue')['readonly']
+ const ref: typeof import('vue')['ref']
+ const resolveComponent: typeof import('vue')['resolveComponent']
+ const shallowReactive: typeof import('vue')['shallowReactive']
+ const shallowReadonly: typeof import('vue')['shallowReadonly']
+ const shallowRef: typeof import('vue')['shallowRef']
+ const toRaw: typeof import('vue')['toRaw']
+ const toRef: typeof import('vue')['toRef']
+ const toRefs: typeof import('vue')['toRefs']
+ const toValue: typeof import('vue')['toValue']
+ const triggerRef: typeof import('vue')['triggerRef']
+ const unref: typeof import('vue')['unref']
+ const useAttrs: typeof import('vue')['useAttrs']
+ const useCssModule: typeof import('vue')['useCssModule']
+ const useCssVars: typeof import('vue')['useCssVars']
+ const useId: typeof import('vue')['useId']
+ const useModel: typeof import('vue')['useModel']
+ const useSlots: typeof import('vue')['useSlots']
+ const useTemplateRef: typeof import('vue')['useTemplateRef']
+ const watch: typeof import('vue')['watch']
+ const watchEffect: typeof import('vue')['watchEffect']
+ const watchPostEffect: typeof import('vue')['watchPostEffect']
+ const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+}
+// for type re-export
+declare global {
+ // @ts-ignore
+ export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+ import('vue')
+}
diff --git a/src/hook-fetch.d.ts b/src/hook-fetch.d.ts
new file mode 100644
index 0000000..47005f2
--- /dev/null
+++ b/src/hook-fetch.d.ts
@@ -0,0 +1 @@
+///
diff --git a/src/layout/index.vue b/src/layout/index.vue
new file mode 100644
index 0000000..f1a3719
--- /dev/null
+++ b/src/layout/index.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
diff --git a/src/pages/chat/index.vue b/src/pages/chat/index.vue
new file mode 100644
index 0000000..0c7b80e
--- /dev/null
+++ b/src/pages/chat/index.vue
@@ -0,0 +1,11 @@
+
+
+
+ {{ chatId }}
+
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 397b3f7..c21489c 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -14,6 +14,7 @@ async function handleSubmit() {
try {
await formRef.value?.validate();
const _res = await login(formModel);
+ console.log(_res, 'res');
}
catch (error) {
console.error('请求错误:', error);
diff --git a/src/router/index.ts b/src/router/index.ts
index 11c98d3..1202a5d 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -2,7 +2,17 @@ import { createRouter, createWebHashHistory } from 'vue-router';
import { jwtGuard } from './permissions';
const routes = [
- { path: '/', component: () => import('@/components/HelloWorld.vue') },
+ {
+ path: '/',
+ component: () => import('@/layout/index.vue'),
+ children: [
+ {
+ path: ':id',
+ name: 'chat',
+ component: () => import('@/pages/chat/index.vue'),
+ },
+ ],
+ },
{
path: '/login',
name: 'login',
diff --git a/src/styles/index.scss b/src/styles/index.scss
index ce1fd38..cfdba80 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -1,5 +1,5 @@
-@import 'reset-css';
-@import './element-plus.scss';
+@use 'reset-css';
+@use './element-plus.scss';
body{
overflow: hidden;
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 30abc2c..99bbed6 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -1,10 +1,11 @@
+import type { HookFetchPlugin } from 'hook-fetch';
import hookFetch from 'hook-fetch';
import { sseTextDecoderPlugin } from 'hook-fetch/plugins';
interface BaseResponse {
code: number;
data: null;
- message: string;
+ msg: string;
}
const instance = hookFetch.create({
@@ -15,9 +16,17 @@ const instance = hookFetch.create({
plugins: [sseTextDecoderPlugin()],
});
-function jwtPlugin() {
+function jwtPlugin(): HookFetchPlugin {
return {
name: 'jwt',
+ afterResponse: async (response) => {
+ console.log(response);
+ if (response.result?.code === 200) {
+ return response;
+ }
+ // alert(response.result?.msg);
+ return Promise.reject(response);
+ },
};
}
diff --git a/vite.config.ts b/vite.config.ts
index bb18181..8517444 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -12,7 +12,12 @@ export default defineConfig({
UnoCSS(),
vue(),
AutoImport({
+ imports: ["vue"],
+ eslintrc: {
+ enabled: true,
+ },
resolvers: [ElementPlusResolver()],
+ dts: path.resolve(__dirname, "./src/auto-imports.d.ts"),
}),
Components({
resolvers: [ElementPlusResolver()],