提交 782f20b5 authored 作者: 刘旭's avatar 刘旭

新增查看日志,重启jar包功能

上级 41281edc
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.17.0",
"npm-run-all2": "^6.1.1", "npm-run-all2": "^6.1.1",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"terser": "^5.27.0",
"typescript": "~5.3.0", "typescript": "~5.3.0",
"vite": "^5.0.10", "vite": "^5.0.10",
"vue-tsc": "^1.8.25" "vue-tsc": "^1.8.25"
......
...@@ -73,12 +73,15 @@ devDependencies: ...@@ -73,12 +73,15 @@ devDependencies:
prettier: prettier:
specifier: ^3.0.3 specifier: ^3.0.3
version: 3.2.4 version: 3.2.4
terser:
specifier: ^5.27.0
version: 5.27.0
typescript: typescript:
specifier: ~5.3.0 specifier: ~5.3.0
version: 5.3.3 version: 5.3.3
vite: vite:
specifier: ^5.0.10 specifier: ^5.0.10
version: 5.0.12(@types/node@18.19.8) version: 5.0.12(@types/node@18.19.8)(terser@5.27.0)
vue-tsc: vue-tsc:
specifier: ^1.8.25 specifier: ^1.8.25
version: 1.8.27(typescript@5.3.3) version: 1.8.27(typescript@5.3.3)
...@@ -463,9 +466,42 @@ packages: ...@@ -463,9 +466,42 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@jridgewell/gen-mapping@0.3.3:
resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}
engines: {node: '>=6.0.0'}
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15
'@jridgewell/trace-mapping': 0.3.22
dev: true
/@jridgewell/resolve-uri@3.1.1:
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
engines: {node: '>=6.0.0'}
dev: true
/@jridgewell/set-array@1.1.2:
resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==}
engines: {node: '>=6.0.0'}
dev: true
/@jridgewell/source-map@0.3.5:
resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.22
dev: true
/@jridgewell/sourcemap-codec@1.4.15: /@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
/@jridgewell/trace-mapping@0.3.22:
resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/@nodelib/fs.scandir@2.1.5: /@nodelib/fs.scandir@2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'} engines: {node: '>= 8'}
...@@ -802,7 +838,7 @@ packages: ...@@ -802,7 +838,7 @@ packages:
vite: ^4.0.0 || ^5.0.0 vite: ^4.0.0 || ^5.0.0
vue: ^3.2.25 vue: ^3.2.25
dependencies: dependencies:
vite: 5.0.12(@types/node@18.19.8) vite: 5.0.12(@types/node@18.19.8)(terser@5.27.0)
vue: 3.4.15(typescript@5.3.3) vue: 3.4.15(typescript@5.3.3)
dev: true dev: true
...@@ -1088,6 +1124,10 @@ packages: ...@@ -1088,6 +1124,10 @@ packages:
dependencies: dependencies:
fill-range: 7.0.1 fill-range: 7.0.1
/buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
dev: true
/callsites@3.1.0: /callsites@3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'} engines: {node: '>=6'}
...@@ -1153,6 +1193,10 @@ packages: ...@@ -1153,6 +1193,10 @@ packages:
delayed-stream: 1.0.0 delayed-stream: 1.0.0
dev: false dev: false
/commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
/computeds@0.0.1: /computeds@0.0.1:
resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==}
dev: true dev: true
...@@ -2309,6 +2353,18 @@ packages: ...@@ -2309,6 +2353,18 @@ packages:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
/source-map-support@0.5.21:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
dependencies:
buffer-from: 1.1.2
source-map: 0.6.1
dev: true
/source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
dev: true
/spdx-correct@3.2.0: /spdx-correct@3.2.0:
resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==}
dependencies: dependencies:
...@@ -2386,6 +2442,17 @@ packages: ...@@ -2386,6 +2442,17 @@ packages:
tslib: 2.6.2 tslib: 2.6.2
dev: true dev: true
/terser@5.27.0:
resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jridgewell/source-map': 0.3.5
acorn: 8.11.3
commander: 2.20.3
source-map-support: 0.5.21
dev: true
/text-table@0.2.0: /text-table@0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true dev: true
...@@ -2578,7 +2645,7 @@ packages: ...@@ -2578,7 +2645,7 @@ packages:
spdx-expression-parse: 3.0.1 spdx-expression-parse: 3.0.1
dev: true dev: true
/vite@5.0.12(@types/node@18.19.8): /vite@5.0.12(@types/node@18.19.8)(terser@5.27.0):
resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
...@@ -2610,6 +2677,7 @@ packages: ...@@ -2610,6 +2677,7 @@ packages:
esbuild: 0.19.11 esbuild: 0.19.11
postcss: 8.4.33 postcss: 8.4.33
rollup: 4.9.6 rollup: 4.9.6
terser: 5.27.0
optionalDependencies: optionalDependencies:
fsevents: 2.3.3 fsevents: 2.3.3
dev: true dev: true
......
...@@ -8,6 +8,10 @@ export const getListAll = (tenantId: any) => { ...@@ -8,6 +8,10 @@ export const getListAll = (tenantId: any) => {
return request.get('/admin/docker/listAll', tenantId) return request.get('/admin/docker/listAll', tenantId)
} }
export const getLogs = (data: any) => {
return request.post('/admin/docker/logs', data)
}
export const getMessage = (tenantId: any) => { export const getMessage = (tenantId: any) => {
return request.get('/admin/docker/message', { tenantId }) return request.get('/admin/docker/message', { tenantId })
} }
...@@ -63,3 +67,6 @@ export const cleanBatch = (data: any) => { ...@@ -63,3 +67,6 @@ export const cleanBatch = (data: any) => {
export const getJarList = () => { export const getJarList = () => {
return request.get('/admin/docker/jar/list') return request.get('/admin/docker/jar/list')
} }
export const jarRestart = (data: any) => {
return request.get('/admin/docker/jar/restart', data)
}
<template>
<el-dialog v-model="show" :title="title" width="60%" @close="handleClose">
<el-scrollbar height="600px" style="background-color: black; color: #ffffff; padding: 12px">
<p v-for="(item, index) in logsText" :key="index" style="margin-bottom: 3px">{{ item }}</p>
</el-scrollbar>
</el-dialog>
</template>
<script setup lang="ts">
import { getLogs } from '@/api'
const show = ref(false)
const logsText = ref()
const title = ref()
const init = async (row: any, logsMinutes: number) => {
title.value = row.name + '日志'
const res: any = await getLogs({
containerId: row.containerId,
timeInMinutes: logsMinutes
})
if (res.code === 200) {
logsText.value = res.data
console.log(logsText.value)
}
}
const handleClose = () => {
show.value = false
logsText.value = null
}
defineExpose({
show,
init
})
</script>
<style scoped></style>
...@@ -6,16 +6,6 @@ ...@@ -6,16 +6,6 @@
text-color="#fff" text-color="#fff"
router router
> >
<!-- <div style="margin-bottom: 10px">
<el-select v-model="tenantId" @change="selectChange" placeholder="请选择租户">
<el-option
v-for="item in tenantList"
:key="item.tenantId"
:label="item.tenantName"
:value="item.tenantId"
/>
</el-select>
</div> -->
<el-menu-item v-for="item in mentList" :index="item.index" :route="item.path"> <el-menu-item v-for="item in mentList" :index="item.index" :route="item.path">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</el-menu-item> </el-menu-item>
...@@ -23,13 +13,8 @@ ...@@ -23,13 +13,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useTenantStore } from '@/stores/modules/tenant'
const route = useRoute() const route = useRoute()
const tenantStore = useTenantStore()
const tenantList = computed(() => tenantStore.getTenantList)
const tenantId = computed(() => tenantStore.getTenantId)
const active: any = ref(1) const active: any = ref(1)
const mentList = ref([ const mentList = ref([
...@@ -62,10 +47,6 @@ watch( ...@@ -62,10 +47,6 @@ watch(
}, },
{ immediate: true } { immediate: true }
) )
const selectChange = (tenantId: any) => {
tenantStore.setTenantId(tenantId)
}
</script> </script>
<style scoped> <style scoped>
......
...@@ -9,11 +9,11 @@ declare module 'vue' { ...@@ -9,11 +9,11 @@ declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer'] ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
...@@ -25,6 +25,7 @@ declare module 'vue' { ...@@ -25,6 +25,7 @@ declare module 'vue' {
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
...@@ -33,6 +34,7 @@ declare module 'vue' { ...@@ -33,6 +34,7 @@ declare module 'vue' {
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
IEpRefreshRight: typeof import('~icons/ep/refresh-right')['default'] IEpRefreshRight: typeof import('~icons/ep/refresh-right')['default']
Logs: typeof import('./../components/logs.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
} }
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<el-button type="primary" size="mini" @click="onClean" style="margin-left: 20px" <el-button type="primary" size="mini" @click="onClean" style="margin-left: 20px"
>清理 >清理
</el-button> </el-button>
<el-button type="primary" size="mini" @click="onShowLogs" style="margin-left: 20px"
>查看日志
</el-button>
<el-button type="primary" size="mini" @click="onMessages" style="margin-left: 20px" <el-button type="primary" size="mini" @click="onMessages" style="margin-left: 20px"
>刷新 >刷新
</el-button> </el-button>
...@@ -49,11 +52,21 @@ ...@@ -49,11 +52,21 @@
</el-timeline> </el-timeline>
</div> </div>
</div> </div>
<logs ref="logsRef" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getListAll, getMessage, restartOne, startBatch, updateBatch, cleanBatch } from '@/api' import {
getListAll,
getMessage,
restartOne,
startBatch,
updateBatch,
cleanBatch,
getLogs
} from '@/api'
import { useTenantStore } from '@/stores/modules/tenant' import { useTenantStore } from '@/stores/modules/tenant'
import logs from '@/components/logs.vue'
const tenantStore = useTenantStore() const tenantStore = useTenantStore()
const tenantId = computed(() => tenantStore.getTenantId) const tenantId = computed(() => tenantStore.getTenantId)
...@@ -66,14 +79,17 @@ const state = reactive({ ...@@ -66,14 +79,17 @@ const state = reactive({
messages: [] as any, messages: [] as any,
dialogVisible: false, dialogVisible: false,
environment: '', environment: '',
selectRows: [] as any selectRows: [] as any,
logsRows: [] as any
}) })
const tableData = ref() const tableData = ref()
const logsRef = ref()
const handleSelectionChange = (rows: any) => { const handleSelectionChange = (rows: any) => {
state.selectRows = rows.map((item: any) => item.name) state.selectRows = rows.map((item: any) => item.name)
state.selectRows = [...state.selectRows] state.selectRows = [...state.selectRows]
state.logsRows = rows
} }
const onStart = () => { const onStart = () => {
...@@ -136,9 +152,9 @@ const onMessages = async () => { ...@@ -136,9 +152,9 @@ const onMessages = async () => {
const onRestartOne = () => { const onRestartOne = () => {
if (!state.selectRows.length) return ElMessage.warning('请先选择数据') if (!state.selectRows.length) return ElMessage.warning('请先选择数据')
if (state.selectRows.length > 1) return ElMessage.warning('一次只能重启一条数据') if (state.selectRows.length > 1) return ElMessage.warning('一次只能重启一个容器')
ElMessageBox.confirm(`确认重启 ?`, '提示', { ElMessageBox.confirm(`确认重启?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -156,6 +172,20 @@ const onRestartOne = () => { ...@@ -156,6 +172,20 @@ const onRestartOne = () => {
}) })
} }
const onShowLogs = () => {
if (!state.logsRows.length) return ElMessage.warning('请先选择数据')
if (state.logsRows.length > 1) return ElMessage.warning('一次只能查看一个容器日志')
ElMessageBox.prompt('请输入查看日志时间', '查看日志', {
confirmButtonText: '确认',
cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '请输入数字'
}).then(({ value }) => {
logsRef.value.show = true
logsRef.value.init(state.logsRows[0], value)
})
}
const tenantChange = (tenantId: any) => { const tenantChange = (tenantId: any) => {
state.loading = true state.loading = true
initListAll(tenantId).then(() => { initListAll(tenantId).then(() => {
......
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<el-table :data="tableData" stripe border> <el-button type="primary" style="margin-bottom: 20px" @click="onRestart">重启</el-button>
<el-table :data="tableData" stripe border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="#" align="center" /> <el-table-column type="index" label="#" align="center" />
<el-table-column prop="name" label="jar包名称" /> <el-table-column prop="name" label="jar包名称" />
<el-table-column prop="stats" label="状态" align="center" width="100px"> <el-table-column prop="stats" label="状态" align="center" width="100px">
...@@ -22,14 +24,40 @@ ...@@ -22,14 +24,40 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getJarList } from '@/api' import { getJarList, jarRestart } from '@/api'
const loading = ref(true) const loading = ref(true)
const tableData = ref() const tableData = ref()
const selectRows = ref()
const handleSelectionChange = (rows: any) => {
selectRows.value = rows
}
const onRestart = () => {
if (!selectRows.value.length) return ElMessage.warning('请先选择数据')
if (selectRows.value.length > 1) return ElMessage.warning('一次只能重启一个jar包')
if (!selectRows.value[0].exist) return ElMessage.warning('存在该jar包才能重启')
ElMessageBox.confirm(`确认重启?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const res: any = await jarRestart({
code: selectRows.value[0].code
})
if (res.code === 200) ElMessage.success('重启成功')
else ElMessage.error(res.msg)
} finally {
init()
}
})
}
const init = async () => { const init = async () => {
loading.value = true
const res: any = await getJarList() const res: any = await getJarList()
console.log(res)
if (res.code === 200) { if (res.code === 200) {
tableData.value = res.data tableData.value = res.data
loading.value = false loading.value = false
......
...@@ -51,7 +51,17 @@ export default defineConfig({ ...@@ -51,7 +51,17 @@ export default defineConfig({
// 设置代理 // 设置代理
proxy: { proxy: {
'/admin': { '/admin': {
target: 'http://192.168.1.88:8080/' target: 'http://192.168.1.67:8080/'
}
}
},
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: true, // 注释console
drop_debugger: true, // console
pure_funcs: ['console.log'] // 移除console
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论