From ebf247f6b13c9ae1735a7467b8dd9105b5ded13e Mon Sep 17 00:00:00 2001 From: chengjm <3497346788@qq.com> Date: Mon, 4 Nov 2024 11:41:26 +0800 Subject: [PATCH] docs(@vben/docs): add public static resources path documentation (#4788) --- docs/src/en/guide/essentials/development.md | 6 ++++++ docs/src/guide/essentials/development.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/src/en/guide/essentials/development.md b/docs/src/en/guide/essentials/development.md index 287c0a96158..da7cfd8cee2 100644 --- a/docs/src/en/guide/essentials/development.md +++ b/docs/src/en/guide/essentials/development.md @@ -150,6 +150,12 @@ To run the `docs` application: pnpm dev:docs ``` +## Public Static Resources + +If you need to use public static resources in the project, such as images, static HTML, etc., and you want to directly import them in the development process through `src="/xxx.png"`. + +You need to put the resource in the corresponding project's `public/static` directory. The import path for the resource should be `src="/static/xxx.png"`. + ## DevTools The project has a built-in [Vue DevTools](https://github.com/vuejs/devtools-next) plugin, which can be used during development. It is disabled by default, but can be enabled in the `.env.development` file. After enabling it, restart the project: diff --git a/docs/src/guide/essentials/development.md b/docs/src/guide/essentials/development.md index 7e64564f20b..556e4c9dd99 100644 --- a/docs/src/guide/essentials/development.md +++ b/docs/src/guide/essentials/development.md @@ -150,6 +150,12 @@ pnpm dev:ele pnpm dev:docs ``` +## 公共静态资源 + +项目中需要使用到的公共静态资源,如:图片、静态HTML等,需要在开发中通过 `src="/xxx.png"` 直接引入的。 + +需要将资源放在对应项目的 `public/static` 目录下。引入的路径为:`src="/static/xxx.png"`。 + ## DevTools 项目内置了 [Vue DevTools](https://github.com/vuejs/devtools-next) 插件,可以在开发过程中使用。默认关闭,可在`.env.development` 内开启,并重新运行项目即可: