Bladeren bron

chore: 迁移v7 版本适配

zhangyuhan 1 jaar geleden
bovenliggende
commit
78d4c4d3d8

+ 25 - 0
apps/mobile/.storybook/preview-head.html

@@ -1 +1,26 @@
 <!--<link rel=”preload” href=”your/font” />-->
 <!--<link rel=”preload” href=”your/font” />-->
+<link rel="preload" as="style" href="//cdn-common.jianyu360.com/cdn/assets/iconfont/mobile/24.2.28/iconfont.css">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/vue/2.7.16/vue.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/vue-router/3.6.5/vue-router.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/vuex/3.6.2/vuex.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/axios/1.6.7/axios.min.js">
+
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/lodash/4.17.21/lodash.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/dayjs/1.11.4/dayjs.min.js">
+<link rel="preload" as="script" href="//cdn-common.jianyu360.com/cdn/lib/js-cookie/2.2.1/js.cookie.min.js">
+
+<!-- 按优先级加载  -->
+<link rel="stylesheet" href="//cdn-common.jianyu360.com/cdn/assets/iconfont/mobile/24.7.16/iconfont.css">
+
+<script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.7.16/vue.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/vue-router/3.6.5/vue-router.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/vuex/3.6.2/vuex.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/axios/1.6.7/axios.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/lodash/4.17.21/lodash.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/dayjs/1.11.4/dayjs.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/js-cookie/2.2.1/js.cookie.min.js"></script>
+
+<script src="//cdn-common.jianyu360.com/cdn/lib/lottie-web/5.7.3/build/player/lottie.min.js"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/jquery/3.5.1/jquery.min.js"></script>

+ 3 - 2
apps/mobile/.storybook/preview.js

@@ -9,8 +9,9 @@ import { useArgs } from '@storybook/preview-api'
 import EventBus from './eventBus'
 import EventBus from './eventBus'
 import Vue from "vue";
 import Vue from "vue";
 
 
-
-Vue.prototype.$envs = {}
+if (Vue) {
+  Vue.prototype.$envs = {}
+}
 
 
 const ComponentUIBus = new EventBus()
 const ComponentUIBus = new EventBus()
 
 

+ 1 - 1
apps/mobile/package.json

@@ -11,7 +11,7 @@
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --ignore-path .gitignore",
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --ignore-path .gitignore",
     "format": "prettier --write \"./**/*.{,vue,ts,js,json,md}\"",
     "format": "prettier --write \"./**/*.{,vue,ts,js,json,md}\"",
     "storybook": "storybook dev -p 6006",
     "storybook": "storybook dev -p 6006",
-    "build-storybook": "storybook build"
+    "build-storybook": "storybook build -o ../../dist/efe-docs-mobile"
   },
   },
   "dependencies": {
   "dependencies": {
     "@jy/data-models": "workspace:^",
     "@jy/data-models": "workspace:^",

+ 3 - 20
apps/mobile/src/data/index.stories.mdx

@@ -1,4 +1,6 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
 
 
 <Meta
 <Meta
   title="项目工具/常量"
   title="项目工具/常量"
@@ -12,24 +14,5 @@ import { Meta } from '@storybook/addon-docs';
   }}
   }}
 />
 />
 
 
-### LINKS 页面地址
-定义app、wx页面地址
 
 
-#### 示例
-```js
-import { LINKS } from '@/data'
-
-console.log(LINKS.超级订阅落地页)
-// {
-//   app: '/jyapp/vipsubscribe/introducePage',
-//   wx: '/front/vipsubscribe/introducePage'
-// }
-```
-#### 与 openAppOrWxPage 自动匹配环境,打开外部项目链接
-```js
-import { openAppOrWxPage } from '@/utils'
-import { LINKS } from '@/data'
-
-// 打开外部项目链接
-openAppOrWxPage(LINKS.超级订阅落地页)
-```
+<Markdown>{ReadMe}</Markdown>

+ 3 - 12
apps/mobile/src/store/index.stories.mdx

@@ -1,4 +1,6 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
 
 
 <Meta
 <Meta
   title="全局状态/store"
   title="全局状态/store"
@@ -12,19 +14,8 @@ import { Meta } from '@storybook/addon-docs';
   }}
   }}
 />
 />
 
 
+<Markdown>{ReadMe}</Markdown>
 
 
-### direction
-获取页面进入方式
 
 
-#### 示例
-```js
-this.$store.state.direction
-```
 
 
-#### Options
-| 结果 | 描述 |
-| :----: | :----: |
-| reload | 初始化路由 / 刷新进入路由 |
-| forward | 其他路由前进到当前路由 |
-| back | 其他路由返回当前路由 |
 
 

+ 2 - 2
apps/mobile/src/stories/Introduction.stories.mdx

