mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-12-30 02:53:33 +00:00
"modifile wifi/test/wifi_testapp/entry/src/main/ets/MainAbility/candidateWifiModel/viewmodel/MainPageModel.ets 将应用提升至api10,增加网页时延测试页面"
Signed-off-by: shitijun <shitijun@kaihong.com>
This commit is contained in:
parent
c09314b590
commit
8990d8e72a
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License,Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
import promptAction from '@ohos.promptAction';
|
||||
import DataModel from './DataModel';
|
||||
import getCurrentTime from '../common/utils/DateUtil';
|
||||
import TaskItemBean from '../common/bean/TaskItemBean';
|
||||
import { CommonConstants } from '../common/constant/CommonConstant';
|
||||
|
||||
/**
|
||||
* Save the progress value and update time after you click OK in the dialog box.
|
||||
*
|
||||
* @param context context from view.
|
||||
* @param value Latest Progress Value.
|
||||
*/
|
||||
export function saveTask(wifiCandidateConfig: Object) {
|
||||
if (wifiCandidateConfig.ssid === '') {
|
||||
promptAction.showToast({
|
||||
message: $r('app.string.cannot_input_empty'),
|
||||
duration: CommonConstants.TOAST_TIME,
|
||||
bottom: CommonConstants.TOAST_MARGIN_BOTTOM
|
||||
});
|
||||
return;
|
||||
}
|
||||
DataModel.addData(new TaskItemBean(wifiCandidateConfig.ssid, 0, getCurrentTime()));
|
||||
this.targetData = DataModel.getData();
|
||||
this.overAllProgressChanged = !this.overAllProgressChanged;
|
||||
this.dialogController.close();
|
||||
}
|
Loading…
Reference in New Issue
Block a user