全局代码格式 优化

This commit is contained in:
Pan 2017-07-06 17:56:17 +08:00
parent 622a8c3a69
commit de992c50a6
73 changed files with 3156 additions and 3151 deletions

View File

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"></div> <div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"></div> <div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"></div> <div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"></div> <div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';

View File

@ -3,6 +3,7 @@
<input type="file" name="file"> <input type="file" name="file">
</div> </div>
</template> </template>
<script> <script>
import Dropzone from 'dropzone'; import Dropzone from 'dropzone';
import 'dropzone/dist/dropzone.css'; import 'dropzone/dist/dropzone.css';

View File

@ -2,7 +2,11 @@
<div> <div>
<el-badge :is-dot="true" style="line-height: 30px;" @click.native="dialogTableVisible=true"> <el-badge :is-dot="true" style="line-height: 30px;" @click.native="dialogTableVisible=true">
<el-button size="small" type="primary"> <el-button size="small" type="primary">
<svg t="1492682037685" class="bug-svg" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1863" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M969.142857 548.571429q0 14.848-10.861714 25.709714t-25.709714 10.861714l-128 0q0 97.718857-38.290286 165.705143l118.857143 119.442286q10.861714 10.861714 10.861714 25.709714t-10.861714 25.709714q-10.276571 10.861714-25.709714 10.861714t-25.709714-10.861714l-113.152-112.566857q-2.852571 2.852571-8.557714 7.424t-23.990857 16.274286-37.156571 20.845714-46.848 16.566857-55.442286 7.424l0-512-73.142857 0 0 512q-29.147429 0-58.002286-7.716571t-49.700571-18.870857-37.705143-22.272-24.868571-18.578286l-8.557714-8.009143-104.557714 118.272q-11.446857 11.995429-27.428571 11.995429-13.714286 0-24.576-9.142857-10.861714-10.276571-11.702857-25.417143t8.850286-26.587429l115.419429-129.718857q-33.133714-65.133714-33.133714-156.562286l-128 0q-14.848 0-25.709714-10.861714t-10.861714-25.709714 10.861714-25.709714 25.709714-10.861714l128 0 0-168.009143-98.852571-98.852571q-10.861714-10.861714-10.861714-25.709714t10.861714-25.709714 25.709714-10.861714 25.709714 10.861714l98.852571 98.852571 482.304 0 98.852571-98.852571q10.861714-10.861714 25.709714-10.861714t25.709714 10.861714 10.861714 25.709714-10.861714 25.709714l-98.852571 98.852571 0 168.009143 128 0q14.848 0 25.709714 10.861714t10.861714 25.709714zM694.857143 219.428571l-365.714286 0q0-75.995429 53.430857-129.426286t129.426286-53.430857 129.426286 53.430857 53.430857 129.426286z" p-id="1864"></path></svg> <svg t="1492682037685" class="bug-svg" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1863"
xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
<path d="M969.142857 548.571429q0 14.848-10.861714 25.709714t-25.709714 10.861714l-128 0q0 97.718857-38.290286 165.705143l118.857143 119.442286q10.861714 10.861714 10.861714 25.709714t-10.861714 25.709714q-10.276571 10.861714-25.709714 10.861714t-25.709714-10.861714l-113.152-112.566857q-2.852571 2.852571-8.557714 7.424t-23.990857 16.274286-37.156571 20.845714-46.848 16.566857-55.442286 7.424l0-512-73.142857 0 0 512q-29.147429 0-58.002286-7.716571t-49.700571-18.870857-37.705143-22.272-24.868571-18.578286l-8.557714-8.009143-104.557714 118.272q-11.446857 11.995429-27.428571 11.995429-13.714286 0-24.576-9.142857-10.861714-10.276571-11.702857-25.417143t8.850286-26.587429l115.419429-129.718857q-33.133714-65.133714-33.133714-156.562286l-128 0q-14.848 0-25.709714-10.861714t-10.861714-25.709714 10.861714-25.709714 25.709714-10.861714l128 0 0-168.009143-98.852571-98.852571q-10.861714-10.861714-10.861714-25.709714t10.861714-25.709714 25.709714-10.861714 25.709714 10.861714l98.852571 98.852571 482.304 0 98.852571-98.852571q10.861714-10.861714 25.709714-10.861714t25.709714 10.861714 10.861714 25.709714-10.861714 25.709714l-98.852571 98.852571 0 168.009143 128 0q14.848 0 25.709714 10.861714t10.861714 25.709714zM694.857143 219.428571l-365.714286 0q0-75.995429 53.430857-129.426286t129.426286-53.430857 129.426286 53.430857 53.430857 129.426286z"
p-id="1864"></path>
</svg>
</el-button> </el-button>
</el-badge> </el-badge>
<el-dialog title="bug日志" :visible.sync="dialogTableVisible"> <el-dialog title="bug日志" :visible.sync="dialogTableVisible">
@ -40,6 +44,7 @@
} }
} }
</script> </script>
<style scoped> <style scoped>
.bug-svg { .bug-svg {
width: 1em; width: 1em;

View File

@ -1,6 +1,14 @@
<template> <template>
<div> <div>
<svg t="1492500959545" @click="toggleClick" class="wscn-icon hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1691" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z" p-id="1692"></path><path d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z" p-id="1693"></path><path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z" p-id="1694"></path></svg> <svg t="1492500959545" @click="toggleClick" class="wscn-icon hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024"
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1691" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
<path d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
p-id="1692"></path>
<path d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z"
p-id="1693"></path>
<path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
p-id="1694"></path>
</svg>
</div> </div>
</template> </template>
@ -30,7 +38,9 @@
transition: .38s; transition: .38s;
transform-origin: 50% 50%; transform-origin: 50% 50%;
} }
.hamburger.is-active { .hamburger.is-active {
transform: rotate(90deg); transform: rotate(90deg);
} }
</style> </style>

View File

