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,6 +5,8 @@ | ||
| 5 | .header-anchor { | 5 | .header-anchor { |
| 6 | color: $primary; | 6 | color: $primary; |
| 7 | text-decoration: none; | 7 | text-decoration: none; |
| 8 | + opacity: 0; | ||
| 9 | + transition: opacity 300ms; | ||
| 8 | } | 10 | } |
| 9 | h1 { | 11 | h1 { |
| 10 | color: $black; | 12 | color: $black; |
| @@ -20,6 +22,14 @@ | @@ -20,6 +22,14 @@ | ||
| 20 | margin: 32px 0 16px; | 22 | margin: 32px 0 16px; |
| 21 | font-weight: 500; | 23 | font-weight: 500; |
| 22 | clear: both; | 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 | h3 { | 34 | h3 { |
| 25 | font-size: 18px; | 35 | font-size: 18px; |
examples/views/docs/guide/installation.md
| 1 | # 安装 | 1 | # 安装 |
| 2 | 2 | ||
| 3 | -本组件库处于未开发完成状态,暂时为私有库,仅供内部项目使用,当前最新版本号为`0.4.1` | 3 | +本组件库处于未开发完成状态,暂时为私有库,仅供内部项目使用,当前最新版本号为`{{ appVersion }}` |
| 4 | 4 | ||
| 5 | > 注意:由于yunweidashi.com服务器的SSL证书未经过第三方机构签署,因此在使用本私有库时,需要在git中设置忽略ssl验证`git config http.sslVerify "false"` | 5 | > 注意:由于yunweidashi.com服务器的SSL证书未经过第三方机构签署,因此在使用本私有库时,需要在git中设置忽略ssl验证`git config http.sslVerify "false"` |
| 6 | 6 | ||
| 7 | ## npm安装 | 7 | ## npm安装 |
| 8 | ```bash | 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 | ## yarn安装 | 12 | ## yarn安装 |
| 13 | ```bash | 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 | \ No newline at end of file | 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,7 +16,7 @@ | ||
| 16 | </div> | 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,7 +2,7 @@ | ||
| 2 | <el-header class="layout-header"> | 2 | <el-header class="layout-header"> |
| 3 | <div class="left"> | 3 | <div class="left"> |
| 4 | <img class="logo" src="/img/logo.svg" /> | 4 | <img class="logo" src="/img/logo.svg" /> |
| 5 | - <span class="title">EAGLE WEB TOOLKIT</span> | 5 | + <span class="title">{{ appName }}</span> |
| 6 | </div> | 6 | </div> |
| 7 | <el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect"> | 7 | <el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect"> |
| 8 | <el-menu-item v-for="(data, index) in pages" :key="index" :index="data.meta.path">{{ data.meta.title }}</el-menu-item> | 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,6 +17,7 @@ export default { | ||
| 17 | name: 'layoutHeader', | 17 | name: 'layoutHeader', |
| 18 | data() { | 18 | data() { |
| 19 | return { | 19 | return { |
| 20 | + appName: process.env.VUE_APP_NAME, | ||
| 20 | activeMenu: '/index', | 21 | activeMenu: '/index', |
| 21 | pages: pages.map((data, index) => { | 22 | pages: pages.map((data, index) => { |
| 22 | const param = data.meta && data.meta.path ? {} : { meta: { title: `Page - ${index}`, path: '/index' } } | 23 | const param = data.meta && data.meta.path ? {} : { meta: { title: `Page - ${index}`, path: '/index' } } |
examples/views/page/index.vue
| @@ -4,14 +4,19 @@ | @@ -4,14 +4,19 @@ | ||
| 4 | <img alt="logo" src="/img/logo.svg"> | 4 | <img alt="logo" src="/img/logo.svg"> |
| 5 | </div> | 5 | </div> |
| 6 | <div class="content"> | 6 | <div class="content"> |
| 7 | - 欢迎使用<span class="name">EAGLE WEB TOOLKIT</span>组件库 | 7 | + 欢迎使用<span class="name">{{ appName }}</span>组件库 |
| 8 | </div> | 8 | </div> |
| 9 | </div> | 9 | </div> |
| 10 | </template> | 10 | </template> |
| 11 | 11 | ||
| 12 | <script> | 12 | <script> |
| 13 | export default { | 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 | </script> | 21 | </script> |
| 17 | 22 |
public/index.html
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| 7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | 7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| 8 | - <title>Eagle Web 组件库 | Eagle Web Toolkit</title> | 8 | + <title><%= VUE_APP_NAME %></title> |
| 9 | </head> | 9 | </head> |
| 10 | <body> | 10 | <body> |
| 11 | <noscript> | 11 | <noscript> |
webpack/markdown-loader.js
| @@ -117,7 +117,13 @@ module.exports = function(source) { | @@ -117,7 +117,13 @@ module.exports = function(source) { | ||
| 117 | export default { | 117 | export default { |
| 118 | name: 'eagle-component-doc', | 118 | name: 'eagle-component-doc', |
| 119 | components: { | 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 | </script> | 129 | </script> |