Ver código fonte

营期页面优化

yjwang 5 horas atrás
pai
commit
1e03d19358
2 arquivos alterados com 18 adições e 39 exclusões
  1. 0 35
      build/index.js
  2. 18 4
      src/views/course/userCoursePeriod/index.vue

+ 0 - 35
build/index.js

@@ -1,35 +0,0 @@
-const { run } = require('runjs')
-const chalk = require('chalk')
-const config = require('../vue.config.js')
-const rawArgv = process.argv.slice(2)
-const args = rawArgv.join(' ')
-
-if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
-  const report = rawArgv.includes('--report')
-
-  run(`vue-cli-service build ${args}`)
-
-  const port = 9526
-  const publicPath = config.publicPath
-
-  var connect = require('connect')
-  var serveStatic = require('serve-static')
-  const app = connect()
-
-  app.use(
-    publicPath,
-    serveStatic('./dist', {
-      index: ['index.html', '/']
-    })
-  )
-
-  app.listen(port, function () {
-    console.log(chalk.green(`> Preview at  http://localhost:${port}${publicPath}`))
-    if (report) {
-      console.log(chalk.green(`> Report at  http://localhost:${port}${publicPath}report.html`))
-    }
-
-  })
-} else {
-  run(`vue-cli-service build ${args}`)
-}

+ 18 - 4
src/views/course/userCoursePeriod/index.vue

@@ -1840,19 +1840,32 @@ export default {
 </script>
 
 <style scoped>
+/* 全局高度重置(确保父容器有明确高度) */
+html, body, #app {
+  height: 100%;
+  margin: 0;
+  padding: 0;
+}
+
+.app-container {
+  height: 100%;
+  overflow: hidden;
+}
+
 .left-aside {
   background-color: #fff;
   border-right: 1px solid #EBEEF5;
   padding: 0;
   display: flex;
   flex-direction: column;
-  height: calc(100vh - 100px);
+  height: 100%;          /* 改为相对父容器高度,而不是固定 calc */
   overflow: hidden;
 }
 
 .left-header {
   padding: 10px;
   border-bottom: 1px solid #EBEEF5;
+  flex-shrink: 0;        /* 防止头部被压缩 */
 }
 
 .left-header-top {
@@ -1923,7 +1936,8 @@ export default {
 
 .camp-list {
   flex: 1;
-  overflow-y: auto;
+  overflow-y: auto !important;
+  min-height: 0;         /* 关键:允许 flex 子项收缩,触发滚动 */
   padding: 3px;
   scrollbar-gutter: stable;
 }
@@ -2052,11 +2066,12 @@ export default {
   overflow: hidden;
   display: flex;
   flex-direction: column;
+  height: 100%;          /* 确保右侧也占满 */
 }
 
 /* 确保容器高度稳定 */
 .app-container >>> .el-container {
-  height: calc(100vh - 100px);
+  height: 100%;          /* 改为 100% 继承父容器高度 */
 }
 
 .app-container >>> .el-aside,
@@ -2066,7 +2081,6 @@ export default {
 
 /* 添加训练营表单样式 */
 .drawer-footer {
-  /* position: absolute; */
   bottom: 0;
   left: 0;
   right: 0;