Commit 18ee49db8ddeb5a747822333cc110e683d8816ff
1 parent
c9c154e1
Exists in
master
and in
1 other branch
维护全局变量
Showing
8 changed files
with
37 additions
and
11 deletions
Show diff stats
examples/styles/markdown.scss
| ... | ... | @@ -5,6 +5,8 @@ |
| 5 | 5 | .header-anchor { |
| 6 | 6 | color: $primary; |
| 7 | 7 | text-decoration: none; |
| 8 | + opacity: 0; | |
| 9 | + transition: opacity 300ms; | |
| 8 | 10 | } |
| 9 | 11 | h1 { |
| 10 | 12 | color: $black; |
| ... | ... | @@ -20,6 +22,14 @@ |
| 20 | 22 | margin: 32px 0 16px; |
| 21 | 23 | font-weight: 500; |
| 22 | 24 | clear: both; |
| 25 | + transition: all 300ms; | |
| 26 | + } | |
| 27 | + h2, h3, h4, h5, h6 { | |
| 28 | + &:hover { | |
| 29 | + .header-anchor { | |
| 30 | + opacity: 1; | |
| 31 | + } | |
| 32 | + } | |
| 23 | 33 | } |
| 24 | 34 | h3 { |
| 25 | 35 | font-size: 18px; | ... | ... |
examples/views/docs/guide/installation.md
| 1 | 1 | # 安装 |
| 2 | 2 | |
| 3 | -本组件库处于未开发完成状态,暂时为私有库,仅供内部项目使用,当前最新版本号为`0.4.1` | |
| 3 | +本组件库处于未开发完成状态,暂时为私有库,仅供内部项目使用,当前最新版本号为`{{ appVersion }}` | |
| 4 | 4 | |
| 5 | 5 | > 注意:由于yunweidashi.com服务器的SSL证书未经过第三方机构签署,因此在使用本私有库时,需要在git中设置忽略ssl验证`git config http.sslVerify "false"` |
| 6 | 6 | |
| 7 | 7 | ## npm安装 |
| 8 | 8 | ```bash |
| 9 | -npm install --save git+https://frameworkweb:frame1WorkwEb@git.yunweidashi.com/framework/eagle-web-toolkit.git#版本号 | |
| 9 | +npm install --save git+https://frameworkweb:frame1WorkwEb@git.yunweidashi.com/framework/eagle-web-toolkit.git#{{ appVersion }} | |
| 10 | 10 | ``` |
| 11 | 11 | |
| 12 | 12 | ## yarn安装 |
| 13 | 13 | ```bash |
| 14 | -yarn git+https://frameworkweb:frame1WorkwEb@git.yunweidashi.com/framework/eagle-web-toolkit.git#版本号 | |
| 14 | +yarn git+https://frameworkweb:frame1WorkwEb@git.yunweidashi.com/framework/eagle-web-toolkit.git#{{ appVersion }} | |
| 15 | 15 | ``` |
| 16 | 16 | \ No newline at end of file | ... | ... |
examples/views/docs/guide/introduce.md
| 1 | -# EAGLE-WEB-TOOKIT | |
| 1 | +# {{ appName }} | |
| 2 | 2 | |
| 3 | -`EAGLE-WEB-TOOKIT` 是在基于**Vue 2.0**的 [**Element**](https://element.eleme.cn) 组件库基础上的扩展组件库,主要用于快速生成企业后台管理项目。 | |
| 3 | +`{{ appName }}` 是在基于**Vue 2.0**的 [**Element**](https://element.eleme.cn) 组件库基础上的扩展组件库,主要用于快速生成企业后台管理项目。 | |
| 4 | 4 | |
| 5 | 5 | ## 特性 |
| 6 | 6 | |
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | </div> |
| 17 | 17 | ::: |
| 18 | 18 | |
| 19 | -**Vue.js**提供核心驱动,**Element**组成基本结构,**EAGLE WEB TOOLKIT**渲染配置项数据 | |
| 19 | +**Vue.js**提供核心驱动,**Element**组成基本结构,{{ appName }}渲染配置项数据 | |
| 20 | 20 | |
| 21 | 21 | ## 谁在使用 |
| 22 | 22 | ... | ... |
examples/views/layout/components/header.vue
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <el-header class="layout-header"> |
| 3 | 3 | <div class="left"> |
| 4 | 4 | <img class="logo" src="/img/logo.svg" /> |
| 5 | - <span class="title">EAGLE WEB TOOLKIT</span> | |
| 5 | + <span class="title">{{ appName }}</span> | |
| 6 | 6 | </div> |
| 7 | 7 | <el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect"> |
| 8 | 8 | <el-menu-item v-for="(data, index) in pages" :key="index" :index="data.meta.path">{{ data.meta.title }}</el-menu-item> |
| ... | ... | @@ -17,6 +17,7 @@ export default { |
| 17 | 17 | name: 'layoutHeader', |
| 18 | 18 | data() { |
| 19 | 19 | return { |
| 20 | + appName: process.env.VUE_APP_NAME, | |
| 20 | 21 | activeMenu: '/index', |
| 21 | 22 | pages: pages.map((data, index) => { |
| 22 | 23 | const param = data.meta && data.meta.path ? {} : { meta: { title: `Page - ${index}`, path: '/index' } } | ... | ... |
examples/views/page/index.vue
| ... | ... | @@ -4,14 +4,19 @@ |
| 4 | 4 | <img alt="logo" src="/img/logo.svg"> |
| 5 | 5 | </div> |
| 6 | 6 | <div class="content"> |
| 7 | - 欢迎使用<span class="name">EAGLE WEB TOOLKIT</span>组件库 | |
| 7 | + 欢迎使用<span class="name">{{ appName }}</span>组件库 | |
| 8 | 8 | </div> |
| 9 | 9 | </div> |
| 10 | 10 | </template> |
| 11 | 11 | |
| 12 | 12 | <script> |
| 13 | 13 | export default { |
| 14 | - name: 'index' | |
| 14 | + name: 'index', | |
| 15 | + data() { | |
| 16 | + return { | |
| 17 | + appName: process.env.VUE_APP_NAME | |
| 18 | + } | |
| 19 | + } | |
| 15 | 20 | } |
| 16 | 21 | </script> |
| 17 | 22 | ... | ... |
public/index.html
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| 7 | 7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| 8 | - <title>Eagle Web 组件库 | Eagle Web Toolkit</title> | |
| 8 | + <title><%= VUE_APP_NAME %></title> | |
| 9 | 9 | </head> |
| 10 | 10 | <body> |
| 11 | 11 | <noscript> | ... | ... |
webpack/markdown-loader.js
| ... | ... | @@ -117,7 +117,13 @@ module.exports = function(source) { |
| 117 | 117 | export default { |
| 118 | 118 | name: 'eagle-component-doc', |
| 119 | 119 | components: { |
| 120 | - ${componentCodeList.join(",")} | |
| 120 | + ${componentCodeList.join(",")} | |
| 121 | + }, | |
| 122 | + data() { | |
| 123 | + return { | |
| 124 | + appName: process.env.VUE_APP_NAME, | |
| 125 | + appVersion: process.env.VUE_APP_VERSION, | |
| 126 | + } | |
| 121 | 127 | } |
| 122 | 128 | } |
| 123 | 129 | </script> | ... | ... |