|
@@ -47,12 +47,14 @@
|
|
|
|
|
|
<script>
|
|
|
import { previewComponentList } from '@/views/book/courseware/data/bookType';
|
|
|
+import { GetBook } from '@/api/book';
|
|
|
|
|
|
export default {
|
|
|
name: 'PreviewEdit',
|
|
|
provide() {
|
|
|
return {
|
|
|
getDragStatus: () => this.drag.dragging,
|
|
|
+ bookInfo: this.bookInfo,
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -102,11 +104,17 @@ export default {
|
|
|
],
|
|
|
// 不需要移动的组件
|
|
|
noMoveComponent: ['divider', 'spacing'],
|
|
|
+ bookInfo: {
|
|
|
+ theme_color: '',
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
document.addEventListener('mousemove', this.dragMove);
|
|
|
document.addEventListener('mouseup', this.dragEnd);
|
|
|
+ GetBook({ id: this.$route.query.book_id }).then(({ theme_color }) => {
|
|
|
+ this.bookInfo.theme_color = theme_color;
|
|
|
+ });
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
document.removeEventListener('mousemove', this.dragMove);
|