优化打包

This commit is contained in:
zc
2026-04-08 10:59:39 +08:00
parent 5d5996b915
commit e9ed63646a
4 changed files with 21 additions and 21 deletions

View File

@@ -1,15 +1,19 @@
# 环境变量 (命名必须以 VITE_ 开头) # 环境变量 (命名必须以 VITE_ 开头)
# 接口前缀
# 是否在打包时启用 Mock VITE_API_PREFIX = '/dev-api'
VITE_BUILD_MOCK = false
# 接口地址 # 接口地址
VITE_API_BASE_URL = 'https://api.continew.top' VITE_API_BASE_URL = 'http://localhost:6609'
VITE_API_WS_URL = 'wss://api.continew.top'
# 接口地址 (WebSocket)
VITE_API_WS_URL = 'ws://localhost:6609'
# 地址前缀 # 地址前缀
VITE_BASE = '/' VITE_BASE = '/'
# 是否开启开发者工具
VITE_OPEN_DEVTOOLS = false
# 应用配置面板 # 应用配置面板
VITE_APP_SETTING = true VITE_APP_SETTING = true

View File

@@ -1,22 +1,21 @@
# 环境变量 (命名必须以 VITE_ 开头) # 环境变量 (命名必须以 VITE_ 开头)
# 是否在打包时启用 Mock
VITE_BUILD_MOCK = true
# 接口前缀 # 接口前缀
VITE_API_PREFIX = '/test-api' VITE_API_PREFIX = '/dev-api'
# 接口地址 # 接口地址
VITE_API_BASE_URL = 'http://localhost:6609' VITE_API_BASE_URL = 'http://localhost:6609'
# 接口地址 (WebSocket)
VITE_API_WS_URL = 'ws://localhost:6609'
# 地址前缀 # 地址前缀
VITE_BASE = '/test' VITE_BASE = '/'
# 是否开启开发者工具 # 是否开启开发者工具
VITE_OPEN_DEVTOOLS = true VITE_OPEN_DEVTOOLS = false
# 应用配置面板 # 应用配置面板
VITE_APP_SETTING = false VITE_APP_SETTING = true
# 终端ID # 终端ID
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a' VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'

View File

@@ -15,6 +15,9 @@ declare module 'vue' {
AButton: typeof import('@arco-design/web-vue')['Button'] AButton: typeof import('@arco-design/web-vue')['Button']
AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup'] AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup']
ACard: typeof import('@arco-design/web-vue')['Card'] ACard: typeof import('@arco-design/web-vue')['Card']
ACardMeta: typeof import('@arco-design/web-vue')['CardMeta']
ACarousel: typeof import('@arco-design/web-vue')['Carousel']
ACarouselItem: typeof import('@arco-design/web-vue')['CarouselItem']
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox'] ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup'] ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup']
ACol: typeof import('@arco-design/web-vue')['Col'] ACol: typeof import('@arco-design/web-vue')['Col']
@@ -77,6 +80,7 @@ declare module 'vue' {
ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect'] ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect']
ATrigger: typeof import('@arco-design/web-vue')['Trigger'] ATrigger: typeof import('@arco-design/web-vue')['Trigger']
ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph'] ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph']
ATypographyText: typeof import('@arco-design/web-vue')['TypographyText']
ATypographyTitle: typeof import('@arco-design/web-vue')['TypographyTitle'] ATypographyTitle: typeof import('@arco-design/web-vue')['TypographyTitle']
AUpload: typeof import('@arco-design/web-vue')['Upload'] AUpload: typeof import('@arco-design/web-vue')['Upload']
Avatar: typeof import('./../components/Avatar/index.vue')['default'] Avatar: typeof import('./../components/Avatar/index.vue')['default']

View File

@@ -32,13 +32,11 @@
</div> </div>
</a-card> </a-card>
<NoticeDetailModal ref="NoticeDetailModalRef" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { type DashboardNoticeResp, listDashboardNotice } from '@/apis' import { type DashboardNoticeResp, listDashboardNotice } from '@/apis'
import { useDict } from '@/hooks/app' import { useDict } from '@/hooks/app'
import NoticeDetailModal from '@/views/system/notice/NoticeDetailModal.vue'
const router = useRouter() const router = useRouter()
const { notice_type } = useDict('notice_type') const { notice_type } = useDict('notice_type')
@@ -56,11 +54,6 @@ const getDataList = async () => {
} }
} }
const NoticeDetailModalRef = ref<InstanceType<typeof NoticeDetailModal>>()
// 详情
const onDetail = (id: string) => {
NoticeDetailModalRef.value?.onDetail(id)
}
onMounted(() => { onMounted(() => {
getDataList() getDataList()