| | |
| | | "name": "jxkg-new-ui", |
| | | "version": "0.0.0", |
| | | "dependencies": { |
| | | "vue": "^3.4.21" |
| | | "axios": "^1.7.2", |
| | | "dayjs": "^1.11.11", |
| | | "lodash": "^4.17.21", |
| | | "pinia": "^2.1.7", |
| | | "vue": "^3.4.21", |
| | | "vue-router": "^4.3.2" |
| | | }, |
| | | "devDependencies": { |
| | | "@vitejs/plugin-vue": "^5.0.4", |
| | |
| | | "@vue/shared": "3.4.27" |
| | | } |
| | | }, |
| | | "node_modules/@vue/devtools-api": { |
| | | "version": "6.6.1", |
| | | "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.1.tgz", |
| | | "integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==" |
| | | }, |
| | | "node_modules/@vue/reactivity": { |
| | | "version": "3.4.27", |
| | | "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.27.tgz", |
| | |
| | | "node_modules/asynckit": { |
| | | "version": "0.4.0", |
| | | "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", |
| | | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", |
| | | "dev": true |
| | | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" |
| | | }, |
| | | "node_modules/at-least-node": { |
| | | "version": "1.0.0", |
| | |
| | | "dev": true, |
| | | "engines": { |
| | | "node": ">= 4.0.0" |
| | | } |
| | | }, |
| | | "node_modules/axios": { |
| | | "version": "1.7.2", |
| | | "resolved": "https://registry.npmmirror.com/axios/-/axios-1.7.2.tgz", |
| | | "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", |
| | | "dependencies": { |
| | | "follow-redirects": "^1.15.6", |
| | | "form-data": "^4.0.0", |
| | | "proxy-from-env": "^1.1.0" |
| | | } |
| | | }, |
| | | "node_modules/balanced-match": { |
| | |
| | | "version": "1.0.8", |
| | | "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", |
| | | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "delayed-stream": "~1.0.0" |
| | | }, |
| | |
| | | "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", |
| | | "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" |
| | | }, |
| | | "node_modules/dayjs": { |
| | | "version": "1.11.11", |
| | | "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz", |
| | | "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" |
| | | }, |
| | | "node_modules/debug": { |
| | | "version": "4.3.4", |
| | | "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", |
| | |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", |
| | | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", |
| | | "dev": true, |
| | | "engines": { |
| | | "node": ">=0.4.0" |
| | | } |
| | |
| | | "minimatch": "^5.0.1" |
| | | } |
| | | }, |
| | | "node_modules/follow-redirects": { |
| | | "version": "1.15.6", |
| | | "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.6.tgz", |
| | | "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", |
| | | "funding": [ |
| | | { |
| | | "type": "individual", |
| | | "url": "https://github.com/sponsors/RubenVerborgh" |
| | | } |
| | | ], |
| | | "engines": { |
| | | "node": ">=4.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "debug": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/foreground-child": { |
| | | "version": "3.1.1", |
| | | "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.1.1.tgz", |
| | |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz", |
| | | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "asynckit": "^0.4.0", |
| | | "combined-stream": "^1.0.8", |
| | |
| | | "node_modules/lodash": { |
| | | "version": "4.17.21", |
| | | "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", |
| | | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", |
| | | "dev": true |
| | | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" |
| | | }, |
| | | "node_modules/lodash.defaults": { |
| | | "version": "4.2.0", |
| | |
| | | "version": "1.52.0", |
| | | "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", |
| | | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", |
| | | "dev": true, |
| | | "engines": { |
| | | "node": ">= 0.6" |
| | | } |
| | |
| | | "version": "2.1.35", |
| | | "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", |
| | | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "mime-db": "1.52.0" |
| | | }, |
| | |
| | | "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz", |
| | | "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" |
| | | }, |
| | | "node_modules/pinia": { |
| | | "version": "2.1.7", |
| | | "resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz", |
| | | "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==", |
| | | "dependencies": { |
| | | "@vue/devtools-api": "^6.5.0", |
| | | "vue-demi": ">=0.14.5" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/posva" |
| | | }, |
| | | "peerDependencies": { |
| | | "@vue/composition-api": "^1.4.0", |
| | | "typescript": ">=4.4.4", |
| | | "vue": "^2.6.14 || ^3.3.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "@vue/composition-api": { |
| | | "optional": true |
| | | }, |
| | | "typescript": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/pinia/node_modules/vue-demi": { |
| | | "version": "0.14.8", |
| | | "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.8.tgz", |
| | | "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", |
| | | "hasInstallScript": true, |
| | | "bin": { |
| | | "vue-demi-fix": "bin/vue-demi-fix.js", |
| | | "vue-demi-switch": "bin/vue-demi-switch.js" |
| | | }, |
| | | "engines": { |
| | | "node": ">=12" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/antfu" |
| | | }, |
| | | "peerDependencies": { |
| | | "@vue/composition-api": "^1.0.0-rc.1", |
| | | "vue": "^3.0.0-0 || ^2.6.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "@vue/composition-api": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/plist": { |
| | | "version": "3.1.0", |
| | | "resolved": "https://registry.npmmirror.com/plist/-/plist-3.1.0.tgz", |
| | |
| | | "engines": { |
| | | "node": ">=10" |
| | | } |
| | | }, |
| | | "node_modules/proxy-from-env": { |
| | | "version": "1.1.0", |
| | | "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", |
| | | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" |
| | | }, |
| | | "node_modules/pump": { |
| | | "version": "3.0.0", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/vue-router": { |
| | | "version": "4.3.2", |
| | | "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.3.2.tgz", |
| | | "integrity": "sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==", |
| | | "dependencies": { |
| | | "@vue/devtools-api": "^6.5.1" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/posva" |
| | | }, |
| | | "peerDependencies": { |
| | | "vue": "^3.2.0" |
| | | } |
| | | }, |
| | | "node_modules/which": { |
| | | "version": "2.0.2", |
| | | "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", |
| | |
| | | "electron:dev": "vite && electron" |
| | | }, |
| | | "dependencies": { |
| | | "vue": "^3.4.21" |
| | | "axios": "^1.7.2", |
| | | "dayjs": "^1.11.11", |
| | | "lodash": "^4.17.21", |
| | | "pinia": "^2.1.7", |
| | | "vue": "^3.4.21", |
| | | "vue-router": "^4.3.2" |
| | | }, |
| | | "devDependencies": { |
| | | "@vitejs/plugin-vue": "^5.0.4", |
| | |
| | | <script setup> |
| | | import HelloWorld from './components/HelloWorld.vue' |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <a href="https://vitejs.dev" target="_blank"> |
| | | <img src="/vite.svg" class="logo" alt="Vite logo" /> |
| | | </a> |
| | | <a href="https://vuejs.org/" target="_blank"> |
| | | <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" /> |
| | | </a> |
| | | </div> |
| | | <HelloWorld msg="Vite + Vue" /> |
| | | <RouterView /> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .logo { |
| | | height: 6em; |
| | | padding: 1.5em; |
| | | will-change: filter; |
| | | transition: filter 300ms; |
| | | } |
| | | .logo:hover { |
| | | filter: drop-shadow(0 0 2em #646cffaa); |
| | | } |
| | | .logo.vue:hover { |
| | | filter: drop-shadow(0 0 2em #42b883aa); |
| | | } |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | import { createApp } from 'vue' |
| | | import './style.css' |
| | | import App from './App.vue' |
| | | import { createApp } from 'vue'; |
| | | import './style.css'; |
| | | import App from './App.vue'; |
| | | import router from '@/router/index.js'; |
| | | import pinia from './store'; |
| | | |
| | | createApp(App).mount('#app') |
| | | |
| | | const app = createApp(App); |
| | | app.use(router); |
| | | app.use(pinia); |
| | | app.mount('#app'); |
| | | |
| | | // 全局vue异常捕获 |
| | | app.config.errorHandler = (error, vm, info) => { |
| | | console.error('Vue 发生错误:', error); |
| | | console.error('错误信息:', info); |
| | | }; |
New file |
| | |
| | | import { createMemoryHistory, createRouter } from 'vue-router' |
| | | |
| | | |
| | | const routes = [ |
| | | { path: '/', component: () => import('@/views/home/index.vue') }, |
| | | ] |
| | | |
| | | const router = createRouter({ |
| | | history: createMemoryHistory(), |
| | | routes, |
| | | }) |
| | | |
| | | export default router; |
New file |
| | |
| | | import { createPinia } from 'pinia'; |
| | | const pinia = createPinia(); |
| | | export default pinia; |
| | | |
| | | export * from './modules/user'; |
New file |
| | |
| | | import { ref } from 'vue'; |
| | | import { defineStore } from 'pinia'; |
| | | const useUserInfoStore = defineStore('userInfo', () => { |
| | | const userInfo = ref(''); |
| | | |
| | | return { |
| | | userInfo |
| | | } |
| | | }); |
| | | |
| | | export default useUserInfoStore; |
| | |
| | | .card { |
| | | padding: 2em; |
| | | } |
| | | html,body { |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | #app { |
| | | max-width: 1280px; |
| | | margin: 0 auto; |
| | | padding: 2rem; |
| | | text-align: center; |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | } |
| | | |
| | | @media (prefers-color-scheme: light) { |
New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <script setup> |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | import { defineConfig } from 'vite' |
| | | import vue from '@vitejs/plugin-vue' |
| | | import electron from 'vite-plugin-electron' |
| | | import { defineConfig } from 'vite'; |
| | | import vue from '@vitejs/plugin-vue'; |
| | | import electron from 'vite-plugin-electron'; |
| | | import { resolve } from 'path' |
| | | |
| | | // https://vitejs.dev/config/ |
| | | export default defineConfig({ |
| | |
| | | server: { |
| | | // 端口 |
| | | port: 3000, |
| | | }, |
| | | resolve: { |
| | | alias: { |
| | | '@': resolve(__dirname, './src') |
| | | } |
| | | }) |
| | | } |
| | | }); |