|
|
@@ -1042,18 +1042,18 @@ export default {
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
// 定位批注
|
|
|
- async handleLocationRemarks(componentId) {
|
|
|
- if (componentId) {
|
|
|
- let node = await this.$refs.courserware.findChildComponentByKey(componentId);
|
|
|
- if (node) {
|
|
|
- await this.$nextTick();
|
|
|
- this.$refs.previewMain.scrollTo({
|
|
|
- top: node.$el.offsetTop - 50,
|
|
|
- left: node.$el.offsetLeft - 50,
|
|
|
- behavior: 'smooth',
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ async handleLocationRemarks(offsetTop) {
|
|
|
+ // if (componentId) {
|
|
|
+ // let node = await this.$refs.courserware.findChildComponentByKey(componentId);
|
|
|
+ // if (node) {
|
|
|
+ await this.$nextTick();
|
|
|
+ this.$refs.previewMain.scrollTo({
|
|
|
+ top: offsetTop - 50,
|
|
|
+ // left: node.$el.offsetLeft - 50,
|
|
|
+ behavior: 'smooth',
|
|
|
+ });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
// 计算previewMain滑动距离
|
|
|
computeScroll() {
|