@@ -17,12 +17,12 @@ import { Meta } from '@storybook/addon-docs';
 
 
 ## 组件的定义
 ## 组件的定义
 
 
-* [组件拆分示例.pdf](http://192.168.3.11:10081/EFE/docs/raw/master/site/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86%E7%82%B9.pdf)
+* [组件拆分示例.pdf](http://192.168.3.128:8080/efe-docs/pdf/%E7%BB%84%E4%BB%B6%E6%8B%86%E5%88%86%E7%A4%BA%E4%BE%8B.pdf)
 
 
 ## 组件代码约束
 ## 组件代码约束
 
 
 * [vue官方风格指南](https://v3.cn.vuejs.org/style-guide/)
 * [vue官方风格指南](https://v3.cn.vuejs.org/style-guide/)
-* [剑鱼组件代码约束](http://192.168.3.11:10081/EFE/docs/raw/master/site/index.html)
+* [剑鱼组件代码约束](http://192.168.3.128:8080/efe-docs/)
 
 
 ## 组件文档
 ## 组件文档
 > 在组件同级新增 组件名.stories.js 或其他支持格式
 > 在组件同级新增 组件名.stories.js 或其他支持格式

+ 4 - 99
apps/mobile/src/utils/directive/index.stories.mdx

@@ -1,4 +1,7 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
+
 
 
 <Meta
 <Meta
   title="指令/directive"
   title="指令/directive"
@@ -12,103 +15,5 @@ import { Meta } from '@storybook/addon-docs';
   }}
   }}
 />
 />
 
 
-## 指令
-项目自定义指令
-
-### v-active
-用于实现自定义 active / press 点击样式效果
-
-#### 示例
-```html
-<button v-active="{ css: 'active', time: 260 }">v-active 示例</button>
-```
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| css | 用于添加的className | String | active |
-| time | 最大展示时长 ms, -1表示只有touchEnd时候才移除css的样式 | Number | -1 |
-
-
-### v-visited
-用于实现添加信息已访问样式,点击时自动存储对应 id, type 用于回显判断,基于实例方法 $visited 的简单封装
-
-#### 示例
-```html
-<!--简写-->
-<button v-visited.content="id">v-visited 示例</button>
-
-<!--等同于如下完整参数-->
-<button v-visited="{ css: 'visited', id: '信息唯一标识', type: 'content' }">v-visited 示例</button>
-
-<!--仅使用自动添加 className, 禁用点击自动缓存 -->
-<button v-visited.content.stop="id">v-visited 示例</button>
-
-<!--等同于如下完整参数-->
-<button v-visited="{ id: '信息唯一标识', type: 'content', stopClick: true }">v-visited 示例</button>
-```
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| css | 用于添加的已访问className | String | visited |
-| id | 信息唯一标识 | String | - |
-| type | 信息类型 | String (content、issued、ent、buyer、project) | - |
-| stopClick | 禁用点击自动缓存 | Boolean | false |
-
-#### Types 信息类型
-```
-content: 'article/content/*',   标讯详情页
-issued: 'article/issued',       供应详情页
-ent: 'ent(_ser)?_portrait',     企业详情页
-buyer: 'client_portrayal',      采购单位详情页
-project: 'client_follow_detail' 项目关注详情页
-```
-
-
-### v-keep
-用于实现收藏业务功能, 基于实例方法 $keep 的简单封装
-
-#### 示例
-```html
-<button v-keep="{ id: 'id1'}">
-    基础 v-keep 收藏示例
-</button>
-```
-```html
-<button
-    v-keep="{
-        status: false,
-        id: ['id1', 'id2']
-    }"
->
-    批量 v-keep 收藏示例
-</button>
-```
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| loadingTip | 加载提示 | String | 提交中 |
-| showLabel | 是否需要选择标签 | Boolean | true |
-| status | 当前是否处于收藏状态 | Boolean | false |
-| id |  用于收藏的 id | String / Array | - |
-| getContainer |  指定挂载的节点 | String / Function | body / () => Element |
-| complete | 业务回调 type 是否完成业务  | Function | - |
-
-
-### v-leave-info
-用于简单留资事件绑定
-
-场景:收藏、下载附件、免费体验等操作需先进行是否需要留资判断
-
-流程:绑定指令,传入指令所需参数source。
-指令会自行绑定点击事件并执行留资判断。如果需要留资,直接跳转留资页面
 
 
-#### 示例
-```html
-<button v-leave-info="'article_collection'"></button>
-```
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| source | 留资source字段 | String | '' |
+<Markdown>{ReadMe}</Markdown>

+ 3 - 101
apps/mobile/src/utils/format/index.stories.mdx

@@ -1,4 +1,6 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
 
 
 <Meta
 <Meta
   title="项目工具/格式化工具"
   title="项目工具/格式化工具"
@@ -12,105 +14,5 @@ import { Meta } from '@storybook/addon-docs';
   }}
   }}
 />
 />
 
 
