From a4d2550fefe77c64e179ebd22d212827b5fa5217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=91=B8=E9=B1=BC=E5=8E=BB?= <1780903673@qq.com> Date: Sat, 27 Sep 2025 19:17:51 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B3=E4=BA=8E=E5=85=A8=E5=B1=80=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E5=92=8C=E6=9C=80=E4=BD=B3=E5=AE=9E=E8=B7=B5?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E7=9A=84=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/message-box.md | 4 ++++ docs/component/toast.md | 2 ++ docs/en-US/component/message-box.md | 4 ++++ docs/en-US/component/toast.md | 6 ++++++ docs/en-US/guide/common-problems.md | 12 +++++++++++- docs/guide/common-problems.md | 6 ++++++ 6 files changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/component/message-box.md b/docs/component/message-box.md index 9ca6b8fd..fb8242d7 100644 --- a/docs/component/message-box.md +++ b/docs/component/message-box.md @@ -2,6 +2,10 @@ 弹出对话框,常用于消息提示、消息确认等,支持函数调用。 +:::tip 提示 +全局调用方案见 [wot-starter](https://starter.wot-ui.cn/guide/feedback.html),支持在路由导航守卫和网络请求拦截器等场景使用的可全局调用的反馈组件。 +::: + ## Alert 弹框 alert 弹框只有确定按钮,用于强提醒。 diff --git a/docs/component/toast.md b/docs/component/toast.md index d22133d7..3f45c8f2 100644 --- a/docs/component/toast.md +++ b/docs/component/toast.md @@ -4,6 +4,8 @@ :::tip 提示 `Toast` 自 1.7.0 版本起支持通过 `props` 属性控制组件样式,字段见[props](#props),需要注意的是函数式调用api的`options`优先级高于`props`。 + +全局调用方案见 [wot-starter](https://starter.wot-ui.cn/guide/feedback.html),支持在路由导航守卫和网络请求拦截器等场景使用的可全局调用的反馈组件。 ::: ## 基本用法 diff --git a/docs/en-US/component/message-box.md b/docs/en-US/component/message-box.md index a791d8b5..223f339e 100644 --- a/docs/en-US/component/message-box.md +++ b/docs/en-US/component/message-box.md @@ -2,6 +2,10 @@ A dialog box that pops up, commonly used for message prompts, message confirmation, etc., supports function calls. +:::tip Note +For global calling solutions, see [wot-starter](https://starter.wot-ui.cn/guide/feedback.html), which supports globally callable feedback components for use in scenarios like route navigation guards and network request interceptors. +::: + ## Alert Dialog Alert dialog only has a confirm button, used for strong reminders. diff --git a/docs/en-US/component/toast.md b/docs/en-US/component/toast.md index 796f3337..d5ca9f16 100644 --- a/docs/en-US/component/toast.md +++ b/docs/en-US/component/toast.md @@ -2,6 +2,12 @@ A lightweight feedback component that appears in the middle of the page. +:::tip Note +`Toast` supports controlling component styles through the `props` attribute since version 1.7.0. See [props](#props) for fields. Note that the `options` priority of functional call API is higher than `props`. + +For global calling solutions, see [wot-starter](https://starter.wot-ui.cn/guide/feedback.html), which supports globally callable feedback components for use in scenarios like route navigation guards and network request interceptors. +::: + ## Basic Usage The Toast component is a functional component that can be used by calling the `$toast` method on the current instance. diff --git a/docs/en-US/guide/common-problems.md b/docs/en-US/guide/common-problems.md index c4eacbb0..c9f4f26f 100644 --- a/docs/en-US/guide/common-problems.md +++ b/docs/en-US/guide/common-problems.md @@ -6,6 +6,9 @@ This section introduces some **common problems** encountered during development Currently supports WeChat Mini Program, Alipay Mini Program, DingTalk Mini Program, H5, APP, and other platforms. +## Are there any best practice sharing? +Yes, you can follow my WeChat public account "不如摸鱼去", or visit my blog [不如摸鱼去](https://blog.wot-ui.cn/), sharing countless dry goods, waiting for you to see. + ## Does the component library provide components that can be imported individually? Currently, no. First, the plugin market lacks CI/CD tools, making automated publishing impossible. Maintaining a set of individually importable components is time and effort-consuming. Secondly, the installation methods provided by the component library can already achieve on-demand importing, so there's no need to provide individually importable components. @@ -197,4 +200,11 @@ First, check if the usage is correct. The `uni-app` platform doesn't support glo ``` -The functional calls of `Message` and `Toast` are implemented based on `provide/inject`, so your calls must be made within `setup`. \ No newline at end of file +The functional calls of `Message` and `Toast` are implemented based on `provide/inject`, so your calls must be made within `setup`. + +## Why are multiple messageBoxes popping up? +Check if the page with multiple `messageBox` popups has multiple `` tags with the same `selector` or no `selector` (including components used in the current page). The same applies to `toast`. When using components like `messageBox` in child components, you need to specify a `selector` and ensure the `selector` is unique. + +## How to call Toast, Message, Loading globally? + +For global calling solutions, see [wot-starter](https://starter.wot-ui.cn/guide/feedback.html), which supports globally callable feedback components for use in scenarios like route navigation guards and network request interceptors. \ No newline at end of file diff --git a/docs/guide/common-problems.md b/docs/guide/common-problems.md index 6fd9715f..9f3e731d 100644 --- a/docs/guide/common-problems.md +++ b/docs/guide/common-problems.md @@ -6,6 +6,9 @@ 目前支持 微信小程序、支付宝小程序、钉钉小程序、H5、APP 等平台。 +## 有没有最佳实践分享? +有,可以关注我的公众号「不如摸鱼去」,也可以访问我的博客[不如摸鱼去](https://blog.wot-ui.cn/),分享无数干货,等你来看。 + ## 组件库有没有提供可以单独引入的组件? 目前是没有的,首先在插件市场缺少`CI/CD`工具,无法实现自动化发布,维护一套单独引入的组件费时费力,其次组件库提供的安装方式均可以实现按需引入,所以是无需提供单独引入的组件的。 @@ -313,6 +316,9 @@ function handleOpened() { ## 为何messageBox弹出了多个? 检查一下弹出多个`messageBox`的页面是否存在多个相同`selector`或无`selector`的``标签(当前页面包括页面中使用的组件)。`toast`亦是同理,在子组件中使用`messageBox`等组件需要指定`selector`并确保`selector`唯一。 +## Toast、Message、Loading 等如何全局调用? + +全局调用方案见 [wot-starter](https://starter.wot-ui.cn/guide/feedback.html),支持在路由导航守卫和网络请求拦截器等场景使用的可全局调用的反馈组件。 ## 如何快速解决你的问题?