From f2fcdee815de255822973e559023f86b136be701 Mon Sep 17 00:00:00 2001
From: Pan <panfree23@gmail.com>
Date: Wed, 22 Nov 2017 11:01:19 +0800
Subject: [PATCH] perf:format code&&fix typo

---
 index.html                                    | 24 +++++------
 src/directive/sticky.js                       | 12 +++---
 src/views/components-demo/dndList.vue         |  6 ++-
 src/views/components-demo/markdown.vue        | 25 ++++++-----
 src/views/components-demo/splitpane.vue       | 41 ++++++++++---------
 src/views/components-demo/tinymce.vue         |  2 +-
 .../dashboard/admin/components/BoxCard.vue    |  2 +-
 .../dashboard/admin/components/PieChart.vue   | 12 +++---
 8 files changed, 63 insertions(+), 61 deletions(-)

diff --git a/index.html b/index.html
index 830bf1f8..a485ce88 100644
--- a/index.html
+++ b/index.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <html>
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="renderer" content="webkit">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <title>Juicy</title>
-</head>
-<body>
-<script src=<%= htmlWebpackPlugin.options.path %>/tinymce/tinymce.min.js></script>
-<div id="app"></div>
-<!-- built files will be auto injected -->
-</body>
+	<head>
+		<meta charset="utf-8">
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+		<meta name="renderer" content="webkit">
+		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+		<title>vue-element-admin</title>
+	</head>
+	<script src=<%= htmlWebpackPlugin.options.path %>/tinymce/tinymce.min.js></script>
+	<body>
+		<div id="app"></div>
+		<!-- built files will be auto injected -->
+	</body>
 </html>
