mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
Deploying to gh-pages from @ WeBankFinTech/fes.js@6769721d41 🚀
This commit is contained in:
parent
911ff2baeb
commit
db3ec30ce6
@ -1 +1 @@
|
|||||||
import{_ as e,o as c,c as t}from"./app.1fff394b.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};
|
import{_ as e,o as c,c as t}from"./app.005e0daf.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as c,o,c as l,b as s,d as a,a as e,f as n}from"./app.1fff394b.js";const i={},u=n(`<h1 id="fesjs-plugin-access" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-access" aria-hidden="true">#</a> @fesjs/plugin-access</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>对于前端应用来说,权限就是页面、页面元素是否可见。</p><h3 id="资源" tabindex="-1"><a class="header-anchor" href="#资源" aria-hidden="true">#</a> 资源</h3><p>Fes.js 把页面、页面元素统一叫做资源,用资源 ID 来识别区分他们:</p><ul><li>页面的资源 ID 默认是页面的路由 <code>path</code> 。比如页面 <code>pages/a.vue</code> 的路由 <code>path</code> 是 <code>/a</code>。当页面访问 <code>/a</code> 时会渲染当前页面,<code>/a</code> 也就是页面的 <code>accessId</code>。</li><li>页面元素的资源 ID 没有默认值,需要自定义。</li></ul><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
import{_ as p,r as c,o,c as l,b as s,d as a,a as e,f as n}from"./app.005e0daf.js";const i={},u=n(`<h1 id="fesjs-plugin-access" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-access" aria-hidden="true">#</a> @fesjs/plugin-access</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>对于前端应用来说,权限就是页面、页面元素是否可见。</p><h3 id="资源" tabindex="-1"><a class="header-anchor" href="#资源" aria-hidden="true">#</a> 资源</h3><p>Fes.js 把页面、页面元素统一叫做资源,用资源 ID 来识别区分他们:</p><ul><li>页面的资源 ID 默认是页面的路由 <code>path</code> 。比如页面 <code>pages/a.vue</code> 的路由 <code>path</code> 是 <code>/a</code>。当页面访问 <code>/a</code> 时会渲染当前页面,<code>/a</code> 也就是页面的 <code>accessId</code>。</li><li>页面元素的资源 ID 没有默认值,需要自定义。</li></ul><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>access</span> <span class="token attr-name">:id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>accessId<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> accessOnepicess1 <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>access</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>access</span> <span class="token attr-name">:id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>accessId<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> accessOnepicess1 <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>access</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">v-access</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>accessId<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>accessOnepicess2<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">v-access</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>accessId<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>accessOnepicess2<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-2fe128e7","path":"/reference/plugin/plugins/access.html","title":"@fesjs/plugin-access","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[{"level":3,"title":"资源","slug":"资源","link":"#资源","children":[]},{"level":3,"title":"匹配规则","slug":"匹配规则","link":"#匹配规则","children":[]},{"level":3,"title":"角色","slug":"角色","link":"#角色","children":[]}]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"roles","slug":"roles","link":"#roles","children":[]}]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[{"level":3,"title":"unAccessHandler","slug":"unaccesshandler","link":"#unaccesshandler","children":[]},{"level":3,"title":"noFoundHandler","slug":"nofoundhandler","link":"#nofoundhandler","children":[]},{"level":3,"title":"ignoreAccess","slug":"ignoreaccess","link":"#ignoreaccess","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"access","slug":"access","link":"#access","children":[]},{"level":3,"title":"useAccess","slug":"useaccess","link":"#useaccess","children":[]},{"level":3,"title":"v-access","slug":"v-access","link":"#v-access","children":[]},{"level":3,"title":"组件 Access","slug":"组件-access","link":"#组件-access","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/access.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-2fe128e7","path":"/reference/plugin/plugins/access.html","title":"@fesjs/plugin-access","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[{"level":3,"title":"资源","slug":"资源","link":"#资源","children":[]},{"level":3,"title":"匹配规则","slug":"匹配规则","link":"#匹配规则","children":[]},{"level":3,"title":"角色","slug":"角色","link":"#角色","children":[]}]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"roles","slug":"roles","link":"#roles","children":[]}]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[{"level":3,"title":"unAccessHandler","slug":"unaccesshandler","link":"#unaccesshandler","children":[]},{"level":3,"title":"noFoundHandler","slug":"nofoundhandler","link":"#nofoundhandler","children":[]},{"level":3,"title":"ignoreAccess","slug":"ignoreaccess","link":"#ignoreaccess","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"access","slug":"access","link":"#access","children":[]},{"level":3,"title":"useAccess","slug":"useaccess","link":"#useaccess","children":[]},{"level":3,"title":"v-access","slug":"v-access","link":"#v-access","children":[]},{"level":3,"title":"组件 Access","slug":"组件-access","link":"#组件-access","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/access.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,r as i,o,c,b as n,d as a,a as p,f as t}from"./app.1fff394b.js";const l={},u=t(`<h1 id="插件-api" tabindex="-1"><a class="header-anchor" href="#插件-api" aria-hidden="true">#</a> 插件 API</h1><h2 id="属性" tabindex="-1"><a class="header-anchor" href="#属性" aria-hidden="true">#</a> 属性</h2><h3 id="api-paths" tabindex="-1"><a class="header-anchor" href="#api-paths" aria-hidden="true">#</a> api.paths</h3><p>一些关键的路径:</p><ul><li>cwd,执行命令的绝对路径</li><li>absNodeModulesPath,nodeModule 的绝对路径</li><li>absOutputPath,输出 <code>build</code> 产物的绝对路径</li><li>absSrcPath,<code>src</code> 目录的绝对路径</li><li>absPagesPath,<code>pages</code>目录的绝对路径</li><li>absTmpPath,<code>.fes</code>临时文件目录的绝对路径</li></ul><h3 id="api-cwd" tabindex="-1"><a class="header-anchor" href="#api-cwd" aria-hidden="true">#</a> api.cwd</h3><p>执行命令的绝对路径</p><h3 id="api-pkg" tabindex="-1"><a class="header-anchor" href="#api-pkg" aria-hidden="true">#</a> api.pkg</h3><p><code>package.json</code>的内容</p><h3 id="api-configinstance" tabindex="-1"><a class="header-anchor" href="#api-configinstance" aria-hidden="true">#</a> api.configInstance</h3><p><code>config</code>实例</p><h3 id="userconfig" tabindex="-1"><a class="header-anchor" href="#userconfig" aria-hidden="true">#</a> userConfig</h3><p>用户配置</p><h3 id="config" tabindex="-1"><a class="header-anchor" href="#config" aria-hidden="true">#</a> config</h3><p>插件配置可被修改,此为最终的配置</p><h3 id="env" tabindex="-1"><a class="header-anchor" href="#env" aria-hidden="true">#</a> env</h3><p>p<wbr>rocess.env</p><h3 id="args" tabindex="-1"><a class="header-anchor" href="#args" aria-hidden="true">#</a> args</h3><p>环境变量</p><h2 id="核心方法" tabindex="-1"><a class="header-anchor" href="#核心方法" aria-hidden="true">#</a> 核心方法</h2><h3 id="describe" tabindex="-1"><a class="header-anchor" href="#describe" aria-hidden="true">#</a> describe</h3><p>注册阶段执行,用于描述插件或插件集的 id、key、配置信息、启用方式等。</p><p>用法:<strong>describe({ id?: string, key?: string, config?: { default, schema, onChange } }, enableBy?)</strong></p><p>例如:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>api<span class="token punctuation">.</span><span class="token function">describe</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
import{_ as e,r as i,o,c,b as n,d as a,a as p,f as t}from"./app.005e0daf.js";const l={},u=t(`<h1 id="插件-api" tabindex="-1"><a class="header-anchor" href="#插件-api" aria-hidden="true">#</a> 插件 API</h1><h2 id="属性" tabindex="-1"><a class="header-anchor" href="#属性" aria-hidden="true">#</a> 属性</h2><h3 id="api-paths" tabindex="-1"><a class="header-anchor" href="#api-paths" aria-hidden="true">#</a> api.paths</h3><p>一些关键的路径:</p><ul><li>cwd,执行命令的绝对路径</li><li>absNodeModulesPath,nodeModule 的绝对路径</li><li>absOutputPath,输出 <code>build</code> 产物的绝对路径</li><li>absSrcPath,<code>src</code> 目录的绝对路径</li><li>absPagesPath,<code>pages</code>目录的绝对路径</li><li>absTmpPath,<code>.fes</code>临时文件目录的绝对路径</li></ul><h3 id="api-cwd" tabindex="-1"><a class="header-anchor" href="#api-cwd" aria-hidden="true">#</a> api.cwd</h3><p>执行命令的绝对路径</p><h3 id="api-pkg" tabindex="-1"><a class="header-anchor" href="#api-pkg" aria-hidden="true">#</a> api.pkg</h3><p><code>package.json</code>的内容</p><h3 id="api-configinstance" tabindex="-1"><a class="header-anchor" href="#api-configinstance" aria-hidden="true">#</a> api.configInstance</h3><p><code>config</code>实例</p><h3 id="userconfig" tabindex="-1"><a class="header-anchor" href="#userconfig" aria-hidden="true">#</a> userConfig</h3><p>用户配置</p><h3 id="config" tabindex="-1"><a class="header-anchor" href="#config" aria-hidden="true">#</a> config</h3><p>插件配置可被修改,此为最终的配置</p><h3 id="env" tabindex="-1"><a class="header-anchor" href="#env" aria-hidden="true">#</a> env</h3><p>p<wbr>rocess.env</p><h3 id="args" tabindex="-1"><a class="header-anchor" href="#args" aria-hidden="true">#</a> args</h3><p>环境变量</p><h2 id="核心方法" tabindex="-1"><a class="header-anchor" href="#核心方法" aria-hidden="true">#</a> 核心方法</h2><h3 id="describe" tabindex="-1"><a class="header-anchor" href="#describe" aria-hidden="true">#</a> describe</h3><p>注册阶段执行,用于描述插件或插件集的 id、key、配置信息、启用方式等。</p><p>用法:<strong>describe({ id?: string, key?: string, config?: { default, schema, onChange } }, enableBy?)</strong></p><p>例如:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>api<span class="token punctuation">.</span><span class="token function">describe</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'esbuild'</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'esbuild'</span><span class="token punctuation">,</span>
|
||||||
<span class="token literal-property property">config</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token literal-property property">config</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token function">schema</span><span class="token punctuation">(</span><span class="token parameter">joi</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
<span class="token function">schema</span><span class="token punctuation">(</span><span class="token parameter">joi</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
1
assets/api.html.20695f57.js
Normal file
1
assets/api.html.20695f57.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
const e=JSON.parse('{"key":"v-a1a49808","path":"/reference/api.html","title":"API","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/api.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
import{_ as a,o as t,c,b as e,d as o}from"./app.1fff394b.js";const r={},s=e("h1",{id:"api",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#api","aria-hidden":"true"},"#"),o(" API")],-1),n=[s];function _(i,d){return t(),c("div",null,n)}const l=a(r,[["render",_],["__file","api.html.vue"]]);export{l as default};
|
import{_ as a,o as t,c,b as e,d as o}from"./app.005e0daf.js";const r={},s=e("h1",{id:"api",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#api","aria-hidden":"true"},"#"),o(" API")],-1),n=[s];function _(i,d){return t(),c("div",null,n)}const l=a(r,[["render",_],["__file","api.html.vue"]]);export{l as default};
|
@ -1 +0,0 @@
|
|||||||
const e=JSON.parse('{"key":"v-a1a49808","path":"/reference/api.html","title":"API","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/api.md"}');export{e as data};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
import{_ as n,r as i,o as c,c as o,b as e,d as t,a as r,f as s}from"./app.1fff394b.js";const l={},h=s('<h1 id="支持-vite-和-webpack-双构建" tabindex="-1"><a class="header-anchor" href="#支持-vite-和-webpack-双构建" aria-hidden="true">#</a> 支持 Vite 和 Webpack 双构建</h1><p><code>Fes.js@3.0.x</code> 版本支持 Vite 和 Webpack 两种构建方式,不再内置构建方式,需要开发者自行选择:</p><ul><li>选用 Vite 构建,安装 <code>npm i @fesjs/builder-vite</code> 依赖即可。</li><li>选用 Webpack 构建,安装 <code>npm i @fesjs/builder-webpack</code> 依赖即可。</li></ul><h2 id="使用差异" tabindex="-1"><a class="header-anchor" href="#使用差异" aria-hidden="true">#</a> 使用差异</h2><p>由于 Fes.js 在 Vite 和 Webpack 上做了一层封装,开发者关心的构建配置不会太多。从使用上来说,主要存在以下几个差异点:</p><h3 id="配置" tabindex="-1"><a class="header-anchor" href="#配置" aria-hidden="true">#</a> 配置</h3><p>Webpack 和 Vite 构建在配置方面有一些差异,具体可以查看<a href="../reference/config">配置</a>。</p><h3 id="静态文件处理" tabindex="-1"><a class="header-anchor" href="#静态文件处理" aria-hidden="true">#</a> 静态文件处理</h3>',8),d=e("code",null,"require",-1),p={href:"https://cn.vitejs.dev/guide/assets.html",target:"_blank",rel:"noopener noreferrer"},u=e("h3",{id:"html-模版",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#html-模版","aria-hidden":"true"},"#"),t(" html 模版")],-1),_={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},b={href:"https://github.com/vbenjs/vite-plugin-html",target:"_blank",rel:"noopener noreferrer"},m=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"提示"),e("p",null,[t("fes3.0+ html 模版文件从 "),e("code",null,"public/index.html"),t(" 挪到项目根目录。")])],-1);function f(k,x){const a=i("ExternalLinkIcon");return c(),o("div",null,[h,e("p",null,[t("由于 Vite 的限制,不支持 "),d,t(" 语法,具体 Vite 的用法可以查看"),e("a",p,[t("官网"),r(a)])]),u,e("p",null,[t("html 模版比较常规的需求,例如模版变量,Webpack 和 Vite 之间没什么差异。如果有其他特殊的需求, Webpack 可以使用 "),e("a",_,[t("html-webpack-plugin"),r(a)]),t(",Vite 使用"),e("a",b,[t("vite-plugin-html"),r(a)]),t(" 进行个性化配置。")]),m])}const v=n(l,[["render",f],["__file","builder.html.vue"]]);export{v as default};
|
import{_ as n,r as i,o as c,c as o,b as e,d as t,a as r,f as s}from"./app.005e0daf.js";const l={},h=s('<h1 id="支持-vite-和-webpack-双构建" tabindex="-1"><a class="header-anchor" href="#支持-vite-和-webpack-双构建" aria-hidden="true">#</a> 支持 Vite 和 Webpack 双构建</h1><p><code>Fes.js@3.0.x</code> 版本支持 Vite 和 Webpack 两种构建方式,不再内置构建方式,需要开发者自行选择:</p><ul><li>选用 Vite 构建,安装 <code>npm i @fesjs/builder-vite</code> 依赖即可。</li><li>选用 Webpack 构建,安装 <code>npm i @fesjs/builder-webpack</code> 依赖即可。</li></ul><h2 id="使用差异" tabindex="-1"><a class="header-anchor" href="#使用差异" aria-hidden="true">#</a> 使用差异</h2><p>由于 Fes.js 在 Vite 和 Webpack 上做了一层封装,开发者关心的构建配置不会太多。从使用上来说,主要存在以下几个差异点:</p><h3 id="配置" tabindex="-1"><a class="header-anchor" href="#配置" aria-hidden="true">#</a> 配置</h3><p>Webpack 和 Vite 构建在配置方面有一些差异,具体可以查看<a href="../reference/config">配置</a>。</p><h3 id="静态文件处理" tabindex="-1"><a class="header-anchor" href="#静态文件处理" aria-hidden="true">#</a> 静态文件处理</h3>',8),d=e("code",null,"require",-1),p={href:"https://cn.vitejs.dev/guide/assets.html",target:"_blank",rel:"noopener noreferrer"},u=e("h3",{id:"html-模版",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#html-模版","aria-hidden":"true"},"#"),t(" html 模版")],-1),_={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},b={href:"https://github.com/vbenjs/vite-plugin-html",target:"_blank",rel:"noopener noreferrer"},m=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"提示"),e("p",null,[t("fes3.0+ html 模版文件从 "),e("code",null,"public/index.html"),t(" 挪到项目根目录。")])],-1);function f(k,x){const a=i("ExternalLinkIcon");return c(),o("div",null,[h,e("p",null,[t("由于 Vite 的限制,不支持 "),d,t(" 语法,具体 Vite 的用法可以查看"),e("a",p,[t("官网"),r(a)])]),u,e("p",null,[t("html 模版比较常规的需求,例如模版变量,Webpack 和 Vite 之间没什么差异。如果有其他特殊的需求, Webpack 可以使用 "),e("a",_,[t("html-webpack-plugin"),r(a)]),t(",Vite 使用"),e("a",b,[t("vite-plugin-html"),r(a)]),t(" 进行个性化配置。")]),m])}const v=n(l,[["render",f],["__file","builder.html.vue"]]);export{v as default};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-0cca110a","path":"/guide/builder.html","title":"支持 Vite 和 Webpack 双构建","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"使用差异","slug":"使用差异","link":"#使用差异","children":[{"level":3,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":3,"title":"静态文件处理","slug":"静态文件处理","link":"#静态文件处理","children":[]},{"level":3,"title":"html 模版","slug":"html-模版","link":"#html-模版","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/builder.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-0cca110a","path":"/guide/builder.html","title":"支持 Vite 和 Webpack 双构建","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"使用差异","slug":"使用差异","link":"#使用差异","children":[{"level":3,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":3,"title":"静态文件处理","slug":"静态文件处理","link":"#静态文件处理","children":[]},{"level":3,"title":"html 模版","slug":"html-模版","link":"#html-模版","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/builder.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as r,r as t,o as p,c as o,b as a,d as e,a as s,w as c,f as i}from"./app.1fff394b.js";const d={},u=a("h1",{id:"命令行接口",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#命令行接口","aria-hidden":"true"},"#"),e(" 命令行接口")],-1),v={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},m={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},b=i(`<p>执行 <code>vuepress --help</code> 来获取下列帮助信息:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>Usage:
|
import{_ as r,r as t,o as p,c as o,b as a,d as e,a as s,w as c,f as i}from"./app.005e0daf.js";const d={},u=a("h1",{id:"命令行接口",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#命令行接口","aria-hidden":"true"},"#"),e(" 命令行接口")],-1),v={href:"https://www.npmjs.com/package/@vuepress/cli",target:"_blank",rel:"noopener noreferrer"},m={href:"https://www.npmjs.com/package/vuepress",target:"_blank",rel:"noopener noreferrer"},b=i(`<p>执行 <code>vuepress --help</code> 来获取下列帮助信息:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>Usage:
|
||||||
$ vuepress <span class="token operator"><</span>command<span class="token operator">></span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span>
|
$ vuepress <span class="token operator"><</span>command<span class="token operator">></span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span>
|
||||||
|
|
||||||
Commands:
|
Commands:
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-a951be94","path":"/reference/cli.html","title":"命令行接口","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"dev","slug":"dev","link":"#dev","children":[]},{"level":2,"title":"build","slug":"build","link":"#build","children":[]},{"level":2,"title":"info","slug":"info","link":"#info","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/cli.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-a951be94","path":"/reference/cli.html","title":"命令行接口","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"dev","slug":"dev","link":"#dev","children":[]},{"level":2,"title":"build","slug":"build","link":"#build","children":[]},{"level":2,"title":"info","slug":"info","link":"#info","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/cli.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,f as e}from"./app.1fff394b.js";const p={},t=e(`<h1 id="编译时配置" tabindex="-1"><a class="header-anchor" href="#编译时配置" aria-hidden="true">#</a> 编译时配置</h1><p>Fes.js 约定 <code>.fes.js</code> 文件为项目编译需要编译时配置文件,可以引入 <code>node</code> 端依赖项,不要引入浏览器端依赖项。</p><p>一份常见的配置示例如下(更多配置项请查阅<a href="../reference/config">配置</a>):</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineBuildConfig <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
import{_ as n,o as s,c as a,f as e}from"./app.005e0daf.js";const p={},t=e(`<h1 id="编译时配置" tabindex="-1"><a class="header-anchor" href="#编译时配置" aria-hidden="true">#</a> 编译时配置</h1><p>Fes.js 约定 <code>.fes.js</code> 文件为项目编译需要编译时配置文件,可以引入 <code>node</code> 端依赖项,不要引入浏览器端依赖项。</p><p>一份常见的配置示例如下(更多配置项请查阅<a href="../reference/config">配置</a>):</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineBuildConfig <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
||||||
|
|
||||||
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token function">defineBuildConfig</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token function">defineBuildConfig</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">publicPath</span><span class="token operator">:</span> <span class="token string">'/'</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">publicPath</span><span class="token operator">:</span> <span class="token string">'/'</span><span class="token punctuation">,</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-85fa9b2a","path":"/guide/config.html","title":"编译时配置","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"本地临时配置文件","slug":"本地临时配置文件","link":"#本地临时配置文件","children":[]},{"level":2,"title":"多环境多份配置","slug":"多环境多份配置","link":"#多环境多份配置","children":[]},{"level":2,"title":"优先级","slug":"优先级","link":"#优先级","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/config.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-85fa9b2a","path":"/guide/config.html","title":"编译时配置","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"本地临时配置文件","slug":"本地临时配置文件","link":"#本地临时配置文件","children":[]},{"level":2,"title":"多环境多份配置","slug":"多环境多份配置","link":"#多环境多份配置","children":[]},{"level":2,"title":"优先级","slug":"优先级","link":"#优先级","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/config.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-d7fa887a","path":"/guide/contributing.html","title":"贡献指南","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"包概览","slug":"包概览","link":"#包概览","children":[]},{"level":2,"title":"开发准备","slug":"开发准备","link":"#开发准备","children":[]},{"level":2,"title":"贡献文档","slug":"贡献文档","link":"#贡献文档","children":[]},{"level":2,"title":"贡献源码","slug":"贡献源码","link":"#贡献源码","children":[]},{"level":2,"title":"提交 PR","slug":"提交-pr","link":"#提交-pr","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/contributing.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-d7fa887a","path":"/guide/contributing.html","title":"贡献指南","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"包概览","slug":"包概览","link":"#包概览","children":[]},{"level":2,"title":"开发准备","slug":"开发准备","link":"#开发准备","children":[]},{"level":2,"title":"贡献文档","slug":"贡献文档","link":"#贡献文档","children":[]},{"level":2,"title":"贡献源码","slug":"贡献源码","link":"#贡献源码","children":[]},{"level":2,"title":"提交 PR","slug":"提交-pr","link":"#提交-pr","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/contributing.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as d,r as t,o as i,c as r,b as e,d as a,a as n,f as o}from"./app.1fff394b.js";const c={},l=e("h1",{id:"贡献指南",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#贡献指南","aria-hidden":"true"},"#"),a(" 贡献指南")],-1),p=e("h2",{id:"包概览",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#包概览","aria-hidden":"true"},"#"),a(" 包概览")],-1),h={href:"https://pnpm.io/pnpm-workspace_yaml",target:"_blank",rel:"noopener noreferrer"},u={href:"https://en.wikipedia.org/wiki/Monorepo",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"packages",-1),f=o('<ul><li><p><code>@fesjs/create-fes-app</code>: 创建项目模板模块。提供<code>create-fes-app</code>命令,提供创建多种类型项目模板的能力。</p></li><li><p><code>@fesjs/compiler</code>: 编译时插件管理模块。定义插件的生命周期、插件配置、插件通讯机制等。</p></li><li><p><code>@fesjs/runtime</code>: 运行时插件模块。集成了 vue-router,定义运行时插件生命周期、插件通讯机制。</p></li><li><p><code>@fesjs/preset-build-in</code>: 内置插件集。包含<code>dev</code>、<code>build</code>等命令,集成 webpack5+babel,提供方便编写插件的 API,入口文件处理,路由处理等能力。</p></li><li><p><code>@fesjs/fes-template</code>: 适用于 PC 类型的模板项目。</p></li><li><p><code>@fesjs/fes-template-h5</code>: 适用于 H5 类型的模板项目。</p></li><li><p><code>@fesjs/plugin-${name}</code>: 官方插件。</p></li><li><p><code>@fesjs/fes</code>: 入口模块。提供<code>fes</code>命令和 API 入口,封装<code>@fesjs/compiler</code> + <code>@fesjs/runtime</code> + <code>@fesjs/preset-build-in</code>,用户只需要安装此依赖和其他插件。</p></li></ul><h2 id="开发准备" tabindex="-1"><a class="header-anchor" href="#开发准备" aria-hidden="true">#</a> 开发准备</h2><p>开发要求:</p>',3),b={href:"http://nodejs.org",target:"_blank",rel:"noopener noreferrer"},v={href:"https://pnpm.io/",target:"_blank",rel:"noopener noreferrer"},g=e("p",null,"本项目开发使用的一些主要工具:",-1),_={href:"https://jestjs.io/",target:"_blank",rel:"noopener noreferrer"},k={href:"https://eslint.org/",target:"_blank",rel:"noopener noreferrer"},x={href:"https://prettier.io/",target:"_blank",rel:"noopener noreferrer"},j=o(`<p>克隆仓库:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">git</span> clone https://github.com/WeBankFinTech/fes.js.git
|
import{_ as d,r as t,o as i,c as r,b as e,d as a,a as n,f as o}from"./app.005e0daf.js";const c={},l=e("h1",{id:"贡献指南",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#贡献指南","aria-hidden":"true"},"#"),a(" 贡献指南")],-1),p=e("h2",{id:"包概览",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#包概览","aria-hidden":"true"},"#"),a(" 包概览")],-1),h={href:"https://pnpm.io/pnpm-workspace_yaml",target:"_blank",rel:"noopener noreferrer"},u={href:"https://en.wikipedia.org/wiki/Monorepo",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"packages",-1),f=o('<ul><li><p><code>@fesjs/create-fes-app</code>: 创建项目模板模块。提供<code>create-fes-app</code>命令,提供创建多种类型项目模板的能力。</p></li><li><p><code>@fesjs/compiler</code>: 编译时插件管理模块。定义插件的生命周期、插件配置、插件通讯机制等。</p></li><li><p><code>@fesjs/runtime</code>: 运行时插件模块。集成了 vue-router,定义运行时插件生命周期、插件通讯机制。</p></li><li><p><code>@fesjs/preset-build-in</code>: 内置插件集。包含<code>dev</code>、<code>build</code>等命令,集成 webpack5+babel,提供方便编写插件的 API,入口文件处理,路由处理等能力。</p></li><li><p><code>@fesjs/fes-template</code>: 适用于 PC 类型的模板项目。</p></li><li><p><code>@fesjs/fes-template-h5</code>: 适用于 H5 类型的模板项目。</p></li><li><p><code>@fesjs/plugin-${name}</code>: 官方插件。</p></li><li><p><code>@fesjs/fes</code>: 入口模块。提供<code>fes</code>命令和 API 入口,封装<code>@fesjs/compiler</code> + <code>@fesjs/runtime</code> + <code>@fesjs/preset-build-in</code>,用户只需要安装此依赖和其他插件。</p></li></ul><h2 id="开发准备" tabindex="-1"><a class="header-anchor" href="#开发准备" aria-hidden="true">#</a> 开发准备</h2><p>开发要求:</p>',3),b={href:"http://nodejs.org",target:"_blank",rel:"noopener noreferrer"},v={href:"https://pnpm.io/",target:"_blank",rel:"noopener noreferrer"},g=e("p",null,"本项目开发使用的一些主要工具:",-1),_={href:"https://jestjs.io/",target:"_blank",rel:"noopener noreferrer"},k={href:"https://eslint.org/",target:"_blank",rel:"noopener noreferrer"},x={href:"https://prettier.io/",target:"_blank",rel:"noopener noreferrer"},j=o(`<p>克隆仓库:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">git</span> clone https://github.com/WeBankFinTech/fes.js.git
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>进入<code>fes.js</code>目录,安装依赖:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">pnpm</span> i
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>进入<code>fes.js</code>目录,安装依赖:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">pnpm</span> i
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="贡献文档" tabindex="-1"><a class="header-anchor" href="#贡献文档" aria-hidden="true">#</a> 贡献文档</h2>`,5),w=e("code",null,"docs",-1),q={href:"https://v2.vuepress.vuejs.org/zh/",target:"_blank",rel:"noopener noreferrer"},P=o(`<h4 id="第一步-启动服务" tabindex="-1"><a class="header-anchor" href="#第一步-启动服务" aria-hidden="true">#</a> 第一步:启动服务</h4><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">pnpm</span> docs:dev
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="贡献文档" tabindex="-1"><a class="header-anchor" href="#贡献文档" aria-hidden="true">#</a> 贡献文档</h2>`,5),w=e("code",null,"docs",-1),q={href:"https://v2.vuepress.vuejs.org/zh/",target:"_blank",rel:"noopener noreferrer"},P=o(`<h4 id="第一步-启动服务" tabindex="-1"><a class="header-anchor" href="#第一步-启动服务" aria-hidden="true">#</a> 第一步:启动服务</h4><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">pnpm</span> docs:dev
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h4 id="第二步-修改-md-文件" tabindex="-1"><a class="header-anchor" href="#第二步-修改-md-文件" aria-hidden="true">#</a> 第二步:修改 md 文件</h4><p>菜单配置在<code>/docs/.vuepress/configs/sidebar/zh.ts</code>中,可以通过此配置找到对应想修改的文档。</p><p>如果想添加图片,则可以先把图片添加至<code>/docs/.vuepress/public</code>,在代码中使用:</p><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">:src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>$withBase('framework.png')<span class="token punctuation">"</span></span> <span class="token attr-name">alt</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>架构<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h4 id="第二步-修改-md-文件" tabindex="-1"><a class="header-anchor" href="#第二步-修改-md-文件" aria-hidden="true">#</a> 第二步:修改 md 文件</h4><p>菜单配置在<code>/docs/.vuepress/configs/sidebar/zh.ts</code>中,可以通过此配置找到对应想修改的文档。</p><p>如果想添加图片,则可以先把图片添加至<code>/docs/.vuepress/public</code>,在代码中使用:</p><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">:src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>$withBase('framework.png')<span class="token punctuation">"</span></span> <span class="token attr-name">alt</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>架构<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-884fd4bc","path":"/guide/css.html","title":"使用 css","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"全局样式","slug":"全局样式","link":"#全局样式","children":[]},{"level":2,"title":"组件内样式","slug":"组件内样式","link":"#组件内样式","children":[]},{"level":2,"title":"引入第三方样式","slug":"引入第三方样式","link":"#引入第三方样式","children":[]},{"level":2,"title":"CSS Modules","slug":"css-modules","link":"#css-modules","children":[]},{"level":2,"title":"CSS 预处理器","slug":"css-预处理器","link":"#css-预处理器","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/css.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-884fd4bc","path":"/guide/css.html","title":"使用 css","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"全局样式","slug":"全局样式","link":"#全局样式","children":[]},{"level":2,"title":"组件内样式","slug":"组件内样式","link":"#组件内样式","children":[]},{"level":2,"title":"引入第三方样式","slug":"引入第三方样式","link":"#引入第三方样式","children":[]},{"level":2,"title":"CSS Modules","slug":"css-modules","link":"#css-modules","children":[]},{"level":2,"title":"CSS 预处理器","slug":"css-预处理器","link":"#css-预处理器","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/css.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,r as c,o,c as d,b as a,d as s,a as i,f as n}from"./app.1fff394b.js";const l={},p=n(`<h1 id="使用-css" tabindex="-1"><a class="header-anchor" href="#使用-css" aria-hidden="true">#</a> 使用 css</h1><div class="custom-container tip"><p class="custom-container-title">提示</p><p>本文档以 css 为示例,把后缀换成 <code>.less</code> 同样适用。</p></div><h2 id="全局样式" tabindex="-1"><a class="header-anchor" href="#全局样式" aria-hidden="true">#</a> 全局样式</h2><p>Fes.js 中约定 <code>src/global.css</code> 为全局样式,如果存在此文件,会被自动引入到入口文件最前面。</p><p>比如用于覆盖样式,</p><div class="language-css line-numbers-mode" data-ext="css"><pre class="language-css"><code><span class="token selector">.layout-content</span> <span class="token punctuation">{</span>
|
import{_ as t,r as c,o,c as d,b as a,d as s,a as i,f as n}from"./app.005e0daf.js";const l={},p=n(`<h1 id="使用-css" tabindex="-1"><a class="header-anchor" href="#使用-css" aria-hidden="true">#</a> 使用 css</h1><div class="custom-container tip"><p class="custom-container-title">提示</p><p>本文档以 css 为示例,把后缀换成 <code>.less</code> 同样适用。</p></div><h2 id="全局样式" tabindex="-1"><a class="header-anchor" href="#全局样式" aria-hidden="true">#</a> 全局样式</h2><p>Fes.js 中约定 <code>src/global.css</code> 为全局样式,如果存在此文件,会被自动引入到入口文件最前面。</p><p>比如用于覆盖样式,</p><div class="language-css line-numbers-mode" data-ext="css"><pre class="language-css"><code><span class="token selector">.layout-content</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">max-width</span><span class="token punctuation">:</span> 1000px<span class="token punctuation">;</span>
|
<span class="token property">max-width</span><span class="token punctuation">:</span> 1000px<span class="token punctuation">;</span>
|
||||||
<span class="token punctuation">}</span>
|
<span class="token punctuation">}</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="组件内样式" tabindex="-1"><a class="header-anchor" href="#组件内样式" aria-hidden="true">#</a> 组件内样式</h2><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css">
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="组件内样式" tabindex="-1"><a class="header-anchor" href="#组件内样式" aria-hidden="true">#</a> 组件内样式</h2><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css">
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,r as t,o,c as p,b as n,d as s,a as c,w as i,f as u}from"./app.1fff394b.js";const l={},r=n("h1",{id:"目录结构",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#目录结构","aria-hidden":"true"},"#"),s(" 目录结构")],-1),d=n("code",null,"约定优于配置",-1),k=u(`<div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>fes-template
|
import{_ as e,r as t,o,c as p,b as n,d as s,a as c,w as i,f as u}from"./app.005e0daf.js";const l={},r=n("h1",{id:"目录结构",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#目录结构","aria-hidden":"true"},"#"),s(" 目录结构")],-1),d=n("code",null,"约定优于配置",-1),k=u(`<div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>fes-template
|
||||||
├── package.json
|
├── package.json
|
||||||
├── tsconfig.json
|
├── tsconfig.json
|
||||||
├── mock.js
|
├── mock.js
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-040800dc","path":"/guide/directory-structure.html","title":"目录结构","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"package.json","slug":"package-json","link":"#package-json","children":[]},{"level":3,"title":"tsconfig.json","slug":"tsconfig-json","link":"#tsconfig-json","children":[]},{"level":3,"title":".fes.js","slug":"fes-js","link":"#fes-js","children":[]},{"level":3,"title":"mock.js","slug":"mock-js","link":"#mock-js","children":[]},{"level":3,"title":".env","slug":"env","link":"#env","children":[]},{"level":3,"title":"dist 目录","slug":"dist-目录","link":"#dist-目录","children":[]},{"level":3,"title":"public 目录","slug":"public-目录","link":"#public-目录","children":[]},{"level":3,"title":"index.html","slug":"index-html","link":"#index-html","children":[]},{"level":3,"title":"src 目录","slug":"src-目录","link":"#src-目录","children":[]},{"level":3,"title":".fes 目录","slug":"fes-目录","link":"#fes-目录","children":[]},{"level":3,"title":"pages 目录","slug":"pages-目录","link":"#pages-目录","children":[]},{"level":3,"title":"app.js","slug":"app-js","link":"#app-js","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/directory-structure.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-040800dc","path":"/guide/directory-structure.html","title":"目录结构","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"package.json","slug":"package-json","link":"#package-json","children":[]},{"level":3,"title":"tsconfig.json","slug":"tsconfig-json","link":"#tsconfig-json","children":[]},{"level":3,"title":".fes.js","slug":"fes-js","link":"#fes-js","children":[]},{"level":3,"title":"mock.js","slug":"mock-js","link":"#mock-js","children":[]},{"level":3,"title":".env","slug":"env","link":"#env","children":[]},{"level":3,"title":"dist 目录","slug":"dist-目录","link":"#dist-目录","children":[]},{"level":3,"title":"public 目录","slug":"public-目录","link":"#public-目录","children":[]},{"level":3,"title":"index.html","slug":"index-html","link":"#index-html","children":[]},{"level":3,"title":"src 目录","slug":"src-目录","link":"#src-目录","children":[]},{"level":3,"title":".fes 目录","slug":"fes-目录","link":"#fes-目录","children":[]},{"level":3,"title":"pages 目录","slug":"pages-目录","link":"#pages-目录","children":[]},{"level":3,"title":"app.js","slug":"app-js","link":"#app-js","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/directory-structure.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-323bda7e","path":"/reference/plugin/plugins/editor.html","title":"@fesjs/plugin-monaco-editor","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"filename","slug":"filename","link":"#filename","children":[]},{"level":3,"title":"publicPath","slug":"publicpath","link":"#publicpath","children":[]},{"level":3,"title":"languages","slug":"languages","link":"#languages","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"monaco","slug":"monaco","link":"#monaco","children":[]},{"level":3,"title":"组件 MonacoEditor","slug":"组件-monacoeditor","link":"#组件-monacoeditor","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/editor.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-323bda7e","path":"/reference/plugin/plugins/editor.html","title":"@fesjs/plugin-monaco-editor","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"filename","slug":"filename","link":"#filename","children":[]},{"level":3,"title":"publicPath","slug":"publicpath","link":"#publicpath","children":[]},{"level":3,"title":"languages","slug":"languages","link":"#languages","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"monaco","slug":"monaco","link":"#monaco","children":[]},{"level":3,"title":"组件 MonacoEditor","slug":"组件-monacoeditor","link":"#组件-monacoeditor","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/editor.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as o,r as p,o as c,c as l,b as s,d as n,a as t,f as e}from"./app.1fff394b.js";const i={},r=s("h1",{id:"fesjs-plugin-monaco-editor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-monaco-editor","aria-hidden":"true"},"#"),n(" @fesjs/plugin-monaco-editor")],-1),d=s("h2",{id:"介绍",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),n(" 介绍")],-1),u=s("code",null,"json",-1),k=s("code",null,"javascript",-1),h=s("code",null,"python",-1),v={href:"https://github.com/Microsoft/monaco-editor",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"Monaco Editor",-1),g=s("code",null,"Monaco Editor",-1),b=s("code",null,"1.9.1",-1),f=e(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as o,r as p,o as c,c as l,b as s,d as n,a as t,f as e}from"./app.005e0daf.js";const i={},r=s("h1",{id:"fesjs-plugin-monaco-editor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-monaco-editor","aria-hidden":"true"},"#"),n(" @fesjs/plugin-monaco-editor")],-1),d=s("h2",{id:"介绍",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),n(" 介绍")],-1),u=s("code",null,"json",-1),k=s("code",null,"javascript",-1),h=s("code",null,"python",-1),v={href:"https://github.com/Microsoft/monaco-editor",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"Monaco Editor",-1),g=s("code",null,"Monaco Editor",-1),b=s("code",null,"1.9.1",-1),f=e(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-monaco-editor"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-monaco-editor"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-c253c956","path":"/reference/plugin/plugins/enums.html","title":"@fesjs/plugin-enums","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"静态配置","slug":"静态配置","link":"#静态配置","children":[]},{"level":3,"title":"动态配置","slug":"动态配置","link":"#动态配置","children":[]}]},{"level":2,"title":"场景使用","slug":"场景使用","link":"#场景使用","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"get","slug":"get","link":"#get","children":[]},{"level":3,"title":"push","slug":"push","link":"#push","children":[]},{"level":3,"title":"remove","slug":"remove","link":"#remove","children":[]},{"level":3,"title":"concat","slug":"concat","link":"#concat","children":[]},{"level":3,"title":"convert","slug":"convert","link":"#convert","children":[]},{"level":3,"title":"extend 配置","slug":"extend-配置","link":"#extend-配置","children":[]},{"level":3,"title":"dir 规则","slug":"dir-规则","link":"#dir-规则","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/enums.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-c253c956","path":"/reference/plugin/plugins/enums.html","title":"@fesjs/plugin-enums","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"静态配置","slug":"静态配置","link":"#静态配置","children":[]},{"level":3,"title":"动态配置","slug":"动态配置","link":"#动态配置","children":[]}]},{"level":2,"title":"场景使用","slug":"场景使用","link":"#场景使用","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"get","slug":"get","link":"#get","children":[]},{"level":3,"title":"push","slug":"push","link":"#push","children":[]},{"level":3,"title":"remove","slug":"remove","link":"#remove","children":[]},{"level":3,"title":"concat","slug":"concat","link":"#concat","children":[]},{"level":3,"title":"convert","slug":"convert","link":"#convert","children":[]},{"level":3,"title":"extend 配置","slug":"extend-配置","link":"#extend-配置","children":[]},{"level":3,"title":"dir 规则","slug":"dir-规则","link":"#dir-规则","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/enums.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,f as t}from"./app.1fff394b.js";const p={},e=t(`<h1 id="fesjs-plugin-enums" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-enums" aria-hidden="true">#</a> @fesjs/plugin-enums</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>日常业务开发中,有很多场景会使用到枚举值,比如 select-options、table-column。</p><p>该插件提供统一的枚举存取及丰富的函数来处理枚举。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as n,o as s,c as a,f as t}from"./app.005e0daf.js";const p={},e=t(`<h1 id="fesjs-plugin-enums" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-enums" aria-hidden="true">#</a> @fesjs/plugin-enums</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>日常业务开发中,有很多场景会使用到枚举值,比如 select-options、table-column。</p><p>该插件提供统一的枚举存取及丰富的函数来处理枚举。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-enums"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-enums"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-ef8c5e10","path":"/guide/env.html","title":"环境变量","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"配置环境变量","slug":"配置环境变量","link":"#配置环境变量","children":[{"level":3,"title":"命令行添加","slug":"命令行添加","link":"#命令行添加","children":[]},{"level":3,"title":".env 文件配置","slug":"env-文件配置","link":"#env-文件配置","children":[]}]},{"level":2,"title":"编译时配置列表","slug":"编译时配置列表","link":"#编译时配置列表","children":[{"level":3,"title":"FES_ENV","slug":"fes-env","link":"#fes-env","children":[]},{"level":3,"title":"FES_PRESETS","slug":"fes-presets","link":"#fes-presets","children":[]},{"level":3,"title":"FES_PLUGINS","slug":"fes-plugins","link":"#fes-plugins","children":[]},{"level":3,"title":"PORT","slug":"port","link":"#port","children":[]},{"level":3,"title":"HOST","slug":"host","link":"#host","children":[]},{"level":3,"title":"HTTPS","slug":"https","link":"#https","children":[]},{"level":3,"title":"WATCH","slug":"watch","link":"#watch","children":[]},{"level":3,"title":"BABEL_CACHE","slug":"babel-cache","link":"#babel-cache","children":[]},{"level":3,"title":"ANALYZE","slug":"analyze","link":"#analyze","children":[]},{"level":3,"title":"ANALYZE_MODE","slug":"analyze-mode","link":"#analyze-mode","children":[]},{"level":3,"title":"ANALYZE_PORT","slug":"analyze-port","link":"#analyze-port","children":[]},{"level":3,"title":"CLEAR_OUTPUT","slug":"clear-output","link":"#clear-output","children":[]},{"level":3,"title":"RM_TMPDIR","slug":"rm-tmpdir","link":"#rm-tmpdir","children":[]}]},{"level":2,"title":"process.env","slug":"process-env","link":"#process-env","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/env.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-ef8c5e10","path":"/guide/env.html","title":"环境变量","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"配置环境变量","slug":"配置环境变量","link":"#配置环境变量","children":[{"level":3,"title":"命令行添加","slug":"命令行添加","link":"#命令行添加","children":[]},{"level":3,"title":".env 文件配置","slug":"env-文件配置","link":"#env-文件配置","children":[]}]},{"level":2,"title":"编译时配置列表","slug":"编译时配置列表","link":"#编译时配置列表","children":[{"level":3,"title":"FES_ENV","slug":"fes-env","link":"#fes-env","children":[]},{"level":3,"title":"FES_PRESETS","slug":"fes-presets","link":"#fes-presets","children":[]},{"level":3,"title":"FES_PLUGINS","slug":"fes-plugins","link":"#fes-plugins","children":[]},{"level":3,"title":"PORT","slug":"port","link":"#port","children":[]},{"level":3,"title":"HOST","slug":"host","link":"#host","children":[]},{"level":3,"title":"HTTPS","slug":"https","link":"#https","children":[]},{"level":3,"title":"WATCH","slug":"watch","link":"#watch","children":[]},{"level":3,"title":"BABEL_CACHE","slug":"babel-cache","link":"#babel-cache","children":[]},{"level":3,"title":"ANALYZE","slug":"analyze","link":"#analyze","children":[]},{"level":3,"title":"ANALYZE_MODE","slug":"analyze-mode","link":"#analyze-mode","children":[]},{"level":3,"title":"ANALYZE_PORT","slug":"analyze-port","link":"#analyze-port","children":[]},{"level":3,"title":"CLEAR_OUTPUT","slug":"clear-output","link":"#clear-output","children":[]},{"level":3,"title":"RM_TMPDIR","slug":"rm-tmpdir","link":"#rm-tmpdir","children":[]}]},{"level":2,"title":"process.env","slug":"process-env","link":"#process-env","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/env.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as o,r as n,o as l,c as p,b as e,d as a,a as s,w as d,f as r}from"./app.1fff394b.js";const h={},u=r(`<h1 id="环境变量" tabindex="-1"><a class="header-anchor" href="#环境变量" aria-hidden="true">#</a> 环境变量</h1><p>在构建或者代码在端上运行中需要一些跟区分于环境的变量,用于配置构建流程或者运行时过程,这时候我们可以配置环境变量。</p><h2 id="配置环境变量" tabindex="-1"><a class="header-anchor" href="#配置环境变量" aria-hidden="true">#</a> 配置环境变量</h2><h3 id="命令行添加" tabindex="-1"><a class="header-anchor" href="#命令行添加" aria-hidden="true">#</a> 命令行添加</h3><p>比如:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># OS X, Linux</span>
|
import{_ as o,r as n,o as l,c as p,b as e,d as a,a as s,w as d,f as r}from"./app.005e0daf.js";const h={},u=r(`<h1 id="环境变量" tabindex="-1"><a class="header-anchor" href="#环境变量" aria-hidden="true">#</a> 环境变量</h1><p>在构建或者代码在端上运行中需要一些跟区分于环境的变量,用于配置构建流程或者运行时过程,这时候我们可以配置环境变量。</p><h2 id="配置环境变量" tabindex="-1"><a class="header-anchor" href="#配置环境变量" aria-hidden="true">#</a> 配置环境变量</h2><h3 id="命令行添加" tabindex="-1"><a class="header-anchor" href="#命令行添加" aria-hidden="true">#</a> 命令行添加</h3><p>比如:</p><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># OS X, Linux</span>
|
||||||
<span class="token assign-left variable">PORT</span><span class="token operator">=</span><span class="token number">3000</span> fes dev
|
<span class="token assign-left variable">PORT</span><span class="token operator">=</span><span class="token number">3000</span> fes dev
|
||||||
|
|
||||||
<span class="token comment"># Windows (cmd.exe)</span>
|
<span class="token comment"># Windows (cmd.exe)</span>
|
1
assets/faq.html.1e599082.js
Normal file
1
assets/faq.html.1e599082.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
const e=JSON.parse('{"key":"v-37e1c06f","path":"/guide/faq.html","title":"常见问题","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/faq.md"}');export{e as data};
|
@ -1 +0,0 @@
|
|||||||
const e=JSON.parse('{"key":"v-37e1c06f","path":"/guide/faq.html","title":"常见问题","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/faq.md"}');export{e as data};
|
|
@ -1,3 +1,3 @@
|
|||||||
import{_ as e,o as t,c as a,f as o}from"./app.1fff394b.js";const c={},d=o(`<h1 id="常见问题" tabindex="-1"><a class="header-anchor" href="#常见问题" aria-hidden="true">#</a> 常见问题</h1><h4 id="为什么代码提示不生效" tabindex="-1"><a class="header-anchor" href="#为什么代码提示不生效" aria-hidden="true">#</a> 为什么代码提示不生效?</h4><ol><li>需要先运行一次<code>fes dev</code></li><li>检查tsconfig.json,<code>include</code>包含当前编辑文件,<code>compilerOptions.path</code>包含</li></ol><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>"@/*": ["./src/*"],
|
import{_ as e,o as t,c as a,f as o}from"./app.005e0daf.js";const c={},d=o(`<h1 id="常见问题" tabindex="-1"><a class="header-anchor" href="#常见问题" aria-hidden="true">#</a> 常见问题</h1><h4 id="为什么代码提示不生效" tabindex="-1"><a class="header-anchor" href="#为什么代码提示不生效" aria-hidden="true">#</a> 为什么代码提示不生效?</h4><ol><li>需要先运行一次<code>fes dev</code></li><li>检查tsconfig.json,<code>include</code>包含当前编辑文件,<code>compilerOptions.path</code>包含</li></ol><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>"@/*": ["./src/*"],
|
||||||
"@@/*": ["./src/.fes/*"]
|
"@@/*": ["./src/.fes/*"]
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div>`,4),i=[d];function s(n,r){return t(),a("div",null,i)}const u=e(c,[["render",s],["__file","faq.html.vue"]]);export{u as default};
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div>`,4),i=[d];function s(n,r){return t(),a("div",null,i)}const u=e(c,[["render",s],["__file","faq.html.vue"]]);export{u as default};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as o,r as t,o as u,c as m,b as e,d as n,a as s,w as a,f as r}from"./app.1fff394b.js";const p={},h=e("h1",{id:"快速上手",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#快速上手","aria-hidden":"true"},"#"),n(" 快速上手")],-1),b=e("h2",{id:"依赖环境",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#依赖环境","aria-hidden":"true"},"#"),n(" 依赖环境")],-1),v={href:"https://nodejs.org/",target:"_blank",rel:"noopener noreferrer"},_=r(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># 打印 node 版本</span>
|
import{_ as o,r as t,o as u,c as m,b as e,d as n,a as s,w as a,f as r}from"./app.005e0daf.js";const p={},h=e("h1",{id:"快速上手",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#快速上手","aria-hidden":"true"},"#"),n(" 快速上手")],-1),b=e("h2",{id:"依赖环境",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#依赖环境","aria-hidden":"true"},"#"),n(" 依赖环境")],-1),v={href:"https://nodejs.org/",target:"_blank",rel:"noopener noreferrer"},_=r(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># 打印 node 版本</span>
|
||||||
<span class="token function">node</span> <span class="token parameter variable">-v</span>
|
<span class="token function">node</span> <span class="token parameter variable">-v</span>
|
||||||
v12.13.0
|
v12.13.0
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,1),k={href:"https://pnpm.io/installation",target:"_blank",rel:"noopener noreferrer"},g=r(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># 全局安装 pnpm</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,1),k={href:"https://pnpm.io/installation",target:"_blank",rel:"noopener noreferrer"},g=r(`<div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token comment"># 全局安装 pnpm</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-fb0f0066","path":"/guide/getting-started.html","title":"快速上手","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"依赖环境","slug":"依赖环境","link":"#依赖环境","children":[]},{"level":2,"title":"创建项目","slug":"创建项目","link":"#创建项目","children":[]},{"level":2,"title":"启动项目","slug":"启动项目","link":"#启动项目","children":[]},{"level":2,"title":"部署发布","slug":"部署发布","link":"#部署发布","children":[{"level":3,"title":"构建","slug":"构建","link":"#构建","children":[]},{"level":3,"title":"本地验证","slug":"本地验证","link":"#本地验证","children":[]},{"level":3,"title":"部署","slug":"部署","link":"#部署","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/getting-started.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-fb0f0066","path":"/guide/getting-started.html","title":"快速上手","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"依赖环境","slug":"依赖环境","link":"#依赖环境","children":[]},{"level":2,"title":"创建项目","slug":"创建项目","link":"#创建项目","children":[]},{"level":2,"title":"启动项目","slug":"启动项目","link":"#启动项目","children":[]},{"level":2,"title":"部署发布","slug":"部署发布","link":"#部署发布","children":[{"level":3,"title":"构建","slug":"构建","link":"#构建","children":[]},{"level":3,"title":"本地验证","slug":"本地验证","link":"#本地验证","children":[]},{"level":3,"title":"部署","slug":"部署","link":"#部署","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/getting-started.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,o as e,c as n,f as a}from"./app.1fff394b.js";const s={},o=a(`<h1 id="fesjs-plugin-icon" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-icon" aria-hidden="true">#</a> @fesjs/plugin-icon</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>提供以 <code>component</code> 的方式,直接使用 svg icon 的能力。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as t,o as e,c as n,f as a}from"./app.005e0daf.js";const s={},o=a(`<h1 id="fesjs-plugin-icon" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-icon" aria-hidden="true">#</a> @fesjs/plugin-icon</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>提供以 <code>component</code> 的方式,直接使用 svg icon 的能力。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-icon"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-icon"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-0a0e491c","path":"/reference/plugin/plugins/icon.html","title":"@fesjs/plugin-icon","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"属性","slug":"属性","link":"#属性","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/icon.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-0a0e491c","path":"/reference/plugin/plugins/icon.html","title":"@fesjs/plugin-icon","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"属性","slug":"属性","link":"#属性","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/icon.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-528b8b6c","path":"/guide/image.html","title":"使用图片","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"使用图片","slug":"使用图片-1","link":"#使用图片-1","children":[{"level":3,"title":"Vue 里使用图片","slug":"vue-里使用图片","link":"#vue-里使用图片","children":[]},{"level":3,"title":"JS 里使用图片","slug":"js-里使用图片","link":"#js-里使用图片","children":[]},{"level":3,"title":"CSS 里使用图片","slug":"css-里使用图片","link":"#css-里使用图片","children":[]}]},{"level":2,"title":"public 文件夹","slug":"public-文件夹","link":"#public-文件夹","children":[{"level":3,"title":"在 HTML 模板中使用","slug":"在-html-模板中使用","link":"#在-html-模板中使用","children":[]},{"level":3,"title":"在.vue 文件中使用","slug":"在-vue-文件中使用","link":"#在-vue-文件中使用","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/image.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-528b8b6c","path":"/guide/image.html","title":"使用图片","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"使用图片","slug":"使用图片-1","link":"#使用图片-1","children":[{"level":3,"title":"Vue 里使用图片","slug":"vue-里使用图片","link":"#vue-里使用图片","children":[]},{"level":3,"title":"JS 里使用图片","slug":"js-里使用图片","link":"#js-里使用图片","children":[]},{"level":3,"title":"CSS 里使用图片","slug":"css-里使用图片","link":"#css-里使用图片","children":[]}]},{"level":2,"title":"public 文件夹","slug":"public-文件夹","link":"#public-文件夹","children":[{"level":3,"title":"在 HTML 模板中使用","slug":"在-html-模板中使用","link":"#在-html-模板中使用","children":[]},{"level":3,"title":"在.vue 文件中使用","slug":"在-vue-文件中使用","link":"#在-vue-文件中使用","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/image.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as a,o as n,c as s,f as e}from"./app.1fff394b.js";const t={},p=e(`<h1 id="使用图片" tabindex="-1"><a class="header-anchor" href="#使用图片" aria-hidden="true">#</a> 使用图片</h1><h2 id="使用图片-1" tabindex="-1"><a class="header-anchor" href="#使用图片-1" aria-hidden="true">#</a> 使用图片</h2><p>假设在 <code>src/images</code> 目录下有 <code>logo.png</code>。</p><h3 id="vue-里使用图片" tabindex="-1"><a class="header-anchor" href="#vue-里使用图片" aria-hidden="true">#</a> Vue 里使用图片</h3><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
import{_ as a,o as n,c as s,f as e}from"./app.005e0daf.js";const t={},p=e(`<h1 id="使用图片" tabindex="-1"><a class="header-anchor" href="#使用图片" aria-hidden="true">#</a> 使用图片</h1><h2 id="使用图片-1" tabindex="-1"><a class="header-anchor" href="#使用图片-1" aria-hidden="true">#</a> 使用图片</h2><p>假设在 <code>src/images</code> 目录下有 <code>logo.png</code>。</p><h3 id="vue-里使用图片" tabindex="-1"><a class="header-anchor" href="#vue-里使用图片" aria-hidden="true">#</a> Vue 里使用图片</h3><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>@/images/logo.png\`<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>@/images/logo.png\`<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="js-里使用图片" tabindex="-1"><a class="header-anchor" href="#js-里使用图片" aria-hidden="true">#</a> JS 里使用图片</h3><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> imageUrl <span class="token keyword">from</span> <span class="token string">'@/images/logo.png\`'</span><span class="token punctuation">;</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="js-里使用图片" tabindex="-1"><a class="header-anchor" href="#js-里使用图片" aria-hidden="true">#</a> JS 里使用图片</h3><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> imageUrl <span class="token keyword">from</span> <span class="token string">'@/images/logo.png\`'</span><span class="token punctuation">;</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as r,o as d,c as n,e as t,b as e,d as a,f as i}from"./app.1fff394b.js";const l={},h=i('<h1 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h1><h2 id="痛点" tabindex="-1"><a class="header-anchor" href="#痛点" aria-hidden="true">#</a> 痛点</h2><p>在开发一个前端项目之前,我们可能需要做如下准备工作:</p><ul><li>搭建开发环境</li><li>约定代码规范</li><li>封装API请求</li><li>配置路由</li><li>实现布局、菜单、导航</li><li>实现登录</li><li>权限管理</li><li>...</li></ul><p>除了准备工作之外,还会遇到很多相似的业务类型,比如中后台应用大多都是工作台、增删改查、权限、图表等。如果每次项目都完全手动处理一遍,不仅耗费时间,久而久之可能会存在多种技术栈、开发规范,导致开发流程不统一,历史项目越来越难维护。所以我们需要一套完整的解决方案,管理开发到部署整个流程。</p><h2 id="fes-js-是什么" tabindex="-1"><a class="header-anchor" href="#fes-js-是什么" aria-hidden="true">#</a> Fes.js 是什么?</h2><p>Fes.js 是一个好用的前端应用解决方案。Fes.js 以 Vue 3.0 和路由为基础,同时支持配置式路由和约定式路由,并以此进行功能扩展。配以覆盖编译时和运行时生命周期完善的插件体系,支持各种功能扩展和业务需求。</p><p>它主要具备以下特点:</p><ul><li><p>🚀 <strong>快速</strong> ,内置了路由、开发、构建等,并且提供测试、布局、权限、国际化、状态管理、API请求、数据字典、SvgIcon等插件,可以满足大部分日常开发需求。</p></li><li><p>🧨 <strong>简单</strong> ,基于Vue.js 3.0,上手简单。贯彻“约定优于配置”思想,设计插件上尽可能用约定替代配置,同时提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。</p></li><li><p>💪 <strong>健壮</strong> ,只需要关心页面内容,减少写BUG的机会!提供单元测试、覆盖测试能力保障项目质量。</p></li><li><p>📦 <strong>可扩展</strong> ,借鉴Umi实现了完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。</p></li><li><p>📡 <strong>面向未来</strong> ,在满足需求的同时,我们也不会停止对新技术的探索。已使用Vue3.0来提升应用性能,已使用webpack5提升构建性能和实现微服务,未来会探索vite等新技术。</p></li></ul><h2 id="fes-js-如何工作" tabindex="-1"><a class="header-anchor" href="#fes-js-如何工作" aria-hidden="true">#</a> Fes.js 如何工作?</h2><h3 id="架构" tabindex="-1"><a class="header-anchor" href="#架构" aria-hidden="true">#</a> 架构</h3>',11),c=["src"],o=e("p",null,"Fes.js 把大家常用的技术栈封装成一个个插件进行整理,收敛到一起,让大家只用 Fes.js 就可以完成 80% 的日常工作。",-1),u=e("h3",{id:"插件和插件集",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#插件和插件集","aria-hidden":"true"},"#"),a(" 插件和插件集")],-1),p=["src"],f=i(`<h3 id="fes-临时文件" tabindex="-1"><a class="header-anchor" href="#fes-临时文件" aria-hidden="true">#</a> .fes 临时文件</h3><p>.fes 临时目录是整个 Fes.js 项目的发动机,你的入口文件、路由等等都在这里,这些是由 fes 内部插件及三方插件生成的。</p><p>你通常会在 .fes 下看到以下目录</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>+ .fes
|
import{_ as r,o as d,c as n,e as t,b as e,d as a,f as i}from"./app.005e0daf.js";const l={},h=i('<h1 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h1><h2 id="痛点" tabindex="-1"><a class="header-anchor" href="#痛点" aria-hidden="true">#</a> 痛点</h2><p>在开发一个前端项目之前,我们可能需要做如下准备工作:</p><ul><li>搭建开发环境</li><li>约定代码规范</li><li>封装API请求</li><li>配置路由</li><li>实现布局、菜单、导航</li><li>实现登录</li><li>权限管理</li><li>...</li></ul><p>除了准备工作之外,还会遇到很多相似的业务类型,比如中后台应用大多都是工作台、增删改查、权限、图表等。如果每次项目都完全手动处理一遍,不仅耗费时间,久而久之可能会存在多种技术栈、开发规范,导致开发流程不统一,历史项目越来越难维护。所以我们需要一套完整的解决方案,管理开发到部署整个流程。</p><h2 id="fes-js-是什么" tabindex="-1"><a class="header-anchor" href="#fes-js-是什么" aria-hidden="true">#</a> Fes.js 是什么?</h2><p>Fes.js 是一个好用的前端应用解决方案。Fes.js 以 Vue 3.0 和路由为基础,同时支持配置式路由和约定式路由,并以此进行功能扩展。配以覆盖编译时和运行时生命周期完善的插件体系,支持各种功能扩展和业务需求。</p><p>它主要具备以下特点:</p><ul><li><p>🚀 <strong>快速</strong> ,内置了路由、开发、构建等,并且提供测试、布局、权限、国际化、状态管理、API请求、数据字典、SvgIcon等插件,可以满足大部分日常开发需求。</p></li><li><p>🧨 <strong>简单</strong> ,基于Vue.js 3.0,上手简单。贯彻“约定优于配置”思想,设计插件上尽可能用约定替代配置,同时提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。</p></li><li><p>💪 <strong>健壮</strong> ,只需要关心页面内容,减少写BUG的机会!提供单元测试、覆盖测试能力保障项目质量。</p></li><li><p>📦 <strong>可扩展</strong> ,借鉴Umi实现了完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。</p></li><li><p>📡 <strong>面向未来</strong> ,在满足需求的同时,我们也不会停止对新技术的探索。已使用Vue3.0来提升应用性能,已使用webpack5提升构建性能和实现微服务,未来会探索vite等新技术。</p></li></ul><h2 id="fes-js-如何工作" tabindex="-1"><a class="header-anchor" href="#fes-js-如何工作" aria-hidden="true">#</a> Fes.js 如何工作?</h2><h3 id="架构" tabindex="-1"><a class="header-anchor" href="#架构" aria-hidden="true">#</a> 架构</h3>',11),c=["src"],o=e("p",null,"Fes.js 把大家常用的技术栈封装成一个个插件进行整理,收敛到一起,让大家只用 Fes.js 就可以完成 80% 的日常工作。",-1),u=e("h3",{id:"插件和插件集",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#插件和插件集","aria-hidden":"true"},"#"),a(" 插件和插件集")],-1),p=["src"],f=i(`<h3 id="fes-临时文件" tabindex="-1"><a class="header-anchor" href="#fes-临时文件" aria-hidden="true">#</a> .fes 临时文件</h3><p>.fes 临时目录是整个 Fes.js 项目的发动机,你的入口文件、路由等等都在这里,这些是由 fes 内部插件及三方插件生成的。</p><p>你通常会在 .fes 下看到以下目录</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>+ .fes
|
||||||
+ core # 内部插件生成
|
+ core # 内部插件生成
|
||||||
+ pluginA # 外部插件生成
|
+ pluginA # 外部插件生成
|
||||||
+ presetB # 外部插件生成
|
+ presetB # 外部插件生成
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as i,r as a,o as r,c as d,a as s,w as t,b as e,d as n}from"./app.1fff394b.js";const u={},m=e("h2",{id:"像数-1-2-3-一样容易",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#像数-1-2-3-一样容易","aria-hidden":"true"},"#"),n(" 像数 1, 2, 3 一样容易")],-1),p=e("div",{class:"language-bash line-numbers-mode","data-ext":"sh"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token comment"},"# 创建模板"),n(`
|
import{_ as i,r as a,o as r,c as d,a as s,w as t,b as e,d as n}from"./app.005e0daf.js";const u={},m=e("h2",{id:"像数-1-2-3-一样容易",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#像数-1-2-3-一样容易","aria-hidden":"true"},"#"),n(" 像数 1, 2, 3 一样容易")],-1),p=e("div",{class:"language-bash line-numbers-mode","data-ext":"sh"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token comment"},"# 创建模板"),n(`
|
||||||
`),e("span",{class:"token function"},"pnpm"),n(` create @fesjs/fes-app myapp
|
`),e("span",{class:"token function"},"pnpm"),n(` create @fesjs/fes-app myapp
|
||||||
|
|
||||||
`),e("span",{class:"token comment"},"# 安装依赖"),n(`
|
`),e("span",{class:"token comment"},"# 安装依赖"),n(`
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-76cd065c","path":"/reference/api/","title":"API","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"基础API","slug":"基础api","link":"#基础api","children":[{"level":3,"title":"plugin","slug":"plugin","link":"#plugin","children":[]},{"level":3,"title":"ApplyPluginsType","slug":"applypluginstype","link":"#applypluginstype","children":[]},{"level":3,"title":"defineRouteMeta","slug":"defineroutemeta","link":"#defineroutemeta","children":[]},{"level":3,"title":"defineBuildConfig","slug":"definebuildconfig","link":"#definebuildconfig","children":[]},{"level":3,"title":"defineRuntimeConfig","slug":"defineruntimeconfig","link":"#defineruntimeconfig","children":[]}]},{"level":2,"title":"路由API","slug":"路由api","link":"#路由api","children":[{"level":3,"title":"getRouter","slug":"getrouter","link":"#getrouter","children":[]},{"level":3,"title":"getHistory","slug":"gethistory","link":"#gethistory","children":[]},{"level":3,"title":"useRoute","slug":"useroute","link":"#useroute","children":[]},{"level":3,"title":"useRouter","slug":"userouter","link":"#userouter","children":[]},{"level":3,"title":"onBeforeRouteUpdate","slug":"onbeforerouteupdate","link":"#onbeforerouteupdate","children":[]},{"level":3,"title":"onBeforeRouteLeave","slug":"onbeforerouteleave","link":"#onbeforerouteleave","children":[]},{"level":3,"title":"createWebHashHistory","slug":"createwebhashhistory","link":"#createwebhashhistory","children":[]},{"level":3,"title":"createWebHistory","slug":"createwebhistory","link":"#createwebhistory","children":[]},{"level":3,"title":"createMemoryHistory","slug":"creatememoryhistory","link":"#creatememoryhistory","children":[]},{"level":3,"title":"createRouter","slug":"createrouter","link":"#createrouter","children":[]},{"level":3,"title":"RouterLink","slug":"routerlink","link":"#routerlink","children":[]},{"level":3,"title":"useLink","slug":"uselink","link":"#uselink","children":[]},{"level":3,"title":"RouterView","slug":"routerview","link":"#routerview","children":[]},{"level":3,"title":"其他 Router Methods","slug":"其他-router-methods","link":"#其他-router-methods","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/api/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-76cd065c","path":"/reference/api/","title":"API","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"基础API","slug":"基础api","link":"#基础api","children":[{"level":3,"title":"plugin","slug":"plugin","link":"#plugin","children":[]},{"level":3,"title":"ApplyPluginsType","slug":"applypluginstype","link":"#applypluginstype","children":[]},{"level":3,"title":"defineRouteMeta","slug":"defineroutemeta","link":"#defineroutemeta","children":[]},{"level":3,"title":"defineBuildConfig","slug":"definebuildconfig","link":"#definebuildconfig","children":[]},{"level":3,"title":"defineRuntimeConfig","slug":"defineruntimeconfig","link":"#defineruntimeconfig","children":[]}]},{"level":2,"title":"路由API","slug":"路由api","link":"#路由api","children":[{"level":3,"title":"getRouter","slug":"getrouter","link":"#getrouter","children":[]},{"level":3,"title":"getHistory","slug":"gethistory","link":"#gethistory","children":[]},{"level":3,"title":"useRoute","slug":"useroute","link":"#useroute","children":[]},{"level":3,"title":"useRouter","slug":"userouter","link":"#userouter","children":[]},{"level":3,"title":"onBeforeRouteUpdate","slug":"onbeforerouteupdate","link":"#onbeforerouteupdate","children":[]},{"level":3,"title":"onBeforeRouteLeave","slug":"onbeforerouteleave","link":"#onbeforerouteleave","children":[]},{"level":3,"title":"createWebHashHistory","slug":"createwebhashhistory","link":"#createwebhashhistory","children":[]},{"level":3,"title":"createWebHistory","slug":"createwebhistory","link":"#createwebhistory","children":[]},{"level":3,"title":"createMemoryHistory","slug":"creatememoryhistory","link":"#creatememoryhistory","children":[]},{"level":3,"title":"createRouter","slug":"createrouter","link":"#createrouter","children":[]},{"level":3,"title":"RouterLink","slug":"routerlink","link":"#routerlink","children":[]},{"level":3,"title":"useLink","slug":"uselink","link":"#uselink","children":[]},{"level":3,"title":"RouterView","slug":"routerview","link":"#routerview","children":[]},{"level":3,"title":"其他 Router Methods","slug":"其他-router-methods","link":"#其他-router-methods","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/api/README.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as r,r as d,o as t,c as u,a as s,w as a,f as c,b as e,d as n}from"./app.1fff394b.js";const o={},v=c(`<h1 id="命令行工具" tabindex="-1"><a class="header-anchor" href="#命令行工具" aria-hidden="true">#</a> 命令行工具</h1><h2 id="create-fes-app" tabindex="-1"><a class="header-anchor" href="#create-fes-app" aria-hidden="true">#</a> create-fes-app</h2><p>通过 <code>create-fes-app</code> 命令创建项目模板,输入<code>create-fes-app -h</code>则可以看到如下信息:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>Usage: create-fes-app <name>
|
import{_ as r,r as d,o as t,c as u,a as s,w as a,f as c,b as e,d as n}from"./app.005e0daf.js";const o={},v=c(`<h1 id="命令行工具" tabindex="-1"><a class="header-anchor" href="#命令行工具" aria-hidden="true">#</a> 命令行工具</h1><h2 id="create-fes-app" tabindex="-1"><a class="header-anchor" href="#create-fes-app" aria-hidden="true">#</a> create-fes-app</h2><p>通过 <code>create-fes-app</code> 命令创建项目模板,输入<code>create-fes-app -h</code>则可以看到如下信息:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>Usage: create-fes-app <name>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-v, --version Output the current version
|
-v, --version Output the current version
|
@ -1 +1 @@
|
|||||||
import{_ as d,r as i,o,c as r,b as l,a as t,w as s,d as e,e as c}from"./app.1fff394b.js";const a={},_=l("h1",{id:"介绍",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),e(" 介绍")],-1),h=l("h2",{id:"插件列表",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#插件列表","aria-hidden":"true"},"#"),e(" 插件列表")],-1),f=l("thead",null,[l("tr",null,[l("th",null,"插件"),l("th",null,"介绍")])],-1),p=l("td",null,"提供对页面资源的权限控制能力",-1),g=l("td",null,"提供统一的枚举存取及丰富的函数来处理枚举",-1),m=l("td",null,"svg 文件自动注册为组件",-1),j=l("td",null,[e("基于 "),l("code",null,"Jest"),e(",提供单元测试、覆盖测试能力")],-1),w=l("td",null,"简单的配置即可拥有布局,包括导航以及侧边栏",-1),x=l("td",null,[e("基于 "),l("code",null,"Vue I18n"),e(",提供国际化能力")],-1),k=l("td",null,"简易的数据管理方案",-1),V=l("td",null,[e("基于 "),l("code",null,"Axios"),e(" 封装的 request,内置防止重复请求、请求节流、错误处理等功能")],-1),b=l("td",null,[e("基于 "),l("code",null,"Vuex"),e(", 提供状态管理能力")],-1),q=l("td",null,[e("基于 "),l("code",null,"qiankun"),e(",提供微服务能力")],-1),v=l("td",null,"样式支持sass",-1),C=l("td",null,[e("提供代码编辑器能力, 基于"),l("code",null,"monaco-editor"),e("(VS Code使用的代码编辑器)")],-1),B=l("td",null,[e("基于 "),l("code",null,"windicss"),e(",提供原子化 CSS 能力")],-1),N=l("td",null,[e("基于 "),l("code",null,"pinia"),e(",提供状态管理")],-1),y=l("td",null,"水印",-1),S=l("td",null,"swc",-1),F=l("h2",{id:"架构",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#架构","aria-hidden":"true"},"#"),e(" 架构")],-1),L=["src"],R=l("p",null,"Fes.js 把大家常用的技术栈封装成一个个插件进行整理,收敛到一起,让大家只用 Fes.js 就可以完成 80% 的日常工作。",-1);function A(u,E){const n=i("RouterLink");return o(),r("div",null,[_,h,l("table",null,[f,l("tbody",null,[l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/access.html"},{default:s(()=>[e("@fesjs/plugin-access")]),_:1})]),p]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/enums.html"},{default:s(()=>[e("@fesjs/plugin-enums")]),_:1})]),g]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/icon.html"},{default:s(()=>[e("@fesjs/plugin-icon")]),_:1})]),m]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/jest.html"},{default:s(()=>[e("@fesjs/plugin-jest")]),_:1})]),j]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/layout.html"},{default:s(()=>[e("@fesjs/plugin-layout")]),_:1})]),w]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/locale.html"},{default:s(()=>[e("@fesjs/plugin-locale")]),_:1})]),x]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/model.html"},{default:s(()=>[e("@fesjs/plugin-model")]),_:1})]),k]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/request.html"},{default:s(()=>[e("@fesjs/plugin-request")]),_:1})]),V]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/vuex.html"},{default:s(()=>[e("@fesjs/plugin-vuex")]),_:1})]),b]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/qiankun.html"},{default:s(()=>[e("@fesjs/plugin-qiankun")]),_:1})]),q]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/sass.html"},{default:s(()=>[e("@fesjs/plugin-sass")]),_:1})]),v]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/editor.html"},{default:s(()=>[e("@fesjs/plugin-monaco-editor")]),_:1})]),C]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/windicss.html"},{default:s(()=>[e("@fesjs/plugin-windicss")]),_:1})]),B]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/pinia.html"},{default:s(()=>[e("@fesjs/plugin-pinia")]),_:1})]),N]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/watermark.html"},{default:s(()=>[e("@fesjs/plugin-watermark")]),_:1})]),y]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/swc.html"},{default:s(()=>[e("@fesjs/plugin-swc")]),_:1})]),S])])]),F,c('  '),l("img",{src:u.$withBase("framework.png"),alt:"架构"},null,8,L),R])}const J=d(a,[["render",A],["__file","index.html.vue"]]);export{J as default};
|
import{_ as d,r as i,o,c as r,b as l,a as t,w as s,d as e,e as c}from"./app.005e0daf.js";const a={},_=l("h1",{id:"介绍",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),e(" 介绍")],-1),h=l("h2",{id:"插件列表",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#插件列表","aria-hidden":"true"},"#"),e(" 插件列表")],-1),f=l("thead",null,[l("tr",null,[l("th",null,"插件"),l("th",null,"介绍")])],-1),p=l("td",null,"提供对页面资源的权限控制能力",-1),g=l("td",null,"提供统一的枚举存取及丰富的函数来处理枚举",-1),m=l("td",null,"svg 文件自动注册为组件",-1),j=l("td",null,[e("基于 "),l("code",null,"Jest"),e(",提供单元测试、覆盖测试能力")],-1),w=l("td",null,"简单的配置即可拥有布局,包括导航以及侧边栏",-1),x=l("td",null,[e("基于 "),l("code",null,"Vue I18n"),e(",提供国际化能力")],-1),k=l("td",null,"简易的数据管理方案",-1),V=l("td",null,[e("基于 "),l("code",null,"Axios"),e(" 封装的 request,内置防止重复请求、请求节流、错误处理等功能")],-1),b=l("td",null,[e("基于 "),l("code",null,"Vuex"),e(", 提供状态管理能力")],-1),q=l("td",null,[e("基于 "),l("code",null,"qiankun"),e(",提供微服务能力")],-1),v=l("td",null,"样式支持sass",-1),C=l("td",null,[e("提供代码编辑器能力, 基于"),l("code",null,"monaco-editor"),e("(VS Code使用的代码编辑器)")],-1),B=l("td",null,[e("基于 "),l("code",null,"windicss"),e(",提供原子化 CSS 能力")],-1),N=l("td",null,[e("基于 "),l("code",null,"pinia"),e(",提供状态管理")],-1),y=l("td",null,"水印",-1),S=l("td",null,"swc",-1),F=l("h2",{id:"架构",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#架构","aria-hidden":"true"},"#"),e(" 架构")],-1),L=["src"],R=l("p",null,"Fes.js 把大家常用的技术栈封装成一个个插件进行整理,收敛到一起,让大家只用 Fes.js 就可以完成 80% 的日常工作。",-1);function A(u,E){const n=i("RouterLink");return o(),r("div",null,[_,h,l("table",null,[f,l("tbody",null,[l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/access.html"},{default:s(()=>[e("@fesjs/plugin-access")]),_:1})]),p]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/enums.html"},{default:s(()=>[e("@fesjs/plugin-enums")]),_:1})]),g]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/icon.html"},{default:s(()=>[e("@fesjs/plugin-icon")]),_:1})]),m]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/jest.html"},{default:s(()=>[e("@fesjs/plugin-jest")]),_:1})]),j]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/layout.html"},{default:s(()=>[e("@fesjs/plugin-layout")]),_:1})]),w]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/locale.html"},{default:s(()=>[e("@fesjs/plugin-locale")]),_:1})]),x]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/model.html"},{default:s(()=>[e("@fesjs/plugin-model")]),_:1})]),k]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/request.html"},{default:s(()=>[e("@fesjs/plugin-request")]),_:1})]),V]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/vuex.html"},{default:s(()=>[e("@fesjs/plugin-vuex")]),_:1})]),b]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/qiankun.html"},{default:s(()=>[e("@fesjs/plugin-qiankun")]),_:1})]),q]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/sass.html"},{default:s(()=>[e("@fesjs/plugin-sass")]),_:1})]),v]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/editor.html"},{default:s(()=>[e("@fesjs/plugin-monaco-editor")]),_:1})]),C]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/windicss.html"},{default:s(()=>[e("@fesjs/plugin-windicss")]),_:1})]),B]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/pinia.html"},{default:s(()=>[e("@fesjs/plugin-pinia")]),_:1})]),N]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/watermark.html"},{default:s(()=>[e("@fesjs/plugin-watermark")]),_:1})]),y]),l("tr",null,[l("td",null,[t(n,{to:"/reference/plugin/plugins/swc.html"},{default:s(()=>[e("@fesjs/plugin-swc")]),_:1})]),S])])]),F,c('  '),l("img",{src:u.$withBase("framework.png"),alt:"架构"},null,8,L),R])}const J=d(a,[["render",A],["__file","index.html.vue"]]);export{J as default};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-2c05b6e0","path":"/reference/config/","title":"","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"配置文件","slug":"配置文件","link":"#配置文件","children":[{"level":3,"title":"配置文件解析","slug":"配置文件解析","link":"#配置文件解析","children":[]},{"level":3,"title":"配置智能提示","slug":"配置智能提示","link":"#配置智能提示","children":[]}]},{"level":2,"title":"共享配置","slug":"共享配置","link":"#共享配置","children":[{"level":3,"title":"alias","slug":"alias","link":"#alias","children":[]},{"level":3,"title":"autoprefixer","slug":"autoprefixer","link":"#autoprefixer","children":[]},{"level":3,"title":"base","slug":"base","link":"#base","children":[]},{"level":3,"title":"builder","slug":"builder","link":"#builder","children":[]},{"level":3,"title":"define","slug":"define","link":"#define","children":[]},{"level":3,"title":"dynamicImport","slug":"dynamicimport","link":"#dynamicimport","children":[]},{"level":3,"title":"inlineLimit","slug":"inlinelimit","link":"#inlinelimit","children":[]},{"level":3,"title":"mock","slug":"mock","link":"#mock","children":[]},{"level":3,"title":"mountElementId","slug":"mountelementid","link":"#mountelementid","children":[]},{"level":3,"title":"outputPath","slug":"outputpath","link":"#outputpath","children":[]},{"level":3,"title":"plugins","slug":"plugins","link":"#plugins","children":[]},{"level":3,"title":"proxy","slug":"proxy","link":"#proxy","children":[]},{"level":3,"title":"publicPath","slug":"publicpath","link":"#publicpath","children":[]},{"level":3,"title":"router","slug":"router","link":"#router","children":[]},{"level":3,"title":"singular","slug":"singular","link":"#singular","children":[]},{"level":3,"title":"targets","slug":"targets","link":"#targets","children":[]},{"level":3,"title":"terserOptions","slug":"terseroptions","link":"#terseroptions","children":[]},{"level":3,"title":"title","slug":"title","link":"#title","children":[]}]},{"level":2,"title":"webpack 专属配置","slug":"webpack-专属配置","link":"#webpack-专属配置","children":[{"level":3,"title":"analyze","slug":"analyze","link":"#analyze","children":[]},{"level":3,"title":"chainWebpack","slug":"chainwebpack","link":"#chainwebpack","children":[]},{"level":3,"title":"cssLoader","slug":"cssloader","link":"#cssloader","children":[]},{"level":3,"title":"copy","slug":"copy","link":"#copy","children":[]},{"level":3,"title":"devServer","slug":"devserver","link":"#devserver","children":[]},{"level":3,"title":"devtool","slug":"devtool","link":"#devtool","children":[]},{"level":3,"title":"exportStatic","slug":"exportstatic","link":"#exportstatic","children":[]},{"level":3,"title":"externals","slug":"externals","link":"#externals","children":[]},{"level":3,"title":"extraBabelPlugins","slug":"extrababelplugins","link":"#extrababelplugins","children":[]},{"level":3,"title":"extraBabelPresets","slug":"extrababelpresets","link":"#extrababelpresets","children":[]},{"level":3,"title":"extraPostCSSPlugins","slug":"extrapostcssplugins","link":"#extrapostcssplugins","children":[]},{"level":3,"title":"html","slug":"html","link":"#html","children":[]},{"level":3,"title":"lessLoader","slug":"lessloader","link":"#lessloader","children":[]},{"level":3,"title":"nodeModulesTransform","slug":"nodemodulestransform","link":"#nodemodulestransform","children":[]},{"level":3,"title":"postcssLoader","slug":"postcssloader","link":"#postcssloader","children":[]},{"level":3,"title":"vueLoader","slug":"vueloader","link":"#vueloader","children":[]}]},{"level":2,"title":"Vite 专属配置","slug":"vite-专属配置","link":"#vite-专属配置","children":[{"level":3,"title":"viteOption","slug":"viteoption","link":"#viteoption","children":[]},{"level":3,"title":"viteVuePlugin","slug":"vitevueplugin","link":"#vitevueplugin","children":[]},{"level":3,"title":"viteVueJsx","slug":"vitevuejsx","link":"#vitevuejsx","children":[]},{"level":3,"title":"viteLegacy","slug":"vitelegacy","link":"#vitelegacy","children":[]},{"level":3,"title":"viteHtml","slug":"vitehtml","link":"#vitehtml","children":[]}]},{"level":2,"title":"更多配置项","slug":"更多配置项","link":"#更多配置项","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/config/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-2c05b6e0","path":"/reference/config/","title":"","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"配置文件","slug":"配置文件","link":"#配置文件","children":[{"level":3,"title":"配置文件解析","slug":"配置文件解析","link":"#配置文件解析","children":[]},{"level":3,"title":"配置智能提示","slug":"配置智能提示","link":"#配置智能提示","children":[]}]},{"level":2,"title":"共享配置","slug":"共享配置","link":"#共享配置","children":[{"level":3,"title":"alias","slug":"alias","link":"#alias","children":[]},{"level":3,"title":"autoprefixer","slug":"autoprefixer","link":"#autoprefixer","children":[]},{"level":3,"title":"base","slug":"base","link":"#base","children":[]},{"level":3,"title":"builder","slug":"builder","link":"#builder","children":[]},{"level":3,"title":"define","slug":"define","link":"#define","children":[]},{"level":3,"title":"dynamicImport","slug":"dynamicimport","link":"#dynamicimport","children":[]},{"level":3,"title":"inlineLimit","slug":"inlinelimit","link":"#inlinelimit","children":[]},{"level":3,"title":"mock","slug":"mock","link":"#mock","children":[]},{"level":3,"title":"mountElementId","slug":"mountelementid","link":"#mountelementid","children":[]},{"level":3,"title":"outputPath","slug":"outputpath","link":"#outputpath","children":[]},{"level":3,"title":"plugins","slug":"plugins","link":"#plugins","children":[]},{"level":3,"title":"proxy","slug":"proxy","link":"#proxy","children":[]},{"level":3,"title":"publicPath","slug":"publicpath","link":"#publicpath","children":[]},{"level":3,"title":"router","slug":"router","link":"#router","children":[]},{"level":3,"title":"singular","slug":"singular","link":"#singular","children":[]},{"level":3,"title":"targets","slug":"targets","link":"#targets","children":[]},{"level":3,"title":"terserOptions","slug":"terseroptions","link":"#terseroptions","children":[]},{"level":3,"title":"title","slug":"title","link":"#title","children":[]}]},{"level":2,"title":"webpack 专属配置","slug":"webpack-专属配置","link":"#webpack-专属配置","children":[{"level":3,"title":"analyze","slug":"analyze","link":"#analyze","children":[]},{"level":3,"title":"chainWebpack","slug":"chainwebpack","link":"#chainwebpack","children":[]},{"level":3,"title":"cssLoader","slug":"cssloader","link":"#cssloader","children":[]},{"level":3,"title":"copy","slug":"copy","link":"#copy","children":[]},{"level":3,"title":"devServer","slug":"devserver","link":"#devserver","children":[]},{"level":3,"title":"devtool","slug":"devtool","link":"#devtool","children":[]},{"level":3,"title":"exportStatic","slug":"exportstatic","link":"#exportstatic","children":[]},{"level":3,"title":"externals","slug":"externals","link":"#externals","children":[]},{"level":3,"title":"extraBabelPlugins","slug":"extrababelplugins","link":"#extrababelplugins","children":[]},{"level":3,"title":"extraBabelPresets","slug":"extrababelpresets","link":"#extrababelpresets","children":[]},{"level":3,"title":"extraPostCSSPlugins","slug":"extrapostcssplugins","link":"#extrapostcssplugins","children":[]},{"level":3,"title":"html","slug":"html","link":"#html","children":[]},{"level":3,"title":"lessLoader","slug":"lessloader","link":"#lessloader","children":[]},{"level":3,"title":"nodeModulesTransform","slug":"nodemodulestransform","link":"#nodemodulestransform","children":[]},{"level":3,"title":"postcssLoader","slug":"postcssloader","link":"#postcssloader","children":[]},{"level":3,"title":"vueLoader","slug":"vueloader","link":"#vueloader","children":[]}]},{"level":2,"title":"Vite 专属配置","slug":"vite-专属配置","link":"#vite-专属配置","children":[{"level":3,"title":"viteOption","slug":"viteoption","link":"#viteoption","children":[]},{"level":3,"title":"viteVuePlugin","slug":"vitevueplugin","link":"#vitevueplugin","children":[]},{"level":3,"title":"viteVueJsx","slug":"vitevuejsx","link":"#vitevuejsx","children":[]},{"level":3,"title":"viteLegacy","slug":"vitelegacy","link":"#vitelegacy","children":[]},{"level":3,"title":"viteHtml","slug":"vitehtml","link":"#vitehtml","children":[]}]},{"level":2,"title":"更多配置项","slug":"更多配置项","link":"#更多配置项","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/config/README.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as a,o as n,c as s,f as e}from"./app.1fff394b.js";const p={},i=e(`<h1 id="插件介绍" tabindex="-1"><a class="header-anchor" href="#插件介绍" aria-hidden="true">#</a> 插件介绍</h1><h2 id="开始" tabindex="-1"><a class="header-anchor" href="#开始" aria-hidden="true">#</a> 开始</h2><p>一个插件是一个 <code>npm</code> 包,它能够为 Fes.js 创建的项目添加额外的功能,这些功能包括:</p><ul><li>项目的 webpack 配置。</li><li>修改项目的 babel 配置。</li><li>添加新的 fes 命令 - 例如 <code>@fes/plugin-jest</code> 添加了 <code>fes test</code> 命令,允许开发者运行单元测试。</li><li>集成 Vue 的插件。</li><li>修改路由配置</li><li>提供运行时 API</li><li>...</li></ul><p>插件的入口是一个函数,函数会以 API 对象作为第一个参数:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">(</span><span class="token parameter">api</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
|
import{_ as a,o as n,c as s,f as e}from"./app.005e0daf.js";const p={},i=e(`<h1 id="插件介绍" tabindex="-1"><a class="header-anchor" href="#插件介绍" aria-hidden="true">#</a> 插件介绍</h1><h2 id="开始" tabindex="-1"><a class="header-anchor" href="#开始" aria-hidden="true">#</a> 开始</h2><p>一个插件是一个 <code>npm</code> 包,它能够为 Fes.js 创建的项目添加额外的功能,这些功能包括:</p><ul><li>项目的 webpack 配置。</li><li>修改项目的 babel 配置。</li><li>添加新的 fes 命令 - 例如 <code>@fes/plugin-jest</code> 添加了 <code>fes test</code> 命令,允许开发者运行单元测试。</li><li>集成 Vue 的插件。</li><li>修改路由配置</li><li>提供运行时 API</li><li>...</li></ul><p>插件的入口是一个函数,函数会以 API 对象作为第一个参数:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">(</span><span class="token parameter">api</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
|
||||||
api<span class="token punctuation">.</span><span class="token function">describe</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
api<span class="token punctuation">.</span><span class="token function">describe</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'esbuild'</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'esbuild'</span><span class="token punctuation">,</span>
|
||||||
<span class="token literal-property property">config</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token literal-property property">config</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-76cb52e8","path":"/reference/cli/","title":"命令行工具","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"create-fes-app","slug":"create-fes-app","link":"#create-fes-app","children":[]},{"level":2,"title":"fes","slug":"fes","link":"#fes","children":[{"level":3,"title":"fes dev","slug":"fes-dev","link":"#fes-dev","children":[]},{"level":3,"title":"fes build","slug":"fes-build","link":"#fes-build","children":[]},{"level":3,"title":"fes help","slug":"fes-help","link":"#fes-help","children":[]},{"level":3,"title":"fes info","slug":"fes-info","link":"#fes-info","children":[]},{"level":3,"title":"fes webpack","slug":"fes-webpack","link":"#fes-webpack","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/cli/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-76cb52e8","path":"/reference/cli/","title":"命令行工具","lang":"zh-CN","frontmatter":{"sidebar":"auto"},"excerpt":"","headers":[{"level":2,"title":"create-fes-app","slug":"create-fes-app","link":"#create-fes-app","children":[]},{"level":2,"title":"fes","slug":"fes","link":"#fes","children":[{"level":3,"title":"fes dev","slug":"fes-dev","link":"#fes-dev","children":[]},{"level":3,"title":"fes build","slug":"fes-build","link":"#fes-build","children":[]},{"level":3,"title":"fes help","slug":"fes-help","link":"#fes-help","children":[]},{"level":3,"title":"fes info","slug":"fes-info","link":"#fes-info","children":[]},{"level":3,"title":"fes webpack","slug":"fes-webpack","link":"#fes-webpack","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/cli/README.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-fffb8e28","path":"/guide/","title":"介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"痛点","slug":"痛点","link":"#痛点","children":[]},{"level":2,"title":"Fes.js 是什么?","slug":"fes-js-是什么","link":"#fes-js-是什么","children":[]},{"level":2,"title":"Fes.js 如何工作?","slug":"fes-js-如何工作","link":"#fes-js-如何工作","children":[{"level":3,"title":"架构","slug":"架构","link":"#架构","children":[]},{"level":3,"title":"插件和插件集","slug":"插件和插件集","link":"#插件和插件集","children":[]},{"level":3,"title":".fes 临时文件","slug":"fes-临时文件","link":"#fes-临时文件","children":[]}]},{"level":2,"title":"为什么不是 ...?","slug":"为什么不是","link":"#为什么不是","children":[{"level":3,"title":"Vue CLI","slug":"vue-cli","link":"#vue-cli","children":[]},{"level":3,"title":"UMI","slug":"umi","link":"#umi","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-fffb8e28","path":"/guide/","title":"介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"痛点","slug":"痛点","link":"#痛点","children":[]},{"level":2,"title":"Fes.js 是什么?","slug":"fes-js-是什么","link":"#fes-js-是什么","children":[]},{"level":2,"title":"Fes.js 如何工作?","slug":"fes-js-如何工作","link":"#fes-js-如何工作","children":[{"level":3,"title":"架构","slug":"架构","link":"#架构","children":[]},{"level":3,"title":"插件和插件集","slug":"插件和插件集","link":"#插件和插件集","children":[]},{"level":3,"title":".fes 临时文件","slug":"fes-临时文件","link":"#fes-临时文件","children":[]}]},{"level":2,"title":"为什么不是 ...?","slug":"为什么不是","link":"#为什么不是","children":[{"level":3,"title":"Vue CLI","slug":"vue-cli","link":"#vue-cli","children":[]},{"level":3,"title":"UMI","slug":"umi","link":"#umi","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/README.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as o,o as i,c as r,b as s,d as n,a as e,f as t}from"./app.1fff394b.js";const c={},l=t(`<h1 id="api" tabindex="-1"><a class="header-anchor" href="#api" aria-hidden="true">#</a> API</h1><p>Fes.js 统一了API的出口,所有运行时API(包含Fes.js内置API和插件提供的API)全部通过<code>@fesjs/fes</code>导出。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> someApi <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">"@fesjs/fes"</span>
|
import{_ as p,r as o,o as i,c as r,b as s,d as n,a as e,f as t}from"./app.005e0daf.js";const c={},l=t(`<h1 id="api" tabindex="-1"><a class="header-anchor" href="#api" aria-hidden="true">#</a> API</h1><p>Fes.js 统一了API的出口,所有运行时API(包含Fes.js内置API和插件提供的API)全部通过<code>@fesjs/fes</code>导出。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> someApi <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">"@fesjs/fes"</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="基础api" tabindex="-1"><a class="header-anchor" href="#基础api" aria-hidden="true">#</a> 基础API</h2><h3 id="plugin" tabindex="-1"><a class="header-anchor" href="#plugin" aria-hidden="true">#</a> plugin</h3><div class="custom-container tip"><p class="custom-container-title">提示</p><p>主要在插件里面使用,项目代码中一般用不到。</p></div><p>运行时插件接口,是 Fes.js 内置的跑在浏览器里的一套插件体系。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> plugin<span class="token punctuation">,</span> ApplyPluginsType <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="基础api" tabindex="-1"><a class="header-anchor" href="#基础api" aria-hidden="true">#</a> 基础API</h2><h3 id="plugin" tabindex="-1"><a class="header-anchor" href="#plugin" aria-hidden="true">#</a> plugin</h3><div class="custom-container tip"><p class="custom-container-title">提示</p><p>主要在插件里面使用,项目代码中一般用不到。</p></div><p>运行时插件接口,是 Fes.js 内置的跑在浏览器里的一套插件体系。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> plugin<span class="token punctuation">,</span> ApplyPluginsType <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
||||||
|
|
||||||
<span class="token comment">// 注册插件</span>
|
<span class="token comment">// 注册插件</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-494b840e","path":"/reference/plugin/dev/","title":"插件介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"开始","slug":"开始","link":"#开始","children":[]},{"level":2,"title":"创建插件","slug":"创建插件","link":"#创建插件","children":[]},{"level":2,"title":"发布到 npm","slug":"发布到-npm","link":"#发布到-npm","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/dev/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-494b840e","path":"/reference/plugin/dev/","title":"插件介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"开始","slug":"开始","link":"#开始","children":[]},{"level":2,"title":"创建插件","slug":"创建插件","link":"#创建插件","children":[]},{"level":2,"title":"发布到 npm","slug":"发布到-npm","link":"#发布到-npm","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/dev/README.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-8daa1a0e","path":"/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"title":"首页","heroImage":"/logo.png","actions":[{"text":"快速上手","link":"/guide/getting-started.html","type":"primary"},{"text":"项目简介","link":"/guide/","type":"secondary"}],"features":[{"title":"Fast","details":"Fes.js 内置路由、构建、插件管理,提供测试、布局、权限、国际化、状态管理、请求、数据字典、SVG等插件,可以满足大部分日常开发需求。"},{"title":"Easy","details":"基于Vue.js 3.0,上手非常简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。"},{"title":"Strong","details":"仅仅需要关心页面内容,减少犯错的机会!提供单元测试、覆盖测试的能力保障项目质量。"},{"title":"可扩展","details":"借鉴 UMI 实现完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。"},{"title":"面向未来","details":"在满足需求的同时,我们也不会停止对新技术的探索。已使用 Vue3.0 来提升应用性能,已使用 webpack5 和 vite 提升构建性能和实现微服务。"},{"title":"令人愉悦","details":"我们的主要重点是开发人员体验。我们喜欢 Fes.js,并且会不断改进框架,所以您也喜欢它!期待有吸引力的解决方案,描述性的错误消息,强大的默认值和详细的文档。如果有问题或疑问,我们有用的社区将为您提供帮助。"}],"footer":"MIT Licensed | Copyright © 2020-present Webank"},"excerpt":"","headers":[{"level":2,"title":"像数 1, 2, 3 一样容易","slug":"像数-1-2-3-一样容易","link":"#像数-1-2-3-一样容易","children":[]},{"level":2,"title":"反馈","slug":"反馈","link":"#反馈","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-8daa1a0e","path":"/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"title":"首页","heroImage":"/logo.png","actions":[{"text":"快速上手","link":"/guide/getting-started.html","type":"primary"},{"text":"项目简介","link":"/guide/","type":"secondary"}],"features":[{"title":"Fast","details":"Fes.js 内置路由、构建、插件管理,提供测试、布局、权限、国际化、状态管理、请求、数据字典、SVG等插件,可以满足大部分日常开发需求。"},{"title":"Easy","details":"基于Vue.js 3.0,上手非常简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。"},{"title":"Strong","details":"仅仅需要关心页面内容,减少犯错的机会!提供单元测试、覆盖测试的能力保障项目质量。"},{"title":"可扩展","details":"借鉴 UMI 实现完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。"},{"title":"面向未来","details":"在满足需求的同时,我们也不会停止对新技术的探索。已使用 Vue3.0 来提升应用性能,已使用 webpack5 和 vite 提升构建性能和实现微服务。"},{"title":"令人愉悦","details":"我们的主要重点是开发人员体验。我们喜欢 Fes.js,并且会不断改进框架,所以您也喜欢它!期待有吸引力的解决方案,描述性的错误消息,强大的默认值和详细的文档。如果有问题或疑问,我们有用的社区将为您提供帮助。"}],"footer":"MIT Licensed | Copyright © 2020-present Webank"},"excerpt":"","headers":[{"level":2,"title":"像数 1, 2, 3 一样容易","slug":"像数-1-2-3-一样容易","link":"#像数-1-2-3-一样容易","children":[]},{"level":2,"title":"反馈","slug":"反馈","link":"#反馈","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"README.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as l,o,c as i,b as n,d as s,a as e,f as t}from"./app.1fff394b.js";const c={},r=t(`<h2 id="配置文件" tabindex="-1"><a class="header-anchor" href="#配置文件" aria-hidden="true">#</a> 配置文件</h2><p>Fes.js 内置了比较通用的构建方式,如果没有个性化需求,不需要修改构建相关的配置。</p><h3 id="配置文件解析" tabindex="-1"><a class="header-anchor" href="#配置文件解析" aria-hidden="true">#</a> 配置文件解析</h3><p>Fes.js 会自动解析项目根目录下的 <code>.fes.js</code> 文件。</p><p>最基础的配置文件是这样的:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token comment">// .fes.js</span>
|
import{_ as p,r as l,o,c as i,b as n,d as s,a as e,f as t}from"./app.005e0daf.js";const c={},r=t(`<h2 id="配置文件" tabindex="-1"><a class="header-anchor" href="#配置文件" aria-hidden="true">#</a> 配置文件</h2><p>Fes.js 内置了比较通用的构建方式,如果没有个性化需求,不需要修改构建相关的配置。</p><h3 id="配置文件解析" tabindex="-1"><a class="header-anchor" href="#配置文件解析" aria-hidden="true">#</a> 配置文件解析</h3><p>Fes.js 会自动解析项目根目录下的 <code>.fes.js</code> 文件。</p><p>最基础的配置文件是这样的:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token comment">// .fes.js</span>
|
||||||
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
|
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>可以通过环境变量 <code>FES_ENV</code> 进行环境差异化配置,当我们运行 <code>FES_ENV=prod fes dev</code> 时,Fes.js 会找到 <code>.fes.js</code> 和 <code>.fes.prod.js</code>(可选) 的配置文件进行 <code>deepmerge</code>。</p><h3 id="配置智能提示" tabindex="-1"><a class="header-anchor" href="#配置智能提示" aria-hidden="true">#</a> 配置智能提示</h3><p>可以通过 <code>defineBuildConfig</code> 工具函数获取类型提示:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineBuildConfig <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>可以通过环境变量 <code>FES_ENV</code> 进行环境差异化配置,当我们运行 <code>FES_ENV=prod fes dev</code> 时,Fes.js 会找到 <code>.fes.js</code> 和 <code>.fes.prod.js</code>(可选) 的配置文件进行 <code>deepmerge</code>。</p><h3 id="配置智能提示" tabindex="-1"><a class="header-anchor" href="#配置智能提示" aria-hidden="true">#</a> 配置智能提示</h3><p>可以通过 <code>defineBuildConfig</code> 工具函数获取类型提示:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineBuildConfig <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@fesjs/fes'</span><span class="token punctuation">;</span>
|
||||||
|
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-d61a9282","path":"/reference/plugin/","title":"介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"插件列表","slug":"插件列表","link":"#插件列表","children":[]},{"level":2,"title":"架构","slug":"架构","link":"#架构","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/README.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-d61a9282","path":"/reference/plugin/","title":"介绍","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"插件列表","slug":"插件列表","link":"#插件列表","children":[]},{"level":2,"title":"架构","slug":"架构","link":"#架构","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/README.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as a,r as l,o as r,c as d,b as n,d as e,a as i,f as t}from"./app.1fff394b.js";const o={},c=n("h1",{id:"fesjs-plugin-jest",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-jest","aria-hidden":"true"},"#"),e(" @fesjs/plugin-jest")],-1),u={href:"https://www.jestjs.cn/",target:"_blank",rel:"noopener noreferrer"},v=t(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as a,r as l,o as r,c as d,b as n,d as e,a as i,f as t}from"./app.005e0daf.js";const o={},c=n("h1",{id:"fesjs-plugin-jest",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-jest","aria-hidden":"true"},"#"),e(" @fesjs/plugin-jest")],-1),u={href:"https://www.jestjs.cn/",target:"_blank",rel:"noopener noreferrer"},v=t(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-jest"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-jest"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-3cd5a4ef","path":"/reference/plugin/plugins/jest.html","title":"@fesjs/plugin-jest","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"约定","slug":"约定","link":"#约定","children":[]},{"level":2,"title":"命令","slug":"命令","link":"#命令","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"args 变量","slug":"args-变量","link":"#args-变量","children":[]},{"level":3,"title":"配置文件","slug":"配置文件","link":"#配置文件","children":[]},{"level":3,"title":"优先级","slug":"优先级","link":"#优先级","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/jest.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-3cd5a4ef","path":"/reference/plugin/plugins/jest.html","title":"@fesjs/plugin-jest","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"约定","slug":"约定","link":"#约定","children":[]},{"level":2,"title":"命令","slug":"命令","link":"#命令","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"args 变量","slug":"args-变量","link":"#args-变量","children":[]},{"level":3,"title":"配置文件","slug":"配置文件","link":"#配置文件","children":[]},{"level":3,"title":"优先级","slug":"优先级","link":"#优先级","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/jest.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as u,r as c,o as r,c as d,b as n,d as s,a as e,w as o,e as l,f as a}from"./app.1fff394b.js";const k={},v=n("h1",{id:"fesjs-plugin-layout",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-layout","aria-hidden":"true"},"#"),s(" @fesjs/plugin-layout")],-1),g=n("h2",{id:"介绍",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),s(" 介绍")],-1),h=n("p",null,[s("为了进一步降低研发成本,我们将布局利用 "),n("code",null,"fes.js"),s(" 插件的方式内置,只需通过简单的配置即可拥有布局,包括导航以及侧边栏。从而做到用户无需关心布局。")],-1),m=a("<li>侧边栏菜单数据根据路由中的配置自动生成。</li><li>布局,提供 <code>side</code>、 <code>top</code>、<code>mixin</code>、<code>left-right</code> 四种布局。</li><li>主题,提供 <code>light</code>、<code>dark</code> 两种主题。</li><li>默认实现对路由的 404、403 处理。</li>",4),b=n("li",null,"支持自定义头部或者侧边栏区域。",-1),f=n("li",null,"菜单支持配置 icon。",-1),_=n("li",null,"菜单标题支持国际化。",-1),x=n("li",null,"可配置页面是否需要 layout。",-1),y=a(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as u,r as c,o as r,c as d,b as n,d as s,a as e,w as o,e as l,f as a}from"./app.005e0daf.js";const k={},v=n("h1",{id:"fesjs-plugin-layout",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-layout","aria-hidden":"true"},"#"),s(" @fesjs/plugin-layout")],-1),g=n("h2",{id:"介绍",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),s(" 介绍")],-1),h=n("p",null,[s("为了进一步降低研发成本,我们将布局利用 "),n("code",null,"fes.js"),s(" 插件的方式内置,只需通过简单的配置即可拥有布局,包括导航以及侧边栏。从而做到用户无需关心布局。")],-1),m=a("<li>侧边栏菜单数据根据路由中的配置自动生成。</li><li>布局,提供 <code>side</code>、 <code>top</code>、<code>mixin</code>、<code>left-right</code> 四种布局。</li><li>主题,提供 <code>light</code>、<code>dark</code> 两种主题。</li><li>默认实现对路由的 404、403 处理。</li>",4),b=n("li",null,"支持自定义头部或者侧边栏区域。",-1),f=n("li",null,"菜单支持配置 icon。",-1),_=n("li",null,"菜单标题支持国际化。",-1),x=n("li",null,"可配置页面是否需要 layout。",-1),y=a(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-layout"</span><span class="token operator">:</span> <span class="token string">"^5.0.0"</span>
|
<span class="token property">"@fesjs/plugin-layout"</span><span class="token operator">:</span> <span class="token string">"^5.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const l=JSON.parse('{"key":"v-355ee23e","path":"/reference/plugin/plugins/layout.html","title":"@fesjs/plugin-layout","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"布局类型","slug":"布局类型","link":"#布局类型","children":[{"level":3,"title":"side","slug":"side","link":"#side","children":[]},{"level":3,"title":"top","slug":"top","link":"#top","children":[]},{"level":3,"title":"mixin","slug":"mixin","link":"#mixin","children":[]},{"level":3,"title":"left-right","slug":"left-right","link":"#left-right","children":[]},{"level":3,"title":"页面个性化","slug":"页面个性化","link":"#页面个性化","children":[]}]},{"level":2,"title":"页面缓存","slug":"页面缓存","link":"#页面缓存","children":[{"level":3,"title":"处理嵌套路由","slug":"处理嵌套路由","link":"#处理嵌套路由","children":[]}]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"footer","slug":"footer","link":"#footer","children":[]},{"level":3,"title":"theme","slug":"theme","link":"#theme","children":[]},{"level":3,"title":"navigation","slug":"navigation","link":"#navigation","children":[]},{"level":3,"title":"isFixedHeader","slug":"isfixedheader","link":"#isfixedheader","children":[]},{"level":3,"title":"isFixedSidebar","slug":"isfixedsidebar","link":"#isfixedsidebar","children":[]},{"level":3,"title":"title","slug":"title","link":"#title","children":[]},{"level":3,"title":"logo","slug":"logo","link":"#logo","children":[]},{"level":3,"title":"multiTabs","slug":"multitabs","link":"#multitabs","children":[]},{"level":3,"title":"menus","slug":"menus","link":"#menus","children":[]},{"level":3,"title":"menuProps","slug":"menuprops","link":"#menuprops","children":[]},{"level":3,"title":"sideWidth","slug":"sidewidth","link":"#sidewidth","children":[]},{"level":3,"title":"renderCustom","slug":"rendercustom","link":"#rendercustom","children":[]},{"level":3,"title":"unAccessHandler","slug":"unaccesshandler","link":"#unaccesshandler","children":[]},{"level":3,"title":"noFoundHandler","slug":"nofoundhandler","link":"#nofoundhandler","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"useTabTitle","slug":"usetabtitle","link":"#usetabtitle","children":[]}]},{"level":2,"title":"4.x 升级到 5.x","slug":"_4-x-升级到-5-x","link":"#_4-x-升级到-5-x","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/layout.md"}');export{l as data};
|
const e=JSON.parse('{"key":"v-355ee23e","path":"/reference/plugin/plugins/layout.html","title":"@fesjs/plugin-layout","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"布局类型","slug":"布局类型","link":"#布局类型","children":[{"level":3,"title":"side","slug":"side","link":"#side","children":[]},{"level":3,"title":"top","slug":"top","link":"#top","children":[]},{"level":3,"title":"mixin","slug":"mixin","link":"#mixin","children":[]},{"level":3,"title":"left-right","slug":"left-right","link":"#left-right","children":[]},{"level":3,"title":"页面个性化","slug":"页面个性化","link":"#页面个性化","children":[]}]},{"level":2,"title":"页面缓存","slug":"页面缓存","link":"#页面缓存","children":[{"level":3,"title":"处理嵌套路由","slug":"处理嵌套路由","link":"#处理嵌套路由","children":[]}]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"footer","slug":"footer","link":"#footer","children":[]},{"level":3,"title":"theme","slug":"theme","link":"#theme","children":[]},{"level":3,"title":"navigation","slug":"navigation","link":"#navigation","children":[]},{"level":3,"title":"isFixedHeader","slug":"isfixedheader","link":"#isfixedheader","children":[]},{"level":3,"title":"isFixedSidebar","slug":"isfixedsidebar","link":"#isfixedsidebar","children":[]},{"level":3,"title":"title","slug":"title","link":"#title","children":[]},{"level":3,"title":"logo","slug":"logo","link":"#logo","children":[]},{"level":3,"title":"multiTabs","slug":"multitabs","link":"#multitabs","children":[]},{"level":3,"title":"menus","slug":"menus","link":"#menus","children":[]},{"level":3,"title":"menuProps","slug":"menuprops","link":"#menuprops","children":[]},{"level":3,"title":"sideWidth","slug":"sidewidth","link":"#sidewidth","children":[]},{"level":3,"title":"renderCustom","slug":"rendercustom","link":"#rendercustom","children":[]},{"level":3,"title":"unAccessHandler","slug":"unaccesshandler","link":"#unaccesshandler","children":[]},{"level":3,"title":"noFoundHandler","slug":"nofoundhandler","link":"#nofoundhandler","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"useTabTitle","slug":"usetabtitle","link":"#usetabtitle","children":[]}]},{"level":2,"title":"4.x 升级到 5.x","slug":"_4-x-升级到-5-x","link":"#_4-x-升级到-5-x","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/layout.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const l=JSON.parse('{"key":"v-411c0c9e","path":"/reference/plugin/plugins/locale.html","title":"@fesjs/plugin-locale","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"约定式配置","slug":"约定式配置","link":"#约定式配置","children":[]},{"level":3,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[]},{"level":3,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"locale","slug":"locale-1","link":"#locale-1","children":[]},{"level":3,"title":"useI18n","slug":"usei18n","link":"#usei18n","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/locale.md"}');export{l as data};
|
const l=JSON.parse('{"key":"v-411c0c9e","path":"/reference/plugin/plugins/locale.html","title":"@fesjs/plugin-locale","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[{"level":3,"title":"约定式配置","slug":"约定式配置","link":"#约定式配置","children":[]},{"level":3,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[]},{"level":3,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"locale","slug":"locale-1","link":"#locale-1","children":[]},{"level":3,"title":"useI18n","slug":"usei18n","link":"#usei18n","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/locale.md"}');export{l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as o,r as p,o as l,c,b as s,d as n,a as e,f as t}from"./app.1fff394b.js";const i={},r=s("h1",{id:"fesjs-plugin-locale",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-locale","aria-hidden":"true"},"#"),n(" @fesjs/plugin-locale")],-1),u=s("h2",{id:"介绍",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),n(" 介绍")],-1),d={href:"https://github.com/intlify/vue-i18n-next",target:"_blank",rel:"noopener noreferrer"},k=t(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as o,r as p,o as l,c,b as s,d as n,a as e,f as t}from"./app.005e0daf.js";const i={},r=s("h1",{id:"fesjs-plugin-locale",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-locale","aria-hidden":"true"},"#"),n(" @fesjs/plugin-locale")],-1),u=s("h2",{id:"介绍",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),n(" 介绍")],-1),d={href:"https://github.com/intlify/vue-i18n-next",target:"_blank",rel:"noopener noreferrer"},k=t(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-locale"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-locale"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,f as e}from"./app.1fff394b.js";const t={},o=e(`<h1 id="fesjs-plugin-login" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-login" aria-hidden="true">#</a> @fesjs/plugin-login</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>管理自定义 login 页面,包括 login 页面权限问题,跳转登陆问题。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as n,o as s,c as a,f as e}from"./app.005e0daf.js";const t={},o=e(`<h1 id="fesjs-plugin-login" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-login" aria-hidden="true">#</a> @fesjs/plugin-login</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>管理自定义 login 页面,包括 login 页面权限问题,跳转登陆问题。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-login"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-login"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-56ab05de","path":"/reference/plugin/plugins/login.html","title":"@fesjs/plugin-login","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/login.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-56ab05de","path":"/reference/plugin/plugins/login.html","title":"@fesjs/plugin-login","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/login.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const l=JSON.parse('{"key":"v-00cf7e23","path":"/guide/mock.html","title":"Mock 数据","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"约定式 Mock 文件","slug":"约定式-mock-文件","link":"#约定式-mock-文件","children":[]},{"level":2,"title":"编写 Mock 文件","slug":"编写-mock-文件","link":"#编写-mock-文件","children":[{"level":3,"title":"cgiMock 参数","slug":"cgimock-参数","link":"#cgimock-参数","children":[]},{"level":3,"title":"mockjs 参数","slug":"mockjs-参数","link":"#mockjs-参数","children":[]},{"level":3,"title":"utils 参数","slug":"utils-参数","link":"#utils-参数","children":[]}]},{"level":2,"title":"配置 Mock","slug":"配置-mock","link":"#配置-mock","children":[]},{"level":2,"title":"关闭 Mock","slug":"关闭-mock","link":"#关闭-mock","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/mock.md"}');export{l as data};
|
const l=JSON.parse('{"key":"v-00cf7e23","path":"/guide/mock.html","title":"Mock 数据","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"约定式 Mock 文件","slug":"约定式-mock-文件","link":"#约定式-mock-文件","children":[]},{"level":2,"title":"编写 Mock 文件","slug":"编写-mock-文件","link":"#编写-mock-文件","children":[{"level":3,"title":"cgiMock 参数","slug":"cgimock-参数","link":"#cgimock-参数","children":[]},{"level":3,"title":"mockjs 参数","slug":"mockjs-参数","link":"#mockjs-参数","children":[]},{"level":3,"title":"utils 参数","slug":"utils-参数","link":"#utils-参数","children":[]}]},{"level":2,"title":"配置 Mock","slug":"配置-mock","link":"#配置-mock","children":[]},{"level":2,"title":"关闭 Mock","slug":"关闭-mock","link":"#关闭-mock","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/mock.md"}');export{l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as c,r as p,o as i,c as l,b as s,d as n,a as t,w as u,f as a}from"./app.1fff394b.js";const r={},k=a(`<h1 id="mock-数据" tabindex="-1"><a class="header-anchor" href="#mock-数据" aria-hidden="true">#</a> Mock 数据</h1><p>Mock 数据是前端开发过程中必不可少的一环,是分离前后端开发的关键链路。通过预先跟服务器端约定好的接口,模拟请求数据甚至逻辑,能够让前端开发独立自主,不会被服务端的开发所阻塞。</p><h2 id="约定式-mock-文件" tabindex="-1"><a class="header-anchor" href="#约定式-mock-文件" aria-hidden="true">#</a> 约定式 Mock 文件</h2><p>Fes.js 约定 <code>./mock.js</code> 为 mock 文件。</p><p>比如:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>.
|
import{_ as c,r as p,o as i,c as l,b as s,d as n,a as t,w as u,f as a}from"./app.005e0daf.js";const r={},k=a(`<h1 id="mock-数据" tabindex="-1"><a class="header-anchor" href="#mock-数据" aria-hidden="true">#</a> Mock 数据</h1><p>Mock 数据是前端开发过程中必不可少的一环,是分离前后端开发的关键链路。通过预先跟服务器端约定好的接口,模拟请求数据甚至逻辑,能够让前端开发独立自主,不会被服务端的开发所阻塞。</p><h2 id="约定式-mock-文件" tabindex="-1"><a class="header-anchor" href="#约定式-mock-文件" aria-hidden="true">#</a> 约定式 Mock 文件</h2><p>Fes.js 约定 <code>./mock.js</code> 为 mock 文件。</p><p>比如:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>.
|
||||||
├── mock.js
|
├── mock.js
|
||||||
└── src
|
└── src
|
||||||
└── pages
|
└── pages
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,f as t}from"./app.1fff394b.js";const e={},p=t(`<h1 id="fesjs-plugin-model" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-model" aria-hidden="true">#</a> @fesjs/plugin-model</h1><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 package.json 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as n,o as s,c as a,f as t}from"./app.005e0daf.js";const e={},p=t(`<h1 id="fesjs-plugin-model" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-model" aria-hidden="true">#</a> @fesjs/plugin-model</h1><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 package.json 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-model"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-model"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-3c4e521e","path":"/reference/plugin/plugins/model.html","title":"@fesjs/plugin-model","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[{"level":3,"title":"Model 文件","slug":"model-文件","link":"#model-文件","children":[]},{"level":3,"title":"在组件中使用 Model","slug":"在组件中使用-model","link":"#在组件中使用-model","children":[]},{"level":3,"title":"@@initialState","slug":"initialstate","link":"#initialstate","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"useModel","slug":"usemodel","link":"#usemodel","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/model.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-3c4e521e","path":"/reference/plugin/plugins/model.html","title":"@fesjs/plugin-model","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[{"level":3,"title":"Model 文件","slug":"model-文件","link":"#model-文件","children":[]},{"level":3,"title":"在组件中使用 Model","slug":"在组件中使用-model","link":"#在组件中使用-model","children":[]},{"level":3,"title":"@@initialState","slug":"initialstate","link":"#initialstate","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"useModel","slug":"usemodel","link":"#usemodel","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/model.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-6f2f6a5a","path":"/reference/plugin/plugins/pinia.html","title":"@fesjs/plugin-pinia","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"pinia","slug":"pinia","link":"#pinia","children":[]}]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"定义 store","slug":"定义-store","link":"#定义-store","children":[]},{"level":3,"title":"setup","slug":"setup","link":"#setup","children":[]},{"level":3,"title":"非 setup","slug":"非-setup","link":"#非-setup","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/pinia.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-6f2f6a5a","path":"/reference/plugin/plugins/pinia.html","title":"@fesjs/plugin-pinia","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"pinia","slug":"pinia","link":"#pinia","children":[]}]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"定义 store","slug":"定义-store","link":"#定义-store","children":[]},{"level":3,"title":"setup","slug":"setup","link":"#setup","children":[]},{"level":3,"title":"非 setup","slug":"非-setup","link":"#非-setup","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/pinia.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,r as t,o as p,c as o,b as n,d as s,a as i,f as c}from"./app.1fff394b.js";const l={},r=n("h1",{id:"fesjs-plugin-pinia",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-pinia","aria-hidden":"true"},"#"),s(" @fesjs/plugin-pinia")],-1),u=n("h2",{id:"介绍",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),s(" 介绍")],-1),d={href:"https://pinia.vuejs.org/",target:"_blank",rel:"noopener noreferrer"},k=c(`<p>为了防止 <code>Fes.js</code> 与 <code>pinia</code> 提供的 API 冲突,<code>Fes.js</code>不提供任何 <code>pinia</code> 的 API,相关 API 直接从 <code>pinia</code> 导出:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineStore <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'pinia'</span><span class="token punctuation">;</span>
|
import{_ as e,r as t,o as p,c as o,b as n,d as s,a as i,f as c}from"./app.005e0daf.js";const l={},r=n("h1",{id:"fesjs-plugin-pinia",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fesjs-plugin-pinia","aria-hidden":"true"},"#"),s(" @fesjs/plugin-pinia")],-1),u=n("h2",{id:"介绍",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),s(" 介绍")],-1),d={href:"https://pinia.vuejs.org/",target:"_blank",rel:"noopener noreferrer"},k=c(`<p>为了防止 <code>Fes.js</code> 与 <code>pinia</code> 提供的 API 冲突,<code>Fes.js</code>不提供任何 <code>pinia</code> 的 API,相关 API 直接从 <code>pinia</code> 导出:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> defineStore <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'pinia'</span><span class="token punctuation">;</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>约定 <code>plugin</code> 定义放在 <code>stores</code> 目录下,文件名包含 plugin 被解析为插件,无需额外配置,定义即可用。</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>└── src
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>约定 <code>plugin</code> 定义放在 <code>stores</code> 目录下,文件名包含 plugin 被解析为插件,无需额外配置,定义即可用。</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>└── src
|
||||||
├── pages
|
├── pages
|
||||||
│ └── index.vue
|
│ └── index.vue
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,o as a,c as e,f as n}from"./app.1fff394b.js";const o={},p=n(`<h1 id="插件" tabindex="-1"><a class="header-anchor" href="#插件" aria-hidden="true">#</a> 插件</h1><h2 id="插件的-id-和-key" tabindex="-1"><a class="header-anchor" href="#插件的-id-和-key" aria-hidden="true">#</a> 插件的 id 和 key</h2><p>每个插件都会对应一个 <code>id</code> 和一个 <code>key</code>,<strong><code>id</code> 是路径的简写,<code>key</code> 是进一步简化后用于配置的唯一值</strong>。</p><p>比如插件 <code>/node_modules/@fesjs/plugin-foo/index.js</code>,通常来说,其 <code>id</code> 为 <code>@fesjs/plugin-foo</code>,<code>key</code> 为 <code>foo</code>。</p><div class="custom-container tip"><p class="custom-container-title">提示</p><p>id 一般用不上,对于普通开发者 key 用来配置插件,而插件开发者可以使用 key 判断是否安装某个插件。</p></div><h2 id="启动插件" tabindex="-1"><a class="header-anchor" href="#启动插件" aria-hidden="true">#</a> 启动插件</h2><p>有多种方式引入插件</p><h3 id="package-json-依赖" tabindex="-1"><a class="header-anchor" href="#package-json-依赖" aria-hidden="true">#</a> package.json 依赖</h3><p>Fes.js 会自动检测 <code>dependencies</code> 和 <code>devDependencies</code> 里的 fes 插件,比如:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as s,o as a,c as e,f as n}from"./app.005e0daf.js";const o={},p=n(`<h1 id="插件" tabindex="-1"><a class="header-anchor" href="#插件" aria-hidden="true">#</a> 插件</h1><h2 id="插件的-id-和-key" tabindex="-1"><a class="header-anchor" href="#插件的-id-和-key" aria-hidden="true">#</a> 插件的 id 和 key</h2><p>每个插件都会对应一个 <code>id</code> 和一个 <code>key</code>,<strong><code>id</code> 是路径的简写,<code>key</code> 是进一步简化后用于配置的唯一值</strong>。</p><p>比如插件 <code>/node_modules/@fesjs/plugin-foo/index.js</code>,通常来说,其 <code>id</code> 为 <code>@fesjs/plugin-foo</code>,<code>key</code> 为 <code>foo</code>。</p><div class="custom-container tip"><p class="custom-container-title">提示</p><p>id 一般用不上,对于普通开发者 key 用来配置插件,而插件开发者可以使用 key 判断是否安装某个插件。</p></div><h2 id="启动插件" tabindex="-1"><a class="header-anchor" href="#启动插件" aria-hidden="true">#</a> 启动插件</h2><p>有多种方式引入插件</p><h3 id="package-json-依赖" tabindex="-1"><a class="header-anchor" href="#package-json-依赖" aria-hidden="true">#</a> package.json 依赖</h3><p>Fes.js 会自动检测 <code>dependencies</code> 和 <code>devDependencies</code> 里的 fes 插件,比如:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/plugin-request"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-request"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
||||||
<span class="token punctuation">}</span>
|
<span class="token punctuation">}</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-1d14d5cc","path":"/guide/plugin.html","title":"插件","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"插件的 id 和 key","slug":"插件的-id-和-key","link":"#插件的-id-和-key","children":[]},{"level":2,"title":"启动插件","slug":"启动插件","link":"#启动插件","children":[{"level":3,"title":"package.json 依赖","slug":"package-json-依赖","link":"#package-json-依赖","children":[]},{"level":3,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":3,"title":"环境变量","slug":"环境变量","link":"#环境变量","children":[]}]},{"level":2,"title":"禁用插件","slug":"禁用插件","link":"#禁用插件","children":[]},{"level":2,"title":"配置插件","slug":"配置插件","link":"#配置插件","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/plugin.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-1d14d5cc","path":"/guide/plugin.html","title":"插件","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"插件的 id 和 key","slug":"插件的-id-和-key","link":"#插件的-id-和-key","children":[]},{"level":2,"title":"启动插件","slug":"启动插件","link":"#启动插件","children":[{"level":3,"title":"package.json 依赖","slug":"package-json-依赖","link":"#package-json-依赖","children":[]},{"level":3,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":3,"title":"环境变量","slug":"环境变量","link":"#环境变量","children":[]}]},{"level":2,"title":"禁用插件","slug":"禁用插件","link":"#禁用插件","children":[]},{"level":2,"title":"配置插件","slug":"配置插件","link":"#配置插件","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/plugin.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,f as t}from"./app.1fff394b.js";const e={},p=t(`<h1 id="静态资源" tabindex="-1"><a class="header-anchor" href="#静态资源" aria-hidden="true">#</a> 静态资源</h1><p>有些内容不需要经过 <code>webpack</code> 模块化处理,则可以将这些内容放在 <code>public</code> 文件夹,构建后会直接复制到 <code>dist</code> 目录,所以你需要通过<code>BASE_URL</code>来引入它们。</p><h3 id="在-html-模板中使用" tabindex="-1"><a class="header-anchor" href="#在-html-模板中使用" aria-hidden="true">#</a> 在 HTML 模板中使用</h3><p>在 <code>index.html</code> 中需要设置:</p><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>link</span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>icon<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><%= BASE_URL %>favicon.ico<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
import{_ as n,o as a,c as s,f as t}from"./app.005e0daf.js";const e={},p=t(`<h1 id="静态资源" tabindex="-1"><a class="header-anchor" href="#静态资源" aria-hidden="true">#</a> 静态资源</h1><p>有些内容不需要经过 <code>webpack</code> 模块化处理,则可以将这些内容放在 <code>public</code> 文件夹,构建后会直接复制到 <code>dist</code> 目录,所以你需要通过<code>BASE_URL</code>来引入它们。</p><h3 id="在-html-模板中使用" tabindex="-1"><a class="header-anchor" href="#在-html-模板中使用" aria-hidden="true">#</a> 在 HTML 模板中使用</h3><p>在 <code>index.html</code> 中需要设置:</p><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>link</span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>icon<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><%= BASE_URL %>favicon.ico<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="在-vue-和-js-文件中使用" tabindex="-1"><a class="header-anchor" href="#在-vue-和-js-文件中使用" aria-hidden="true">#</a> 在.vue 和 js 文件中使用</h3><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="在-vue-和-js-文件中使用" tabindex="-1"><a class="header-anchor" href="#在-vue-和-js-文件中使用" aria-hidden="true">#</a> 在.vue 和 js 文件中使用</h3><div class="language-vue line-numbers-mode" data-ext="vue"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">:src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>\`\${publicPath}my-image.png\`<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>img</span> <span class="token attr-name">:src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>\`\${publicPath}my-image.png\`<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-7b96e3a4","path":"/guide/public.html","title":"静态资源","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"在 HTML 模板中使用","slug":"在-html-模板中使用","link":"#在-html-模板中使用","children":[]},{"level":3,"title":"在.vue 和 js 文件中使用","slug":"在-vue-和-js-文件中使用","link":"#在-vue-和-js-文件中使用","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/public.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-7b96e3a4","path":"/guide/public.html","title":"静态资源","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"在 HTML 模板中使用","slug":"在-html-模板中使用","link":"#在-html-模板中使用","children":[]},{"level":3,"title":"在.vue 和 js 文件中使用","slug":"在-vue-和-js-文件中使用","link":"#在-vue-和-js-文件中使用","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/public.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as c,r as p,o as i,c as l,b as s,d as n,a,w as u,f as e}from"./app.1fff394b.js";const r={},d=s("h1",{id:"fesjs-plugin-qiankun",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-qiankun","aria-hidden":"true"},"#"),n(" @fesjs/plugin-qiankun")],-1),k={href:"https://qiankun.umijs.org/",target:"_blank",rel:"noopener noreferrer"},v={href:"https://umijs.org/zh-CN/plugins/plugin-qiankun#MicroApp",target:"_blank",rel:"noopener noreferrer"},m=e(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as c,r as p,o as i,c as l,b as s,d as n,a,w as u,f as e}from"./app.005e0daf.js";const r={},d=s("h1",{id:"fesjs-plugin-qiankun",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-qiankun","aria-hidden":"true"},"#"),n(" @fesjs/plugin-qiankun")],-1),k={href:"https://qiankun.umijs.org/",target:"_blank",rel:"noopener noreferrer"},v={href:"https://umijs.org/zh-CN/plugins/plugin-qiankun#MicroApp",target:"_blank",rel:"noopener noreferrer"},m=e(`<h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-qiankun"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-qiankun"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const l=JSON.parse('{"key":"v-b15becb0","path":"/reference/plugin/plugins/qiankun.html","title":"@fesjs/plugin-qiankun","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"主应用配置","slug":"主应用配置","link":"#主应用配置","children":[{"level":3,"title":"第一步:注册子应用","slug":"第一步-注册子应用","link":"#第一步-注册子应用","children":[]},{"level":3,"title":"第二步:装载子应用","slug":"第二步-装载子应用","link":"#第二步-装载子应用","children":[]}]},{"level":2,"title":"子应用配置","slug":"子应用配置","link":"#子应用配置","children":[{"level":3,"title":"第一步:插件注册","slug":"第一步-插件注册","link":"#第一步-插件注册","children":[]},{"level":3,"title":"第二步:配置运行时生命周期钩子(可选)","slug":"第二步-配置运行时生命周期钩子-可选","link":"#第二步-配置运行时生命周期钩子-可选","children":[]}]},{"level":2,"title":"父子应用通讯","slug":"父子应用通讯","link":"#父子应用通讯","children":[{"level":3,"title":"配合 useModel 使用","slug":"配合-usemodel-使用","link":"#配合-usemodel-使用","children":[]},{"level":3,"title":"基于 props 传递","slug":"基于-props-传递","link":"#基于-props-传递","children":[]},{"level":3,"title":"MicroApp","slug":"microapp","link":"#microapp","children":[]},{"level":3,"title":"MicroAppWithMemoHistory","slug":"microappwithmemohistory","link":"#microappwithmemohistory","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/qiankun.md"}');export{l as data};
|
const l=JSON.parse('{"key":"v-b15becb0","path":"/reference/plugin/plugins/qiankun.html","title":"@fesjs/plugin-qiankun","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"主应用配置","slug":"主应用配置","link":"#主应用配置","children":[{"level":3,"title":"第一步:注册子应用","slug":"第一步-注册子应用","link":"#第一步-注册子应用","children":[]},{"level":3,"title":"第二步:装载子应用","slug":"第二步-装载子应用","link":"#第二步-装载子应用","children":[]}]},{"level":2,"title":"子应用配置","slug":"子应用配置","link":"#子应用配置","children":[{"level":3,"title":"第一步:插件注册","slug":"第一步-插件注册","link":"#第一步-插件注册","children":[]},{"level":3,"title":"第二步:配置运行时生命周期钩子(可选)","slug":"第二步-配置运行时生命周期钩子-可选","link":"#第二步-配置运行时生命周期钩子-可选","children":[]}]},{"level":2,"title":"父子应用通讯","slug":"父子应用通讯","link":"#父子应用通讯","children":[{"level":3,"title":"配合 useModel 使用","slug":"配合-usemodel-使用","link":"#配合-usemodel-使用","children":[]},{"level":3,"title":"基于 props 传递","slug":"基于-props-传递","link":"#基于-props-传递","children":[]},{"level":3,"title":"MicroApp","slug":"microapp","link":"#microapp","children":[]},{"level":3,"title":"MicroAppWithMemoHistory","slug":"microappwithmemohistory","link":"#microappwithmemohistory","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/qiankun.md"}');export{l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as o,o as c,c as l,b as n,d as s,a as e,f as a}from"./app.1fff394b.js";const i={},u=a(`<h1 id="fesjs-plugin-request" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-request" aria-hidden="true">#</a> @fesjs/plugin-request</h1><p>基于 fetch 封装的 request,内置防止重复请求、请求缓存、错误处理等功能。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as p,r as o,o as c,c as l,b as n,d as s,a as e,f as a}from"./app.005e0daf.js";const i={},u=a(`<h1 id="fesjs-plugin-request" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-request" aria-hidden="true">#</a> @fesjs/plugin-request</h1><p>基于 fetch 封装的 request,内置防止重复请求、请求缓存、错误处理等功能。</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-request"</span><span class="token operator">:</span> <span class="token string">"^4.0.0-beta.0"</span>
|
<span class="token property">"@fesjs/plugin-request"</span><span class="token operator">:</span> <span class="token string">"^4.0.0-beta.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-41dee210","path":"/reference/plugin/plugins/request.html","title":"@fesjs/plugin-request","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"request","slug":"request","link":"#request","children":[]},{"level":3,"title":"useRequest","slug":"userequest","link":"#userequest","children":[]}]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"发起一个普通 post 请求","slug":"发起一个普通-post-请求","link":"#发起一个普通-post-请求","children":[]},{"level":3,"title":"merge 重复请求","slug":"merge-重复请求","link":"#merge-重复请求","children":[]},{"level":3,"title":"请求缓存","slug":"请求缓存","link":"#请求缓存","children":[]},{"level":3,"title":"请求 abort","slug":"请求-abort","link":"#请求-abort","children":[]},{"level":3,"title":"获取 response headers","slug":"获取-response-headers","link":"#获取-response-headers","children":[]},{"level":3,"title":"结合 use 使用","slug":"结合-use-使用","link":"#结合-use-使用","children":[]}]},{"level":2,"title":"3.x 升级到 4.x","slug":"_3-x-升级到-4-x","link":"#_3-x-升级到-4-x","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/request.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-41dee210","path":"/reference/plugin/plugins/request.html","title":"@fesjs/plugin-request","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"运行时配置","slug":"运行时配置","link":"#运行时配置","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"request","slug":"request","link":"#request","children":[]},{"level":3,"title":"useRequest","slug":"userequest","link":"#userequest","children":[]}]},{"level":2,"title":"使用","slug":"使用","link":"#使用","children":[{"level":3,"title":"发起一个普通 post 请求","slug":"发起一个普通-post-请求","link":"#发起一个普通-post-请求","children":[]},{"level":3,"title":"merge 重复请求","slug":"merge-重复请求","link":"#merge-重复请求","children":[]},{"level":3,"title":"请求缓存","slug":"请求缓存","link":"#请求缓存","children":[]},{"level":3,"title":"请求 abort","slug":"请求-abort","link":"#请求-abort","children":[]},{"level":3,"title":"获取 response headers","slug":"获取-response-headers","link":"#获取-response-headers","children":[]},{"level":3,"title":"结合 use 使用","slug":"结合-use-使用","link":"#结合-use-使用","children":[]}]},{"level":2,"title":"3.x 升级到 4.x","slug":"_3-x-升级到-4-x","link":"#_3-x-升级到-4-x","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/request.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,r as o,o as c,c as l,b as n,d as s,a as e,f as p}from"./app.1fff394b.js";const i={},r=n("h1",{id:"路由",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#路由","aria-hidden":"true"},"#"),s(" 路由")],-1),u=n("code",null,"Vue Router",-1),d={href:"https://next.router.vuejs.org/",target:"_blank",rel:"noopener noreferrer"},k=p(`<h2 id="路由配置" tabindex="-1"><a class="header-anchor" href="#路由配置" aria-hidden="true">#</a> 路由配置</h2><p>在配置文件 <code>.fes.js</code>中通过 <code>router</code> 进行配置。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
|
import{_ as t,r as o,o as c,c as l,b as n,d as s,a as e,f as p}from"./app.005e0daf.js";const i={},r=n("h1",{id:"路由",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#路由","aria-hidden":"true"},"#"),s(" 路由")],-1),u=n("code",null,"Vue Router",-1),d={href:"https://next.router.vuejs.org/",target:"_blank",rel:"noopener noreferrer"},k=p(`<h2 id="路由配置" tabindex="-1"><a class="header-anchor" href="#路由配置" aria-hidden="true">#</a> 路由配置</h2><p>在配置文件 <code>.fes.js</code>中通过 <code>router</code> 进行配置。</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">router</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token literal-property property">router</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">routes</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">routes</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
|
||||||
<span class="token literal-property property">mode</span><span class="token operator">:</span> <span class="token string">'hash'</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">mode</span><span class="token operator">:</span> <span class="token string">'hash'</span><span class="token punctuation">,</span>
|
@ -1 +1 @@
|
|||||||
const l=JSON.parse('{"key":"v-6320961c","path":"/guide/route.html","title":"路由","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"路由配置","slug":"路由配置","link":"#路由配置","children":[{"level":3,"title":"routes","slug":"routes","link":"#routes","children":[]},{"level":3,"title":"mode","slug":"mode","link":"#mode","children":[]}]},{"level":2,"title":"约定式路由","slug":"约定式路由","link":"#约定式路由","children":[{"level":3,"title":"约定规范","slug":"约定规范","link":"#约定规范","children":[]},{"level":3,"title":"动态路由","slug":"动态路由","link":"#动态路由","children":[]},{"level":3,"title":"模糊匹配","slug":"模糊匹配","link":"#模糊匹配","children":[]},{"level":3,"title":"嵌套路由","slug":"嵌套路由","link":"#嵌套路由","children":[]},{"level":3,"title":"模糊匹配","slug":"模糊匹配-1","link":"#模糊匹配-1","children":[]},{"level":3,"title":"智能路由","slug":"智能路由","link":"#智能路由","children":[]}]},{"level":2,"title":"扩展路由元信息","slug":"扩展路由元信息","link":"#扩展路由元信息","children":[]},{"level":2,"title":"路由跳转","slug":"路由跳转","link":"#路由跳转","children":[{"level":3,"title":"声明式","slug":"声明式","link":"#声明式","children":[]},{"level":3,"title":"命令式","slug":"命令式","link":"#命令式","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/route.md"}');export{l as data};
|
const l=JSON.parse('{"key":"v-6320961c","path":"/guide/route.html","title":"路由","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"路由配置","slug":"路由配置","link":"#路由配置","children":[{"level":3,"title":"routes","slug":"routes","link":"#routes","children":[]},{"level":3,"title":"mode","slug":"mode","link":"#mode","children":[]}]},{"level":2,"title":"约定式路由","slug":"约定式路由","link":"#约定式路由","children":[{"level":3,"title":"约定规范","slug":"约定规范","link":"#约定规范","children":[]},{"level":3,"title":"动态路由","slug":"动态路由","link":"#动态路由","children":[]},{"level":3,"title":"模糊匹配","slug":"模糊匹配","link":"#模糊匹配","children":[]},{"level":3,"title":"嵌套路由","slug":"嵌套路由","link":"#嵌套路由","children":[]},{"level":3,"title":"模糊匹配","slug":"模糊匹配-1","link":"#模糊匹配-1","children":[]},{"level":3,"title":"智能路由","slug":"智能路由","link":"#智能路由","children":[]}]},{"level":2,"title":"扩展路由元信息","slug":"扩展路由元信息","link":"#扩展路由元信息","children":[]},{"level":2,"title":"路由跳转","slug":"路由跳转","link":"#路由跳转","children":[{"level":3,"title":"声明式","slug":"声明式","link":"#声明式","children":[]},{"level":3,"title":"命令式","slug":"命令式","link":"#命令式","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/route.md"}');export{l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,f as e}from"./app.1fff394b.js";const p={},t=e(`<h1 id="运行时配置" tabindex="-1"><a class="header-anchor" href="#运行时配置" aria-hidden="true">#</a> 运行时配置</h1><p>Fes.js 约定 <code>src/app.js</code> 为运行时配置文件。运行时配置和配置的区别是他跑在浏览器端,因此我们可以在这里写函数、引入浏览器端依赖项等等,注意不要引入 node 端依赖项。</p><h2 id="运行时为啥需要配置" tabindex="-1"><a class="header-anchor" href="#运行时为啥需要配置" aria-hidden="true">#</a> 运行时为啥需要配置?</h2><p>Fes.js 框架跟传统开发模式不一样。传统开发模式中用户编写 entry 文件,而 Fes.js 中 entry 文件由框架生成,用户就不必要编写胶水代码。内置插件和其他插件提供的一些运行时功能提供用户或者其他插件自定义。</p><p>例如:</p><p>plugin-access 插件定义运行时配置项:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>api<span class="token punctuation">.</span><span class="token function">addRuntimePluginKey</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token string">'access'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
import{_ as n,o as s,c as a,f as e}from"./app.005e0daf.js";const p={},t=e(`<h1 id="运行时配置" tabindex="-1"><a class="header-anchor" href="#运行时配置" aria-hidden="true">#</a> 运行时配置</h1><p>Fes.js 约定 <code>src/app.js</code> 为运行时配置文件。运行时配置和配置的区别是他跑在浏览器端,因此我们可以在这里写函数、引入浏览器端依赖项等等,注意不要引入 node 端依赖项。</p><h2 id="运行时为啥需要配置" tabindex="-1"><a class="header-anchor" href="#运行时为啥需要配置" aria-hidden="true">#</a> 运行时为啥需要配置?</h2><p>Fes.js 框架跟传统开发模式不一样。传统开发模式中用户编写 entry 文件,而 Fes.js 中 entry 文件由框架生成,用户就不必要编写胶水代码。内置插件和其他插件提供的一些运行时功能提供用户或者其他插件自定义。</p><p>例如:</p><p>plugin-access 插件定义运行时配置项:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>api<span class="token punctuation">.</span><span class="token function">addRuntimePluginKey</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token string">'access'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>plugin-access 插件读取配置项:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">const</span> runtimeConfig <span class="token operator">=</span> plugin<span class="token punctuation">.</span><span class="token function">applyPlugins</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>plugin-access 插件读取配置项:</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">const</span> runtimeConfig <span class="token operator">=</span> plugin<span class="token punctuation">.</span><span class="token function">applyPlugins</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
|
||||||
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'access'</span><span class="token punctuation">,</span>
|
<span class="token literal-property property">key</span><span class="token operator">:</span> <span class="token string">'access'</span><span class="token punctuation">,</span>
|
||||||
<span class="token literal-property property">type</span><span class="token operator">:</span> ApplyPluginsType<span class="token punctuation">.</span>modify<span class="token punctuation">,</span>
|
<span class="token literal-property property">type</span><span class="token operator">:</span> ApplyPluginsType<span class="token punctuation">.</span>modify<span class="token punctuation">,</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-3dba8814","path":"/guide/runtime-config.html","title":"运行时配置","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"运行时为啥需要配置?","slug":"运行时为啥需要配置","link":"#运行时为啥需要配置","children":[]},{"level":2,"title":"配置智能提示","slug":"配置智能提示","link":"#配置智能提示","children":[]},{"level":2,"title":"配置项","slug":"配置项","link":"#配置项","children":[{"level":3,"title":"beforeRender","slug":"beforerender","link":"#beforerender","children":[]},{"level":3,"title":"patchRoutes","slug":"patchroutes","link":"#patchroutes","children":[]},{"level":3,"title":"modifyRoute","slug":"modifyroute","link":"#modifyroute","children":[]},{"level":3,"title":"modifyClientRenderOpts","slug":"modifyclientrenderopts","link":"#modifyclientrenderopts","children":[]},{"level":3,"title":"rootContainer","slug":"rootcontainer","link":"#rootcontainer","children":[]},{"level":3,"title":"onAppCreated","slug":"onappcreated","link":"#onappcreated","children":[]},{"level":3,"title":"render","slug":"render","link":"#render","children":[]},{"level":3,"title":"onRouterCreated","slug":"onroutercreated","link":"#onroutercreated","children":[]}]},{"level":2,"title":"更多配置项","slug":"更多配置项","link":"#更多配置项","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/runtime-config.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-3dba8814","path":"/guide/runtime-config.html","title":"运行时配置","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"运行时为啥需要配置?","slug":"运行时为啥需要配置","link":"#运行时为啥需要配置","children":[]},{"level":2,"title":"配置智能提示","slug":"配置智能提示","link":"#配置智能提示","children":[]},{"level":2,"title":"配置项","slug":"配置项","link":"#配置项","children":[{"level":3,"title":"beforeRender","slug":"beforerender","link":"#beforerender","children":[]},{"level":3,"title":"patchRoutes","slug":"patchroutes","link":"#patchroutes","children":[]},{"level":3,"title":"modifyRoute","slug":"modifyroute","link":"#modifyroute","children":[]},{"level":3,"title":"modifyClientRenderOpts","slug":"modifyclientrenderopts","link":"#modifyclientrenderopts","children":[]},{"level":3,"title":"rootContainer","slug":"rootcontainer","link":"#rootcontainer","children":[]},{"level":3,"title":"onAppCreated","slug":"onappcreated","link":"#onappcreated","children":[]},{"level":3,"title":"render","slug":"render","link":"#render","children":[]},{"level":3,"title":"onRouterCreated","slug":"onroutercreated","link":"#onroutercreated","children":[]}]},{"level":2,"title":"更多配置项","slug":"更多配置项","link":"#更多配置项","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/runtime-config.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-5bf80046","path":"/reference/plugin/plugins/sass.html","title":"@fesjs/plugin-sass","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"global css","slug":"global-css","link":"#global-css","children":[]},{"level":2,"title":"Vue 单文件组件","slug":"vue-单文件组件","link":"#vue-单文件组件","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/sass.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-5bf80046","path":"/reference/plugin/plugins/sass.html","title":"@fesjs/plugin-sass","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"global css","slug":"global-css","link":"#global-css","children":[]},{"level":2,"title":"Vue 单文件组件","slug":"vue-单文件组件","link":"#vue-单文件组件","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/sass.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,o as a,c as n,f as e}from"./app.1fff394b.js";const t={},c=e(`<h1 id="fesjs-plugin-sass" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-sass" aria-hidden="true">#</a> @fesjs/plugin-sass</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>Fes.js 默认只支持 <code>less</code>,通过此插件扩展支持 <code>sass</code>。</p><div class="custom-container tip"><p class="custom-container-title">webpack 构建 sass 插件</p><p>如果使用 Vite 构建,直接装 <code>sass</code> 依赖即可,不需要安装此插件。</p></div><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as s,o as a,c as n,f as e}from"./app.005e0daf.js";const t={},c=e(`<h1 id="fesjs-plugin-sass" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-sass" aria-hidden="true">#</a> @fesjs/plugin-sass</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>Fes.js 默认只支持 <code>less</code>,通过此插件扩展支持 <code>sass</code>。</p><div class="custom-container tip"><p class="custom-container-title">webpack 构建 sass 插件</p><p>如果使用 Vite 构建,直接装 <code>sass</code> 依赖即可,不需要安装此插件。</p></div><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-sass"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-sass"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,r as o,o as p,c,b as s,d as n,a as r,f as a}from"./app.1fff394b.js";const i={},l=a(`<h1 id="fesjs-plugin-swc" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-swc" aria-hidden="true">#</a> @fesjs/plugin-swc</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>webpack 启用 swc,构建速度更快!</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as t,r as o,o as p,c,b as s,d as n,a as r,f as a}from"./app.005e0daf.js";const i={},l=a(`<h1 id="fesjs-plugin-swc" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-swc" aria-hidden="true">#</a> @fesjs/plugin-swc</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>webpack 启用 swc,构建速度更快!</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-swc"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-swc"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-317f9008","path":"/reference/plugin/plugins/swc.html","title":"@fesjs/plugin-swc","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/swc.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-317f9008","path":"/reference/plugin/plugins/swc.html","title":"@fesjs/plugin-swc","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/swc.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,f as t}from"./app.1fff394b.js";const p={},e=t(`<h1 id="html-模板" tabindex="-1"><a class="header-anchor" href="#html-模板" aria-hidden="true">#</a> HTML 模板</h1><p>Fes.js 默认模板内容是:</p><div class="custom-container tip"><p class="custom-container-title">提示</p><p>fes3.0+ html 模版文件从 <code>public/index.html</code> 挪到项目根目录。</p></div><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token doctype"><span class="token punctuation"><!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">></span></span>
|
import{_ as n,o as a,c as s,f as t}from"./app.005e0daf.js";const p={},e=t(`<h1 id="html-模板" tabindex="-1"><a class="header-anchor" href="#html-模板" aria-hidden="true">#</a> HTML 模板</h1><p>Fes.js 默认模板内容是:</p><div class="custom-container tip"><p class="custom-container-title">提示</p><p>fes3.0+ html 模版文件从 <code>public/index.html</code> 挪到项目根目录。</p></div><div class="language-html line-numbers-mode" data-ext="html"><pre class="language-html"><code><span class="token doctype"><span class="token punctuation"><!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>html</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>html</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>head</span><span class="token punctuation">></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>head</span><span class="token punctuation">></span></span>
|
||||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>utf-8<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>utf-8<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-7b48519a","path":"/guide/template.html","title":"HTML 模板","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"修改页面标题","slug":"修改页面标题","link":"#修改页面标题","children":[]},{"level":2,"title":"模板变量","slug":"模板变量","link":"#模板变量","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/template.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-7b48519a","path":"/guide/template.html","title":"HTML 模板","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"修改页面标题","slug":"修改页面标题","link":"#修改页面标题","children":[]},{"level":2,"title":"模板变量","slug":"模板变量","link":"#模板变量","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/template.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-4acab794","path":"/guide/upgrade3.html","title":"从 2.0.x 迁移到 3.0.x","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"版本 3.0.x 的 break","slug":"版本-3-0-x-的-break","link":"#版本-3-0-x-的-break","children":[]},{"level":2,"title":"继续使用 Webpack","slug":"继续使用-webpack","link":"#继续使用-webpack","children":[]},{"level":2,"title":"换成 Vite","slug":"换成-vite","link":"#换成-vite","children":[]},{"level":2,"title":"插件","slug":"插件","link":"#插件","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"guide/upgrade3.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-4acab794","path":"/guide/upgrade3.html","title":"从 2.0.x 迁移到 3.0.x","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"版本 3.0.x 的 break","slug":"版本-3-0-x-的-break","link":"#版本-3-0-x-的-break","children":[]},{"level":2,"title":"继续使用 Webpack","slug":"继续使用-webpack","link":"#继续使用-webpack","children":[]},{"level":2,"title":"换成 Vite","slug":"换成-vite","link":"#换成-vite","children":[]},{"level":2,"title":"插件","slug":"插件","link":"#插件","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"guide/upgrade3.md"}');export{e as data};
|
@ -1 +1 @@
|
|||||||
import{_ as i,r as l,o as c,c as s,b as t,d as e,a as n,w as a,f as d}from"./app.1fff394b.js";const h={},u=t("h1",{id:"从-2-0-x-迁移到-3-0-x",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#从-2-0-x-迁移到-3-0-x","aria-hidden":"true"},"#"),e(" 从 2.0.x 迁移到 3.0.x")],-1),_=t("h2",{id:"版本-3-0-x-的-break",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#版本-3-0-x-的-break","aria-hidden":"true"},"#"),e(" 版本 3.0.x 的 break")],-1),p={href:"https://github.com/webpack/webpack-dev-server",target:"_blank",rel:"noopener noreferrer"},b=t("code",null,"v3.x",-1),f=t("code",null,"v4.x",-1),k={href:"https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md",target:"_blank",rel:"noopener noreferrer"},m=t("h2",{id:"继续使用-webpack",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#继续使用-webpack","aria-hidden":"true"},"#"),e(" 继续使用 Webpack")],-1),x=t("li",null,[e("添加 Webpack 构建依赖包: "),t("code",null,"npm i @fesjs/builder-webpack -D"),e("。")],-1),g=t("code",null,"public/index.html",-1),v={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},w=t("h2",{id:"换成-vite",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#换成-vite","aria-hidden":"true"},"#"),e(" 换成 Vite")],-1),j=t("li",null,[e("安装依赖包 "),t("code",null,"npm i @fesjs/builder-vite"),e("。")],-1),V=t("li",null,[e("将 Webpack 相关的配置换成 Vite,具体可查看"),t("a",{href:"../reference/config"},"配置"),e("。")],-1),L=t("code",null,"public/index.html",-1),q={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},N={href:"https://github.com/vbenjs/vite-plugin-html",target:"_blank",rel:"noopener noreferrer"},W=t("li",null,[e("将 "),t("code",null,"require"),e(" 等 Vite 不支持的代码,改写成 Vite 支持的方式。")],-1),B=d('<h2 id="插件" tabindex="-1"><a class="header-anchor" href="#插件" aria-hidden="true">#</a> 插件</h2><p>插件都需要升级到 <code>3.0.x</code> 版本,新版添加了兼容<code>builder</code>的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。</p><ul><li><a href="../reference/plugins/layout">@fesjs/plugin-layout</a> 需要升级到<code>5.0.x</code>版本。</li><li><a href="../reference/plugins/locale">@fesjs/plugin-locale</a> 需要升级到<code>4.0.x</code>版本。</li><li><a href="../reference/plugins/qiankun">@fesjs/plugin-qiankun</a> 由于<code>qiankun</code>技术限制,子应用目前还只能使用 Webpack 构建。</li></ul>',3);function E(y,C){const o=l("RouterLink"),r=l("ExternalLinkIcon");return c(),s("div",null,[u,_,t("ol",null,[t("li",null,[e("编译时的 "),n(o,{to:"/reference/config/#base"},{default:a(()=>[e("base")]),_:1}),e(" 配置,移到了 "),n(o,{to:"/reference/config/#router"},{default:a(()=>[e("router.base")]),_:1}),e(" 下。")]),t("li",null,[t("a",p,[e("webpack-dev-server"),n(r)]),e(" 从 "),b,e(" 升级到了 "),f,e(",如果遇到配置不兼容,可以查看"),t("a",k,[e("webpack-dev-server 3.x 升级 4.x"),n(r)]),e("。")])]),m,t("ol",null,[x,t("li",null,[e("如果有,将 "),g,e(" 文件挪到项目根目录,移除 "),t("a",v,[e("html-webpack-plugin"),n(r)]),e(" 相关配置,具体模版变量使用请查看"),n(o,{to:"/guide/template.html"},{default:a(()=>[e("HTML 模版")]),_:1}),e("。")])]),w,t("ol",null,[j,V,t("li",null,[e("将 html 模版文件从 "),L,e(" 挪到项目根目录,如果有相应的 "),t("a",q,[e("html-webpack-plugin"),n(r)]),e(" 配置,需要改成 "),t("a",N,[e("vite-plugin-html"),n(r)]),e(" 的写法。")]),W]),B])}const R=i(h,[["render",E],["__file","upgrade3.html.vue"]]);export{R as default};
|
import{_ as i,r as l,o as c,c as s,b as t,d as e,a as n,w as a,f as d}from"./app.005e0daf.js";const h={},u=t("h1",{id:"从-2-0-x-迁移到-3-0-x",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#从-2-0-x-迁移到-3-0-x","aria-hidden":"true"},"#"),e(" 从 2.0.x 迁移到 3.0.x")],-1),_=t("h2",{id:"版本-3-0-x-的-break",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#版本-3-0-x-的-break","aria-hidden":"true"},"#"),e(" 版本 3.0.x 的 break")],-1),p={href:"https://github.com/webpack/webpack-dev-server",target:"_blank",rel:"noopener noreferrer"},b=t("code",null,"v3.x",-1),f=t("code",null,"v4.x",-1),k={href:"https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md",target:"_blank",rel:"noopener noreferrer"},m=t("h2",{id:"继续使用-webpack",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#继续使用-webpack","aria-hidden":"true"},"#"),e(" 继续使用 Webpack")],-1),x=t("li",null,[e("添加 Webpack 构建依赖包: "),t("code",null,"npm i @fesjs/builder-webpack -D"),e("。")],-1),g=t("code",null,"public/index.html",-1),v={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},w=t("h2",{id:"换成-vite",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#换成-vite","aria-hidden":"true"},"#"),e(" 换成 Vite")],-1),j=t("li",null,[e("安装依赖包 "),t("code",null,"npm i @fesjs/builder-vite"),e("。")],-1),V=t("li",null,[e("将 Webpack 相关的配置换成 Vite,具体可查看"),t("a",{href:"../reference/config"},"配置"),e("。")],-1),L=t("code",null,"public/index.html",-1),q={href:"https://github.com/jantimon/html-webpack-plugin",target:"_blank",rel:"noopener noreferrer"},N={href:"https://github.com/vbenjs/vite-plugin-html",target:"_blank",rel:"noopener noreferrer"},W=t("li",null,[e("将 "),t("code",null,"require"),e(" 等 Vite 不支持的代码,改写成 Vite 支持的方式。")],-1),B=d('<h2 id="插件" tabindex="-1"><a class="header-anchor" href="#插件" aria-hidden="true">#</a> 插件</h2><p>插件都需要升级到 <code>3.0.x</code> 版本,新版添加了兼容<code>builder</code>的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。</p><ul><li><a href="../reference/plugins/layout">@fesjs/plugin-layout</a> 需要升级到<code>5.0.x</code>版本。</li><li><a href="../reference/plugins/locale">@fesjs/plugin-locale</a> 需要升级到<code>4.0.x</code>版本。</li><li><a href="../reference/plugins/qiankun">@fesjs/plugin-qiankun</a> 由于<code>qiankun</code>技术限制,子应用目前还只能使用 Webpack 构建。</li></ul>',3);function E(y,C){const o=l("RouterLink"),r=l("ExternalLinkIcon");return c(),s("div",null,[u,_,t("ol",null,[t("li",null,[e("编译时的 "),n(o,{to:"/reference/config/#base"},{default:a(()=>[e("base")]),_:1}),e(" 配置,移到了 "),n(o,{to:"/reference/config/#router"},{default:a(()=>[e("router.base")]),_:1}),e(" 下。")]),t("li",null,[t("a",p,[e("webpack-dev-server"),n(r)]),e(" 从 "),b,e(" 升级到了 "),f,e(",如果遇到配置不兼容,可以查看"),t("a",k,[e("webpack-dev-server 3.x 升级 4.x"),n(r)]),e("。")])]),m,t("ol",null,[x,t("li",null,[e("如果有,将 "),g,e(" 文件挪到项目根目录,移除 "),t("a",v,[e("html-webpack-plugin"),n(r)]),e(" 相关配置,具体模版变量使用请查看"),n(o,{to:"/guide/template.html"},{default:a(()=>[e("HTML 模版")]),_:1}),e("。")])]),w,t("ol",null,[j,V,t("li",null,[e("将 html 模版文件从 "),L,e(" 挪到项目根目录,如果有相应的 "),t("a",q,[e("html-webpack-plugin"),n(r)]),e(" 配置,需要改成 "),t("a",N,[e("vite-plugin-html"),n(r)]),e(" 的写法。")]),W]),B])}const R=i(h,[["render",E],["__file","upgrade3.html.vue"]]);export{R as default};
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-5f4c684e","path":"/reference/plugin/plugins/vuex.html","title":"@fesjs/plugin-vuex","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":2,"title":"场景使用","slug":"场景使用","link":"#场景使用","children":[]},{"level":2,"title":"vuex 插件","slug":"vuex-插件","link":"#vuex-插件","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"store","slug":"store","link":"#store","children":[]},{"level":3,"title":"MUTATION_TYPES","slug":"mutation-types","link":"#mutation-types","children":[]},{"level":3,"title":"GETTER_TYPES","slug":"getter-types","link":"#getter-types","children":[]},{"level":3,"title":"ACTION_TYPES","slug":"action-types","link":"#action-types","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/vuex.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-5f4c684e","path":"/reference/plugin/plugins/vuex.html","title":"@fesjs/plugin-vuex","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[]},{"level":2,"title":"场景使用","slug":"场景使用","link":"#场景使用","children":[]},{"level":2,"title":"vuex 插件","slug":"vuex-插件","link":"#vuex-插件","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"store","slug":"store","link":"#store","children":[]},{"level":3,"title":"MUTATION_TYPES","slug":"mutation-types","link":"#mutation-types","children":[]},{"level":3,"title":"GETTER_TYPES","slug":"getter-types","link":"#getter-types","children":[]},{"level":3,"title":"ACTION_TYPES","slug":"action-types","link":"#action-types","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/vuex.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as e,o,c,b as n,d as s,a as l,f as a}from"./app.1fff394b.js";const i={},u=a(`<h1 id="fesjs-plugin-vuex" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-vuex" aria-hidden="true">#</a> @fesjs/plugin-vuex</h1><div class="custom-container tip"><p class="custom-container-title">提示</p><p>vue3+ 官方推荐使用<a href="./pinia">pinia</a>,不在推荐使用 vuex。</p></div><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>集成 vuex 插件</p><p>增强 vuex,导出所有的<code>mutations</code>、<code>actions</code>和<code>getter</code>的事件类型,编辑器提示</p><p>约定模式,module 和 plugin 定义放在 stores 目录下,文件名包含 plugin 被解析为插件,无需额外配置,定义即可用。</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>└── src
|
import{_ as p,r as e,o,c,b as n,d as s,a as l,f as a}from"./app.005e0daf.js";const i={},u=a(`<h1 id="fesjs-plugin-vuex" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-vuex" aria-hidden="true">#</a> @fesjs/plugin-vuex</h1><div class="custom-container tip"><p class="custom-container-title">提示</p><p>vue3+ 官方推荐使用<a href="./pinia">pinia</a>,不在推荐使用 vuex。</p></div><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>集成 vuex 插件</p><p>增强 vuex,导出所有的<code>mutations</code>、<code>actions</code>和<code>getter</code>的事件类型,编辑器提示</p><p>约定模式,module 和 plugin 定义放在 stores 目录下,文件名包含 plugin 被解析为插件,无需额外配置,定义即可用。</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>└── src
|
||||||
├── pages
|
├── pages
|
||||||
│ └── index.vue
|
│ └── index.vue
|
||||||
└── stores
|
└── stores
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,f as e}from"./app.1fff394b.js";const t={},p=e(`<h1 id="fesjs-plugin-watermark" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-watermark" aria-hidden="true">#</a> @fesjs/plugin-watermark</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>给页面添加水印效果</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as n,o as a,c as s,f as e}from"./app.005e0daf.js";const t={},p=e(`<h1 id="fesjs-plugin-watermark" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-watermark" aria-hidden="true">#</a> @fesjs/plugin-watermark</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>给页面添加水印效果</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||||||
<span class="token property">"@fesjs/plugin-watermark"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
<span class="token property">"@fesjs/plugin-watermark"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-1c0edac3","path":"/reference/plugin/plugins/watermark.html","title":"@fesjs/plugin-watermark","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"disabled","slug":"disabled","link":"#disabled","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"createWatermark","slug":"createwatermark","link":"#createwatermark","children":[]}]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/watermark.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-1c0edac3","path":"/reference/plugin/plugins/watermark.html","title":"@fesjs/plugin-watermark","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"编译时配置","slug":"编译时配置","link":"#编译时配置","children":[{"level":3,"title":"disabled","slug":"disabled","link":"#disabled","children":[]}]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"createWatermark","slug":"createwatermark","link":"#createwatermark","children":[]}]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/watermark.md"}');export{e as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as i,r as o,o as c,c as r,b as s,d as n,a as e,f as t}from"./app.1fff394b.js";const p={},d=s("h1",{id:"fesjs-plugin-windicss",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-windicss","aria-hidden":"true"},"#"),n(" @fesjs/plugin-windicss")],-1),l={class:"custom-container warning"},u=s("p",{class:"custom-container-title"},"即将废弃",-1),h={href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},v=t(`<h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p><code>windicss</code> 支持</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
import{_ as i,r as o,o as c,c as r,b as s,d as n,a as e,f as t}from"./app.005e0daf.js";const p={},d=s("h1",{id:"fesjs-plugin-windicss",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#fesjs-plugin-windicss","aria-hidden":"true"},"#"),n(" @fesjs/plugin-windicss")],-1),l={class:"custom-container warning"},u=s("p",{class:"custom-container-title"},"即将废弃",-1),h={href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},v=t(`<h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p><code>windicss</code> 支持</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
|
||||||
<span class="token property">"devDependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
<span class="token property">"devDependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||||
<span class="token property">"@fesjs/plugin-windicss"</span><span class="token operator">:</span> <span class="token string">"^2.0.0"</span>
|
<span class="token property">"@fesjs/plugin-windicss"</span><span class="token operator">:</span> <span class="token string">"^2.0.0"</span>
|
||||||
<span class="token punctuation">}</span>
|
<span class="token punctuation">}</span>
|
@ -1 +1 @@
|
|||||||
const e=JSON.parse('{"key":"v-392e58ee","path":"/reference/plugin/plugins/windicss.html","title":"@fesjs/plugin-windicss","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[]}],"git":{"updatedTime":1681286587000,"contributors":[{"name":"qlin","email":"haizekuo@gmail.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/windicss.md"}');export{e as data};
|
const e=JSON.parse('{"key":"v-392e58ee","path":"/reference/plugin/plugins/windicss.html","title":"@fesjs/plugin-windicss","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"介绍","slug":"介绍","link":"#介绍","children":[]},{"level":2,"title":"启用方式","slug":"启用方式","link":"#启用方式","children":[]},{"level":2,"title":"配置","slug":"配置","link":"#配置","children":[]}],"git":{"updatedTime":1681713428000,"contributors":[{"name":"wanchun","email":"445436867@qq.com","commits":1}]},"filePathRelative":"reference/plugin/plugins/windicss.md"}');export{e as data};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user