|
@@ -67,7 +67,7 @@
|
|
|
:border-color="computedBorderColor(row.row_id)"
|
|
:border-color="computedBorderColor(row.row_id)"
|
|
|
:style="computedGridStyle(grid, row.row_id)"
|
|
:style="computedGridStyle(grid, row.row_id)"
|
|
|
:component-move="componentMove(i, j, k)"
|
|
:component-move="componentMove(i, j, k)"
|
|
|
- @deleteComponent="deleteComponent"
|
|
|
|
|
|
|
+ @deleteComponent="deleteComponentConfirm"
|
|
|
@showSetting="showSetting"
|
|
@showSetting="showSetting"
|
|
|
@copyComponent="copyComponent"
|
|
@copyComponent="copyComponent"
|
|
|
@changeData="changeData"
|
|
@changeData="changeData"
|
|
@@ -759,6 +759,20 @@ export default {
|
|
|
});
|
|
});
|
|
|
col.grid_template_columns = grid_template_columns;
|
|
col.grid_template_columns = grid_template_columns;
|
|
|
},
|
|
},
|
|
|
|
|
+ async deleteComponentConfirm(id) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.$confirm('确定要删除该组件吗?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ });
|
|
|
|
|
+ this.deleteComponent(id);
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ if (err === 'cancel') {
|
|
|
|
|
+ this.$message.info('已取消删除');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 删除组件
|
|
* 删除组件
|
|
|
* @param {String} id 组件 id
|
|
* @param {String} id 组件 id
|