From b1fe367bfd4d7b58be0ab3ce1b4b5ca4817a3081 Mon Sep 17 00:00:00 2001 From: lld <15027638633@163.com> Date: Sun, 28 Dec 2025 23:59:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B8=85=E9=99=A4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/demo/index.vue | 58 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/pages/demo/index.vue b/pages/demo/index.vue index c699eb5..599bcf6 100644 --- a/pages/demo/index.vue +++ b/pages/demo/index.vue @@ -128,12 +128,27 @@ - 消息日志 + + 消息日志 + + + + + 暂无消息日志 + { + if (res.confirm) { + this.messageLogs = [] + uni.showToast({ + title: '日志已清空', + icon: 'success', + duration: 1500 + }) + } + } + }) + }, + // 添加日志 addLog(type, topic, message) { const time = new Date().toLocaleTimeString() @@ -443,6 +476,14 @@ export default { margin-bottom: 15px; } +/* 日志区域标题容器 - 包含标题和清空按钮 */ +.section-title-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; +} + .section-title { font-size: 16px; font-weight: bold; @@ -452,6 +493,13 @@ export default { padding-bottom: 8px; } +/* 清空日志按钮样式 */ +.clear-log-btn { + height: 30px; + line-height: 30px; + padding: 0 10px; +} + .form-item { display: flex; flex-direction: column; @@ -561,6 +609,14 @@ export default { padding: 10px; } +/* 空日志提示 */ +.empty-log-tip { + text-align: center; + color: #999; + padding: 20px 0; + font-size: 14px; +} + .log-item { padding: 8px; border-bottom: 1px solid #eee;