@ -7,17 +7,17 @@
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :required="required" @focus="handleFocus(true)" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :required="required" @focus="handleFocus(true)"
@blur="handleFocus(false)" @input="handleModelInput"> @blur="handleFocus(false)" @input="handleModelInput">
<input v-if="type === 'number'" type="number" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy" <input v-if="type === 'number'" type="number" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy"
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :max="max" :min="min" :minlength="minlength" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :max="max" :min="min" :minlength="minlength" :maxlength="maxlength"
:maxlength="maxlength" :required="required" @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
<input v-if="type === 'password'" type="password" class="material-input" :name="name" :id="id" :placeholder="placeholder"
v-model="valueCopy" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :max="max" :min="min"
:required="required" @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput"> :required="required" @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
<input v-if="type === 'password'" type="password" class="material-input" :name="name" :id="id" :placeholder="placeholder"
v-model="valueCopy" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :max="max" :min="min" :required="required"
@focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
<input v-if="type === 'tel'" type="tel" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy" <input v-if="type === 'tel'" type="tel" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy"
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :required="required" @focus="handleFocus(true)" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :required="required" @focus="handleFocus(true)"
@blur="handleFocus(false)" @input="handleModelInput"> @blur="handleFocus(false)" @input="handleModelInput">
<input v-if="type === 'text'" type="text" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy" <input v-if="type === 'text'" type="text" class="material-input" :name="name" :id="id" :placeholder="placeholder" v-model="valueCopy"
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :minlength="minlength" :maxlength="maxlength" :readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :minlength="minlength" :maxlength="maxlength" :required="required"
:required="required" @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput"> @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
<span class="material-input-bar"></span> <span class="material-input-bar"></span>
@ -25,7 +25,7 @@
<slot></slot> <slot></slot>
</label> </label>
<div v-if="errorMessages" class="material-errors"> <div v-if="errorMessages" class="material-errors">
<div v-for="error in computedErrors" class="material-error"> <div v-for="error in computedErrors" class="material-error" :key='error'>
{{ error }} {{ error }}
</div> </div>
</div> </div>

View File

@ -6,8 +6,9 @@
</template> </template>
<script> <script>
import 'simplemde/dist/simplemde.min.css' import 'simplemde/dist/simplemde.min.css';
import SimpleMDE from 'simplemde' import SimpleMDE from 'simplemde';
export default { export default {
name: 'Sticky', name: 'Sticky',
props: { props: {
@ -81,6 +82,7 @@ export default {
/*height: 150px;*/ /*height: 150px;*/
min-height: 150px; min-height: 150px;
} }
.simplemde-container .CodeMirror-scroll { .simplemde-container .CodeMirror-scroll {
min-height: 150px; min-height: 150px;
} }
@ -88,6 +90,7 @@ export default {
.simplemde-container .CodeMirror-code { .simplemde-container .CodeMirror-code {
padding-bottom: 40px; padding-bottom: 40px;
} }
.simplemde-container .editor-statusbar { .simplemde-container .editor-statusbar {
display: none; display: none;
} }

View File

@ -8,6 +8,7 @@
<img class="pan-thumb" :src="image"> <img class="pan-thumb" :src="image">
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'PanThumb', name: 'PanThumb',
@ -28,9 +29,6 @@
type: String, type: String,
default: '150px' default: '150px'
} }
},
data() {
return {};
} }
}; };
</script> </script>
@ -94,8 +92,7 @@
padding: 22px 0 0 0; padding: 22px 0 0 0;
height: 85px; height: 85px;
font-family: 'Open Sans', Arial, sans-serif; font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
0 1px 2px rgba(0, 0, 0, 0.3);
} }
.pan-info p { .pan-info p {
@ -124,9 +121,7 @@
margin: 7px auto 0; margin: 7px auto 0;
font-family: 'Open Sans', Arial, sans-serif; font-family: 'Open Sans', Arial, sans-serif;
opacity: 0; opacity: 0;
transition: transform 0.3s ease-in-out 0.2s, transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
opacity 0.3s ease-in-out 0.2s,
background 0.2s linear 0s;
transform: translateX(60px) rotate(90deg); transform: translateX(60px) rotate(90deg);
} }

View File

@ -1,6 +1,9 @@
<template> <template>
<svg @click='click' class="icon screenfull" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
<svg @click='click' class="icon screenfull" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1497503607356" viewBox="0 0 1024 1024" version="1.1" p-id="4109" :fill='fill' :width="width" :height="height"><path d="M604.157933 512l204.484208 204.484208 82.942037-82.942037c10.364045-10.952446 26.498514-13.83817 40.309054-8.067746 13.249769 5.742794 22.465664 18.99154 22.465664 33.977859l0 258.042008c0 20.168342-16.695241 36.863582-36.863582 36.863582L659.452283 954.357873c-14.986319 0-28.236088-9.215896-33.977859-23.025413-5.770424-13.249769-2.885723-29.384237 8.067746-39.748283l82.942037-82.942037L512 604.157933 307.515792 808.642141l82.942037 82.942037c10.952446 10.364045 13.83817 26.498514 8.067746 39.748283-5.742794 13.809517-18.99154 23.025413-33.977859 23.025413L106.504686 954.357873c-20.168342 0-36.863582-16.695241-36.863582-36.863582L69.641103 659.452283c0-14.986319 9.215896-28.236088 23.025413-33.977859 13.249769-5.770424 29.384237-2.8847 39.748283 8.067746l82.942037 82.942037 204.484208-204.484208L215.357859 307.515792l-82.942037 82.942037c-6.890944 6.918573-16.10684 10.952446-25.911136 10.952446-4.593622 0-9.804297-1.14815-13.83817-2.8847-13.809517-5.742794-23.025413-18.99154-23.025413-33.977859L69.641103 106.504686c0-20.168342 16.695241-36.863582 36.863582-36.863582L364.546693 69.641103c14.986319 0 28.236088 9.215896 33.977859 23.025413 5.770424 13.249769 2.8847 29.384237-8.067746 39.748283l-82.942037 82.942037 204.484208 204.484208L716.484208 215.357859l-82.942037-82.942037c-10.952446-10.364045-13.83817-26.498514-8.067746-39.748283 5.742794-13.809517 18.99154-23.025413 33.977859-23.025413l258.042008 0c20.168342 0 36.863582 16.695241 36.863582 36.863582l0 258.042008c0 14.986319-9.215896 28.236088-22.465664 33.977859-4.593622 1.736551-9.804297 2.8847-14.397918 2.8847-9.804297 0-19.020192-4.033873-25.911136-10.952446l-82.942037-82.942037L604.157933 512z" p-id="4110"/></svg> t="1497503607356" viewBox="0 0 1024 1024" version="1.1" p-id="4109" :fill='fill' :width="width" :height="height">
<path d="M604.157933 512l204.484208 204.484208 82.942037-82.942037c10.364045-10.952446 26.498514-13.83817 40.309054-8.067746 13.249769 5.742794 22.465664 18.99154 22.465664 33.977859l0 258.042008c0 20.168342-16.695241 36.863582-36.863582 36.863582L659.452283 954.357873c-14.986319 0-28.236088-9.215896-33.977859-23.025413-5.770424-13.249769-2.885723-29.384237 8.067746-39.748283l82.942037-82.942037L512 604.157933 307.515792 808.642141l82.942037 82.942037c10.952446 10.364045 13.83817 26.498514 8.067746 39.748283-5.742794 13.809517-18.99154 23.025413-33.977859 23.025413L106.504686 954.357873c-20.168342 0-36.863582-16.695241-36.863582-36.863582L69.641103 659.452283c0-14.986319 9.215896-28.236088 23.025413-33.977859 13.249769-5.770424 29.384237-2.8847 39.748283 8.067746l82.942037 82.942037 204.484208-204.484208L215.357859 307.515792l-82.942037 82.942037c-6.890944 6.918573-16.10684 10.952446-25.911136 10.952446-4.593622 0-9.804297-1.14815-13.83817-2.8847-13.809517-5.742794-23.025413-18.99154-23.025413-33.977859L69.641103 106.504686c0-20.168342 16.695241-36.863582 36.863582-36.863582L364.546693 69.641103c14.986319 0 28.236088 9.215896 33.977859 23.025413 5.770424 13.249769 2.8847 29.384237-8.067746 39.748283l-82.942037 82.942037 204.484208 204.484208L716.484208 215.357859l-82.942037-82.942037c-10.952446-10.364045-13.83817-26.498514-8.067746-39.748283 5.742794-13.809517 18.99154-23.025413 33.977859-23.025413l258.042008 0c20.168342 0 36.863582 16.695241 36.863582 36.863582l0 258.042008c0 14.986319-9.215896 28.236088-22.465664 33.977859-4.593622 1.736551-9.804297 2.8847-14.397918 2.8847-9.804297 0-19.020192-4.033873-25.911136-10.952446l-82.942037-82.942037L604.157933 512z"
p-id="4110" />
</svg>
</template> </template>
<script> <script>

