瀏覽代碼

style(course.vue): adjust container style logic for course page

refactor the inline styles to dynamically set height, margin and overflow based on courseUrl existence, simplify fixed height auto style
lsc 3 月之前
父節點
當前提交
d5308f27a1
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/components/pages/course.vue

+ 2 - 1
src/components/pages/course.vue

@@ -1,5 +1,6 @@
 <template>
-  <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;"
+  <div class="pb_content" style="width: 94%; background: unset;"
+  :style="{height: courseUrl ? '100vh' : 'auto', margin: courseUrl ? '0' : '10px auto', overflow: courseUrl ? 'hidden' : 'auto'}"
   :class="[gotype? 'liyuan':'']"
   >