-### calcNotExactTime
-时间格式化工具函数
 
 
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| exact | 快捷格式, 见下方 | String | - |
-| unit | 时间单位 [ms | s] | String | ms |
-
-#### 示例
-```js
-// 获取今天00:00:00 - 23:59:59
-calcNotExactTime('today')
-// {
-//   start: '时间戳',
-//   end: '时间戳'
-// }
-```
-
-#### Exacts 支持的格式
-```
-today 今天
-yesterday 昨天
-lately3 近3天
-lately-7 近7天
-lately7 近7天
-lately-30 近30天
-lately30 近30天
-lately90 近90天
-lately180 1近80天
-thisYear 今年全年
-thisyear 最近1年
-lastYear 去年全年
-sinceLastYear 去年至今
-sinceYearBeforeLast 前年至今
-threeyear 最近3年
-fiveyear 最近5年
-```
-
-### formatMoney
-金额格式化函数
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| money | 金额 | String, Number | - |
-| config | 类型 [full | number | unit] | String | full |
-| config.type | 配置项 | Object | 见下方详细字段 |
-| config.level | 初始单位索引 | Number | 0 |
-| config.levelArr | 单位数组 | Array | ['元', '万元', '亿元', '万亿元'] |
-| config.unit | 计算单位 | Number | 10000 |
-| config.digit | 精度,保留小数位数 | Number | 2 |
-| config.degrade | 指定单位索引时,所需精度不够是否降级单位 | Boolean | false |
-
-#### 基础示例
-```js
-formatMoney('1000')
-// 1000元
-
-formatMoney('1000', {
-  type: 'number'
-})
-// 1000
-
-formatMoney('1000', {
-  type: 'unit'
-})
-// 元
-```
-
-#### 复杂示例
-```js
-// 指定单位为万,格式化
-formatMoney('1', {
-  level: 1
-})
-// '' 默认精度为2,格式化后值为0
-
-formatMoney('1', {
-  digit: 4,
-  level: 1
-})
-// 0.0001万元
-
-formatMoney('1', {
-  degrade: true,
-  level: 1
-})
-// 1元 允许降级一个单位
-```
-
-#### 自定义示例
-```js
-// 自定义单位用法
-formatMoney('1000000', {
-    type: 'full',
-    level: 0,
-    unit: 10,
-    levelArr: ['分', '角', '元', '0元', '00元', '000元', '万元']
-})
-// 1万元
-```
+<Markdown>{ReadMe}</Markdown>

+ 3 - 70
apps/mobile/src/utils/index.stories.mdx

@@ -1,4 +1,6 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
 
 
 <Meta
 <Meta
   title="项目工具/Utils"
   title="项目工具/Utils"
@@ -12,74 +14,5 @@ import { Meta } from '@storybook/addon-docs';
   }}
   }}
 />
 />
 
 
-### $env, $envs
-项目运行环境
-
-#### 示例
-```js
-import { env, envs } from '@/utils'
-
-env.platform // 平台wx/app/h5
-env.platformOS // 系统平台android/ios
-envs.inWX // 判断是否是微信浏览器
-envs.inApp // 判断是否是app
-envs.inH5 // 判断是否是网页
-```
-
-### openLinkOfOther
-打开外部项目地址,自动区分补全前缀地址
-
-#### 示例
-```js
-import { openLinkOfOther } from '@/utils'
-
-// 根据环境,自动补全
-openLinkOfOther('/jyapp/vipsubscribe/introducePage')
-
-// 手动全路径
-openLinkOfOther('https://jianyu360.cn/jyapp/vipsubscribe/introducePage')
-```
-
-### openAppOrWxPage
-打开外部项目地址,自动区分补全前缀地址
-
-#### 示例
-```js
-import { openAppOrWxPage } from '@/utils'
-
-openAppOrWxPage({
-  app: '/jyapp/vipsubscribe/introducePage',
-  wx: '/front/vipsubscribe/introducePage'
-})
-
-// 携带参数
-openAppOrWxPage({
-  app: '/jyapp/vipsubscribe/introducePage',
-  wx: '/front/vipsubscribe/introducePage'
-}, {
-  query: {
-    type: 'type'
-  }
-})
-```
-
-### callChangeTab
-切换底部导航
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| name | 需要切换到的TabName 对应关系 search:搜索 subscribe:订阅 box:百宝箱 me:我的 message:消息 | String | - |
-| router | 当前项目需传递 this.$router | String | - |
-
-#### 示例
-```js
-import { callChangeTab } from '@/utils'
-
-// 当前项目 Tabbar
-callChangeTab('search', this.$router)
-
-// 旧项目 Tabbar
-callChangeTab('box')
-```
 
 
+<Markdown>{ReadMe}</Markdown>