View File

@ -17,22 +17,25 @@
} }
</script> </script>
<style> <style scoped>
.splitter-pane.vertical.splitter-paneL { .splitter-pane.vertical.splitter-paneL {
position: absolute; position: absolute;
left: 0px; left: 0px;
height: 100%; height: 100%;
} }
.splitter-pane.vertical.splitter-paneR { .splitter-pane.vertical.splitter-paneR {
position: absolute; position: absolute;
right: 0px; right: 0px;
height: 100%; height: 100%;
} }
.splitter-pane.horizontal.splitter-paneL { .splitter-pane.horizontal.splitter-paneL {
position: absolute; position: absolute;
top: 0px; top: 0px;
width: 100%; width: 100%;
} }
.splitter-pane.horizontal.splitter-paneR { .splitter-pane.horizontal.splitter-paneR {
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="classes" @mousedown="onMouseDown"></div> <div :class="classes" @mousedown="onMouseDown"></div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
@ -23,6 +24,7 @@
} }
} }
</script> </script>
<style scoped> <style scoped>
.Resizer { .Resizer {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
@ -36,7 +38,6 @@
/*-webkit-background-clip: padding;*/ /*-webkit-background-clip: padding;*/
/*background-clip: padding-box;*/ /*background-clip: padding-box;*/
} }
/*.Resizer:hover {*/ /*.Resizer:hover {*/
/*-webkit-transition: all 2s ease;*/ /*-webkit-transition: all 2s ease;*/
/*transition: all 2s ease;*/ /*transition: all 2s ease;*/

View File

@ -1,31 +1,14 @@
<template> <template>
<div ref :style="{ cursor, userSelect}" class="vue-splitter-container clearfix" @mouseup="onMouseUp" <div ref :style="{ cursor, userSelect}" class="vue-splitter-container clearfix" @mouseup="onMouseUp" @mousemove="onMouseMove">
@mousemove="onMouseMove"> <pane class="splitter-pane splitter-paneL" :split="split" :style="{ [type]: percent+'%'}">
<Pane class="splitter-pane splitter-paneL" :split="split" :style="{ [type]: percent+'%'}">
<slot name="paneL"></slot> <slot name="paneL"></slot>
</Pane> </pane>
<Resizer :style="{ [resizeType]: percent+'%'}" :split="split" :onMouseDown="onMouseDown" <resizer :style="{ [resizeType]: percent+'%'}" :split="split" :onMouseDown="onMouseDown" @click="onClick"></resizer>
@click="onClick"></Resizer> <pane class="splitter-pane splitter-paneR" :split="split" :style="{ [type]: 100-percent+'%'}">
<Pane class="splitter-pane splitter-paneR" :split="split" :style="{ [type]: 100-percent+'%'}">
<slot name="paneR"></slot> <slot name="paneR"></slot>
</Pane> </pane>
</div> </div>
</template> </template>
<style scoped>
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.vue-splitter-container {
height: 100%;
/*display: flex;*/
position: relative;
}
</style>
<script> <script>
import Resizer from './Resizer'; import Resizer from './Resizer';
@ -109,3 +92,20 @@
} }
} }
</script> </script>
<style scoped>
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.vue-splitter-container {
height: 100%;
/*display: flex;*/
position: relative;
}
</style>

View File

@ -7,6 +7,7 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'Sticky', name: 'Sticky',

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="upload-container"> <div class="upload-container">
<el-upload <el-upload class="image-uploader" :data="dataObj" drag :multiple="false" :show-file-list="false" action="https://httpbin.org/post"
class="image-uploader"
:data="dataObj"
drag
:multiple="false"
:show-file-list="false"
action="https://httpbin.org/post"
:on-success="handleImageScucess"> :on-success="handleImageScucess">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -22,6 +15,7 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// //
import { getToken } from 'api/qiniu'; import { getToken } from 'api/qiniu';

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="singleImageUpload2 upload-container"> <div class="singleImageUpload2 upload-container">
<el-upload <el-upload class="image-uploader" :data="dataObj" drag :multiple="false" :show-file-list="false" action="https://httpbin.org/post"
class="image-uploader"
:data="dataObj"
drag
:multiple="false"
:show-file-list="false"
action="https://httpbin.org/post"
:on-success="handleImageScucess"> :on-success="handleImageScucess">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">Drag或<em>点击上传</em></div> <div class="el-upload__text">Drag或<em>点击上传</em></div>
@ -22,6 +15,7 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// //
import { getToken } from 'api/qiniu'; import { getToken } from 'api/qiniu';
@ -122,5 +116,4 @@
} }
} }
} }
</style> </style>

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="upload-container"> <div class="upload-container">
<el-upload <el-upload class="image-uploader" :data="dataObj" drag :multiple="false" :show-file-list="false" action="https://httpbin.org/post"
class="image-uploader"
:data="dataObj"
drag
:multiple="false"
:show-file-list="false"
action="https://httpbin.org/post"
:on-success="handleImageScucess"> :on-success="handleImageScucess">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -31,6 +24,7 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// //
import { getToken } from 'api/qiniu'; import { getToken } from 'api/qiniu';
@ -142,12 +136,10 @@
.app-fake-conver { .app-fake-conver {
height: 44px; height: 44px;
position: absolute; position: absolute;
width: 100%; width: 100%; // background: rgba(0, 0, 0, .1);
// background: rgba(0, 0, 0, .1);
text-align: center; text-align: center;
line-height: 64px; line-height: 64px;
color: #fff; color: #fff;
} }
} }
} }

