课程包详情优化
This commit is contained in:
parent
bab12cbed3
commit
a986709776
27
reading-platform-frontend/src/components.d.ts
vendored
27
reading-platform-frontend/src/components.d.ts
vendored
@ -11,35 +11,22 @@ declare module 'vue' {
|
|||||||
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
||||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||||
AButton: typeof import('ant-design-vue/es')['Button']
|
AButton: typeof import('ant-design-vue/es')['Button']
|
||||||
AButtonGroup: typeof import('ant-design-vue/es')['ButtonGroup']
|
|
||||||
ACard: typeof import('ant-design-vue/es')['Card']
|
ACard: typeof import('ant-design-vue/es')['Card']
|
||||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||||
ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
|
|
||||||
ACol: typeof import('ant-design-vue/es')['Col']
|
ACol: typeof import('ant-design-vue/es')['Col']
|
||||||
ACollapse: typeof import('ant-design-vue/es')['Collapse']
|
|
||||||
ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
|
|
||||||
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
|
||||||
ADescriptions: typeof import('ant-design-vue/es')['Descriptions']
|
|
||||||
ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem']
|
|
||||||
ADivider: typeof import('ant-design-vue/es')['Divider']
|
|
||||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||||
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
||||||
AEmpty: typeof import('ant-design-vue/es')['Empty']
|
AEmpty: typeof import('ant-design-vue/es')['Empty']
|
||||||
AForm: typeof import('ant-design-vue/es')['Form']
|
AForm: typeof import('ant-design-vue/es')['Form']
|
||||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||||
AImage: typeof import('ant-design-vue/es')['Image']
|
AImage: typeof import('ant-design-vue/es')['Image']
|
||||||
AImagePreviewGroup: typeof import('ant-design-vue/es')['ImagePreviewGroup']
|
|
||||||
AInput: typeof import('ant-design-vue/es')['Input']
|
AInput: typeof import('ant-design-vue/es')['Input']
|
||||||
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
|
|
||||||
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
||||||
AInputSearch: typeof import('ant-design-vue/es')['InputSearch']
|
AInputSearch: typeof import('ant-design-vue/es')['InputSearch']
|
||||||
ALayout: typeof import('ant-design-vue/es')['Layout']
|
ALayout: typeof import('ant-design-vue/es')['Layout']
|
||||||
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
||||||
ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
|
ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
|
||||||
ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
|
ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
|
||||||
AList: typeof import('ant-design-vue/es')['List']
|
|
||||||
AListItem: typeof import('ant-design-vue/es')['ListItem']
|
|
||||||
AListItemMeta: typeof import('ant-design-vue/es')['ListItemMeta']
|
|
||||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||||
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
@ -48,34 +35,20 @@ declare module 'vue' {
|
|||||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
|
||||||
ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
|
|
||||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
|
||||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||||
ARate: typeof import('ant-design-vue/es')['Rate']
|
|
||||||
AResult: typeof import('ant-design-vue/es')['Result']
|
|
||||||
ARow: typeof import('ant-design-vue/es')['Row']
|
ARow: typeof import('ant-design-vue/es')['Row']
|
||||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||||
ASelectOptGroup: typeof import('ant-design-vue/es')['SelectOptGroup']
|
|
||||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||||
ASkeleton: typeof import('ant-design-vue/es')['Skeleton']
|
|
||||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||||
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
||||||
AStep: typeof import('ant-design-vue/es')['Step']
|
|
||||||
ASteps: typeof import('ant-design-vue/es')['Steps']
|
|
||||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
|
||||||
ATable: typeof import('ant-design-vue/es')['Table']
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
|
||||||
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
|
||||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
||||||
ATypographyText: typeof import('ant-design-vue/es')['TypographyText']
|
ATypographyText: typeof import('ant-design-vue/es')['TypographyText']
|
||||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
|
||||||
AUploadDragger: typeof import('ant-design-vue/es')['UploadDragger']
|
|
||||||
FilePreviewModal: typeof import('./components/FilePreviewModal.vue')['default']
|
FilePreviewModal: typeof import('./components/FilePreviewModal.vue')['default']
|
||||||
FileUploader: typeof import('./components/course/FileUploader.vue')['default']
|
FileUploader: typeof import('./components/course/FileUploader.vue')['default']
|
||||||
LessonConfigPanel: typeof import('./components/course/LessonConfigPanel.vue')['default']
|
LessonConfigPanel: typeof import('./components/course/LessonConfigPanel.vue')['default']
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="course-detail-view">
|
<div class="course-detail-view">
|
||||||
<!-- 顶部导航 -->
|
<!-- 顶部导航 -->
|
||||||
<div class="detail-header">
|
<div class="detail-header flex flex-wrap items-center">
|
||||||
<div class="header-left">
|
<div class="header-left flex-shrink-0">
|
||||||
<a-button type="text" @click="router.back()">
|
<a-button type="text" @click="router.back()">
|
||||||
<ArrowLeftOutlined />
|
<ArrowLeftOutlined />
|
||||||
</a-button>
|
</a-button>
|
||||||
@ -788,7 +788,9 @@ const fetchCourseDetail = async () => {
|
|||||||
background: white;
|
background: white;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
padding-top: 1.5rem;
|
||||||
|
top: -1.5rem;
|
||||||
|
margin-top: -1.5rem;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
.header-left {
|
.header-left {
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<div class="py-6 px-6 max-w-[1400px] mx-auto">
|
<div class="px-4 py-4 md:px-6 md:py-6">
|
||||||
<!-- 封面和基本信息 -->
|
<!-- 封面和基本信息 -->
|
||||||
<div class="mb-6 text-center" v-if="course.coverImagePath">
|
<div class="mb-6 text-center" v-if="course.coverImagePath">
|
||||||
<img :src="getFileUrl(course.coverImagePath)" alt="课程封面"
|
<img :src="getFileUrl(course.coverImagePath)" alt="课程封面"
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<div class="p-6 max-w-[1200px] mx-auto">
|
<div class="px-4 py-4 md:px-6 md:py-6">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<div class="bg-white rounded-xl overflow-hidden shadow-[0_2px_8px_rgba(0,0,0,0.06)] mb-6">
|
<div class="bg-white rounded-xl overflow-hidden shadow-[0_2px_8px_rgba(0,0,0,0.06)] mb-6">
|
||||||
<div class="py-4 px-6 border-b border-[#f0f0f0] flex justify-between items-center">
|
<div class="py-4 px-6 border-b border-[#f0f0f0] flex justify-between items-center">
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from "vite";
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from "@vitejs/plugin-vue";
|
||||||
import UnoCSS from 'unocss/vite';
|
import UnoCSS from "unocss/vite";
|
||||||
import { resolve } from 'path';
|
import { resolve } from "path";
|
||||||
import AutoImport from 'unplugin-auto-import/vite';
|
import AutoImport from "unplugin-auto-import/vite";
|
||||||
import Components from 'unplugin-vue-components/vite';
|
import Components from "unplugin-vue-components/vite";
|
||||||
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
|
||||||
import viteCompression from 'vite-plugin-compression';
|
import viteCompression from "vite-plugin-compression";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -13,14 +13,14 @@ export default defineConfig({
|
|||||||
UnoCSS(),
|
UnoCSS(),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
imports: [
|
imports: [
|
||||||
'vue',
|
"vue",
|
||||||
'vue-router',
|
"vue-router",
|
||||||
'pinia',
|
"pinia",
|
||||||
{
|
{
|
||||||
'ant-design-vue': ['message', 'notification', 'Modal'],
|
"ant-design-vue": ["message", "notification", "Modal"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dts: 'src/auto-imports.d.ts',
|
dts: "src/auto-imports.d.ts",
|
||||||
}),
|
}),
|
||||||
Components({
|
Components({
|
||||||
resolvers: [
|
resolvers: [
|
||||||
@ -28,32 +28,32 @@ export default defineConfig({
|
|||||||
importStyle: false,
|
importStyle: false,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
dts: 'src/components.d.ts',
|
dts: "src/components.d.ts",
|
||||||
}),
|
}),
|
||||||
viteCompression({
|
viteCompression({
|
||||||
verbose: true,
|
verbose: true,
|
||||||
disable: false,
|
disable: false,
|
||||||
threshold: 10240,
|
threshold: 10240,
|
||||||
algorithm: 'gzip',
|
algorithm: "gzip",
|
||||||
ext: '.gz',
|
ext: ".gz",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve(__dirname, 'src'),
|
"@": resolve(__dirname, "src"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
host: true,
|
host: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
"/api": {
|
||||||
target: 'http://localhost:3000',
|
target: "http://8.148.151.56:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
rewrite: (path) => path.replace(/^\/api/, "/api"),
|
||||||
},
|
},
|
||||||
'/uploads': {
|
"/uploads": {
|
||||||
target: 'http://localhost:3000',
|
target: "http://8.148.151.56:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -62,10 +62,16 @@ export default defineConfig({
|
|||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: {
|
manualChunks: {
|
||||||
'ant-design-vue': ['ant-design-vue', '@ant-design/icons-vue'],
|
"ant-design-vue": ["ant-design-vue", "@ant-design/icons-vue"],
|
||||||
'echarts': ['echarts'],
|
echarts: ["echarts"],
|
||||||
'fullcalendar': ['@fullcalendar/vue3', '@fullcalendar/core', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/interaction'],
|
fullcalendar: [
|
||||||
'dayjs': ['dayjs'],
|
"@fullcalendar/vue3",
|
||||||
|
"@fullcalendar/core",
|
||||||
|
"@fullcalendar/daygrid",
|
||||||
|
"@fullcalendar/timegrid",
|
||||||
|
"@fullcalendar/interaction",
|
||||||
|
],
|
||||||
|
dayjs: ["dayjs"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user