|
@@ -38,6 +38,8 @@ import { InAndOutBoundDialog } from '../view/InAndOutBoundDialog';
|
|
|
import { LittleMaterialRequestDialog } from '../view/LittleMaterialRequestDialog';
|
|
|
import { PictureDrawingDialog } from '../view/PictureDrawingDialog';
|
|
|
import { AuxiliaryOperationView } from '../view/AuxiliaryOperationView';
|
|
|
+import { BusinessError } from '@ohos.base';
|
|
|
+import window from '@ohos.window';
|
|
|
|
|
|
// 声明接受参数的类型
|
|
|
interface Params {
|
|
@@ -310,7 +312,22 @@ struct ProcessIndex {
|
|
|
.width('94.8%')
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
.onClick(() => {
|
|
|
- router.back()
|
|
|
+ // router.back()
|
|
|
+ const context = getContext(this)
|
|
|
+ window.getLastWindow(getContext()).then((data) => {
|
|
|
+ //获取窗口对象
|
|
|
+ let windowClass = data;
|
|
|
+ windowClass.minimize((err: BusinessError) => {
|
|
|
+ const errCode: number = err.code;
|
|
|
+ if (errCode) {
|
|
|
+ console.error('Failed to minimize the window. Cause: ' + JSON.stringify(err));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.info('Succeeded in minimizing the window.');
|
|
|
+ });
|
|
|
+ console.info('Succeeded in obtaining the top window. Data: ' + JSON.stringify(data));
|
|
|
+ });
|
|
|
+ return true;
|
|
|
})
|
|
|
|
|
|
Row().height('2.8%')
|