mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	refactor: sql取消执行逻辑调整、前端使用vueuse重构部分代码
This commit is contained in:
		@@ -197,9 +197,17 @@ export class DbInst {
 | 
			
		||||
     * @param remark 执行备注
 | 
			
		||||
     */
 | 
			
		||||
    async runSql(dbName: string, sql: string, remark: string = '', key: string = '') {
 | 
			
		||||
        if (key) {
 | 
			
		||||
            return await dbApi.sqlExec.allowCancelReq(key, {
 | 
			
		||||
                id: this.id,
 | 
			
		||||
                db: dbName,
 | 
			
		||||
                sql: sql.trim(),
 | 
			
		||||
                remark,
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return await dbApi.sqlExec.request({
 | 
			
		||||
            id: this.id,
 | 
			
		||||
            execId: key,
 | 
			
		||||
            db: dbName,
 | 
			
		||||
            sql: sql.trim(),
 | 
			
		||||
            remark,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user