diff --git a/src/directive/sticky.js b/src/directive/sticky.js
index d7da0891..bc234660 100644
--- a/src/directive/sticky.js
+++ b/src/directive/sticky.js
@@ -10,12 +10,12 @@ vueSticky.install = Vue => {
 
       elStyle.position = '-webkit-sticky'
       elStyle.position = 'sticky'
-        // if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)
-        // if (~elStyle.position.indexOf('sticky')) {
-        //     elStyle.top = `${stickyTop}px`;
-        //     elStyle.zIndex = zIndex;
-        //     return
-        // }
+      // if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)
+      // if (~elStyle.position.indexOf('sticky')) {
+      //     elStyle.top = `${stickyTop}px`;
+      //     elStyle.zIndex = zIndex;
+      //     return
+      // }
       const elHeight = el.getBoundingClientRect().height
       const elWidth = el.getBoundingClientRect().width
       elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}`
diff --git a/src/views/components-demo/dndList.vue b/src/views/components-demo/dndList.vue
index 3d436390..140e4c7f 100644
--- a/src/views/components-demo/dndList.vue
+++ b/src/views/components-demo/dndList.vue
@@ -1,8 +1,10 @@
 <template>
   <div class="components-container">
-    <code>drag-list base on <a href="https://github.com/SortableJS/Vue.Draggable" target="_blank">Vue.Draggable</a></code>
+    <code>drag-list base on
+      <a href="https://github.com/SortableJS/Vue.Draggable" target="_blank">Vue.Draggable</a>
+    </code>
     <div class="editor-container">
-       <dnd-list :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池"></dnd-list>
+      <dnd-list :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池"></dnd-list>
     </div>
   </div>
 </template>
diff --git a/src/views/components-demo/markdown.vue b/src/views/components-demo/markdown.vue
index 59dbc25c..afd07c6c 100644
--- a/src/views/components-demo/markdown.vue
+++ b/src/views/components-demo/markdown.vue
@@ -3,7 +3,7 @@
     <code>Markdown 我们这里选用了
       <a href="https://github.com/sparksuite/simplemde-markdown-editor" target="_blank">simplemde-markdown-editor</a> ,简单的用vue封装了一下
       <a target="_blank" href="https://segmentfault.com/a/1190000009762198#articleHeader14">
-      相关文章 </a>
+        相关文章 </a>
     </code>
     <div class="editor-container">
       <markdown-editor id="contentEditor" ref="contentEditor" v-model="content" :height="300" :zIndex="20"></markdown-editor>
@@ -16,26 +16,25 @@
 <script>
 import MarkdownEditor from '@/components/MarkdownEditor'
 
+const content = `
+**this is test**
+
+* vue
+* element
+* webpack
+
+## Simplemde
+`
+
 export default {
   name: 'markdown-demo',
   components: { MarkdownEditor },
   data() {
     return {
-      content: '## Simplemde',
+      content: content,
       html: ''
     }
   },
-  computed: {
-    cachedViews() {
-      return this.$store.state.app.cachedViews
-    }
-  },
-  // deactivated() {
-  //   console.log(this.cachedViews.indexOf(this.$route.name))
-  //   if (this.cachedViews.indexOf(this.$route.name) < 0) {
-  //     this.$destroy()
-  //   }
-  // },
   methods: {
     markdown2Html() {
       import('showdown').then(showdown => {
diff --git a/src/views/components-demo/splitpane.vue b/src/views/components-demo/splitpane.vue
index 3bf989df..fa3f14a4 100644
--- a/src/views/components-demo/splitpane.vue
+++ b/src/views/components-demo/splitpane.vue
@@ -1,25 +1,26 @@
 <template>
-	<div class="components-container">
-		<code>splitPane 如果你用过<a href="http://codepen.io/" target="_blank"> codepen</a>,<a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>就不会陌生了
+  <div class="components-container">
+    <code>splitPane 如果你用过
+      <a href="http://codepen.io/" target="_blank"> codepen</a>,
+      <a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>就不会陌生了
       <a href="https://github.com/PanJiaChen/vue-split-pane" target='_blank'>项目地址</a>
-      </code>
-		<split-pane v-on:resize="resize" split="vertical">
-			<template slot="paneL">
-				<div class="left-container"></div>
-			</template>
-			<template slot="paneR">
-				<split-pane split="horizontal">
-					<template slot="paneL">
-						<div class="top-container"></div>
-					</template>
-					<template slot="paneR">
-						<div class="bottom-container">
-						</div>
-					</template>
-				</split-pane>
-			</template>
-		</split-pane>
-	</div>
+    </code>
+    <split-pane v-on:resize="resize" split="vertical">
+      <template slot="paneL">
+        <div class="left-container"></div>
+      </template>
+      <template slot="paneR">
+        <split-pane split="horizontal">
+          <template slot="paneL">
+            <div class="top-container"></div>
+          </template>
+          <template slot="paneR">
+            <div class="bottom-container"></div>
+          </template>
+        </split-pane>
+      </template>
+    </split-pane>
+  </div>
 </template>
 
 <script>
diff --git a/src/views/components-demo/tinymce.vue b/src/views/components-demo/tinymce.vue
index 4f88f05e..d8a85c3b 100644
--- a/src/views/components-demo/tinymce.vue
+++ b/src/views/components-demo/tinymce.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="components-container">
     <code>公司做的后台主要是一个cms系统,公司也是以自媒体为核心的,所以富文本是后台很核心的功能。在选择富文本的过程中也走了不少的弯路,市面上常见的富文本都基本用过了,最终选择了Tinymce
-      <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/rich-editor">文档介绍</a>
+      <a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/#/rich-editor">文档介绍</a>
     </code>
     <div>
       <tinymce :height="200" v-model="content"></tinymce>
diff --git a/src/views/dashboard/admin/components/BoxCard.vue b/src/views/dashboard/admin/components/BoxCard.vue
index 6b8f37c7..10761103 100644
--- a/src/views/dashboard/admin/components/BoxCard.vue
+++ b/src/views/dashboard/admin/components/BoxCard.vue
@@ -19,7 +19,7 @@
         <el-progress :percentage="12"></el-progress>
       </div>
        <div class='progress-item'>
-        <span>ESlint</span>
+        <span>ESLint</span>
         <el-progress :percentage="100" status="success"></el-progress>
       </div>
     </div>
diff --git a/src/views/dashboard/admin/components/PieChart.vue b/src/views/dashboard/admin/components/PieChart.vue
index 3146bbfd..36a11227 100644
--- a/src/views/dashboard/admin/components/PieChart.vue
+++ b/src/views/dashboard/admin/components/PieChart.vue
@@ -56,7 +56,7 @@ export default {
         legend: {
           left: 'center',
           bottom: '10',
-          data: ['industries', 'technology', 'forex', 'gold', 'forecasts']
+          data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
         },
         calculable: true,
         series: [
@@ -67,11 +67,11 @@ export default {
             radius: [15, 95],
             center: ['50%', '38%'],
             data: [
-              { value: 320, name: 'industries' },
-              { value: 240, name: 'technology' },
-              { value: 149, name: 'forex' },
-              { value: 100, name: 'gold' },
-              { value: 59, name: 'forecasts' }
+              { value: 320, name: 'Industries' },
+              { value: 240, name: 'Technology' },
+              { value: 149, name: 'Forex' },
+              { value: 100, name: 'Gold' },
+              { value: 59, name: 'Forecasts' }
             ],
             animationEasing: 'cubicInOut',
             animationDuration: 2600
-- 
GitLab