1
0
mirror of synced 2026-04-03 22:48:36 +08:00

feat(admin): 更新runtime

This commit is contained in:
roymondchen
2022-08-18 19:46:34 +08:00
committed by jia000
parent 87f1bfbdd6
commit aed4b42191
25 changed files with 246 additions and 273 deletions

View File

@@ -21,13 +21,16 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import type { MNode } from '@tmagic/schema';
import actApi from '@src/api/act';
import { isPage } from '@tmagic/utils';
export default {
/**
* 编辑器删除插件(删除前hook)
* @returns void
*/
beforeRemove: async () => {
beforeRemove: async (node: MNode) => {
if (!isPage(node)) return [node];
try {
await ElMessageBox.confirm('确认删除该页面吗?', '提示', {
confirmButtonText: '删除',
@@ -38,6 +41,8 @@ export default {
} catch (error) {
throw new Error('delete canceled');
}
return [node];
},
/**
* 编辑器删除插件(删除后hook)