+ 4 - 153
apps/mobile/src/utils/prototype/index.stories.mdx

@@ -1,4 +1,7 @@
 import { Meta } from '@storybook/addon-docs';
 import { Meta } from '@storybook/addon-docs';
+import { Markdown } from '@storybook/blocks';
+import ReadMe from './README.md?raw';
+
 
 
 <Meta
 <Meta
   title="实例方法/prototype"
   title="实例方法/prototype"
@@ -13,156 +16,4 @@ import { Meta } from '@storybook/addon-docs';
 />
 />
 
 
 
 
-### $keep
-用于实现收藏业务功能, 也可以使用指令 v-keep
-
-#### 示例
-```js
-this.status = false
-this.$keep.action({
-  status: this.status,
-  id: '',
-  complete: ({ type, message }) => {
-    if (type) {
-      this.status = !this.status
-    }
-  }
-})
-```
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| loadingTip | 加载提示 | String | 提交中 |
-| showLabel | 是否需要选择标签 | Boolean | true |
-| status | 当前是否处于收藏状态 | Boolean | false |
-| id |  用于收藏的 id | String / Array | - |
-| getContainer |  指定挂载的节点 | String / Function | body / () => Element |
-| complete | 业务回调 type 是否完成业务  | Function | ({ type, message }, response) => null |
-| source | 留资业务 source | String | article_collection |
-| stopLeaveInfo | 是否禁用留资业务 | Boolaan | false |
-| beforeRedirect | 留资业务回调 beforeRedirect  | Function | (conf, response) => null |
-
-
-### $storage
-用于快捷实现本地存储存取数据
-
-#### Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| prefix | 前缀 | String | package.json-name |
-| storage | localStorage/sessionStorage | Object | localStorage |
-| expires | 过期时间 | Date | -1 |
-| login | 是否添加特殊标识,标识登录时需清除的数据 | Boolean | false |
-| loginPrefix | 标识登录时需清除的数据的特殊附加前缀 | String | -login-clear- |
-
-#### 示例
-```js
-// 存
-this.$storage.set('test key', 'this is test value')
-
-// 取
-this.$storage.get('test key')
-// 取,没有值时使用默认值
-this.$storage.get('test key', 'this is default value')
-
-// 清除
-this.$storage.rm('test key')
-```
-
-#### 复杂示例
-```js
-// 存 设置过期时间为 今天23:59:59
-this.$storage.set('test key', 'this is test value', {
-  expires: 'today'
-})
-
-// 存 使用 sessionStorage
-this.$storage.set('test key', 'this is test value', {
-  storage: sessionStorage
-})
-
-// 存 APP端用户退出、登录时清除,或 Cookies.sessionID 变更时清除
-this.$storage.set('test key', 'this is test value', {
-  login: true
-})
-```
-
-### $visited
-用于快捷实现已访问信息存储,及回显判断,简单用法参见指令 v-visited
-
-#### 示例
-
-```js
-// 新增访问记录
-this.$visited.push({
-  type: '信息类型',
-  id: '信息唯一标识'
-})
-
-// 检查是否存在访问记录
-this.$visited.check({
-  type: '信息类型',
-  id: '信息唯一标识'
-})
-
-// 手动更新数据,获取最新本地存储数据,清除过期数据,更新 list
-this.$visited.refreshVisited()
-```
-
-#### Types 信息类型
-```
-content: 'article/content/*',   标讯详情页
-issued: 'article/issued',       供应详情页
-ent: 'ent(_ser)?_portrait',     企业详情页
-buyer: 'client_portrayal',      采购单位详情页
-project: 'client_follow_detail' 项目关注详情页
-```
-
-### $leaveInfo
-用于实现留资功能以及复杂留资逻辑判断的函数, 也可以使用指令 v-leave-info 使用简单功能
-
-#### 示例
-```js
-// 如果this.$leaveInfo中抛出异常,则do something中的内容不再执行
-// 如果beforeLeaveInfo中抛出Error,则do something中的内容不再执行
-// 判断是否需要留资
-await this.$leaveInfo({
-  source: 'listLeaveSource',
-  beforeRedirect: beforeLeaveInfo
-})
-
-// do something
-console.log('star')
-```
-```js
-// 自定义提示
-async function beforeLeaveInfo (conf, { retainedCapital: needLeaveInfo }) {
-  if (needLeaveInfo) {
-    await this.$dialog.confirm({
-      className: 'j-confirm-dialog',
-      closeOnClickOverlay: true,
-      showCancelButton: false,
-      message: '重要项目一键创建标签收藏!请完善个人信息,为您匹配精准服务',
-      confirmButtonText: '立即前往'
-    })
-    // throw new Error('需要留资,beforeRedirect中阻止了后续事件执行')
-  }
-}
-```
-
-#### Conf Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| source | 留资id(必传) | String | '' |
-| params | 额外参数 | Object | {} |
-| beforeRedirect | 需要跳转前的回调,`throw new Error('xxx') 中断后续操作`,支持Promise | Function | - |
-| redirect |  跳转操作,默认跳转留资 | Function | - |
-
-#### callback params Options
-| 参数 | 描述 | 类型 | 默认值 |
-| :----: | :----: | :----: | :----: |
-| source | 留资id | String | '' |
-| params | 额外参数 | Object | {} |
-| fource | 是否强制留资 | Boolean | false |
-| retainedCapital |  是否需要留资。是则跳转留资页面 | Boolean | false |
+<Markdown>{ReadMe}</Markdown>

