浏览代码

样式调整

lex 1 年之前
父节点
当前提交
fa8c1b1395

+ 15 - 2
src/views/courseList/index.module.less

@@ -172,6 +172,17 @@
       background: linear-gradient(180deg, #D3D3D3 0%, #8F8F8F 100%);
     }
   }
+
+  .titleName {
+    span {
+      display: -webkit-box;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      -webkit-line-clamp: 2;
+      line-break: anywhere;
+      -webkit-box-orient: vertical;
+    }
+  }
 }
 
 .periodItem {
@@ -204,9 +215,11 @@
     z-index: 99;
   }
 }
-.periodItemModel{
+
+.periodItemModel {
   position: relative;
-  .periodTip{
+
+  .periodTip {
     position: absolute;
     left: -7px;
     top: 0;

+ 9 - 5
src/views/courseList/index.tsx

@@ -171,11 +171,11 @@ export default defineComponent({
 
       if (!item.hasCache) {
         const hasFree = String(item.accessScope) === '0'
-        if (!hasFree){
+        if (!hasFree) {
           const hasVip = handleCheckVip()
           if (!hasVip) return
         }
-        
+
         // 下载中不提示
         if (item.downloadStatus == 1) {
           return
@@ -328,7 +328,8 @@ export default defineComponent({
               <div key="list" class={styles.periodList}>
                 <CellGroup inset>
                   {data.list.map((item: any) => {
-                    let isLock = item.lockFlag ||
+                    const isLock =
+                      item.lockFlag ||
                       ((route.query.code == 'select' || state.platformType == 'STUDENT') &&
                         !item.unlock)
                     const isSelect = route.query.code === 'select'
@@ -337,6 +338,7 @@ export default defineComponent({
                         border
                         center
                         title={item.coursewareDetailName}
+                        titleClass={styles.titleName}
                         label={!browserInfo.isStudent ? `已使用${item.useNum || 0}次` : ''}
                         onClick={() => !isLock && handleClick(item)}
                       >
@@ -344,8 +346,10 @@ export default defineComponent({
                           icon: () => (
                             <div class={styles.periodItem}>
                               <div class={styles.periodItemModel}>
-                                <img src={ isLock ? iconCourseLock : iconCourse} />
-                                {!isLock && String(item.accessScope) === '0' && <img class={styles.periodTip} src={iconTip} />}
+                                <img src={isLock ? iconCourseLock : iconCourse} />
+                                {!isLock && String(item.accessScope) === '0' && (
+                                  <img class={styles.periodTip} src={iconTip} />
+                                )}
                               </div>
                             </div>
                           ),

+ 11 - 2
src/views/coursewarePlay/component/points.tsx

@@ -1,8 +1,15 @@
 import { defineComponent, reactive, watch } from 'vue'
 import styles from './point.module.less'
-import { iconMulv, iconArrow} from '../image/icons.json'
+import { iconMulv, iconArrow } from '../image/icons.json'
 import iconZhibo from '../image/icon-load.gif'
-import { iconImage, iconImageActive, iconVideo, iconVideoActive, iconSong, iconSongActive } from '../image/icons.json'
+import {
+  iconImage,
+  iconImageActive,
+  iconVideo,
+  iconVideoActive,
+  iconSong,
+  iconSongActive
+} from '../image/icons.json'
 import { Collapse, CollapseItem, Icon, Image } from 'vant'
 export default defineComponent({
   name: 'points-list',
@@ -71,6 +78,7 @@ export default defineComponent({
                   class={index > 0 ? styles.borderTop : ''}
                   isLink={false}
                   title={item.name}
+                  titleClass={'van-multi-ellipsis--l2'}
                   name={item.id}
                 >
                   {{
@@ -120,6 +128,7 @@ export default defineComponent({
                                   border={false}
                                   isLink={false}
                                   title={child.name}
+                                  titleClass={'van-multi-ellipsis--l2'}
                                   name={child.id}
                                   class={styles.childCollapseItem}
                                 >

+ 7 - 0
src/views/coursewarePlay/index.module.less

@@ -92,6 +92,13 @@
   align-items: center;
   font-size: 12px;
   color: #fff;
+
+  p {
+    max-width: 60%;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
 }
 
 .tabsContent {

+ 2 - 2
src/views/coursewarePlay/index.tsx

@@ -318,7 +318,7 @@ export default defineComponent({
     onMounted(async () => {
       await getDetail()
       const hasFree = String(data.detail?.accessScope) === '0'
-      if (!hasFree){
+      if (!hasFree) {
         const hasVip = handleCheckVip()
         if (!hasVip) {
           nextTick(() => {
@@ -876,7 +876,7 @@ export default defineComponent({
               setModelOpen()
             }}
           >
-            {popupData.tabName}
+            <p>{popupData.tabName}</p>
           </div>
 
           {state.platformType == 'TEACHER' && (

+ 2 - 2
vite.config.ts

@@ -11,8 +11,8 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://online.lexiaoya.cn/'
-// const proxyUrl = 'https://test.lexiaoya.cn/'
+// const proxyUrl = 'https://online.lexiaoya.cn/'
+const proxyUrl = 'https://test.lexiaoya.cn/'
 // const proxyUrl = 'https://dev.lexiaoya.cn/'
 // const proxyUrl = 'http://47.98.131.38:8989/'
 // const proxyUrl = 'http://192.168.3.20:8989/' // 邹旋