|
@@ -334,6 +334,18 @@ export default {
|
|
* @param {string} type 类型
|
|
* @param {string} type 类型
|
|
*/
|
|
*/
|
|
saveCoursewareContent(type) {
|
|
saveCoursewareContent(type) {
|
|
|
|
+ let isAllLoader = false;
|
|
|
|
+ if (this.isEdit) {
|
|
|
|
+ isAllLoader = this.$refs?.component.every((item) => item.property.isGetContent);
|
|
|
|
+ } else {
|
|
|
|
+ isAllLoader = this.$refs?.previewEdit?.$refs?.preview?.every((item) => item.loader);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!isAllLoader) {
|
|
|
|
+ this.$message.warning('有组件内容未加载完成,请稍后再试');
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
let component_id_list = this.data.row_list.flatMap((row) =>
|
|
let component_id_list = this.data.row_list.flatMap((row) =>
|
|
row.col_list.flatMap((col) => col.grid_list.map((grid) => grid.id)),
|
|
row.col_list.flatMap((col) => col.grid_list.map((grid) => grid.id)),
|
|
);
|
|
);
|