|
@@ -107,6 +107,7 @@ export default {
|
|
|
components: {
|
|
|
PreviewEdit,
|
|
|
},
|
|
|
+ inject: ['getCurSettingId'],
|
|
|
props: {
|
|
|
isEdit: {
|
|
|
type: Boolean,
|
|
@@ -174,6 +175,21 @@ export default {
|
|
|
this.gridInsertType = '';
|
|
|
},
|
|
|
},
|
|
|
+ 'data.row_list': {
|
|
|
+ handler(val) {
|
|
|
+ // row_list 更改时判断是否有当前设置 id 的组件
|
|
|
+ const curSettingId = this.getCurSettingId();
|
|
|
+ const find = val.find((row) => {
|
|
|
+ return row.col_list.find((col) => {
|
|
|
+ return col.grid_list.find((grid) => grid.id === curSettingId);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ if (!find) {
|
|
|
+ this.$emit('showSettingEmpty');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
GetCoursewareContent({ id: this.courseware_id }).then(({ content }) => {
|