瀏覽代碼

Upload: fix links in the doc (#553)

cinwell.li 8 年之前
父節點
當前提交
febe6e8ffa
共有 4 個文件被更改,包括 9 次插入7 次删除
  1. 2 0
      .travis.yml
  2. 2 2
      build/deploy-ci.sh
  3. 3 3
      examples/docs/zh-cn/upload.md
  4. 2 2
      examples/index.tpl

+ 2 - 0
.travis.yml

@@ -7,6 +7,8 @@ cache:
   - travis_phantomjs
 before_install:
 - export TRAVIS_COMMIT_MSG="[deploy] $(git log --format='%h - %B' --no-merges -n 1)"
+- export TRAVIS_COMMIT_USER="$(git log --no-merges -n 1 --format=%an)"
+- export TRAVIS_COMMIT_EMAIL="$(git log --no-merges -n 1 --format=%ae)"
 - export PHANTOMJS_VERSION=2.1.1
 - export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH
 - if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs;

+ 2 - 2
build/deploy-ci.sh

@@ -5,8 +5,8 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
   mkdir temp_web
   cd temp_web
   git clone https://$GH_TOKEN@github.com/ElementUI/dev.git && cd dev
-  git config user.name "$(git log --no-merges -n 1 --format=%an)"
-  git config user.email "$(git log --no-merges -n 1 --format=%ae)"
+  git config user.name "$TRAVIS_COMMIT_USER"
+  git config user.email "$TRAVIS_COMMIT_EMAIL"
   rm -rf *
   cp -rf ../../examples/element-ui/** .
   git add -A .

+ 3 - 3
examples/docs/zh-cn/upload.md

@@ -46,7 +46,7 @@
 ::: demo 通过 slot 你可以传入自定义的上传按钮类型和文字提示。
 ```html
 <el-upload
-  action="http://jsonplaceholder.typicode.com/"
+  action="http://jsonplaceholder.typicode.com/posts/"
   :on-preview="handlePreview"
   :on-remove="handleRemove">
   <el-button size="small" type="primary">点击上传</el-button>
@@ -74,7 +74,7 @@
 ::: demo 将 `type` 属性指定为 'drag' 可以将上传控件变为支持拖拽的形式,并且你可以通过 `multiple` 属性来控制是否支持多选,`on-preview` 和 `on-remove` 是一个钩子函数,分别在点击上传后的文件链接和点击移除上传后的文件后被调用。
 ```html
 <el-upload
-  action="http://jsonplaceholder.typicode.com/"
+  action="http://jsonplaceholder.typicode.com/posts/"
   type="drag"
   :multiple="true"
   :on-preview="handlePreview"
@@ -108,7 +108,7 @@
 ::: demo `thumbnail-mode` 属性允许你将上传组件强制只允许图片上传,并支持展示上传文件的缩略图。
 ```html
 <el-upload
-  action="http://jsonplaceholder.typicode.com/"
+  action="http://jsonplaceholder.typicode.com/posts/"
   type="drag"
   :thumbnail-mode="true"
   :on-preview="handlePreview"

+ 2 - 2
examples/index.tpl

@@ -7,8 +7,8 @@
   </head>
   <body>
     <div id="app"></div><% if (process.env.NODE_ENV === 'production') { %>
-    <script src="//cdn.jsdelivr.net/vue/2.0.0-rc.7/vue.min.js"></script>
-    <script src="//cdn.jsdelivr.net/vue.router/2.0.0-rc.5/vue-router.min.js"></script><% } %>
+    <script src="//cdn.jsdelivr.net/vue/2.0.3/vue.min.js"></script>
+    <script src="//cdn.jsdelivr.net/vue.router/2.0.1/vue-router.min.js"></script><% } %>
   </body>
   <% if (process.env.NODE_ENV === 'production') { %><script>
     (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){