View File

@ -4,7 +4,6 @@
</div> </div>
</template> </template>
<script> <script>
import CodeMirror from 'codemirror'; import CodeMirror from 'codemirror';
import 'codemirror/addon/lint/lint.css'; import 'codemirror/addon/lint/lint.css';
@ -58,6 +57,7 @@
.CodeMirror { .CodeMirror {
height: 100%; height: 100%;
} }
.json-editor .cm-s-rubyblue span.cm-string { .json-editor .cm-s-rubyblue span.cm-string {
color: #F08047; color: #F08047;
} }

View File

@ -3,7 +3,7 @@
<div class="twoDndList-list" :style="{width:width1}"> <div class="twoDndList-list" :style="{width:width1}">
<h3>{{list1Title}}</h3> <h3>{{list1Title}}</h3>
<draggable :list="list1" class="dragArea" :options="{group:'article'}"> <draggable :list="list1" class="dragArea" :options="{group:'article'}">
<div class="list-complete-item" v-for="element in list1"> <div class="list-complete-item" v-for="element in list1" :key='element'>
<div class="list-complete-item-handle">[{{element.author}}] {{element.title}}</div> <div class="list-complete-item-handle">[{{element.author}}] {{element.title}}</div>
<div style="position:absolute;right:0px;"> <div style="position:absolute;right:0px;">
<span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)"> <span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)">
@ -17,7 +17,7 @@
<div class="twoDndList-list" :style="{width:width2}"> <div class="twoDndList-list" :style="{width:width2}">
<h3>{{list2Title}}</h3> <h3>{{list2Title}}</h3>
<draggable :list="filterList2" class="dragArea" :options="{group:'article'}"> <draggable :list="filterList2" class="dragArea" :options="{group:'article'}">
<div class="list-complete-item" v-for="element in filterList2"> <div class="list-complete-item" v-for="element in filterList2" :key='element'>
<div class='list-complete-item-handle2' @click="pushEle(element)"> [{{element.author}}] {{element.title}}</div> <div class='list-complete-item-handle2' @click="pushEle(element)"> [{{element.author}}] {{element.title}}</div>
</div> </div>
</draggable> </draggable>
@ -135,6 +135,7 @@
white-space: nowrap; white-space: nowrap;
margin-right: 50px; margin-right: 50px;
} }
.list-complete-item-handle2 { .list-complete-item-handle2 {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -150,7 +151,8 @@
background: #30B08F; background: #30B08F;
} }
.list-complete-enter, .list-complete-leave-active { .list-complete-enter,
.list-complete-leave-active {
opacity: 0; opacity: 0;
} }
</style> </style>

View File

@ -24,7 +24,6 @@ export function parseTime(time, cFormat) {
time = +time * 1000 time = +time * 1000
} }
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'; const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
let date; let date;
if (typeof time == 'object') { if (typeof time == 'object') {
@ -75,8 +74,6 @@ export function formatTime(time, option) {
} }
} }
/* 数字 格式化*/ /* 数字 格式化*/
export function nFormatter(num, digits) { export function nFormatter(num, digits) {
const si = [ const si = [
@ -95,14 +92,12 @@ export function nFormatter(num, digits) {
return num.toString(); return num.toString();
} }
export function html2Text(val) { export function html2Text(val) {
const div = document.createElement('div'); const div = document.createElement('div');
div.innerHTML = val; div.innerHTML = val;
return div.textContent || div.innerText; return div.textContent || div.innerText;
} }
export function toThousandslsFilter(num) { export function toThousandslsFilter(num) {
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ',')); return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','));
} }

View File

