From b186ffd3dbc508c18dad4780b2aa60536e839055 Mon Sep 17 00:00:00 2001 From: surenjun Date: Mon, 7 Apr 2025 16:18:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:showToast=E6=96=B9=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/common/utils/TcpClient.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/common/utils/TcpClient.ts b/entry/src/main/ets/common/utils/TcpClient.ts index 61889fa8..7fcb893c 100644 --- a/entry/src/main/ets/common/utils/TcpClient.ts +++ b/entry/src/main/ets/common/utils/TcpClient.ts @@ -1,10 +1,9 @@ import socket from '@ohos.net.socket'; import hilog from '@ohos.hilog'; import { getTCP } from './GlobalTcp'; -import prompt from '@ohos.prompt'; import FileUtil from './File'; import { dateFormat } from './tools'; - +import Prompt from '@system.prompt'; const TAG = 'socketTag[TcpDemo.TcpClient]' export default class TcpClient { @@ -187,7 +186,7 @@ export default class TcpClient { if (globalThis.tcpUdpError) { console.log(TAG,'tcp信号丢失') // getTCP() - prompt.showToast({ + Prompt.showToast({ message: 'tcp信号丢失', duration: 2000 });