作者 曾海沥

autoadd

(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{219:function(t,r,s){"use strict";s.r(r);var e=s(0),n=Object(e.a)({},function(){var t=this.$createElement,r=this._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[r("h1",{attrs:{id:"android-安卓端"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#android-安卓端","aria-hidden":"true"}},[this._v("#")]),this._v(" Android 安卓端")])])},[],!1,null,null,null);r.default=n.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{217:function(t,s,e){"use strict";e.r(s);var r=e(0),a=Object(r.a)({},function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"服务端"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#服务端","aria-hidden":"true"}},[this._v("#")]),this._v(" 服务端")])])},[],!1,null,null,null);s.default=a.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{225:function(t,v,_){"use strict";_.r(v);var r=_(0),e=Object(r.a)({},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h1",{attrs:{id:"前端-frontend"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#前端-frontend","aria-hidden":"true"}},[t._v("#")]),t._v(" 前端 Frontend")]),t._v(" "),_("h2",{attrs:{id:"能力输出"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#能力输出","aria-hidden":"true"}},[t._v("#")]),t._v(" 能力输出")]),t._v(" "),_("ul",[_("li",[_("p",[t._v("微信小程序")])]),t._v(" "),_("li",[_("p",[t._v("支持全平台("),_("strong",[t._v("Windows")]),t._v("、"),_("strong",[t._v("Mac")]),t._v("、"),_("strong",[t._v("Linux")]),t._v(")的桌面客户端,以 "),_("code",[t._v("Windows")]),t._v(" 环境为例,客户端程序以 "),_("code",[t._v("exe")]),t._v(" 格式的可执行文件形式存在,不需要依赖浏览器运行,例如 QQ、Microsoft Office 等一系列可直接运行的桌面客户端")])]),t._v(" "),_("li",[_("p",[t._v("各类型网站,包含但不限于以下类型")]),t._v(" "),_("ul",[_("li",[t._v("管理平台")]),t._v(" "),_("li",[t._v("CMS 站点")]),t._v(" "),_("li",[t._v("企业门户综合网站")]),t._v(" "),_("li",[t._v("服务类型网站")]),t._v(" "),_("li",[t._v("设备嵌入网页")])]),t._v(" "),_("p",[t._v("网站可根据需求针对 "),_("code",[t._v("desktop")]),t._v("、"),_("code",[t._v("tablet")]),t._v("、"),_("code",[t._v("mobile")]),t._v(" 等不同尺寸设备进行适配")])])]),t._v(" "),_("h2",{attrs:{id:"项目构建说明"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#项目构建说明","aria-hidden":"true"}},[t._v("#")]),t._v(" 项目构建说明")]),t._v(" "),_("h3",{attrs:{id:"构建网站"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#构建网站","aria-hidden":"true"}},[t._v("#")]),t._v(" 构建网站")]),t._v(" "),_("p",[t._v("各类型网站、设备嵌入式网页等")]),t._v(" "),_("p",[_("strong",[t._v("生产环境")])]),t._v(" "),_("p",[t._v("生产环境内容更新须严格按照计划安排执行")]),t._v(" "),_("p",[t._v("执行构建流程")]),t._v(" "),_("ol",[_("li",[t._v("测试小组确认当前版本已通过测试")]),t._v(" "),_("li",[t._v("项目负责人根据计划决定更新时间")]),t._v(" "),_("li",[t._v("执行构建前自动化测试\n"),_("ul",{staticClass:"contains-task-list"},[_("li",{staticClass:"task-list-item"},[_("input",{staticClass:"task-list-item-checkbox",attrs:{checked:"",disabled:"",type:"checkbox"}}),t._v(" ESLint 语法检查扫描")]),t._v(" "),_("li",{staticClass:"task-list-item"},[_("input",{staticClass:"task-list-item-checkbox",attrs:{disabled:"",type:"checkbox"}}),t._v(" 单元测试")]),t._v(" "),_("li",{staticClass:"task-list-item"},[_("input",{staticClass:"task-list-item-checkbox",attrs:{disabled:"",type:"checkbox"}}),t._v(" 端对端测试")])])]),t._v(" "),_("li",[t._v("执行项目构建")]),t._v(" "),_("li",[t._v("提交构建结果于运维人员并正式更新至生产环境")])]),t._v(" "),_("p",[_("strong",[t._v("测试环境")])]),t._v(" "),_("p",[t._v("持续集成平台根据配置自动进行构建,用于测试小组测试功能完成情况")]),t._v(" "),_("div",{staticClass:"custom-block tip"},[_("p",{staticClass:"custom-block-title"},[t._v("构建频率")]),t._v(" "),_("p",[t._v("在所有使用自动持续集成的项目中,构建频率均为每天中午及凌晨两个时段")]),t._v(" "),_("ul",[_("li",[t._v("中午自动构建保证下午可以测试新的内容")]),t._v(" "),_("li",[t._v("凌晨自动构建保证第二天早晨可以测试新的内容")])])]),t._v(" "),_("h4",{attrs:{id:"开发环境"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#开发环境","aria-hidden":"true"}},[t._v("#")]),t._v(" 开发环境")]),t._v(" "),_("p",[t._v("开发环境使用本地环境进行构建及运行项目")]),t._v(" "),_("h3",{attrs:{id:"构建微信小程序"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#构建微信小程序","aria-hidden":"true"}},[t._v("#")]),t._v(" 构建微信小程序")]),t._v(" "),_("p",[t._v("微信小程序各版本发布流程说明")]),t._v(" "),_("p",[_("strong",[t._v("线上版")])]),t._v(" "),_("ol",[_("li",[t._v("测试小组确认当前版本已通过测试")]),t._v(" "),_("li",[t._v("项目负责人根据计划决定更新时间")]),t._v(" "),_("li",[t._v("设置环境参数为线上版")]),t._v(" "),_("li",[t._v("上传代码至微信小程序平台")]),t._v(" "),_("li",[t._v("进入微信公众平台,在版本管理中将当前 "),_("strong",[t._v("体验版")]),t._v(" 提交为 "),_("strong",[t._v("线上版")])]),t._v(" "),_("li",[t._v("等待微信平台审核")]),t._v(" "),_("li",[t._v("微信平台审核通过,并会在微信中通知相关人员")]),t._v(" "),_("li",[t._v("进入微信公众平台,将审核通过的版本,发布为 "),_("strong",[t._v("线上版")])])]),t._v(" "),_("p",[_("strong",[t._v("预览版")])]),t._v(" "),_("ol",[_("li",[t._v("设置环境参数为开发版")]),t._v(" "),_("li",[t._v("将开发完成的代码上传至微信小程序平台")]),t._v(" "),_("li",[t._v("通过扫描预览版二维码进行试用")])]),t._v(" "),_("h2",{attrs:{id:"项目环境要求"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#项目环境要求","aria-hidden":"true"}},[t._v("#")]),t._v(" 项目环境要求")]),t._v(" "),_("p",[_("strong",[t._v("浏览器及版本要求")])]),t._v(" "),_("table",[_("thead",[_("tr",[_("th",[_("img",{attrs:{src:"/frontend/browser/edge.png",alt:"IE / Edge",width:"48",height:"48"}}),_("br"),t._v("IE / Edge")]),t._v(" "),_("th",[_("img",{attrs:{src:"/frontend/browser/firefox.png",alt:"Firefox",width:"48",height:"48"}}),_("br"),t._v("Firefox")]),t._v(" "),_("th",[_("img",{attrs:{src:"/frontend/browser/chrome.png",alt:"Chrome",width:"48",height:"48"}}),_("br"),t._v("Chrome")]),t._v(" "),_("th",[_("img",{attrs:{src:"/frontend/browser/safari.png",alt:"Safari",width:"48",height:"48"}}),_("br"),t._v("Safari")]),t._v(" "),_("th",[_("img",{attrs:{src:"/frontend/browser/opera.png",alt:"Opera",width:"48",height:"48"}}),_("br"),t._v("Opera")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("IE10, IE11, Edge")]),t._v(" "),_("td",[t._v("Firefox 18+")]),t._v(" "),_("td",[t._v("Chrome 49+")]),t._v(" "),_("td",[t._v("Safari 10+")]),t._v(" "),_("td",[t._v("Opera 36+")])])])]),t._v(" "),_("blockquote",[_("p",[t._v("后续的技术版本升级后,仅对 IE11 进行兼容性支持")])]),t._v(" "),_("p",[_("strong",[t._v("屏幕分辨率要求")])]),t._v(" "),_("p",[_("code",[t._v("1366 X 768")]),t._v(" 及以上")]),t._v(" "),_("p",[_("strong",[t._v("项目部署需求")])]),t._v(" "),_("ul",[_("li",[t._v("nginx(gzip)")])]),t._v(" "),_("p",[_("br"),_("br")]),t._v(" "),_("h2",{attrs:{id:"项目技术组成"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#项目技术组成","aria-hidden":"true"}},[t._v("#")]),t._v(" 项目技术组成")]),t._v(" "),_("p",[t._v("管理平台")]),t._v(" "),_("ul",[_("li",[t._v("vue2")]),t._v(" "),_("li",[t._v("vue-router")]),t._v(" "),_("li",[t._v("vuex")]),t._v(" "),_("li",[t._v("axios")]),t._v(" "),_("li",[t._v("element-ui")])]),t._v(" "),_("p",[t._v("网页开放平台(专项提供移动端 WebView 嵌入、独立页提供)")]),t._v(" "),_("ul",[_("li",[t._v("vue2")]),t._v(" "),_("li",[t._v("vue-router")]),t._v(" "),_("li",[t._v("axios")]),t._v(" "),_("li",[t._v("bootstrap 4(仅 CSS)")])]),t._v(" "),_("p",[t._v("单元测试")]),t._v(" "),_("ul",[_("li",[t._v("vue-test-utils")]),t._v(" "),_("li",[t._v("mocha")]),t._v(" "),_("li",[t._v("cypress")]),t._v(" "),_("li",[t._v("chai")])]),t._v(" "),_("p",[t._v("小程序")]),t._v(" "),_("ul",[_("li",[t._v("微信小程序原生方式")])]),t._v(" "),_("p",[_("br"),_("br")]),t._v(" "),_("h2",{attrs:{id:"代码版本控制位置"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#代码版本控制位置","aria-hidden":"true"}},[t._v("#")]),t._v(" 代码版本控制位置")]),t._v(" "),_("p",[t._v("前端团队代码使用位置:"),_("a",{attrs:{href:"http://192.168.100.254:3000/frontend",target:"_blank",rel:"noopener noreferrer"}},[t._v("frontend"),_("OutboundLink")],1)]),t._v(" "),_("p",[t._v("以下为前端团队目前完成的项目")]),t._v(" "),_("h3",{attrs:{id:"网站、管理平台"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#网站、管理平台","aria-hidden":"true"}},[t._v("#")]),t._v(" 网站、管理平台")]),t._v(" "),_("ul",[_("li",[_("a",{attrs:{href:"http://192.168.100.254:3000/zenghaili/vegetarian-plus",target:"_blank",rel:"noopener noreferrer"}},[t._v("素+管理平台"),_("OutboundLink")],1)]),t._v(" "),_("li",[_("a",{attrs:{href:"http://192.168.100.254:3000/zenghaili/admin-platform",target:"_blank",rel:"noopener noreferrer"}},[t._v("系统管理后台"),_("OutboundLink")],1)])]),t._v(" "),_("h3",{attrs:{id:"小程序"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#小程序","aria-hidden":"true"}},[t._v("#")]),t._v(" 小程序")]),t._v(" "),_("ul",[_("li",[_("a",{attrs:{href:"http://192.168.100.254:3000/zenghaili/exam",target:"_blank",rel:"noopener noreferrer"}},[t._v("便捷答题"),_("OutboundLink")],1)]),t._v(" "),_("li",[t._v("票选小助手")]),t._v(" "),_("li",[t._v("海鲜干货人家")]),t._v(" "),_("li",[t._v("我的旺铺")])])])},[],!1,null,null,null);v.default=e.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{220:function(s,t,a){"use strict";a.r(t);var n=a(0),e=Object(n.a)({},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"系统框架"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#系统框架","aria-hidden":"true"}},[s._v("#")]),s._v(" 系统框架")]),s._v(" "),a("p",[s._v("管理平台项目框架目标使用规范说明及部分系统 API 描述,目前仅适用于 "),a("code",[s._v("素+管理平台")]),s._v(" 项目")]),s._v(" "),a("h2",{attrs:{id:"目录结构描述"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#目录结构描述","aria-hidden":"true"}},[s._v("#")]),s._v(" 目录结构描述")]),s._v(" "),a("p",[s._v("项目结构目录树如下")]),s._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[s._v("project/\n│ .browserslistrc 浏览器版本配置\n│ .editorconfig 编辑器配置\n│ .env.development 开发环境下使用的环境变量配置文件\n│ .env.production 生产环境下使用的环境变量配置文件\n│ .env.test 单元测试环境下使用的环境变量配置文件\n│ .eslintrc.js ESLint 配置\n│ .gitignore 设置 git 忽略上传的内容\n│ babel.config.js 项目脚本兼容版本设置\n│ cypress.json cypress 配置文件\n│ Dockerfile docker 配置文件\n│ package.json 项目总体描述及依赖描述\n│ postcss.config.js 预编译样式\n│ vue.config.js vue-cli 脚手架配置及 webpack 配置\n│ \n├─public 静态资源文件目录\n│ favicon.ico 网站图标\n│ index.html 网站实际入口\n│ \n├─src\n│ │ main.js 项目主入口\n│ │ \n│ ├─assets 项目相关资产 / 附件,通常用于存放图片资源\n│ │ \n│ ├─business 业务处理逻辑、框架相关 API\n│ │ \n│ ├─components 自定义业务组件\n│ │ \n│ ├─config 项目相关配置\n│ │ constants.js 常量配置\n│ │ directives.js 自定义指令集配置\n│ │ element-plugins.js element-ui 插件配置\n│ │ menu-path.js 系统菜单及路由匹配关系\n│ │ plugins.js 项目中除 element-ui 外的插件引用配置\n│ │ polyfill.js 自定义脚本兼容\n│ │ velidateData.js 自定义表单校验规则\n│ │ \n│ ├─layouts 整体布局结构\n│ │ \n│ ├─mixins 公共抽象模型\n│ │ \n│ ├─plugins 系统公共插件\n│ │ \n│ ├─router vue-router 路由配置\n│ │ \n│ ├─store Vuex 与本地缓存的相关处理\n│ │ \n│ ├─style 自定义样式文件收纳\n│ │ \n│ ├─utils 工具类\n│ │ \n│ └─views 系统业务功能页面\n│ │ \n│ ├─alonePage 独立页\n│ │ \n│ ├─demo 框架组件、API 实例\n│ │ \n│ └─inner 移动端内嵌页\n│ \n└─tests\n ├─e2e 端对端测试\n │ \n ├─sample 部分数据样例\n │ \n └─unit 单元测试\n .eslintrc.js 针对单元测试的 eslint 配置\n setup.js 单元测试的前置处理\n\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br"),a("span",{staticClass:"line-number"},[s._v("22")]),a("br"),a("span",{staticClass:"line-number"},[s._v("23")]),a("br"),a("span",{staticClass:"line-number"},[s._v("24")]),a("br"),a("span",{staticClass:"line-number"},[s._v("25")]),a("br"),a("span",{staticClass:"line-number"},[s._v("26")]),a("br"),a("span",{staticClass:"line-number"},[s._v("27")]),a("br"),a("span",{staticClass:"line-number"},[s._v("28")]),a("br"),a("span",{staticClass:"line-number"},[s._v("29")]),a("br"),a("span",{staticClass:"line-number"},[s._v("30")]),a("br"),a("span",{staticClass:"line-number"},[s._v("31")]),a("br"),a("span",{staticClass:"line-number"},[s._v("32")]),a("br"),a("span",{staticClass:"line-number"},[s._v("33")]),a("br"),a("span",{staticClass:"line-number"},[s._v("34")]),a("br"),a("span",{staticClass:"line-number"},[s._v("35")]),a("br"),a("span",{staticClass:"line-number"},[s._v("36")]),a("br"),a("span",{staticClass:"line-number"},[s._v("37")]),a("br"),a("span",{staticClass:"line-number"},[s._v("38")]),a("br"),a("span",{staticClass:"line-number"},[s._v("39")]),a("br"),a("span",{staticClass:"line-number"},[s._v("40")]),a("br"),a("span",{staticClass:"line-number"},[s._v("41")]),a("br"),a("span",{staticClass:"line-number"},[s._v("42")]),a("br"),a("span",{staticClass:"line-number"},[s._v("43")]),a("br"),a("span",{staticClass:"line-number"},[s._v("44")]),a("br"),a("span",{staticClass:"line-number"},[s._v("45")]),a("br"),a("span",{staticClass:"line-number"},[s._v("46")]),a("br"),a("span",{staticClass:"line-number"},[s._v("47")]),a("br"),a("span",{staticClass:"line-number"},[s._v("48")]),a("br"),a("span",{staticClass:"line-number"},[s._v("49")]),a("br"),a("span",{staticClass:"line-number"},[s._v("50")]),a("br"),a("span",{staticClass:"line-number"},[s._v("51")]),a("br"),a("span",{staticClass:"line-number"},[s._v("52")]),a("br"),a("span",{staticClass:"line-number"},[s._v("53")]),a("br"),a("span",{staticClass:"line-number"},[s._v("54")]),a("br"),a("span",{staticClass:"line-number"},[s._v("55")]),a("br"),a("span",{staticClass:"line-number"},[s._v("56")]),a("br"),a("span",{staticClass:"line-number"},[s._v("57")]),a("br"),a("span",{staticClass:"line-number"},[s._v("58")]),a("br"),a("span",{staticClass:"line-number"},[s._v("59")]),a("br"),a("span",{staticClass:"line-number"},[s._v("60")]),a("br"),a("span",{staticClass:"line-number"},[s._v("61")]),a("br"),a("span",{staticClass:"line-number"},[s._v("62")]),a("br"),a("span",{staticClass:"line-number"},[s._v("63")]),a("br"),a("span",{staticClass:"line-number"},[s._v("64")]),a("br"),a("span",{staticClass:"line-number"},[s._v("65")]),a("br"),a("span",{staticClass:"line-number"},[s._v("66")]),a("br"),a("span",{staticClass:"line-number"},[s._v("67")]),a("br"),a("span",{staticClass:"line-number"},[s._v("68")]),a("br")])]),a("p",[s._v("以上项目结构将为作为后续所有项目的基础结构")]),s._v(" "),a("h2",{attrs:{id:"api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api","aria-hidden":"true"}},[s._v("#")]),s._v(" API")]),s._v(" "),a("h3",{attrs:{id:"http-url-data-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-url-data-options","aria-hidden":"true"}},[s._v("#")]),s._v(" $http(url, [data], [options])")]),s._v(" "),a("p",[s._v("http 数据请求统一入口")]),s._v(" "),a("ul",[a("li",[s._v("url")])]),s._v(" "),a("p",[s._v("目标请求地址,地址分为两种类型:"),a("code",[s._v("当前域地址")]),s._v(" 和 "),a("code",[s._v("其他域地址")])]),s._v(" "),a("ul",[a("li",[s._v("data")])]),s._v(" "),a("p",[s._v("提交的数据参数")]),s._v(" "),a("ul",[a("li",[s._v("options")])]),s._v(" "),a("p",[s._v("配置参数,主要用于特殊情况下需要覆盖 "),a("strong",[s._v("axios")]),s._v(" 原生配置的情况,多数情况下不需要进行设置")]),s._v(" "),a("p",[a("strong",[s._v("return")])]),s._v(" "),a("p",[s._v("Promise 接口对象")]),s._v(" "),a("hr"),s._v(" "),a("p",[s._v("常见使用场景")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("//访问当前域服务")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("$http")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/user/list'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" groupId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("then")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("resp")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("resp")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("//访问其他域服务")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("$http")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://aaa.com/user/list'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" groupId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("then")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("resp")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("catch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("resp")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br")])]),a("h2",{attrs:{id:"自定义指令集-directive"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#自定义指令集-directive","aria-hidden":"true"}},[s._v("#")]),s._v(" 自定义指令集 directive")]),s._v(" "),a("h3",{attrs:{id:"v-date"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-date","aria-hidden":"true"}},[s._v("#")]),s._v(" v-date")]),s._v(" "),a("p",[s._v("日期格式化,将元素的内容格式化为指定的日期格式")]),s._v(" "),a("h4",{attrs:{id:"参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#参数","aria-hidden":"true"}},[s._v("#")]),s._v(" 参数")]),s._v(" "),a("ul",[a("li",[s._v("日期格式 (string)")])]),s._v(" "),a("p",[s._v("指定日期格式,例如:'yyyy-MM-dd hh:mm:ss',若不指定格式则默认使用格式:'yyyy-MM-dd'")]),s._v(" "),a("h4",{attrs:{id:"使用方式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#使用方式","aria-hidden":"true"}},[s._v("#")]),s._v(" 使用方式")]),s._v(" "),a("div",{staticClass:"language-vue line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 指定自定义格式 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-date")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("'")]),s._v("yyyy-MM-dd hh:mm:ss'"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("1559631857305"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 不指定格式,使用默认格式 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-date")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("1559631857305"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])]),a("h4",{attrs:{id:"实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#实例","aria-hidden":"true"}},[s._v("#")]),s._v(" 实例")]),s._v(" "),a("div",{staticClass:"language-vue line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-date")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("'")]),s._v("yyyy-MM-dd hh:mm:ss'"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("1559631857305"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 结果:2019-06-04 15:04:17 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-date")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("Tue Jun 04 2019 15:33:06 GMT+0800 (中国标准时间)"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 结果:2019-06-04 --\x3e")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])]),a("h3",{attrs:{id:"v-number"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-number","aria-hidden":"true"}},[s._v("#")]),s._v(" v-number")]),s._v(" "),a("p",[s._v("数字类型格式化(保留小数点位数),将元素内容格式化为指定位数小数点数字,位数不足则使用 0 补充,推荐用于数据统计,金额计算、展示等场景")]),s._v(" "),a("h4",{attrs:{id:"参数-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#参数-2","aria-hidden":"true"}},[s._v("#")]),s._v(" 参数")]),s._v(" "),a("ul",[a("li",[s._v("保留小数点位数 (number)")])]),s._v(" "),a("p",[s._v("指定数字保留小数点位数,默认为:2")]),s._v(" "),a("h4",{attrs:{id:"使用方式-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#使用方式-2","aria-hidden":"true"}},[s._v("#")]),s._v(" 使用方式")]),s._v(" "),a("div",{staticClass:"language-vue line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 指定自定义保留位数 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-number")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')]),s._v("4"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("3450.20"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 不指定格式,使用默认保留位数 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-number")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("3450"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])]),a("h4",{attrs:{id:"实例-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#实例-2","aria-hidden":"true"}},[s._v("#")]),s._v(" 实例")]),s._v(" "),a("div",{staticClass:"language-vue line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-number")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')]),s._v("4"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("3450.20"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 结果:3450.2000 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-number")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("3450"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 结果:3450.00 --\x3e")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("span")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v("v-number")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("3450.1234"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("span")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("\x3c!-- 结果:3450.12 --\x3e")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br")])]),a("h2",{attrs:{id:"表单校验规则"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#表单校验规则","aria-hidden":"true"}},[s._v("#")]),s._v(" 表单校验规则")]),s._v(" "),a("h4",{attrs:{id:"使用方式-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#使用方式-3","aria-hidden":"true"}},[s._v("#")]),s._v(" 使用方式")]),s._v(" "),a("p",[s._v("Form 组件通过 rules 属性传入约定的验证规则,并将 Form-Item 的 prop 属性设置为需校验的字段名")]),s._v(" "),a("div",{staticClass:"language-vue line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-vue"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("el-form")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[s._v(":rules")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')]),s._v("rules"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("el-form")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}},[a("span",{pre:!0,attrs:{class:"token language-javascript"}},[s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n ruleForm"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("''")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n rules"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" required"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" message"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'请输入活动名称'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" trigger"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'blur'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" min"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" max"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" message"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'长度在 3 到 5 个字符'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" trigger"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'blur'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("</")]),s._v("script")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br")])]),a("h4",{attrs:{id:"自定义验证函数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#自定义验证函数","aria-hidden":"true"}},[s._v("#")]),s._v(" 自定义验证函数")]),s._v(" "),a("ul",[a("li",[a("code",[s._v("checkNumOrLetter")]),s._v(" 验证只能包含数字和字母")]),s._v(" "),a("li",[a("code",[s._v("checkNum")]),s._v(" 验证只能为整数")]),s._v(" "),a("li",[a("code",[s._v("validateNumAndFloat")]),s._v(" 验证必须是整数或小数")]),s._v(" "),a("li",[a("code",[s._v("velidateSpecialNUm")]),s._v(" 验证只能是范围0.0001 ~ 999999999.9999的数字")]),s._v(" "),a("li",[a("code",[s._v("fourDigitsAfter")]),s._v(" 验证只能是小数点后4位的浮点数")]),s._v(" "),a("li",[a("code",[s._v("checkPhoneNum")]),s._v(" 验证只能是电话号码")])])])},[],!1,null,null,null);t.default=e.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{231:function(t,s,n){"use strict";n.r(s);var a=n(0),r=Object(a.a)({},function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"数据交互格式标准"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#数据交互格式标准","aria-hidden":"true"}},[t._v("#")]),t._v(" 数据交互格式标准")]),t._v(" "),n("p",[t._v("前后端数据交互格式详细说明")]),t._v(" "),n("div",{staticClass:"language-js line-numbers-mode"},[n("pre",{pre:!0,attrs:{class:"language-js"}},[n("code",[n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n\t * 请求结果\n * -1:请求成功,但业务检查不通过\n\t * 0:请求成功,数据正常返回\n * 2:token 超时,主要用于用户登录超时、特定情况下主动清除用户登录状态\n * 例如用户权限发生变化等场景\n\t */")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"code"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n\t * 提示信息,错误时按UI规范显示错误信息,成功则返回操作成功\n\t */")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"msg"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"姓名不能超过20个字符"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n\t * 请求返回结果 JSON类型\n\t * 正常请求后返回的内容都应在data节点下生成\n\t */")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"data"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n\t\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/** int、String、long等普通类型 */")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attr"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" value"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n\t\t "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/** 属性为JSON对象 */")]),t._v(" \n\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"user"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"name"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"zhangsan"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"age"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n\t\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/** 属性为一维数组,An为一维数组元素 */")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"users"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),n("span",{pre:!0,attrs:{class:"token constant"}},[t._v("A1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),n("span",{pre:!0,attrs:{class:"token constant"}},[t._v("A2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v("An"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(", \n\t\t "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/** 属性为对象数组 */")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"users"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),n("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),t._v("类型"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),n("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),t._v("类型"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(",\n\t\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n\t\t * grid表格结果集格式 表单记录 JSON类型\n\t\t */")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"gridResult"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//当前页")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pageNumber"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//总记录数")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"totalRow"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//数据列表内容")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lists"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"id"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"remark"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop1"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"statusName"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"启用"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"description"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"系统标题名称"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"后台管理系统"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"code"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SYSTEM_CAPTION"')]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"id"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("12860")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"remark"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop1"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"statusName"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"启用"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"description"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"定时任务开关"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"code"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SYSTEM_QUARTZ"')]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"id"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("12861")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop2"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"remark"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop1"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"statusName"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"启用"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"description"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prop3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"code"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3"')]),t._v("\n\t\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\t\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\t\t"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),n("div",{staticClass:"line-numbers-wrapper"},[n("span",{staticClass:"line-number"},[t._v("1")]),n("br"),n("span",{staticClass:"line-number"},[t._v("2")]),n("br"),n("span",{staticClass:"line-number"},[t._v("3")]),n("br"),n("span",{staticClass:"line-number"},[t._v("4")]),n("br"),n("span",{staticClass:"line-number"},[t._v("5")]),n("br"),n("span",{staticClass:"line-number"},[t._v("6")]),n("br"),n("span",{staticClass:"line-number"},[t._v("7")]),n("br"),n("span",{staticClass:"line-number"},[t._v("8")]),n("br"),n("span",{staticClass:"line-number"},[t._v("9")]),n("br"),n("span",{staticClass:"line-number"},[t._v("10")]),n("br"),n("span",{staticClass:"line-number"},[t._v("11")]),n("br"),n("span",{staticClass:"line-number"},[t._v("12")]),n("br"),n("span",{staticClass:"line-number"},[t._v("13")]),n("br"),n("span",{staticClass:"line-number"},[t._v("14")]),n("br"),n("span",{staticClass:"line-number"},[t._v("15")]),n("br"),n("span",{staticClass:"line-number"},[t._v("16")]),n("br"),n("span",{staticClass:"line-number"},[t._v("17")]),n("br"),n("span",{staticClass:"line-number"},[t._v("18")]),n("br"),n("span",{staticClass:"line-number"},[t._v("19")]),n("br"),n("span",{staticClass:"line-number"},[t._v("20")]),n("br"),n("span",{staticClass:"line-number"},[t._v("21")]),n("br"),n("span",{staticClass:"line-number"},[t._v("22")]),n("br"),n("span",{staticClass:"line-number"},[t._v("23")]),n("br"),n("span",{staticClass:"line-number"},[t._v("24")]),n("br"),n("span",{staticClass:"line-number"},[t._v("25")]),n("br"),n("span",{staticClass:"line-number"},[t._v("26")]),n("br"),n("span",{staticClass:"line-number"},[t._v("27")]),n("br"),n("span",{staticClass:"line-number"},[t._v("28")]),n("br"),n("span",{staticClass:"line-number"},[t._v("29")]),n("br"),n("span",{staticClass:"line-number"},[t._v("30")]),n("br"),n("span",{staticClass:"line-number"},[t._v("31")]),n("br"),n("span",{staticClass:"line-number"},[t._v("32")]),n("br"),n("span",{staticClass:"line-number"},[t._v("33")]),n("br"),n("span",{staticClass:"line-number"},[t._v("34")]),n("br"),n("span",{staticClass:"line-number"},[t._v("35")]),n("br"),n("span",{staticClass:"line-number"},[t._v("36")]),n("br"),n("span",{staticClass:"line-number"},[t._v("37")]),n("br"),n("span",{staticClass:"line-number"},[t._v("38")]),n("br"),n("span",{staticClass:"line-number"},[t._v("39")]),n("br"),n("span",{staticClass:"line-number"},[t._v("40")]),n("br"),n("span",{staticClass:"line-number"},[t._v("41")]),n("br"),n("span",{staticClass:"line-number"},[t._v("42")]),n("br"),n("span",{staticClass:"line-number"},[t._v("43")]),n("br"),n("span",{staticClass:"line-number"},[t._v("44")]),n("br"),n("span",{staticClass:"line-number"},[t._v("45")]),n("br"),n("span",{staticClass:"line-number"},[t._v("46")]),n("br"),n("span",{staticClass:"line-number"},[t._v("47")]),n("br"),n("span",{staticClass:"line-number"},[t._v("48")]),n("br"),n("span",{staticClass:"line-number"},[t._v("49")]),n("br"),n("span",{staticClass:"line-number"},[t._v("50")]),n("br"),n("span",{staticClass:"line-number"},[t._v("51")]),n("br"),n("span",{staticClass:"line-number"},[t._v("52")]),n("br"),n("span",{staticClass:"line-number"},[t._v("53")]),n("br"),n("span",{staticClass:"line-number"},[t._v("54")]),n("br"),n("span",{staticClass:"line-number"},[t._v("55")]),n("br"),n("span",{staticClass:"line-number"},[t._v("56")]),n("br"),n("span",{staticClass:"line-number"},[t._v("57")]),n("br"),n("span",{staticClass:"line-number"},[t._v("58")]),n("br"),n("span",{staticClass:"line-number"},[t._v("59")]),n("br"),n("span",{staticClass:"line-number"},[t._v("60")]),n("br"),n("span",{staticClass:"line-number"},[t._v("61")]),n("br"),n("span",{staticClass:"line-number"},[t._v("62")]),n("br"),n("span",{staticClass:"line-number"},[t._v("63")]),n("br"),n("span",{staticClass:"line-number"},[t._v("64")]),n("br"),n("span",{staticClass:"line-number"},[t._v("65")]),n("br"),n("span",{staticClass:"line-number"},[t._v("66")]),n("br"),n("span",{staticClass:"line-number"},[t._v("67")]),n("br"),n("span",{staticClass:"line-number"},[t._v("68")]),n("br"),n("span",{staticClass:"line-number"},[t._v("69")]),n("br"),n("span",{staticClass:"line-number"},[t._v("70")]),n("br"),n("span",{staticClass:"line-number"},[t._v("71")]),n("br"),n("span",{staticClass:"line-number"},[t._v("72")]),n("br"),n("span",{staticClass:"line-number"},[t._v("73")]),n("br"),n("span",{staticClass:"line-number"},[t._v("74")]),n("br"),n("span",{staticClass:"line-number"},[t._v("75")]),n("br"),n("span",{staticClass:"line-number"},[t._v("76")]),n("br"),n("span",{staticClass:"line-number"},[t._v("77")]),n("br"),n("span",{staticClass:"line-number"},[t._v("78")]),n("br"),n("span",{staticClass:"line-number"},[t._v("79")]),n("br"),n("span",{staticClass:"line-number"},[t._v("80")]),n("br")])])])},[],!1,null,null,null);s.default=r.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{213:function(t,a,r){"use strict";r.r(a);var s=r(0),e=Object(s.a)({},function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"功能插件"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#功能插件","aria-hidden":"true"}},[t._v("#")]),t._v(" 功能插件")]),t._v(" "),r("p",[t._v("完全不与业务耦合的功能插件/组件,此类型的成果代表着不以项目类型或业务为限,可随意组合使用")]),t._v(" "),r("h2",{attrs:{id:"拼图验证码插件"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#拼图验证码插件","aria-hidden":"true"}},[t._v("#")]),t._v(" 拼图验证码插件")]),t._v(" "),r("p",[t._v("用户操作行为验证,能有效区分人机,阻绝恶意程序带来的业务损失。")]),t._v(" "),r("p",[t._v("可应用于系统登录、用户端留言或发贴等场景")]),t._v(" "),r("p",[r("strong",[t._v("拼图拖拽模式")])]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/captcha.png",alt:"captcha"}})]),t._v(" "),r("p",[r("strong",[t._v("随机文字点选模式")])]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/captcha1.png",alt:"captcha1"}})]),t._v(" "),r("p",[t._v("图形验证码插件(极验),当前使用 "),r("strong",[t._v("免费")]),t._v(" 版本,限制为 200 次 / 小时的使用频率,且免费版仅能使用拼图拖拽或文字选择等形式的其中一种,收费版本可随出现验证类型或根据验证级别的提升智能选择不同验证方式和难度,且可定制背景图片")]),t._v(" "),r("p",[r("strong",[t._v("全部验证形式")])]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/captcha-all.png",alt:"captcha-all"}})]),t._v(" "),r("blockquote",[r("p",[t._v("该功能需要服务端配套相关功能")])]),t._v(" "),r("h2",{attrs:{id:"短信验证"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#短信验证","aria-hidden":"true"}},[t._v("#")]),t._v(" 短信验证")]),t._v(" "),r("p",[t._v("使用手机及验证码进行身份验证")]),t._v(" "),r("img",{staticClass:"border-shadow",attrs:{src:"/frontend/plugins/sms.png"}}),t._v(" "),r("p",[t._v("提供了默认形态界面的完整功能,也允许只引用底层实现 API 适配自定义短信验证界面场景")]),t._v(" "),r("h2",{attrs:{id:"侧边栏抽屉"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#侧边栏抽屉","aria-hidden":"true"}},[t._v("#")]),t._v(" 侧边栏抽屉")]),t._v(" "),r("p",[t._v("一个可从屏幕边缘抽屉式滑出的内容展示层")]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/slide.png",alt:"slide"}})]),t._v(" "),r("h2",{attrs:{id:"数据表格"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#数据表格","aria-hidden":"true"}},[t._v("#")]),t._v(" 数据表格")]),t._v(" "),r("p",[t._v("带有分页栏的数据表格,集成了单选、多选、跨页选择等功能")]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/grid.png",alt:"grid"}})]),t._v(" "),r("blockquote",[r("p",[t._v("该插件依赖于 element-ui,以及服务端数据接口")])]),t._v(" "),r("h2",{attrs:{id:"数据下载-导出"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#数据下载-导出","aria-hidden":"true"}},[t._v("#")]),t._v(" 数据下载/导出")]),t._v(" "),r("p",[t._v("标准文件下载/导出功能,根据提供位置的内容构建文件流并自动开始下载,下载过程中默认开启全屏遮罩,并在下载完成后自动关闭")]),t._v(" "),r("p",[r("img",{attrs:{src:"/frontend/plugins/download.png",alt:"download"}})]),t._v(" "),r("blockquote",[r("p",[t._v("该插件遮罩功能依赖于 element-ui")])]),t._v(" "),r("h2",{attrs:{id:"选择器"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#选择器","aria-hidden":"true"}},[t._v("#")]),t._v(" 选择器")]),t._v(" "),r("p",[t._v("用于挑选数据的选择器")]),t._v(" "),r("p",[r("strong",[t._v("选择器基本规则说明")])]),t._v(" "),r("p",[t._v("所有选择器应包含以下三个基本行为")]),t._v(" "),r("ul",[r("li",[t._v("右上角 "),r("code",[t._v("X")]),t._v(" 关闭按钮,点击后仅关闭选择器,不触发事件响应")]),t._v(" "),r("li",[r("code",[t._v("清空")]),t._v(" 按钮,清空选择器已选择项目,但不关闭窗口")]),t._v(" "),r("li",[r("code",[t._v("确定")]),t._v(" 按钮,触发回调事件,响应数据变更并关闭选择器窗口")])]),t._v(" "),r("p",[r("strong",[t._v("选择器基本构成元素图例")])]),t._v(" "),r("img",{staticClass:"border-shadow",attrs:{src:"/frontend/plugins/selector-base.png"}}),t._v(" "),r("h3",{attrs:{id:"单列数据穿梭框"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#单列数据穿梭框","aria-hidden":"true"}},[t._v("#")]),t._v(" 单列数据穿梭框")]),t._v(" "),r("p",[t._v("以数据列表形式展现,提供数据可以左右穿梭直观效果")]),t._v(" "),r("img",{staticClass:"border-shadow",attrs:{src:"/frontend/plugins/selector-transfer.png"}}),t._v(" "),r("h3",{attrs:{id:"树形数据选择器"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#树形数据选择器","aria-hidden":"true"}},[t._v("#")]),t._v(" 树形数据选择器")]),t._v(" "),r("p",[t._v("以树形结构展示待选项目")]),t._v(" "),r("img",{staticClass:"border-shadow",attrs:{src:"/frontend/plugins/selector-tree.png"}}),t._v(" "),r("h3",{attrs:{id:"分组树形数据选择器"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#分组树形数据选择器","aria-hidden":"true"}},[t._v("#")]),t._v(" 分组树形数据选择器")]),t._v(" "),r("p",[t._v("多分组且每个分组可使用树形结构展示的选择器")]),t._v(" "),r("img",{staticClass:"border-shadow",attrs:{src:"/frontend/plugins/selector-tree-group.png"}})])},[],!1,null,null,null);a.default=e.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{227:function(t,a,e){"use strict";e.r(a);var r=e(0),s=Object(r.a)({},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"质量保证体系"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#质量保证体系","aria-hidden":"true"}},[t._v("#")]),t._v(" 质量保证体系")]),t._v(" "),e("p",[t._v("通过各类型自动化工具及测试用例对代码质量进行检测")]),t._v(" "),e("h2",{attrs:{id:"团队应用现状"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#团队应用现状","aria-hidden":"true"}},[t._v("#")]),t._v(" 团队应用现状")]),t._v(" "),e("ul",{staticClass:"contains-task-list"},[e("li",{staticClass:"task-list-item"},[e("input",{staticClass:"task-list-item-checkbox",attrs:{checked:"",disabled:"",type:"checkbox"}}),t._v(" 语法检查工具")]),t._v(" "),e("li",{staticClass:"task-list-item"},[e("input",{staticClass:"task-list-item-checkbox",attrs:{disabled:"",type:"checkbox"}}),t._v(" 单元测试")]),t._v(" "),e("li",{staticClass:"task-list-item"},[e("input",{staticClass:"task-list-item-checkbox",attrs:{disabled:"",type:"checkbox"}}),t._v(" 端对端测试")])]),t._v(" "),e("p",[t._v("目前所有自动化检查的方式仅为手动运行检测,后续将视情况切换为强制执行方式,检测不通过则不允许编译与发行")]),t._v(" "),e("h2",{attrs:{id:"语法检查"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#语法检查","aria-hidden":"true"}},[t._v("#")]),t._v(" 语法检查")]),t._v(" "),e("p",[t._v("语法检查工具用于检查代码的语法是否正确、风格是否符合要求")]),t._v(" "),e("p",[t._v("JavaScript 是一个动态的弱类型语言,在开发中比较容易出错。因为没有编译程序,为了寻找 JavaScript 代码错误通常需要在执行过程中不断调试。像 ESLint 这样的可以让程序员在编码的过程中发现问题而不是在执行的过程中。")]),t._v(" "),e("h3",{attrs:{id:"使用工具"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用工具","aria-hidden":"true"}},[t._v("#")]),t._v(" 使用工具")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://eslint.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("ESLint"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("目前使用规则为宽松模式,后续将逐步增加规则要求级别")]),t._v(" "),e("h3",{attrs:{id:"运行方式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#运行方式","aria-hidden":"true"}},[t._v("#")]),t._v(" 运行方式")]),t._v(" "),e("div",{staticClass:"language-bash line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" run lint\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("h3",{attrs:{id:"检查结果要求"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#检查结果要求","aria-hidden":"true"}},[t._v("#")]),t._v(" 检查结果要求")]),t._v(" "),e("p",[t._v("ESlint 命令行输出")]),t._v(" "),e("blockquote",[e("Badge",{attrs:{text:"DONE",vertical:"middle"}}),t._v(" No lint errors found!\n")],1),t._v(" "),e("p",[t._v("代表了语法检查通过")]),t._v(" "),e("h2",{attrs:{id:"单元测试"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#单元测试","aria-hidden":"true"}},[t._v("#")]),t._v(" 单元测试")]),t._v(" "),e("p",[t._v("单元测试是用来对一个模块、一个函数或者一个类来进行正确性检验的测试工作,可以理解为 "),e("strong",[t._v("白盒测试")]),t._v(" 的行为。")]),t._v(" "),e("h3",{attrs:{id:"为什么要写单元测试?"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#为什么要写单元测试?","aria-hidden":"true"}},[t._v("#")]),t._v(" 为什么要写单元测试?")]),t._v(" "),e("p",[t._v("Web应用程序越来越复杂,这意味着有更多的可能出错。测试是帮助我们提高代码质量、降低错误的最好方法和工具之一")]),t._v(" "),e("ul",[e("li",[t._v("测试可以确保得到预期结果")]),t._v(" "),e("li",[t._v("加快开发速度")]),t._v(" "),e("li",[t._v("方便维护")]),t._v(" "),e("li",[t._v("提供用法的文档")])]),t._v(" "),e("p",[t._v("通过测试提供软件的质量,在开始的时候,可能会降低开发速度。但是从长期看,尤其是那种代码需要长期维护、不断开发的情况,测试会大大加快开发速度,减轻维护难度")]),t._v(" "),e("h3",{attrs:{id:"使用功能库"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用功能库","aria-hidden":"true"}},[t._v("#")]),t._v(" 使用功能库")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("功能库")]),t._v(" "),e("th",[t._v("作用")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[e("a",{attrs:{href:"https://mochajs.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Mocha"),e("OutboundLink")],1)]),t._v(" "),e("td",[t._v("单元测试引擎")])]),t._v(" "),e("tr",[e("td",[e("a",{attrs:{href:"https://www.chaijs.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chai"),e("OutboundLink")],1)]),t._v(" "),e("td",[t._v("断言库")])]),t._v(" "),e("tr",[e("td",[e("a",{attrs:{href:"https://github.com/jsdom/jsdom",target:"_blank",rel:"noopener noreferrer"}},[t._v("JsDom"),e("OutboundLink")],1)]),t._v(" "),e("td",[t._v("虚拟浏览器容器")])]),t._v(" "),e("tr",[e("td",[e("a",{attrs:{href:"https://vue-test-utils.vuejs.org/zh/",target:"_blank",rel:"noopener noreferrer"}},[t._v("@vue/test-utils"),e("OutboundLink")],1)]),t._v(" "),e("td",[t._v("vue 官方提供单元测试工具集")])])])]),t._v(" "),e("h3",{attrs:{id:"运行方式-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#运行方式-2","aria-hidden":"true"}},[t._v("#")]),t._v(" 运行方式")]),t._v(" "),e("div",{staticClass:"language-bash line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" run test:unit\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("h3",{attrs:{id:"适用范围"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#适用范围","aria-hidden":"true"}},[t._v("#")]),t._v(" 适用范围")]),t._v(" "),e("p",[t._v("很多时候,一些简单的功能场景,例如表单增、删、改、查等并没有编写单元测试的必要,况且编写单元测试需要不少时间成本,建议编写单元测试的场景如下")]),t._v(" "),e("ul",[e("li",[t._v("系统底层 API")]),t._v(" "),e("li",[t._v("功能封装类")]),t._v(" "),e("li",[t._v("功能组件")]),t._v(" "),e("li",[t._v("关联计算")]),t._v(" "),e("li",[t._v("业务集成联动")])]),t._v(" "),e("p",[t._v("对于功能封装函数,更是应该增加多种测试用例进行功能覆盖,对于边界测试更是其中重中之重")]),t._v(" "),e("h2",{attrs:{id:"端对端测试(end-to-end)"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#端对端测试(end-to-end)","aria-hidden":"true"}},[t._v("#")]),t._v(" 端对端测试(End-to-end)")]),t._v(" "),e("p",[t._v("端对端测试,简单地可以理解为站在用户角度的测试。站在用户的角度,他不需要知道软件的内部实现是怎么样的,只是使用即可;那么端对端测试模拟的就是用户的行为,只负责打开软件/浏览器,按序执行测试用例,并检查测试结果是否符合预期,它是 "),e("strong",[t._v("黑盒测试")]),t._v(" 的行为。")]),t._v(" "),e("h3",{attrs:{id:"使用功能库-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用功能库-2","aria-hidden":"true"}},[t._v("#")]),t._v(" 使用功能库")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://www.cypress.io/",target:"_blank",rel:"noopener noreferrer"}},[t._v("cypress"),e("OutboundLink")],1)])]),t._v(" "),e("h3",{attrs:{id:"运行方式-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#运行方式-3","aria-hidden":"true"}},[t._v("#")]),t._v(" 运行方式")]),t._v(" "),e("div",{staticClass:"language-bash line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" run test:e2e\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])])])},[],!1,null,null,null);a.default=s.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{229:function(t,r,a){"use strict";a.r(r);var e=a(0),s=Object(e.a)({},function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"陈列柜"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#陈列柜","aria-hidden":"true"}},[t._v("#")]),t._v(" 陈列柜")]),t._v(" "),a("p",[t._v("展示出团队完成的相关产品")]),t._v(" "),a("h2",{attrs:{id:"网站"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#网站","aria-hidden":"true"}},[t._v("#")]),t._v(" 网站")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("名称")]),t._v(" "),a("th",[t._v("生产环境")]),t._v(" "),a("th",[t._v("测试环境")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("买买买公司首页")]),t._v(" "),a("td",[a("a",{attrs:{href:"http://www.szmaimaimai.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)]),t._v(" "),a("td")]),t._v(" "),a("tr",[a("td",[t._v("素+管理平台")]),t._v(" "),a("td",[a("a",{attrs:{href:"http://suplus-front-prd.fjmaimaimai.com",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)]),t._v(" "),a("td",[a("a",{attrs:{href:"http://suplus-front-dev.fjmaimaimai.com",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)])]),t._v(" "),a("tr",[a("td",[t._v("管理中心(原素+管理后台)")]),t._v(" "),a("td",[a("a",{attrs:{href:"http://suplus-app-mg-prd.fjmaimaimai.com",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)]),t._v(" "),a("td",[a("a",{attrs:{href:"http://suplus-app-mg-dev.fjmaimaimai.com",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)])]),t._v(" "),a("tr",[a("td",[t._v("便捷答题小程序管理平台")]),t._v(" "),a("td",[a("a",{attrs:{href:"https://dati.fjmaimaimai.com/dati_manage/#/login",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)]),t._v(" "),a("td",[a("a",{attrs:{href:"https://csdati.fjmaimaimai.com/dati_manage/#/login",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击访问"),a("OutboundLink")],1)])])])]),t._v(" "),a("h2",{attrs:{id:"微信小程序"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#微信小程序","aria-hidden":"true"}},[t._v("#")]),t._v(" 微信小程序")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("名称")]),t._v(" "),a("th",[t._v("体验版")]),t._v(" "),a("th",[t._v("线上版")])])]),t._v(" "),a("tbody",[a("tr",[a("td",{staticClass:"nowrap",attrs:{rowspan:"2"}},[t._v("票选小助手")]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/vote/experience.jpg"}})]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/vote/production.jpg"}})])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v("快速简单创建投票,支持图文选项。可支持群投票或指定用户进行投票")])]),t._v(" "),a("tr",[a("td",{staticClass:"nowrap",attrs:{rowspan:"2"}},[t._v("便捷答题")]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/exam/experience.jpg"}})]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/exam/production.jpg"}})])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v("让公司可以便捷地给员工培训考试")])]),t._v(" "),a("tr",[a("td",{staticClass:"nowrap",attrs:{rowspan:"2"}},[t._v("海鲜干货人家")]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/seafood/experience.jpg"}})]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/seafood/production.jpg"}})])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v("专业包点、小食订购平台;自提需标提货时间(至少次日),配送为当天下单,次日配送;周末节假日暂不支持发货")])]),t._v(" "),a("tr",[a("td",{staticClass:"nowrap",attrs:{rowspan:"2"}},[t._v("我的旺铺")]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/hot-shop/experience.jpg"}})]),t._v(" "),a("td",{staticClass:"text-center"},[a("img",{staticClass:"img",attrs:{src:"/frontend/mini-program/hot-shop/production.jpg"}})])]),t._v(" "),a("tr",[a("td",{attrs:{colspan:"2"}},[t._v("店铺管理工具,能快速的管理店铺的分类、商品和海报图册。")])])])]),t._v(" "),a("h2",{attrs:{id:"桌面客户端"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#桌面客户端","aria-hidden":"true"}},[t._v("#")]),t._v(" 桌面客户端")]),t._v(" "),a("p",[t._v("未上线")])])},[],!1,null,null,null);r.default=s.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{230:function(s,t,a){"use strict";a.r(t);var n=a(0),e=Object(n.a)({},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"开发规范"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#开发规范","aria-hidden":"true"}},[s._v("#")]),s._v(" 开发规范")]),s._v(" "),a("p",[s._v("编码规范好比协议,有了 "),a("code",[s._v("Http")]),s._v("、"),a("code",[s._v("TCP")]),s._v(" 等各种协议,计算机之间才能有效地通信,同样的,有了一致的编码规范,开发人员之间才能有效地合作")]),s._v(" "),a("p",[s._v("为提高软件开发质量,降低开发周期,增强代码的可重用性和易读性,使软件便于维护及移交,开发人员间便于交流和协作,本规范适用于前端团队,以作参考。")]),s._v(" "),a("div",{staticClass:"custom-block danger"},[a("p",{staticClass:"custom-block-title"},[s._v("注意")]),s._v(" "),a("p",[s._v("开发规范执行情况将会不定期进行 "),a("strong",[s._v("Code Review")]),s._v(",不符合规范的内容必须进行整改。")])]),s._v(" "),a("h2",{attrs:{id:"文件与目录命名规范"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#文件与目录命名规范","aria-hidden":"true"}},[s._v("#")]),s._v(" 文件与目录命名规范")]),s._v(" "),a("p",[s._v("前端开发规范应用于 Web 网站、管理平台、移动端内嵌、微信小程序等范围,即使是本文档项目("),a("code",[s._v("doc-press")]),s._v(")中的文件命名,依然建议应用本规范")]),s._v(" "),a("p",[s._v("命名规范优秀的行业范例可参考 "),a("a",{attrs:{href:"https://github.com/vuejs/vue",target:"_blank",rel:"noopener noreferrer"}},[s._v("Vuejs"),a("OutboundLink")],1),s._v(" 和 "),a("a",{attrs:{href:"https://github.com/facebook/react",target:"_blank",rel:"noopener noreferrer"}},[s._v("Reactjs"),a("OutboundLink")],1),s._v(" 的源码")]),s._v(" "),a("h3",{attrs:{id:"目录命名"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#目录命名","aria-hidden":"true"}},[s._v("#")]),s._v(" 目录命名")]),s._v(" "),a("p",[s._v("业务功能结构示例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("├─用户管理\n └─授权管理\n ├─角色管理\n └─用户角色绑定\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])]),a("p",[s._v("目录命名示例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("✖\n├─userManage\n └─userAuthManage\n ├─RoleManage\n └─userRoleBind\n\n✔\n├─user\n └─auth\n ├─role\n └─user"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("role\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br")])]),a("p",[s._v("目录的命名,应尽可能结合上下、父子结构进行上下文信息描述,目录名自身应尽可能简洁直观。文本上使用全小写字母,有词组的情况使用 “-” 符号隔开")]),s._v(" "),a("h4",{attrs:{id:"为什么要使用小写?"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#为什么要使用小写?","aria-hidden":"true"}},[s._v("#")]),s._v(" 为什么要使用小写?")]),s._v(" "),a("ul",[a("li",[a("p",[s._v("易用性/可读性"),a("br"),s._v("\n小写文件名通常比大写文件名更易读,比如 "),a("code",[s._v("accessibility.txt")]),s._v(" 就比 "),a("code",[s._v("ACCESSIBILITY.TXT")]),s._v(" 易读。即使使用驼峰命名法,如 "),a("code",[s._v("UserRoleBind")]),s._v(" 或 "),a("code",[s._v("userRoleBind")]),s._v(" 不如 "),a("code",[s._v("user-role-bind")]),s._v(" 的可读性高")])]),s._v(" "),a("li",[a("p",[s._v("兼容性"),a("br"),s._v("\n不同操作系统对于大小兼容程度不一样,为了保证编译、部署后的内容在所有平台上顺利部署,目录名也应当使用小写")])]),s._v(" "),a("li",[a("p",[s._v("行业惯例"),a("br"),s._v("\n诸如 "),a("code",[s._v("Java")]),s._v("、"),a("code",[s._v(".net")]),s._v("、"),a("code",[s._v("C")]),s._v(" 等著名语言的包路径均为小写,行业巨头的良好规范也逐渐成为行业里约定俗成的规范")])])]),s._v(" "),a("h3",{attrs:{id:"文件命名"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#文件命名","aria-hidden":"true"}},[s._v("#")]),s._v(" 文件命名")]),s._v(" "),a("p",[s._v("文件名的规则在遵循目录命名的规则作为基础规则,但文件名的命名规则相比目录,略有不同")]),s._v(" "),a("h4",{attrs:{id:"插件-组件-页面"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#插件-组件-页面","aria-hidden":"true"}},[s._v("#")]),s._v(" 插件/组件/页面")]),s._v(" "),a("p",[s._v("单文件组件、插件/组件主体、页面的文件名应该始终是单词大写开头 (PascalCase)")]),s._v(" "),a("p",[s._v("单词大写开头对于代码编辑器的自动补全最为友好,因为这使得我们在 JS(X) 和模板中引用组件的方式尽可能的一致。然而,混用文件命名方式有的时候会导致大小写不敏感的文件系统的问题。")]),s._v(" "),a("p",[a("strong",[s._v("Vuejs")]),s._v(" 官方文档中,对于文件命名也有相应的 "),a("a",{attrs:{href:"https://cn.vuejs.org/v2/style-guide/#%E5%8D%95%E6%96%87%E4%BB%B6%E7%BB%84%E4%BB%B6%E6%96%87%E4%BB%B6%E7%9A%84%E5%A4%A7%E5%B0%8F%E5%86%99-%E5%BC%BA%E7%83%88%E6%8E%A8%E8%8D%90",target:"_blank",rel:"noopener noreferrer"}},[s._v("指导规范"),a("OutboundLink")],1)]),s._v(" "),a("p",[s._v("文件命名示例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("✖\ncomponents\n └─grid\n ├─grid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("sass\n ├─headRow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n ├─bodyrow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n ├─grid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n └─index"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("js\n\n✔\ncomponents\n └─grid\n ├─grid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("sass\n ├─HeadRow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n ├─BodyRow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n ├─Grid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("vue\n └─index"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("js\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br")])]),a("h2",{attrs:{id:"css-样式预处理"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#css-样式预处理","aria-hidden":"true"}},[s._v("#")]),s._v(" CSS 样式预处理")]),s._v(" "),a("p",[s._v("对于 CSS 样式预处理方案,比较流行的有 "),a("code",[s._v("SASS/SCSS")]),s._v("、"),a("code",[s._v("LESS")]),s._v(" 和 "),a("code",[s._v("Stylus")]),s._v(",大体上的使用方式类似,区别在于功能的多少与扩展的能力。")]),s._v(" "),a("p",[s._v("综合各方面考虑,开发规范如下(微信小程序不在讨论范围)")]),s._v(" "),a("ul",[a("li",[s._v("前端项目统一使用 "),a("code",[s._v("SASS/SCSS")]),s._v(" 开发样式预处理内容")]),s._v(" "),a("li",[a("code",[s._v("web-open-platform")]),s._v(" 项目使用 "),a("code",[s._v("Stylus")])])]),s._v(" "),a("p",[s._v("关于文件及目录的命名遵循 "),a("a",{attrs:{href:"#%E6%96%87%E4%BB%B6%E4%B8%8E%E7%9B%AE%E5%BD%95%E5%91%BD%E5%90%8D%E8%A7%84%E8%8C%83"}},[s._v("文件与目录命名")]),s._v(" 规则")]),s._v(" "),a("h3",{attrs:{id:"class-命名"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#class-命名","aria-hidden":"true"}},[s._v("#")]),s._v(" class 命名")]),s._v(" "),a("p",[s._v('对于 class name 的命名同样遵循全小写与单词间使用 "-" 隔开原则')]),s._v(" "),a("p",[s._v("命名示例")]),s._v(" "),a("div",{staticClass:"language-scss line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-scss"}},[a("code",[a("span",{pre:!0,attrs:{class:"token selector"}},[s._v(".user-container ")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token selector"}},[s._v("width: 100vw\n .user-header ")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[s._v("background-color")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" #eee\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br")])]),a("h3",{attrs:{id:"样式抽象"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#样式抽象","aria-hidden":"true"}},[s._v("#")]),s._v(" 样式抽象")]),s._v(" "),a("p",[s._v("一个工程通常会有大量的页面、组件和插件,功能虽不同,但风格必须统一。对于主题风格部分的内容,必须提取到专用样式文件中进行维护。类似的功能或结构的样式内容在多处独立维护,是冗余且低效的,多人协同开发时须杜绝该现象发生,在进行样式定义之前应互相询问是否存在重复定义的情况。")]),s._v(" "),a("p",[a("strong",[s._v("BTW")]),a("br"),s._v("\nCSS 样式预处理,只使用最基本的结构嵌套功能是不够的,了解和使用高级特性才是提高效率和效果的最佳实践")]),s._v(" "),a("h2",{attrs:{id:"路由命名规则"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#路由命名规则","aria-hidden":"true"}},[s._v("#")]),s._v(" 路由命名规则")]),s._v(" "),a("p",[s._v("在路由(Vue Router)的命名中,依然遵循 "),a("a",{attrs:{href:"#%E6%96%87%E4%BB%B6%E4%B8%8E%E7%9B%AE%E5%BD%95%E5%91%BD%E5%90%8D%E8%A7%84%E8%8C%83"}},[s._v("文件与目录命名")]),s._v(" 规则;因为路由命名的结果最终会体现在浏览器的地址栏中,所以在路由的命名过程中依然是推荐结合业务结构的上下文级进行组合命名,内容必须做到精简、简洁,不要让最终呈现出来的地址链接过于冗长。")]),s._v(" "),a("p",[s._v("一个网站的路由结构通常两层就可以完全满足需求,所以除去页面布局结构外,大量的业务页面的路由均为同级,既然是同级,就需要通过路由的路径(path)来声明功能的业务结构")]),s._v(" "),a("p",[s._v("业务功能结构示例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("├─系统管理\n └─用户管理\n └─角色授权管理\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br")])]),a("p",[s._v("路由命名示例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("✖\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/systemManage/userManage/roleAuth'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n\n✔\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/system/user/role-auth'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br")])]),a("p",[a("strong",[s._v("现有项目命名情况改造实例")])]),s._v(" "),a("p",[s._v("以现有素+管理平台的路由设置情况进行举例")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[s._v("✖ 不推荐\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/stockType'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货类别")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/goodsClassify'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货分类")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/goodsSeries'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货系列")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/goodsUnit'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 计量组单位")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/stockBrands'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货品牌")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/stockForm'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货形态")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stockManager/stockArchives'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货档案")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n\n✔ 推荐设置\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/type'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货类别")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/category'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货分类")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/series'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货系列")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/goods-unit'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 计量组单位")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/brand'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货品牌")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/form'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货形态")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/workbench/stock/file'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 存货档案")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br")])]),a("p",[s._v("通常情况下,对于路由的定义,不设置 "),a("code",[s._v("name")]),s._v(" 属性,推荐仅对于使用频率较高的功能模块设置,例如登录、首页等最经常被使用的模块,另外就是业务中也经常会被多个场景中使用的情况")]),s._v(" "),a("h3",{attrs:{id:"异步加载页面-组件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#异步加载页面-组件","aria-hidden":"true"}},[s._v("#")]),s._v(" 异步加载页面/组件")]),s._v(" "),a("p",[s._v("对于路由的定义推荐使用以下模式")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'/aaa/bbb'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("component")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@/views/abc'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])])])},[],!1,null,null,null);t.default=e.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{222:function(t,a,r){"use strict";r.r(a);var e=r(0),s=Object(e.a)({},function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"网页能力开放平台"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#网页能力开放平台","aria-hidden":"true"}},[t._v("#")]),t._v(" 网页能力开放平台")]),t._v(" "),r("h2",{attrs:{id:"平台介绍及使用规范"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#平台介绍及使用规范","aria-hidden":"true"}},[t._v("#")]),t._v(" 平台介绍及使用规范")]),t._v(" "),r("h4",{attrs:{id:"背景情况说明"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#背景情况说明","aria-hidden":"true"}},[t._v("#")]),t._v(" 背景情况说明")]),t._v(" "),r("p",[r("em",[t._v("网页能力开放平台")]),t._v(" 作为专为 "),r("code",[t._v("App")]),t._v(" 中内嵌或在 "),r("code",[t._v("Desktop / Mobile")]),t._v(" 独立功能网页输出的功能平台,将移动、多场景共享使用的内容聚合于一个独立工程中,以达到专项优化,专项处理的功能需求")]),t._v(" "),r("p",[t._v("平台使用 "),r("a",{attrs:{href:"https://getbootstrap.com/docs/4.3/getting-started/introduction/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bootstrap"),r("OutboundLink")],1),t._v(" UI 框架的 4.3.1 版本的样式作为基础框架样式库使用, 原则上如果没有极其特殊需求,不允许再引用其他样式进行使用")]),t._v(" "),r("h4",{attrs:{id:"项目名称"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#项目名称","aria-hidden":"true"}},[t._v("#")]),t._v(" 项目名称")]),t._v(" "),r("p",[r("code",[t._v("web-open-platform")])]),t._v(" "),r("h4",{attrs:{id:"内容管理规范"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#内容管理规范","aria-hidden":"true"}},[t._v("#")]),t._v(" 内容管理规范")]),t._v(" "),r("ul",[r("li",[t._v("内容以项目作为基本单位建立目录")]),t._v(" "),r("li",[t._v("使用 "),r("a",{attrs:{href:"https://getbootstrap.com/docs/4.3/getting-started/introduction/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bootstrap"),r("OutboundLink")],1),t._v(" 作为基础 UI 框架(仅使用样式),为界面中排版布局,样式组件所用")]),t._v(" "),r("li",[t._v("样式表预处理语言必须使用 "),r("a",{attrs:{href:"https://www.zhangxinxu.com/jq/stylus/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Stylus"),r("OutboundLink")],1)])]),t._v(" "),r("h4",{attrs:{id:"路由命令规则"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#路由命令规则","aria-hidden":"true"}},[t._v("#")]),t._v(" 路由命令规则")]),t._v(" "),r("div",{staticClass:"language- line-numbers-mode"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("project/function[/children-function]\n")])]),t._v(" "),r("div",{staticClass:"line-numbers-wrapper"},[r("span",{staticClass:"line-number"},[t._v("1")]),r("br")])]),r("p",[r("strong",[t._v("示例")])]),t._v(" "),r("p",[t._v("能力展示平台的公告详情功能: "),r("code",[t._v("http://web-open-platform.com/ability/announcement")])]),t._v(" "),r("h2",{attrs:{id:"现有项目-模块"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#现有项目-模块","aria-hidden":"true"}},[t._v("#")]),t._v(" 现有项目/模块")]),t._v(" "),r("p",[t._v("陈列出在 "),r("strong",[t._v("网页能力开放平台")]),t._v(" 中已完成或正在进行中的项目")]),t._v(" "),r("h3",{attrs:{id:"app-内嵌网页"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#app-内嵌网页","aria-hidden":"true"}},[t._v("#")]),t._v(" App 内嵌网页")]),t._v(" "),r("p",[t._v("应用于 "),r("strong",[t._v("App(Android、IOS)")]),t._v(" 内嵌使用")]),t._v(" "),r("h4",{attrs:{id:"能力展示"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#能力展示","aria-hidden":"true"}},[t._v("#")]),t._v(" 能力展示")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("活动 / 公告内容展示")]),t._v(" "),r("Badge",{attrs:{text:"完成",type:"success",vertical:"middle"}}),r("br"),t._v("\n提供展示活动 / 公告的标题、内容以及投票交互能力,若有交互功能场景则在提交数据后,通知客户端处理后续功能")],1)]),t._v(" "),r("h4",{attrs:{id:"素-管理平台"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#素-管理平台","aria-hidden":"true"}},[t._v("#")]),t._v(" 素+管理平台")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("用户协议")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供素+管理平台用户协议详情,内容来自管理后台")],1),t._v(" "),r("li",[r("strong",[t._v("隐私政策")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供素+管理平台隐私政策详情,内容来自管理后台")],1),t._v(" "),r("li",[r("strong",[t._v("App 版本更新详情")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供 App 版本更新详情内容展示,内容来自管理后台")],1),t._v(" "),r("li",[r("strong",[t._v("仓储管理预警消息详情")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供预警消息详情内容查看,其中又分为 “产品” 与 “仓库” 两种类型")],1)]),t._v(" "),r("h3",{attrs:{id:"独立功能页"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#独立功能页","aria-hidden":"true"}},[t._v("#")]),t._v(" 独立功能页")]),t._v(" "),r("p",[t._v("应用于 "),r("strong",[t._v("Desktop、Mobile")]),t._v(" 的独立功能网页")]),t._v(" "),r("h4",{attrs:{id:"素-管理平台-2"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#素-管理平台-2","aria-hidden":"true"}},[t._v("#")]),t._v(" 素+管理平台")]),t._v(" "),r("ul",[r("li",[r("strong",[t._v("App 版本更新详情")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供 App 版本更新详情内容展示,内容来自管理后台")],1),t._v(" "),r("li",[r("strong",[t._v("仓储管理预警消息详情")]),t._v(" "),r("Badge",{attrs:{text:"完成",vertical:"middle"}}),r("br"),t._v("\n提供预警消息详情内容查看,其中又分为 “产品” 与 “仓库” 两种类型")],1)])])},[],!1,null,null,null);a.default=s.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{226:function(t,s,e){"use strict";e.r(s);var r=e(0),a=Object(r.a)({},function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"ios-苹果端"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ios-苹果端","aria-hidden":"true"}},[this._v("#")]),this._v(" IOS 苹果端")])])},[],!1,null,null,null);s.default=a.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{228:function(t,s,e){"use strict";e.r(s);var r=e(0),a=Object(r.a)({},function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"测试组"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#测试组","aria-hidden":"true"}},[this._v("#")]),this._v(" 测试组")])])},[],!1,null,null,null);s.default=a.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{216:function(t,s,e){"use strict";e.r(s);var r=e(0),a=Object(r.a)({},function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"行政管理"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#行政管理","aria-hidden":"true"}},[this._v("#")]),this._v(" 行政管理")])])},[],!1,null,null,null);s.default=a.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{221:function(t,e,r){"use strict";r.r(e);var a=r(0),s=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"文档写作平台使用入门"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#文档写作平台使用入门","aria-hidden":"true"}},[t._v("#")]),t._v(" 文档写作平台使用入门")]),t._v(" "),r("p",[t._v("介绍文档写作平台的运行方式,如何编写文档及各方面资源的内容组织")]),t._v(" "),r("h2",{attrs:{id:"文档写作平台项目地址"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#文档写作平台项目地址","aria-hidden":"true"}},[t._v("#")]),t._v(" 文档写作平台项目地址")]),t._v(" "),r("p",[r("a",{attrs:{href:"http://192.168.100.254:3000/frontend/doc-press",target:"_blank",rel:"noopener noreferrer"}},[t._v("doc-press"),r("OutboundLink")],1)]),t._v(" "),r("h2",{attrs:{id:"项目运行方式"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#项目运行方式","aria-hidden":"true"}},[t._v("#")]),t._v(" 项目运行方式")]),t._v(" "),r("ol",[r("li",[t._v("安装 "),r("code",[t._v("nodejs")]),t._v(",在 "),r("a",{attrs:{href:"http://nodejs.cn/download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("nodejs 官网"),r("OutboundLink")],1),t._v(" 下载并安装"),r("br"),t._v(" "),r("em",[t._v("windows 下建议下载 "),r("code",[t._v("Windows 安装包 (.msi) 64 位")])])]),t._v(" "),r("li",[t._v("安装 "),r("code",[t._v("yarn")]),t._v(",在 "),r("a",{attrs:{href:"https://www.yarnpkg.com/zh-Hant/docs/install#windows-stable",target:"_blank",rel:"noopener noreferrer"}},[t._v("yarn 官网"),r("OutboundLink")],1),t._v(" 下载并安装")]),t._v(" "),r("li",[t._v("安装 "),r("code",[t._v("git")]),t._v(",在 "),r("a",{attrs:{href:"https://git-scm.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("git 官网"),r("OutboundLink")],1),t._v(" 下载并安装好")]),t._v(" "),r("li",[t._v("下载并安装 git 图形化工具,推荐使用的有 "),r("a",{attrs:{href:"https://tortoisegit.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("TortoiseGit"),r("OutboundLink")],1),t._v("、"),r("a",{attrs:{href:"https://www.sourcetreeapp.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("SourceTree"),r("OutboundLink")],1),t._v("、"),r("a",{attrs:{href:"https://git-fork.com/windows",target:"_blank",rel:"noopener noreferrer"}},[t._v("Fork"),r("OutboundLink")],1)]),t._v(" "),r("li",[t._v("克隆文档写作平台到本地环境")]),t._v(" "),r("li",[t._v("使用命令行进入到文档写作平台目录")]),t._v(" "),r("li",[t._v("运行命令 "),r("code",[t._v("yarn install")]),t._v(" 安装依赖库")]),t._v(" "),r("li",[t._v("运行命令 "),r("code",[t._v("yarn dev")]),t._v(" 运行本地开发平台")]),t._v(" "),r("li",[t._v("运行完成后,命令行界面中会提示访问地址,在浏览器中访问该地址即可开始进行写作,效果如下")]),t._v(" "),r("li",[t._v("此时可开始写作,并在网页中实时预览效果")]),t._v(" "),r("li",[t._v("写作完成后,将内容提交并推送到项目托管地址")])]),t._v(" "),r("div",{staticClass:"language-bash line-numbers-mode"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[t._v("success "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),r("span",{pre:!0,attrs:{class:"token number"}},[t._v("16")]),t._v(":22:08"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" Build 42920d finished "),r("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[t._v("3668")]),t._v(" ms"),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n"),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" VuePress dev server listening at http://localhost:8080/\n")])]),t._v(" "),r("div",{staticClass:"line-numbers-wrapper"},[r("span",{staticClass:"line-number"},[t._v("1")]),r("br"),r("span",{staticClass:"line-number"},[t._v("2")]),r("br")])]),r("p",[t._v("只进行文档写作,不希望本地运行网站服务的情况,仅需执行 "),r("code",[t._v("3、4、5、11")]),t._v(" 步骤")]),t._v(" "),r("h2",{attrs:{id:"文档写作"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#文档写作","aria-hidden":"true"}},[t._v("#")]),t._v(" 文档写作")]),t._v(" "),r("p",[t._v("Markdown 标记语言语法")]),t._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.w3cschool.cn/markdownyfsm/markdownyfsm-odm6256r.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://www.w3cschool.cn"),r("OutboundLink")],1)]),t._v(" "),r("li",[r("a",{attrs:{href:"https://www.markdown.cn/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://www.markdown.cn/"),r("OutboundLink")],1)]),t._v(" "),r("li",[r("a",{attrs:{href:"https://markdown-zh.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://markdown-zh.readthedocs.io/en/latest/"),r("OutboundLink")],1)]),t._v(" "),r("li",[r("a",{attrs:{href:"http://wow.kuapp.com/markdown/",target:"_blank",rel:"noopener noreferrer"}},[t._v("http://wow.kuapp.com/markdown/"),r("OutboundLink")],1)])]),t._v(" "),r("p",[t._v("推荐编辑器")]),t._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://typora.io/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Typora"),r("OutboundLink")],1)]),t._v(" "),r("li",[r("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("VSCode"),r("OutboundLink")],1)])]),t._v(" "),r("blockquote",[r("p",[t._v("文档写作平台项目基于 VuePress 构建,具体配置内容请查看 "),r("a",{attrs:{href:"https://vuepress.vuejs.org/zh/",target:"_blank",rel:"noopener noreferrer"}},[t._v("这里"),r("OutboundLink")],1)])]),t._v(" "),r("h3",{attrs:{id:"写作方式"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#写作方式","aria-hidden":"true"}},[t._v("#")]),t._v(" 写作方式")]),t._v(" "),r("p",[t._v("文档写作平台所有编写的文档均是基于 "),r("strong",[t._v("Markdown")]),t._v(" 标记语言来编写,它的特点是使用简单的符号即可清晰地描述整个文档结构和排版,仅需要普通文本编辑器即可完成,不像 Word、Excel 等格式必须安装 Microsft Office 才可以正常使用;目前 Markdown 标记语言已经被广泛使用于国内、国际各种记事本或笔记平台、知识平台、写作平台,成为一种流行的文档编写格式,且范围不仅仅是软件行业")]),t._v(" "),r("p",[t._v("在网站的内容组织上,一个目录或站点的默认访问位置是 "),r("code",[t._v("index.html")]),t._v(",这是整个互联网环境、网页服务平台、网页服务软件等组织共同形成的约定俗成的结果")]),t._v(" "),r("p",[t._v("在以 Markdown 标记语言为主要格式和形式的文档平台中,大家约定俗成的默认文档为 "),r("code",[t._v("README.md")]),t._v("(注意大小写),其功能与 "),r("code",[t._v("index.html")]),t._v(" 一致,可以将其理解为是一个目录或是一个文档站点的里的 "),r("strong",[t._v("首页")])]),t._v(" "),r("p",[r("strong",[t._v("HTML")])]),t._v(" "),r("p",[t._v("实际上,在文档写作平台中,所有的 Markdown 文档最终会被编译为 HTML 格式的网页作为最终展现,所以在内容的编写上可以放心使用部分 HTML 标签的排版,建议是排版方面的标签,"),r("strong",[t._v("表单类型的标签请尽可能不要使用")]),t._v(",以免出现不可预期的问题")]),t._v(" "),r("h3",{attrs:{id:"资源内容添加"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#资源内容添加","aria-hidden":"true"}},[t._v("#")]),t._v(" 资源内容添加")]),t._v(" "),r("p",[t._v("在文档写作过程中,除了文档描述自身,往往需要引用图片、跳转链接和文件下载等需求来丰富文档内容")]),t._v(" "),r("h4",{attrs:{id:"资源内容说明"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#资源内容说明","aria-hidden":"true"}},[t._v("#")]),t._v(" 资源内容说明")]),t._v(" "),r("p",[t._v("资源可分为以下两类")]),t._v(" "),r("ul",[r("li",[t._v("图片")]),t._v(" "),r("li",[t._v("文档(Word、Excel、PowerPoint或其它类型文档)")])]),t._v(" "),r("p",[t._v("其中,图片可在文档中直接显示,而其它类型文件可作为下载附件的方式挂载在文档中")]),t._v(" "),r("p",[t._v("所有资源存放位置:")]),t._v(" "),r("p",[r("code",[t._v("/.vuepress/public/")])]),t._v(" "),r("div",{staticClass:"custom-block danger"},[r("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),r("p",[t._v("注意:所有资源要求必须有序存放,例如根据业务类型、团队类型等形式分目录存放")])]),t._v(" "),r("h4",{attrs:{id:"资源使用方式"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#资源使用方式","aria-hidden":"true"}},[t._v("#")]),t._v(" 资源使用方式")]),t._v(" "),r("ul",[r("li",[t._v("图片内容")])]),t._v(" "),r("p",[t._v("假设有一张图片存放于以下位置")]),t._v(" "),r("p",[r("code",[t._v("/.vuepress/public/logo.png")])]),t._v(" "),r("p",[t._v("那么在文档中引用该图片的方式为")]),t._v(" "),r("p",[r("code",[t._v("![logo](/logo.png)")])]),t._v(" "),r("p",[t._v("渲染结果")]),t._v(" "),r("p",[r("img",{attrs:{src:"/logo.png",alt:"logo"}})]),t._v(" "),r("p",[t._v("可以看到 "),r("code",[t._v("/")]),t._v(" 资源引用的根位置指向了 "),r("code",[t._v("/.vuepress/public/")])]),t._v(" "),r("div",{staticClass:"custom-block danger"},[r("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),r("p",[t._v("如果设置的图片是项目 Logo、二维码(App 或 小程序等),必须按照以下格式使用")]),t._v(" "),r("div",{staticClass:"language-html line-numbers-mode"},[r("pre",{pre:!0,attrs:{class:"language-html"}},[r("code",[r("span",{pre:!0,attrs:{class:"token tag"}},[r("span",{pre:!0,attrs:{class:"token tag"}},[r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("img")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),r("span",{pre:!0,attrs:{class:"token attr-value"}},[r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("/xxx.jpg"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),r("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("class")]),r("span",{pre:!0,attrs:{class:"token attr-value"}},[r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("img"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n")])]),t._v(" "),r("div",{staticClass:"line-numbers-wrapper"},[r("span",{staticClass:"line-number"},[t._v("1")]),r("br")])]),r("p",[t._v("图片将以 "),r("code",[t._v("150 X 150")]),t._v(" 的统一规格(像素)显示")])]),t._v(" "),r("ul",[r("li",[t._v("文档或其它")])]),t._v(" "),r("p",[t._v("引用其它资源,区别仅为引用方式上,假设有一个文档存放于以下位置")]),t._v(" "),r("p",[r("code",[t._v("/.vuepress/public/design/file.docx")])]),t._v(" "),r("p",[t._v("该文档的引用方式为")]),t._v(" "),r("p",[r("code",[t._v("[file](/design/file.docx)")])]),t._v(" "),r("p",[t._v("根据观察可以发现,文件的引用方式与图片的引用方式上的区别仅是一个 "),r("code",[t._v("!")]),t._v(",而在描述一个链接时增加感叹号则是专用于图片显示")]),t._v(" "),r("blockquote",[r("p",[t._v("附件类型的在点击后,会直接弹出浏览器下载窗口下载该文件,所以该方式适用于与文档内容相关的附件设置")])])])},[],!1,null,null,null);e.default=s.exports}}]);
\ No newline at end of file
... ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{214:function(t,s,e){"use strict";e.r(s);var r=e(0),a=Object(r.a)({},function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"项目管控"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#项目管控","aria-hidden":"true"}},[this._v("#")]),this._v(" 项目管控")])])},[],!1,null,null,null);s.default=a.exports}}]);
\ No newline at end of file
... ...
此 diff 太大无法显示。