Compare commits
2 Commits
9b2170cab2
...
b92a44c170
Author | SHA1 | Date | |
---|---|---|---|
b92a44c170 | |||
4521cab242 |
@ -11,6 +11,7 @@
|
|||||||
"d": "vite",
|
"d": "vite",
|
||||||
"build": "run-p type-check \"build-only {@}\" --",
|
"build": "run-p type-check \"build-only {@}\" --",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
|
"p": "vite preview",
|
||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
"b": "vite build",
|
"b": "vite build",
|
||||||
"type-check": "vue-tsc --build",
|
"type-check": "vue-tsc --build",
|
||||||
@ -31,7 +32,6 @@
|
|||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.3",
|
||||||
"pinia-plugin-persistedstate": "^4.5.0",
|
"pinia-plugin-persistedstate": "^4.5.0",
|
||||||
"sass-embedded": "^1.90.0",
|
"sass-embedded": "^1.90.0",
|
||||||
"vite-plugin-bundle-obfuscator": "^1.8.0",
|
|
||||||
"vue": "^3.5.18",
|
"vue": "^3.5.18",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
@ -44,6 +44,8 @@
|
|||||||
"npm-run-all2": "^8.0.4",
|
"npm-run-all2": "^8.0.4",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.6.2",
|
||||||
"typescript": "~5.8.0",
|
"typescript": "~5.8.0",
|
||||||
|
"unplugin-auto-import": "^20.0.0",
|
||||||
|
"unplugin-vue-components": "^29.0.0",
|
||||||
"vite": "^7.0.6",
|
"vite": "^7.0.6",
|
||||||
"vite-plugin-vue-devtools": "^8.0.0",
|
"vite-plugin-vue-devtools": "^8.0.0",
|
||||||
"vue-tsc": "^3.0.4"
|
"vue-tsc": "^3.0.4"
|
||||||
|
@ -66,7 +66,6 @@ import { onMounted, ref } from 'vue';
|
|||||||
import { getMyCar } from '@/apis/bacth';
|
import { getMyCar } from '@/apis/bacth';
|
||||||
|
|
||||||
import { UserStore } from '@/plugins';
|
import { UserStore } from '@/plugins';
|
||||||
import { NAlert, NButton, NDescriptions, NDescriptionsItem, NGradientText } from 'naive-ui';
|
|
||||||
import type { CarDataResType } from '@/apis/bacth/type.ts';
|
import type { CarDataResType } from '@/apis/bacth/type.ts';
|
||||||
import UseApiLoading from '@/utils/UseApiLoading.ts';
|
import UseApiLoading from '@/utils/UseApiLoading.ts';
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UserStore } from '@/plugins';
|
import { UserStore } from '@/plugins';
|
||||||
import { NText } from 'naive-ui';
|
|
||||||
|
|
||||||
const userStore = UserStore();
|
const userStore = UserStore();
|
||||||
</script>
|
</script>
|
||||||
|
@ -48,17 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { type FormInst, type FormItemRule } from 'naive-ui';
|
||||||
type FormInst,
|
|
||||||
type FormItemRule,
|
|
||||||
NButton,
|
|
||||||
NCheckbox,
|
|
||||||
NForm,
|
|
||||||
NFormItem,
|
|
||||||
NGradientText,
|
|
||||||
NInput,
|
|
||||||
NText,
|
|
||||||
} from 'naive-ui';
|
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import message from '@/utils/message.ts';
|
import message from '@/utils/message.ts';
|
||||||
import { captcha, login } from '@/apis/auth';
|
import { captcha, login } from '@/apis/auth';
|
||||||
|
@ -51,16 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { type FormInst, type FormItemRule } from 'naive-ui';
|
||||||
type FormInst,
|
|
||||||
type FormItemRule,
|
|
||||||
NButton,
|
|
||||||
NForm,
|
|
||||||
NFormItem,
|
|
||||||
NGradientText,
|
|
||||||
NInput,
|
|
||||||
NText
|
|
||||||
} from 'naive-ui';
|
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import message from '@/utils/message.ts';
|
import message from '@/utils/message.ts';
|
||||||
import { captcha, register } from '@/apis/auth';
|
import { captcha, register } from '@/apis/auth';
|
||||||
@ -149,6 +140,6 @@ const rules = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
onMounted(captchas);
|
onMounted(() => captchas);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router, UserStore } from '@/plugins';
|
import { router, UserStore } from '@/plugins';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { NButton, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
|
||||||
|
|
||||||
const userStore = UserStore();
|
const userStore = UserStore();
|
||||||
|
|
||||||
|
24
src/types/components.auto.d.ts
vendored
Normal file
24
src/types/components.auto.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-vue-components
|
||||||
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
export {}
|
||||||
|
|
||||||
|
/* prettier-ignore */
|
||||||
|
declare module 'vue' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
NAlert: typeof import('naive-ui')['NAlert']
|
||||||
|
NButton: typeof import('naive-ui')['NButton']
|
||||||
|
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||||
|
NDescriptions: typeof import('naive-ui')['NDescriptions']
|
||||||
|
NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem']
|
||||||
|
NForm: typeof import('naive-ui')['NForm']
|
||||||
|
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||||
|
NGradientText: typeof import('naive-ui')['NGradientText']
|
||||||
|
NInput: typeof import('naive-ui')['NInput']
|
||||||
|
NText: typeof import('naive-ui')['NText']
|
||||||
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
}
|
||||||
|
}
|
@ -3,9 +3,12 @@ import { fileURLToPath, URL } from 'node:url';
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import vueDevTools from 'vite-plugin-vue-devtools';
|
import vueDevTools from 'vite-plugin-vue-devtools';
|
||||||
import Obfuscator from 'vite-plugin-bundle-obfuscator';
|
import Components from 'unplugin-vue-components/vite';
|
||||||
|
import {
|
||||||
const date = new Date().getTime();
|
AntDesignVueResolver,
|
||||||
|
IduxResolver,
|
||||||
|
NaiveUiResolver
|
||||||
|
} from 'unplugin-vue-components/resolvers';
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
@ -18,9 +21,9 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
chunkFileNames: `assets/data/js/[hash].${date}.js`,
|
chunkFileNames: `[hash].js`,
|
||||||
entryFileNames: `assets/data/js/[hash].${date}.js`,
|
entryFileNames: `[hash].js`,
|
||||||
assetFileNames: `assets/data/[ext]/[hash].${date}.[ext]`,
|
assetFileNames: `[hash].[ext]`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
terserOptions: {
|
terserOptions: {
|
||||||
@ -33,11 +36,18 @@ export default defineConfig({
|
|||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
vueDevTools(),
|
vueDevTools(),
|
||||||
Obfuscator({
|
Components({
|
||||||
enable: true,
|
resolvers: [
|
||||||
log: true,
|
IduxResolver({
|
||||||
autoExcludeNodeModules: true,
|
importStyle: 'css',
|
||||||
threadPool: true,
|
}),
|
||||||
|
NaiveUiResolver(),
|
||||||
|
AntDesignVueResolver({
|
||||||
|
resolveIcons: true,
|
||||||
|
importStyle: 'less',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
dts: 'src/types/components.auto.d.ts',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user