|
@@ -7,7 +7,7 @@
|
|
@click-left="onClickLeft"
|
|
@click-left="onClickLeft"
|
|
/>
|
|
/>
|
|
<div class="loading" v-if="loading">
|
|
<div class="loading" v-if="loading">
|
|
- <van-loading type="spinner" vertical >加载中...</van-loading>
|
|
|
|
|
|
+ <van-loading type="spinner" vertical>加载中...</van-loading>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
<div v-if="!isReadable" class="learn-content-rest-time">已学完</div>
|
|
<div v-if="!isReadable" class="learn-content-rest-time">已学完</div>
|
|
@@ -59,7 +59,7 @@
|
|
:key="index"
|
|
:key="index"
|
|
class="linkListItem"
|
|
class="linkListItem"
|
|
>
|
|
>
|
|
- <a :href="item">
|
|
|
|
|
|
+ <a :href="item" @click="previewFile(item)">
|
|
<div class="linkListItemIocn">
|
|
<div class="linkListItemIocn">
|
|
<img :src="getLinkIcon(item)" />
|
|
<img :src="getLinkIcon(item)" />
|
|
</div>
|
|
</div>
|
|
@@ -524,6 +524,17 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
return img;
|
|
return img;
|
|
|
|
+ },
|
|
|
|
+ previewFile(url) {
|
|
|
|
+ let strArr = url.split(".");
|
|
|
|
+ let type = strArr[strArr.length - 1];
|
|
|
|
+ lx.utils.previewFile({
|
|
|
|
+ url: url,
|
|
|
|
+ name: "",
|
|
|
|
+ size: 1000,
|
|
|
|
+ type: type,
|
|
|
|
+ moreHidden: false
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -542,7 +553,7 @@ export default {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
- }
|
|
|
|
|
|
+ }
|
|
.learn-content-rest-time {
|
|
.learn-content-rest-time {
|
|
height: 1.5rem;
|
|
height: 1.5rem;
|
|
display: flex;
|
|
display: flex;
|