+ 52 - 28
docs/.vitepress/config.mts

@@ -2,12 +2,11 @@ import { defineConfig } from 'vitepress'
 import { CustomAvatars } from './constant'
 import { CustomAvatars } from './constant'
 // @ts-ignore
 // @ts-ignore
 import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
 import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
-import { demoPreviewPlugin } from '@vitepress-code-preview/plugin'
-import { viteDemoPreviewPlugin } from '@vitepress-code-preview/plugin'
+
 
 
 export default defineConfig({
 export default defineConfig({
   base: '/efe-docs/',
   base: '/efe-docs/',
-  outDir: './efe-docs',
+  outDir: '../dist/efe-docs',
   title: '文档',
   title: '文档',
   description: "剑鱼前端团队内部文档 - 探索前端世界,从文档开始",
   description: "剑鱼前端团队内部文档 - 探索前端世界,从文档开始",
   lang: 'zh-CN',
   lang: 'zh-CN',
@@ -18,9 +17,9 @@ export default defineConfig({
     'plugins/**',
     'plugins/**',
     'scripts/**',
     'scripts/**',
   ],
   ],
-  // sitemap: {
-  //   hostname: './'
-  // },
+  sitemap: {
+    hostname: 'http://192.168.3.128:8080/efe-docs/'
+  },
   rewrites: {
   rewrites: {
     'apps/(.*)/README.md': 'apps/(.*)/index.md',
     'apps/(.*)/README.md': 'apps/(.*)/index.md',
     'core/(.*)/README.md': 'core/(.*)/index.md',
     'core/(.*)/README.md': 'core/(.*)/index.md',
@@ -47,10 +46,18 @@ export default defineConfig({
           { text: 'work-bench', link: '/apps/work-bench/' },
           { text: 'work-bench', link: '/apps/work-bench/' },
         ]
         ]
       },
       },
+      {
+        text: '组件',
+        items: [
+          { text: 'mobile', link: 'http://192.168.3.128:8080/efe-docs-mobile/' },
+          { text: 'pc', link: 'http://192.168.3.128:8080/efe-docs-pc/' },
+        ]
+      },
       {
       {
         text: 'data',
         text: 'data',
         items: [
         items: [
           { text: '🚧 @jy/api', link: '/data/api/' },
           { text: '🚧 @jy/api', link: '/data/api/' },
+          { text: '🚧 @jy/store', link: '/data/store/' },
           { text: '@jy/data-models', link: '/data/data-models/' }
           { text: '@jy/data-models', link: '/data/data-models/' }
         ]
         ]
       },
       },
@@ -79,8 +86,14 @@ export default defineConfig({
           { text: 'go模板相关', link: '/go/go安装应用' }
           { text: 'go模板相关', link: '/go/go安装应用' }
         ]
         ]
       },
       },
-      { text: '资源', link: '/resource' },
-      { text: '参与建设', link: '/to-do/' }
+      {
+        text: '参与建设',
+        items: [
+          { text: '资源', link: '/resource' },
+          { text: '参与建设', link: '/to-do/' },
+          { text: '网站地图', link: '/sitemap' }
+        ]
+      },
     ],
     ],
     sidebar: {
     sidebar: {
       '/guide/': {
       '/guide/': {
@@ -130,9 +143,9 @@ export default defineConfig({
             text: '业务模型',
             text: '业务模型',
             base: '/data/data-models/modules/',
             base: '/data/data-models/modules/',
             items: [
             items: [
-              { text: 'article 详情页', link: '/article/' },
-              { text: 'quick-monitor<br>项目、企业、业主监控', link: '/quick-monitor/' },
-              { text: 'quick-search<br>标讯、企业、采购搜索', link: '/quick-search/' },
+              { text: 'article 详情页', link: 'article/' },
+              { text: 'quick-monitor<br>项目、企业、业主监控', link: 'quick-monitor/' },
+              { text: 'quick-search<br>标讯、企业、采购搜索', link: 'quick-search/' },
             ]
             ]
           }
           }
         ]
         ]
@@ -146,7 +159,7 @@ export default defineConfig({
             items: [
             items: [
               {
               {
                 text: 'article-content<br>详情页',
                 text: 'article-content<br>详情页',
-                link: '/views/article-content/composables/'
+                link: 'views/article-content/composables/'
               }
               }
             ]
             ]
           },
           },
@@ -154,9 +167,9 @@ export default defineConfig({
             text: 'composables',
             text: 'composables',
             base: '/apps/bigmember_pc/src/composables/',
             base: '/apps/bigmember_pc/src/composables/',
             items: [
             items: [
-              { text: 'down-project-report<br>下载项目报告', link: '/down-project-report/' },
-              { text: 'quick-join-bid<br>参标,取消参标相关', link: '/quick-join-bid/' },
-              { text: 'quick-monitor<br>项目、企业、业主监控', link: '/quick-monitor/' }
+              { text: 'down-project-report<br>下载项目报告', link: 'down-project-report/' },
+              { text: 'quick-join-bid<br>参标,取消参标相关', link: 'quick-join-bid/' },
+              { text: 'quick-monitor<br>项目、企业、业主监控', link: 'quick-monitor/' }
             ]
             ]
           }
           }
         ]
         ]
