feat: Remove unused front-end components (#10432)

This commit is contained in:
CityFun 2025-09-22 16:00:07 +08:00 committed by GitHub
parent 49a777e2d8
commit b73b851245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 11 deletions

View file

@ -4,7 +4,7 @@
"version": "2.0", "version": "2.0",
"description": "1Panel 前端", "description": "1Panel 前端",
"scripts": { "scripts": {
"dev": "vite", "dev": "node --max-old-space-size=8192 ./node_modules/.bin/vite --host",
"serve": "vite", "serve": "vite",
"build:dev": "vite build --mode development", "build:dev": "vite build --mode development",
"build:test": "vue-tsc --noEmit && vite build --mode test", "build:test": "vue-tsc --noEmit && vite build --mode test",
@ -56,8 +56,7 @@
"vue-codemirror": "^6.1.1", "vue-codemirror": "^6.1.1",
"vue-demi": "^0.14.6", "vue-demi": "^0.14.6",
"vue-i18n": "^10.0.5", "vue-i18n": "^10.0.5",
"vue-router": "^4.3.3", "vue-router": "^4.5.1"
"vue-virtual-scroller": "^2.0.0-beta.8"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.8", "@types/node": "^20.14.8",

View file

@ -25,9 +25,6 @@ import Fit2CloudPlus from 'fit2cloud-ui-plus';
import * as Icons from '@element-plus/icons-vue'; import * as Icons from '@element-plus/icons-vue';
import hljsVuePlugin from '@highlightjs/vue-plugin'; import hljsVuePlugin from '@highlightjs/vue-plugin';
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
import VirtualScroller from 'vue-virtual-scroller';
import directives from '@/directives/index'; import directives from '@/directives/index';
const app = createApp(App); const app = createApp(App);
@ -40,7 +37,6 @@ Object.keys(Icons).forEach((key) => {
app.component(key, Icons[key as keyof typeof Icons]); app.component(key, Icons[key as keyof typeof Icons]);
}); });
app.use(VirtualScroller);
app.use(router); app.use(router);
app.use(i18n); app.use(i18n);
app.use(pinia); app.use(pinia);

View file

@ -16,7 +16,6 @@
</template> </template>
<script lang="ts" setup name="AppInstallPage"> <script lang="ts" setup name="AppInstallPage">
import { ref, reactive } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import AppInstallForm from '@/views/app-store/detail/form/index.vue'; import AppInstallForm from '@/views/app-store/detail/form/index.vue';
import { installApp } from '@/api/modules/app'; import { installApp } from '@/api/modules/app';
@ -32,7 +31,7 @@ const loading = ref(false);
const installFormRef = ref<InstanceType<typeof AppInstallForm>>(); const installFormRef = ref<InstanceType<typeof AppInstallForm>>();
const taskLogRef = ref(); const taskLogRef = ref();
const formData = reactive({ const formData = ref({
appDetailId: 0, appDetailId: 0,
params: {}, params: {},
name: '', name: '',

View file

@ -31,8 +31,17 @@
}, },
// //
"skipLibCheck": true, "skipLibCheck": true,
"ignoreDeprecations": "5.0", "ignoreDeprecations": "5.0"
}, },
// "include": ["./src/views"], "include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"build/**/*.ts",
"build/**/*.d.ts",
"vite.config.ts",
"auto-imports.d.ts"
],
"exclude": ["node_modules", "dist", "**/*.js", "*.json", "*.md"] "exclude": ["node_modules", "dist", "**/*.js", "*.json", "*.md"]
} }