|
@@ -7,7 +7,7 @@
|
|
|
@click-left="onClickLeft"
|
|
|
/>
|
|
|
<div class="loading" v-if="loading">
|
|
|
- <van-loading type="spinner" vertical >加载中...</van-loading>
|
|
|
+ <van-loading type="spinner" vertical>加载中...</van-loading>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<div v-if="!isReadable" class="learn-content-rest-time">已学完</div>
|
|
@@ -59,7 +59,7 @@
|
|
|
:key="index"
|
|
|
class="linkListItem"
|
|
|
>
|
|
|
- <a :href="item">
|
|
|
+ <a :href="item" @click="previewFile(item)">
|
|
|
<div class="linkListItemIocn">
|
|
|
<img :src="getLinkIcon(item)" />
|
|
|
</div>
|
|
@@ -524,6 +524,17 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
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;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- }
|
|
|
+ }
|
|
|
.learn-content-rest-time {
|
|
|
height: 1.5rem;
|
|
|
display: flex;
|