@@ -168,8 +181,28 @@ export default defineConfig({
             text: 'composables',
             text: 'composables',
             base: '/apps/mobile/src/composables/',
             base: '/apps/mobile/src/composables/',
             items: [
             items: [
-              { text: 'quick-monitor<br>项目、企业、业主监控', link: '/quick-monitor/' }
+              { text: 'quick-monitor<br>项目、企业、业主监控', link: 'quick-monitor/' }
             ]
             ]
+          },
+          {
+            text: 'utils',
+            base: '/apps/mobile/src/utils/',
+            items: [
+              { text: 'utils', link: '/' },
+              { text: 'directive', link: 'directive/' },
+              { text: 'format', link: 'format/' },
+              { text: 'prototype', link: 'prototype/' },
+            ]
+          },
+          {
+            text: 'data',
+            base: '/apps/mobile/src/',
+            link: 'data/'
+          },
+          {
+            text: 'store',
+            base: '/apps/mobile/src/',
+            link: 'store/'
           }
           }
         ]
         ]
       },
       },
@@ -220,6 +253,7 @@ export default defineConfig({
       contributor.avatar = `https://jygit.jydev.jianyu360.cn/avatars/${CustomAvatars[contributor.name]}`
       contributor.avatar = `https://jygit.jydev.jianyu360.cn/avatars/${CustomAvatars[contributor.name]}`
       return contributor
       return contributor
     })
     })
+    console.log(relativePath, CustomContributors.length);
     return {
     return {
       CommitData: {
       CommitData: {
         contributors: CustomContributors,
         contributors: CustomContributors,
@@ -234,16 +268,6 @@ export default defineConfig({
       rollupOptions: {
       rollupOptions: {
         external: ["vue/server-renderer"]
         external: ["vue/server-renderer"]
       }
       }
-    },
-    plugins: [
-      viteDemoPreviewPlugin()
-    ]
-  },
-  markdown: {
-    config(md) {
-      md.use(demoPreviewPlugin, {
-        docRoot: '../'
-      })
-    },
-  },
+    }
+  }
 })
 })

+ 2 - 2
docs/cli/index.md

@@ -6,11 +6,11 @@
 ::: code-group
 ::: code-group
 
 
 ```shell [npm]
 ```shell [npm]
-npm i -g --registry=http://192.168.3.207:4873 @jianyu/cli
+npm i -g --registry=http://192.168.3.71:4873 @jianyu/cli
 ```
 ```
 
 
 ```shell [yarn]
 ```shell [yarn]
-yarn golbal add --registry=http://192.168.3.207:4873 @jianyu/cli
+yarn golbal add --registry=http://192.168.3.71:4873 @jianyu/cli
 ```
 ```
 
 
 :::
 :::

+ 9 - 3
docs/resource.md