@ -20,7 +20,6 @@ import vueWaves from './directive/waves';// 水波纹指令
import errLog from 'store/errLog';// error log组件 import errLog from 'store/errLog';// error log组件
import './mock/index.js'; // 该项目所有请求使用mockjs模拟 import './mock/index.js'; // 该项目所有请求使用mockjs模拟
// register globally // register globally
Vue.component('multiselect', Multiselect); Vue.component('multiselect', Multiselect);
Vue.component('Sticky', Sticky); Vue.component('Sticky', Sticky);
@ -28,8 +27,6 @@ Vue.component('icon-svg', IconSvg)
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(vueWaves); Vue.use(vueWaves);
Vue.config.productionTip = false;
// register global utility filters. // register global utility filters.
Object.keys(filters).forEach(key => { Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]) Vue.filter(key, filters[key])
@ -78,11 +75,12 @@ router.beforeEach((to, from, next) => {
} }
}); });
router.afterEach(() => { router.afterEach(() => {
NProgress.done(); // 结束Progress NProgress.done(); // 结束Progress
}); });
Vue.config.productionTip = false;
// 生产环境错误日志 // 生产环境错误日志
if (process.env === 'production') { if (process.env === 'production') {
Vue.config.errorHandler = function(err, vm) { Vue.config.errorHandler = function(err, vm) {

View File

@ -6,25 +6,21 @@ const userMap = {
token: 'admin', token: 'admin',
introduction: '我是超级管理员', introduction: '我是超级管理员',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Super Admin', name: 'Super Admin'
uid: '001'
}, },
editor: { editor: {
role: ['editor'], role: ['editor'],
token: 'editor', token: 'editor',
introduction: '我是编辑', introduction: '我是编辑',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Normal Editor', name: 'Normal Editor'
uid: '002'
}, },
developer: { developer: {
role: ['develop'], role: ['develop'],
token: 'develop', token: 'develop',
introduction: '我是开发', introduction: '我是开发',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: '工程师小王', name: '工程师小王'
uid: '003'
} }
} }

View File

@ -29,7 +29,6 @@ const SplitPane = _import('components/splitpane');
const CountTo = _import('components/countTo'); const CountTo = _import('components/countTo');
const Mixin = _import('components/mixin'); const Mixin = _import('components/mixin');
/* charts */ /* charts */
const chartIndex = _import('charts/index'); const chartIndex = _import('charts/index');
const KeyboardChart = _import('charts/keyboard'); const KeyboardChart = _import('charts/keyboard');
@ -63,7 +62,6 @@ const Tab = _import('example/tab/index');
/* permission */ /* permission */
const Permission = _import('permission/index'); const Permission = _import('permission/index');
Vue.use(Router); Vue.use(Router);
/** /**

View File

@ -4,10 +4,7 @@ const getters = {
token: state => state.user.token, token: state => state.user.token,
avatar: state => state.user.avatar, avatar: state => state.user.avatar,
name: state => state.user.name, name: state => state.user.name,
uid: state => state.user.uid,
email: state => state.user.email,
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
auth_type: state => state.user.auth_type,
status: state => state.user.status, status: state => state.user.status,
roles: state => state.user.roles, roles: state => state.user.roles,
setting: state => state.user.setting, setting: state => state.user.setting,

View File

@ -5,10 +5,7 @@ const user = {
state: { state: {
user: '', user: '',
status: '', status: '',
email: '',
code: '', code: '',
uid: undefined,
auth_type: '',
token: Cookies.get('Admin-Token'), token: Cookies.get('Admin-Token'),
name: '', name: '',
avatar: '', avatar: '',
@ -20,21 +17,12 @@ const user = {
}, },
mutations: { mutations: {
SET_AUTH_TYPE: (state, type) => {
state.auth_type = type;
},
SET_CODE: (state, code) => { SET_CODE: (state, code) => {
state.code = code; state.code = code;
}, },
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {
state.token = token; state.token = token;
}, },
SET_UID: (state, uid) => {
state.uid = uid;
},
SET_EMAIL: (state, email) => {
state.email = email;
},
SET_INTRODUCTION: (state, introduction) => { SET_INTRODUCTION: (state, introduction) => {
state.introduction = introduction; state.introduction = introduction;
}, },
@ -70,7 +58,6 @@ const user = {
const data = response.data; const data = response.data;
Cookies.set('Admin-Token', response.data.token); Cookies.set('Admin-Token', response.data.token);
commit('SET_TOKEN', data.token); commit('SET_TOKEN', data.token);
commit('SET_EMAIL', email);
resolve(); resolve();
}).catch(error => { }).catch(error => {
reject(error); reject(error);
@ -78,7 +65,6 @@ const user = {
}); });
}, },
// 获取用户信息 // 获取用户信息
GetInfo({ commit, state }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -87,7 +73,6 @@ const user = {
commit('SET_ROLES', data.role); commit('SET_ROLES', data.role);
commit('SET_NAME', data.name); commit('SET_NAME', data.name);
commit('SET_AVATAR', data.avatar); commit('SET_AVATAR', data.avatar);
commit('SET_UID', data.uid);
commit('SET_INTRODUCTION', data.introduction); commit('SET_INTRODUCTION', data.introduction);
resolve(response); resolve(response);
}).catch(error => { }).catch(error => {
@ -100,7 +85,7 @@ const user = {
LoginByThirdparty({ commit, state }, code) { LoginByThirdparty({ commit, state }, code) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
commit('SET_CODE', code); commit('SET_CODE', code);
loginByThirdparty(state.status, state.email, state.code, state.auth_type).then(response => { loginByThirdparty(state.status, state.email, state.code).then(response => {
commit('SET_TOKEN', response.data.token); commit('SET_TOKEN', response.data.token);
Cookies.set('Admin-Token', response.data.token); Cookies.set('Admin-Token', response.data.token);
resolve(); resolve();
@ -110,7 +95,6 @@ const user = {
}); });
}, },
// 登出 // 登出
LogOut({ commit, state }) { LogOut({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -8,6 +8,7 @@
<script> <script>
import keyboardChart from 'components/Charts/keyboard'; import keyboardChart from 'components/Charts/keyboard';
export default { export default {
components: { keyboardChart } components: { keyboardChart }
}; };

View File

@ -8,6 +8,7 @@
<script> <script>
import keyboardChart2 from 'components/Charts/keyboard2'; import keyboardChart2 from 'components/Charts/keyboard2';
export default { export default {
components: { keyboardChart2 } components: { keyboardChart2 }
}; };

View File

@ -8,6 +8,7 @@
<script> <script>
import lineMarker from 'components/Charts/lineMarker'; import lineMarker from 'components/Charts/lineMarker';
export default { export default {
components: { lineMarker } components: { lineMarker }
}; };

View File

@ -8,6 +8,7 @@
<script> <script>
import mixChart from 'components/Charts/mixChart'; import mixChart from 'components/Charts/mixChart';
export default { export default {
components: { mixChart } components: { mixChart }
}; };

View File

@ -4,19 +4,19 @@
由于我在使用时它只有vue@1版本而且有些业务的需求耦合到七牛等等原因吧自己改造了一下如果大家要使用的话优先还是使用官方component 由于我在使用时它只有vue@1版本而且有些业务的需求耦合到七牛等等原因吧自己改造了一下如果大家要使用的话优先还是使用官方component
</code> </code>
<PanThumb :image='image'> <pan-thumb :image='image'></pan-thumb>
</PanThumb>
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">修改头像 <el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">修改头像
</el-button> </el-button>
<ImageCropper :width="300" :height="300" url="https://httpbin.org/post" @close='close' @crop-upload-success="cropSuccess" <image-cropper :width="300" :height="300" url="https://httpbin.org/post" @close='close' @crop-upload-success="cropSuccess" :key="imagecropperKey" v-show="imagecropperShow"></image-cropper>
:key="imagecropperKey" v-show="imagecropperShow" />
</div> </div>
</template> </template>
<script> <script>
import ImageCropper from 'components/ImageCropper'; import ImageCropper from 'components/ImageCropper';
import PanThumb from 'components/PanThumb'; import PanThumb from 'components/PanThumb';
export default { export default {
components: { ImageCropper, PanThumb }, components: { ImageCropper, PanThumb },
data() { data() {
@ -38,6 +38,7 @@
} }
}; };
</script> </script>
<style scoped> <style scoped>
.avatar{ .avatar{
width: 200px; width: 200px;

View File

@ -3,7 +3,7 @@
<code> <a href='https://github.com/PanJiaChen/vue-countTo' target='_blank'>countTo component</a></code> <code> <a href='https://github.com/PanJiaChen/vue-countTo' target='_blank'>countTo component</a></code>
<count-to ref='example' class='example' :start-val='_startVal' :end-val='_endVal' :duration='_duration' :decimals='_decimals' <count-to ref='example' class='example' :start-val='_startVal' :end-val='_endVal' :duration='_duration' :decimals='_decimals'
:separator='_separator' :prefix='_prefix' :suffix='_suffix' :autoplay='false' /> :separator='_separator' :prefix='_prefix' :suffix='_suffix' :autoplay='false'></count-to>
<div style='margin-left: 25%;margin-top: 40px;'> <div style='margin-left: 25%;margin-top: 40px;'>
<label class="label" for="startValInput">startVal: <input type="number" v-model.number='setStartVal' name='startValInput' /></label> <label class="label" for="startValInput">startVal: <input type="number" v-model.number='setStartVal' name='startValInput' /></label>
<label class="label" for="endValInput">endVal: <input type="number" v-model.number='setEndVal' name='endVaInput' /></label> <label class="label" for="endValInput">endVal: <input type="number" v-model.number='setEndVal' name='endVaInput' /></label>

View File

@ -2,13 +2,15 @@
<div class="components-container"> <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"> <div class="editor-container">
<DndList :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池" /> <dnd-list :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池"></dnd-list>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import DndList from 'components/twoDndList' import DndList from 'components/twoDndList'
import { getList } from 'api/article'; import { getList } from 'api/article';
export default { export default {
components: { DndList }, components: { DndList },
data() { data() {

View File

@ -4,11 +4,11 @@
由于我司业务有特殊需求而且要传七牛 所以没用第三方 选择了自己封装 由于我司业务有特殊需求而且要传七牛 所以没用第三方 选择了自己封装
</code> </code>
<div class="editor-container"> <div class="editor-container">
<Dropzone v-on:dropzone-removedFile="dropzoneR" v-on:dropzone-success="dropzoneS" id="myVueDropzone" <dropzone v-on:dropzone-removedFile="dropzoneR" v-on:dropzone-success="dropzoneS" id="myVueDropzone" url="https://httpbin.org/post"></dropzone>
url="https://httpbin.org/post"></Dropzone>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Dropzone from 'components/Dropzone'; import Dropzone from 'components/Dropzone';

View File

@ -10,6 +10,7 @@
<script> <script>
import jsonEditor from 'components/jsonEditor'; import jsonEditor from 'components/jsonEditor';
const jsonData = '[{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"CORN"}],"name":""},{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"XAGUSD"},{"market_type":"forexdata","symbol":"AUTD"},{"market_type":"forexdata","symbol":"AGTD"}],"name":"贵金属"},{"items":[{"market_type":"forexdata","symbol":"CORN"},{"market_type":"forexdata","symbol":"WHEAT"},{"market_type":"forexdata","symbol":"SOYBEAN"},{"market_type":"forexdata","symbol":"SUGAR"}],"name":"农产品"},{"items":[{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"USOIL"},{"market_type":"forexdata","symbol":"NGAS"}],"name":"能源化工"}]'; const jsonData = '[{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"CORN"}],"name":""},{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"XAGUSD"},{"market_type":"forexdata","symbol":"AUTD"},{"market_type":"forexdata","symbol":"AGTD"}],"name":"贵金属"},{"items":[{"market_type":"forexdata","symbol":"CORN"},{"market_type":"forexdata","symbol":"WHEAT"},{"market_type":"forexdata","symbol":"SOYBEAN"},{"market_type":"forexdata","symbol":"SUGAR"}],"name":"农产品"},{"items":[{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"USOIL"},{"market_type":"forexdata","symbol":"NGAS"}],"name":"能源化工"}]';
export default { export default {
components: { jsonEditor }, components: { jsonEditor },
data() { data() {

View File

@ -2,7 +2,7 @@
<div class="components-container"> <div class="components-container">
<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></code> <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></code>
<div class="editor-container"> <div class="editor-container">
<MdEditor id='contentEditor' ref="contentEditor" v-model='content' :height="300" :zIndex='20'></MdEditor> <md-editor id='contentEditor' ref="contentEditor" v-model='content' :height="300" :zIndex='20'></md-editor>
</div> </div>
<el-button @click='markdown2Html' style="margin-top:80px;" type="primary">转为HTML<i class="el-icon-document el-icon--right"></i></el-button> <el-button @click='markdown2Html' style="margin-top:80px;" type="primary">转为HTML<i class="el-icon-document el-icon--right"></i></el-button>
<div v-html="html"></div> <div v-html="html"></div>

View File

@ -1,16 +1,16 @@
<template> <template>
<div class="components-container"> <div class="components-container">
<div class='component-item'> <div class='component-item'>
<MDinput name="name" v-model="title" required :maxlength="100"> <md-input name="name" v-model="title" required :maxlength="100">
标题 标题
</MDinput> </md-input>
<code class='code-part'>Material Design 的input</code> <code class='code-part'>Material Design 的input</code>
</div> </div>
<div class='component-item'> <div class='component-item'>
<PanThumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'> <pan-thumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'>
上海花裤衩 上海花裤衩
</PanThumb> </pan-thumb>
<code class='code-part'>图片hover效果</code> <code class='code-part'>图片hover效果</code>
</div> </div>
@ -18,15 +18,15 @@
<el-button v-waves type="primary">水波纹效果</el-button> <el-button v-waves type="primary">水波纹效果</el-button>
<code class='code-part'>水波纹 v-directive</code> <code class='code-part'>水波纹 v-directive</code>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import MDinput from 'components/MDinput'; import MdInput from 'components/MDinput';
import PanThumb from 'components/PanThumb'; import PanThumb from 'components/PanThumb';
export default { export default {
components: { MDinput, PanThumb }, components: { MdInput, PanThumb },
data() { data() {
return { return {
title: '' title: ''

View File

@ -3,7 +3,7 @@
<code>splitPane 如果你用过<a href='http://codepen.io/' target='_blank'>codepen</a>,<a href='https://jsfiddle.net/' target='_blank'>jsfiddle</a>就不会陌生了 <code>splitPane 如果你用过<a href='http://codepen.io/' target='_blank'>codepen</a>,<a href='https://jsfiddle.net/' target='_blank'>jsfiddle</a>就不会陌生了
暂还没有时间开源封装好日后补上 暂还没有时间开源封装好日后补上
</code> </code>
<splitPane v-on:resize="resize" split="vertical"> <split-pane v-on:resize="resize" split="vertical">
<template slot="paneL"> <template slot="paneL">
<div class="left-container"></div> <div class="left-container"></div>
</template> </template>
@ -18,12 +18,13 @@
</template> </template>
</split-pane> </split-pane>
</template> </template>
</splitPane> </split-pane>
</div> </div>
</template> </template>
<script> <script>
import splitPane from 'components/SplitPane' import splitPane from 'components/SplitPane'
export default { export default {
components: { splitPane }, components: { splitPane },
methods: { methods: {
@ -33,11 +34,13 @@
} }
}; };
</script> </script>
<style scoped> <style scoped>
.components-container { .components-container {
position: relative; position: relative;
height: 100vh; height: 100vh;
} }
.left-container { .left-container {
background-color: #F38181; background-color: #F38181;
height: 100%; height: 100%;

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<Sticky className="sub-navbar"> <sticky className="sub-navbar">
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<el-button> <el-button>
平台<i class="el-icon-caret-bottom el-icon--right"></i> 平台<i class="el-icon-caret-bottom el-icon--right"></i>
@ -32,7 +32,7 @@
<el-button style="margin-left: 10px;" type="success">发布 <el-button style="margin-left: 10px;" type="success">发布
</el-button> </el-button>
</Sticky> </sticky>
<div class="components-container"> <div class="components-container">
<code>Sticky header 当页面滚动到预设的位置会吸附在顶部</code> <code>Sticky header 当页面滚动到预设的位置会吸附在顶部</code>
@ -90,8 +90,9 @@
<div>我是占位</div> <div>我是占位</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Sticky from 'components/Sticky'; import Sticky from 'components/Sticky';
@ -114,9 +115,9 @@
} }
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>
.time-container { .time-container {
display: inline-block; display: inline-block;

View File

@ -1,16 +1,17 @@
<template> <template>
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<div class=" clearfix"> <div class=" clearfix">
<PanThumb style="float: left" :image="avatar"> 你的权限: <pan-thumb style="float: left" :image="avatar"> 你的权限:
<span class="pan-info-roles" v-for="item in roles">{{item}}</span> <span class="pan-info-roles" v-for="item in roles">{{item}}</span>
</PanThumb> </pan-thumb>
<a href="https://github.com/PanJiaChen/vue-element-admin" target="_blank" class="github-corner" aria-label="View source on Github"> <a href="https://github.com/PanJiaChen/vue-element-admin" target="_blank" class="github-corner" aria-label="View source on Github">
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#4AB7BD; color:#fff; position: absolute; top: 50px; border: 0; right: 0;" <svg width="80" height="80" viewBox="0 0 250 250" style="fill:#4AB7BD; color:#fff; position: absolute; top: 50px; border: 0; right: 0;"
aria-hidden="true"> aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path> fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"fill="currentColor" class="octo-body"></path> <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
fill="currentColor" class="octo-body"></path>
</svg> </svg>
</a> </a>
<div class="info-container"> <div class="info-container">
@ -27,6 +28,7 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import PanThumb from 'components/PanThumb'; import PanThumb from 'components/PanThumb';
export default { export default {
name: 'dashboard-default', name: 'dashboard-default',
components: { PanThumb }, components: { PanThumb },
@ -39,9 +41,6 @@
...mapGetters([ ...mapGetters([
'name', 'name',
'avatar', 'avatar',
'email',
'uid',
'introduction',
'roles' 'roles'
]) ])
} }
@ -54,6 +53,7 @@
width: 45%; width: 45%;
margin: 0 auto; margin: 0 auto;
} }
.dashboard-editor-container { .dashboard-editor-container {
background-color: #e3e3e3; background-color: #e3e3e3;
min-height: 100vh; min-height: 100vh;

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}"></div> <div :class="className" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';
require('echarts/theme/macarons'); // echarts require('echarts/theme/macarons'); // echarts

View File

@ -1,12 +1,12 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}"></div> <div :class="className" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';
require('echarts/theme/macarons'); // echarts require('echarts/theme/macarons'); // echarts
import { debounce } from 'utils'; import { debounce } from 'utils';
export default { export default {
props: { props: {
className: { className: {

View File

@ -1,6 +1,7 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}"></div> <div :class="className" :style="{height:height,width:width}"></div>
</template> </template>
<script> <script>
import echarts from 'echarts'; import echarts from 'echarts';
require('echarts/theme/macarons'); // echarts require('echarts/theme/macarons'); // echarts

View File

@ -8,6 +8,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import EditorDashboard from './editor/index'; import EditorDashboard from './editor/index';
import DefaultDashboard from './default/index'; import DefaultDashboard from './default/index';
export default { export default {
name: 'dashboard', name: 'dashboard',
components: { EditorDashboard, DefaultDashboard }, components: { EditorDashboard, DefaultDashboard },
@ -29,10 +30,6 @@
if (this.roles.indexOf('admin') >= 0) { if (this.roles.indexOf('admin') >= 0) {
return; return;
} }
// const isEditor = this.roles.some(v => v.indexOf('editor') >= 0)
// if (!isEditor) {
// this.currentRole = 'DefaultDashboard';
// }
this.currentRole = 'DefaultDashboard'; this.currentRole = 'DefaultDashboard';
} }
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="errPage-container"> <div class="errPage-container">
<err-code/> <err-code></err-code>
<h3>请点击右上角bug小图表</h3> <h3>请点击右上角bug小图表</h3>
<code> <code>
@ -12,13 +12,9 @@
<script> <script>
import errCode from './errcode'; import errCode from './errcode';
export default { export default {
components: { errCode }, components: { errCode }
methods: {
back() {
this.$router.go(-1)
}
}
}; };
</script> </script>

View File

@ -28,7 +28,7 @@
</template> </template>
<script> <script>
import errGif from 'assets/401.gif'; import errGif from 'assets/401_images/401.gif';
export default { export default {
data() { data() {
return { return {

View File

@ -2,10 +2,10 @@
<div style="background:#f0f2f5;margin-top: -20px;"> <div style="background:#f0f2f5;margin-top: -20px;">
<div class="wscn-http404"> <div class="wscn-http404">
<div class="pic-404"> <div class="pic-404">
<img class="pic-404__parent" src="../../assets/404.png" alt="404"> <img class="pic-404__parent" :src="img_404" alt="404">
<img class="pic-404__child left" src="../../assets/404_cloud.png" alt="404"> <img class="pic-404__child left" :src="img_404_cloud" alt="404">
<img class="pic-404__child mid" src="../../assets/404_cloud.png" alt="404"> <img class="pic-404__child mid" :src="img_404_cloud" alt="404">
<img class="pic-404__child right" src="../../assets/404_cloud.png" alt="404"> <img class="pic-404__child right" :src="img_404_cloud" alt="404">
</div> </div>
<div class="bullshit"> <div class="bullshit">
<div class="bullshit__oops">OOPS!</div> <div class="bullshit__oops">OOPS!</div>
@ -19,7 +19,16 @@
</template> </template>
<script> <script>
import img_404 from '@/assets/404_images/404.png'
import img_404_cloud from '@/assets/404_images/404_cloud.png'
export default { export default {
data() {
return {
img_404,
img_404_cloud
}
},
computed: { computed: {
message() { message() {
return '特朗普说这个页面你不能进......' return '特朗普说这个页面你不能进......'
@ -216,4 +225,5 @@
} }
} }
} }
</style> </style>

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div style='margin:0 0 5px 20px'>固定表头 按照表头顺序排序</div> <div style='margin:0 0 5px 20px'>固定表头 按照表头顺序排序</div>
<fixed-thead/> <fixed-thead></fixed-thead>
<div style='margin:30px 0 5px 20px'>不固定表头 按照点击顺序排序</div> <div style='margin:30px 0 5px 20px'>不固定表头 按照点击顺序排序</div>
<unfixed-thead/> <unfixed-thead></unfixed-thead>
</div> </div>
</template> </template>

View File

@ -35,6 +35,7 @@
<script> <script>
import { getList } from 'api/article'; import { getList } from 'api/article';
export default { export default {
data() { data() {
return { return {
@ -55,7 +56,9 @@ export default {
}, },
handleDownload() { handleDownload() {
require.ensure([], () => { require.ensure([], () => {
const { export_json_to_excel } = require('vendor/Export2Excel'); const {
export_json_to_excel
} = require('vendor/Export2Excel');
const tHeader = ['序号', '文章标题', '作者', '阅读数', '发布时间']; const tHeader = ['序号', '文章标题', '作者', '阅读数', '发布时间'];
const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time']; const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time'];
const list = this.list; const list = this.list;

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="app-wrapper" :class="{hideSidebar:!sidebar.opened}"> <div class="app-wrapper" :class="{hideSidebar:!sidebar.opened}">
<div class="sidebar-wrapper"> <div class="sidebar-wrapper">
<Sidebar class="sidebar-container" /> <sidebar class="sidebar-container"></sidebar>
</div> </div>
<div class="main-container"> <div class="main-container">
<Navbar/> <navbar></navbar>
<App-main/> <app-main></app-main>
</div> </div>
</div> </div>
</template> </template>

View File

@ -24,7 +24,6 @@
</template> </template>
<script> <script>
export default { export default {
name: 'SidebarItem', name: 'SidebarItem',
props: { props: {
@ -39,6 +38,7 @@
.svg-icon { .svg-icon {
margin-right: 10px; margin-right: 10px;
} }
.hideSidebar .menu-indent { .hideSidebar .menu-indent {
display: block; display: block;
text-indent: 10px; text-indent: 10px;

View File

@ -48,5 +48,4 @@
margin-left: 10px; margin-left: 10px;
} }
} }
</style> </style>

View File

@ -20,10 +20,12 @@
<div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div> <div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
<div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div> <div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
</el-form> </el-form>
<el-dialog title="第三方验证" :visible.sync="showDialog"> <el-dialog title="第三方验证" :visible.sync="showDialog">
邮箱登录成功,请选择第三方验证 邮箱登录成功,请选择第三方验证
<socialSign></socialSign> <social-sign></social-sign>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -120,11 +122,11 @@
color: #fff; color: #fff;
margin-bottom: 5px; margin-bottom: 5px;
} }
.login-container { .login-container {
@include relative; @include relative;
height: 100vh; height: 100vh;
background-color: #2d3a4b; background-color: #2d3a4b;
input:-webkit-autofill { input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px #293444 inset !important; -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important; -webkit-text-fill-color: #fff !important;
@ -147,7 +149,6 @@
padding: 6px 5px 6px 15px; padding: 6px 5px 6px 15px;
color: #889aa4; color: #889aa4;
} }
.title { .title {
font-size: 26px; font-size: 26px;
font-weight: 400; font-weight: 400;
@ -156,7 +157,6 @@
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
} }
.login-form { .login-form {
position: absolute; position: absolute;
left: 0; left: 0;
@ -165,17 +165,14 @@
padding: 35px 35px 15px 35px; padding: 35px 35px 15px 35px;
margin: 120px auto; margin: 120px auto;
} }
.el-form-item { .el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
border-radius: 5px; border-radius: 5px;
color: #454545; color: #454545;
} }
.forget-pwd { .forget-pwd {
color: #fff; color: #fff;
} }
} }
</style> </style>

View File

@ -32,6 +32,7 @@
} }
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.social-signup-container { .social-signup-container {
margin: 20px 0; margin: 20px 0;
@ -44,7 +45,8 @@
font-size: 30px; font-size: 30px;
margin-top: 6px; margin-top: 6px;
} }
.wx-svg-container, .qq-svg-container { .wx-svg-container,
.qq-svg-container {
display: inline-block; display: inline-block;
width: 40px; width: 40px;
height: 40px; height: 40px;

View File

@ -1,10 +1,5 @@
<template> <template>
<el-upload <el-upload action="https://upload.qbox.me" :data="dataObj" drag :multiple="true" :before-upload="beforeUpload">
action="https://upload.qbox.me"
:data="dataObj"
drag
:multiple="true"
:before-upload="beforeUpload">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload> </el-upload>

View File

@ -51,13 +51,30 @@ export default {
data() { data() {
return { return {
theme: false, theme: false,
tags: [ tags: [{
{ name: '标签一', type: '' }, name: '标签一',
{ name: '标签二', type: 'gray' }, type: ''
{ name: '标签三', type: 'primary' }, },
{ name: '标签四', type: 'success' }, {
{ name: '标签五', type: 'warning' }, name: '标签二',
{ name: '标签六', type: 'danger' } type: 'gray'
},
{
name: '标签三',
type: 'primary'
},
{
name: '标签四',
type: 'success'
},
{
name: '标签五',
type: 'warning'
},
{
name: '标签六',
type: 'danger'
}
], ],
inputVisible: false, inputVisible: false,
inputValue: '' inputValue: ''