@@ -164,19 +164,19 @@ const NavItems = [
         fill: 'H5',
         fill: 'H5',
         title: '移动端组件库',
         title: '移动端组件库',
         desc: '组件库文档、使用示例',
         desc: '组件库文档、使用示例',
-        href: 'http://192.168.3.11:10081/doc-serve/page_docs/'
+        href: 'http://192.168.3.128:8080/efe-docs-mobile/'
       },
       },
       {
       {
         fill: 'PC',
         fill: 'PC',
         title: 'PC组件库',
         title: 'PC组件库',
         desc: '组件库文档、使用示例',
         desc: '组件库文档、使用示例',
-        href: 'http://192.168.3.11:10081/EFE/jy-ui-library/raw/master/docs/'
+        href: 'http://192.168.3.128:8080/efe-docs-pc/'
       },
       },
       {
       {
         fill: 'CLI',
         fill: 'CLI',
         title: '@jianyu/cli',
         title: '@jianyu/cli',
         desc: '提供远程模版项目拉取、模块包上传等',
         desc: '提供远程模版项目拉取、模块包上传等',
-        href: 'http://192.168.3.207:4873/-/web/detail/@jianyu/cli'
+        href: 'http://192.168.3.71:4873/-/web/detail/@jianyu/cli'
       }
       }
     ]
     ]
   },
   },
@@ -190,6 +190,12 @@ const NavItems = [
         desc: '组件库 UI 资源,包含移动端、PC端',
         desc: '组件库 UI 资源,包含移动端、PC端',
         href: 'https://www.figma.com/files/project/61897445/%E7%BB%84%E4%BB%B6%E5%BA%93?fuid=679245771498651937'
         href: 'https://www.figma.com/files/project/61897445/%E7%BB%84%E4%BB%B6%E5%BA%93?fuid=679245771498651937'
       },
       },
+      {
+        icon: '/icon/pdf.png',
+        title: '组件拆分示例.pdf',
+        desc: '前端组件拆分示例',
+        href: './pdf/组件拆分示例.pdf'
+      },
       {
       {
         icon: '/icon/pdf.png',
         icon: '/icon/pdf.png',
         title: '前端知识点.pdf',
         title: '前端知识点.pdf',

+ 26 - 9
docs/vue3/vue3.md

@@ -10,10 +10,11 @@ Vue2 与 Vue3 最大的区别: Vue2 使用`Options API`而 Vue3 使用的`Compos
 Composition API 中,所有的逻辑可以集中在一个名为 setup() 的函数内定义,并根据功能进行分组和模块化。
 Composition API 中,所有的逻辑可以集中在一个名为 setup() 的函数内定义,并根据功能进行分组和模块化。
 
 
 ## 声明响应式状态的方式
 ## 声明响应式状态的方式
-ref() 
-reactive()
-shallowRef()
-shallowReactive()
+`ref() `
+`reactive()`
+`shallowRef()`
+`shallowReactive()`
+```vue
 <script>
 <script>
 import { ref, reactive, shallowRef, shallowReactive, onMounted } from 'vue';
 import { ref, reactive, shallowRef, shallowReactive, onMounted } from 'vue';
  
  
@@ -132,6 +133,7 @@ destroyed     -> onUnmounted
 activated     -> onActivated
 activated     -> onActivated
 deactivated   -> onDeactivated
 deactivated   -> onDeactivated
 ```
 ```
+```vue
 
 
 <template>
 <template>
   <div>{{ message }}</div>
   <div>{{ message }}</div>
@@ -162,7 +164,7 @@ export default {
   }
   }
 };
 };
 </script>
 </script>
-
+```
 ## 性能提升
 ## 性能提升
 ```
 ```
 vue3 => {
 vue3 => {
@@ -176,6 +178,9 @@ vue3 => {
 • 事件监听缓存
 • 事件监听缓存
 • SSR 优化
 • SSR 优化
 ```
 ```
+
+```vue
+
 <template>
 <template>
  <div id="content">
  <div id="content">
   <p class="text">静态文本</p>
   <p class="text">静态文本</p>
@@ -187,6 +192,7 @@ vue3 => {
  </div>
  </div>
 </template>
 </template>
 
 
+```
 ### 1.diff 算法
 ### 1.diff 算法
 ```
 ```
 vue3 在 diff 算法中相比 vue2 增加了静态标记
 vue3 在 diff 算法中相比 vue2 增加了静态标记
@@ -200,6 +206,10 @@ Vue3 中对不参与更新的元素,会做静态提升,只会被创建一次
 这样就免去了重复的创建节点,大型应用会受益于这个改动,免去了重复的创建操
 这样就免去了重复的创建节点,大型应用会受益于这个改动,免去了重复的创建操
 作,优化了运行时候的内存占用
 作,优化了运行时候的内存占用
 ```
 ```
+
+```vue
+
+
 <template>
 <template>
   <span>你好</span>
   <span>你好</span>
   <div>{{ message }}</div>
   <div>{{ message }}</div>
@@ -225,11 +235,14 @@ export function render(_ctx, _cache, $props, $setup, $data, $options) {
   ], 64 /* STABLE_FRAGMENT */))
   ], 64 /* STABLE_FRAGMENT */))
 }
 }
 </script>
 </script>
+```
 
 
 ### 3.事件监听缓存
 ### 3.事件监听缓存
 ```
 ```
 未开启事件监听器缓存:
 未开启事件监听器缓存:
 ```
 ```
+```vue
+
 <script>
 <script>
 export const render = /*#__PURE__*/_withId(function render(_ctx, _cache, $props, $setup, $data, $options) {
 export const render = /*#__PURE__*/_withId(function render(_ctx, _cache, $props, $setup, $data, $options) {
   return (_openBlock(), _createBlock("div", null, [
   return (_openBlock(), _createBlock("div", null, [
@@ -237,11 +250,14 @@ export const render = /*#__PURE__*/_withId(function render(_ctx, _cache, $props,
   ]))
   ]))
 })
 })
 </script>
 </script>
+
+```
 ```
 ```
 onClick属性直接绑定到组件实例的_ctx.onClick方法。每次渲染时,都会创建一个新的事件处理器引用。
 onClick属性直接绑定到组件实例的_ctx.onClick方法。每次渲染时,都会创建一个新的事件处理器引用。
 
 
 开启事件监听器缓存:
 开启事件监听器缓存:
 ```
 ```
+```
 <script>
 <script>
 export function render(_ctx, _cache, $props, $setup, $data, $options) {
 export function render(_ctx, _cache, $props, $setup, $data, $options) {
   return (_openBlock(), _createBlock("div", null, [
   return (_openBlock(), _createBlock("div", null, [
@@ -252,13 +268,13 @@ export function render(_ctx, _cache, $props, $setup, $data, $options) {
 }
 }
 </script>
 </script>
 ```
 ```
+```
 在开启了事件监听器缓存的情况下,Vue.js会尝试复用已创建的事件处理器以提高性能。这里使用了闭包来缓存事件处理函数,_cache[1] 是一个闭包缓存变量,如果之前已经为 onClick 创建过处理函数,则从缓存 _cache 中获取,否则新建一个处理函数并赋值给 _cache[1]。这样,在后续的渲染过程中,如果_ctx.onClick方法没有变化,就会复用同一个事件处理器,从而避免不必要的内存分配和DOM操作。
 在开启了事件监听器缓存的情况下,Vue.js会尝试复用已创建的事件处理器以提高性能。这里使用了闭包来缓存事件处理函数,_cache[1] 是一个闭包缓存变量,如果之前已经为 onClick 创建过处理函数,则从缓存 _cache 中获取,否则新建一个处理函数并赋值给 _cache[1]。这样,在后续的渲染过程中,如果_ctx.onClick方法没有变化,就会复用同一个事件处理器,从而避免不必要的内存分配和DOM操作。
 
 
 总结来说,开启事件监听器缓存是为了优化性能,减少无谓的DOM更新以及内存消耗。
 总结来说,开启事件监听器缓存是为了优化性能,减少无谓的DOM更新以及内存消耗。
 
 
 ```
 ```
 ### 4.SSR 优化
 ### 4.SSR 优化
-```
 当静态内容大到一定量级时候,会用 createStaticVNode 方法在客户端去生成一
 当静态内容大到一定量级时候,会用 createStaticVNode 方法在客户端去生成一
 个 static node,这些静态 node,会被直接 innerHtml,就不需要创建对象,然后根
 个 static node,这些静态 node,会被直接 innerHtml,就不需要创建对象,然后根
 据对象渲染
 据对象渲染
@@ -292,12 +308,12 @@ $data, $options) {
  }</span></div></div>`)
  }</span></div></div>`)
 }
 }
 </script>
 </script>
-
+```
 
 
 
 
 ### 源码体积
 ### 源码体积
 
 
-```
+
 相比 Vue2,Vue3 整体体积变小了,除了移出一些不常用的 API,再重要的是 Tree 
 相比 Vue2,Vue3 整体体积变小了,除了移出一些不常用的 API,再重要的是 Tree 
 shanking
 shanking
 任何一个函数,如 ref、reavtived、computed 等,仅仅在用到的时候才打包,没
 任何一个函数,如 ref、reavtived、computed 等,仅仅在用到的时候才打包,没
@@ -324,6 +340,7 @@ shanking
   };
   };
   // 在上面的例子中,因为只使用了ref函数,所以打包工具在压缩和优化时,理论上会排除reactive和computed相关代码,从而减小最终bundle的体积。
   // 在上面的例子中,因为只使用了ref函数,所以打包工具在压缩和优化时,理论上会排除reactive和computed相关代码,从而减小最终bundle的体积。
 </script>
 </script>
+```
 
 
 ```
 ```
  Tree shanking的作用
  Tree shanking的作用
@@ -658,4 +675,4 @@ export default {
   },
   },
 };
 };
 </script>
 </script>
-```
+```