全局代码格式 优化

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>
<div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template>
<script>
import echarts from 'echarts';

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,11 @@
<div>
<el-badge :is-dot="true" style="line-height: 30px;" @click.native="dialogTableVisible=true">
<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-badge>
<el-dialog title="bug日志" :visible.sync="dialogTableVisible">
@ -40,6 +44,7 @@
}
}
</script>
<style scoped>
.bug-svg {
width: 1em;

View File

@ -1,6 +1,14 @@
<template>
<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>
</template>
@ -21,7 +29,7 @@
</script>
<style scoped>
.hamburger {
.hamburger {
display: inline-block;
cursor: pointer;
width: 20px;
@ -29,8 +37,10 @@
transform: rotate(0deg);
transition: .38s;
transform-origin: 50% 50%;
}
.hamburger.is-active {
}
.hamburger.is-active {
transform: rotate(90deg);
}
}
</style>

View File

@ -7,17 +7,17 @@
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :required="required" @focus="handleFocus(true)"
@blur="handleFocus(false)" @input="handleModelInput">
<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"
: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"
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :max="max" :min="min" :minlength="minlength" :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">
<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)"
@blur="handleFocus(false)" @input="handleModelInput">
<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"
:required="required" @focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
:readonly="readonly" :disabled="disabled" :autocomplete="autocomplete" :minlength="minlength" :maxlength="maxlength" :required="required"
@focus="handleFocus(true)" @blur="handleFocus(false)" @input="handleModelInput">
<span class="material-input-bar"></span>
@ -25,7 +25,7 @@
<slot></slot>
</label>
<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 }}
</div>
</div>
@ -141,7 +141,7 @@
default: null
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -6,9 +6,10 @@
</template>
<script>
import 'simplemde/dist/simplemde.min.css'
import SimpleMDE from 'simplemde'
export default {
import 'simplemde/dist/simplemde.min.css';
import SimpleMDE from 'simplemde';
export default {
name: 'Sticky',
props: {
value: String,
@ -77,35 +78,37 @@ export default {
</script>
<style>
.simplemde-container .CodeMirror {
.simplemde-container .CodeMirror {
/*height: 150px;*/
min-height: 150px;
}
.simplemde-container .CodeMirror-scroll{
}
.simplemde-container .CodeMirror-scroll {
min-height: 150px;
}
}
.simplemde-container .CodeMirror-code{
.simplemde-container .CodeMirror-code {
padding-bottom: 40px;
}
.simplemde-container .editor-statusbar {
}
.simplemde-container .editor-statusbar {
display: none;
}
}
.simplemde-container .CodeMirror .CodeMirror-code .cm-link {
.simplemde-container .CodeMirror .CodeMirror-code .cm-link {
color: #1482F0;
}
}
.simplemde-container .CodeMirror .CodeMirror-code .cm-string.cm-url {
.simplemde-container .CodeMirror .CodeMirror-code .cm-string.cm-url {
color: #2d3b4d;
font-weight: bold;
}
}
.simplemde-container .CodeMirror .CodeMirror-code .cm-formatting-link-string.cm-url {
.simplemde-container .CodeMirror .CodeMirror-code .cm-formatting-link-string.cm-url {
padding: 0 2px;
font-weight: bold;
color: #E61E1E;
}
}
</style>

View File

@ -8,6 +8,7 @@
<img class="pan-thumb" :src="image">
</div>
</template>
<script>
export default {
name: 'PanThumb',
@ -28,15 +29,12 @@
type: String,
default: '150px'
}
},
data() {
return {};
}
};
</script>
<style scoped>
.pan-item {
.pan-item {
width: 200px;
height: 200px;
border-radius: 50%;
@ -44,14 +42,14 @@
position: relative;
cursor: default;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
}
.pan-info-roles-container {
.pan-info-roles-container {
padding: 20px;
text-align: center;
}
}
.pan-thumb {
.pan-thumb {
width: 100%;
height: 100%;
background-size: 100%;
@ -60,9 +58,9 @@
position: absolute;
transform-origin: 95% 40%;
transition: all 0.3s ease-in-out;
}
}
.pan-thumb:after {
.pan-thumb:after {
content: '';
width: 8px;
height: 8px;
@ -73,18 +71,18 @@
margin: -4px 0 0 -4px;
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
}
}
.pan-info {
.pan-info {
position: absolute;
width: inherit;
height: inherit;
border-radius: 50%;
overflow: hidden;
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
}
}
.pan-info h3 {
.pan-info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
@ -94,20 +92,19 @@
padding: 22px 0 0 0;
height: 85px;
font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff,
0 1px 2px rgba(0, 0, 0, 0.3);
}
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.pan-info p {
.pan-info p {
color: #fff;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
}
.pan-info p a {
.pan-info p a {
display: block;
color: #333;
width: 80px;
@ -124,22 +121,20 @@
margin: 7px auto 0;
font-family: 'Open Sans', Arial, sans-serif;
opacity: 0;
transition: transform 0.3s ease-in-out 0.2s,
opacity 0.3s ease-in-out 0.2s,
background 0.2s linear 0s;
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
transform: translateX(60px) rotate(90deg);
}
}
.pan-info p a:hover {
.pan-info p a:hover {
background: rgba(255, 255, 255, 0.5);
}
}
.pan-item:hover .pan-thumb {
.pan-item:hover .pan-thumb {
transform: rotate(-110deg);
}
}
.pan-item:hover .pan-info p a {
.pan-item:hover .pan-info p a {
opacity: 1;
transform: translateX(0px) rotate(0deg);
}
}
</style>

View File

@ -1,6 +1,9 @@
<template>
<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>
<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>
</template>
<script>
@ -42,9 +45,9 @@
</script>
<style scoped>
.screenfull {
.screenfull {
display: inline-block;
cursor: pointer;
vertical-align: -0.15em;
}
}
</style>

View File

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

View File

@ -1,6 +1,7 @@
<template>
<div :class="classes" @mousedown="onMouseDown"></div>
</template>
<script>
export default {
props: {
@ -23,8 +24,9 @@
}
}
</script>
<style scoped>
.Resizer {
.Resizer {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
@ -35,37 +37,36 @@
/*-moz-background-clip: padding;*/
/*-webkit-background-clip: padding;*/
/*background-clip: padding-box;*/
}
}
/*.Resizer:hover {*/
/*-webkit-transition: all 2s ease;*/
/*transition: all 2s ease;*/
/*}*/
/*.Resizer:hover {*/
/*-webkit-transition: all 2s ease;*/
/*transition: all 2s ease;*/
/*}*/
.Resizer.horizontal {
.Resizer.horizontal {
height: 11px;
margin: -5px 0;
border-top: 5px solid rgba(255, 255, 255, 0);
border-bottom: 5px solid rgba(255, 255, 255, 0);
cursor: row-resize;
width: 100%;
}
}
.Resizer.horizontal:hover {
.Resizer.horizontal:hover {
border-top: 5px solid rgba(0, 0, 0, 0.5);
border-bottom: 5px solid rgba(0, 0, 0, 0.5);
}
}
.Resizer.vertical {
.Resizer.vertical {
width: 11px;
height: 100%;
border-left: 5px solid rgba(255, 255, 255, 0);
border-right: 5px solid rgba(255, 255, 255, 0);
cursor: col-resize;
}
}
.Resizer.vertical:hover {
.Resizer.vertical:hover {
border-left: 5px solid rgba(0, 0, 0, 0.5);
border-right: 5px solid rgba(0, 0, 0, 0.5);
}
}
</style>

View File

@ -1,31 +1,14 @@
<template>
<div ref :style="{ cursor, userSelect}" class="vue-splitter-container clearfix" @mouseup="onMouseUp"
@mousemove="onMouseMove">
<Pane class="splitter-pane splitter-paneL" :split="split" :style="{ [type]: percent+'%'}">
<div ref :style="{ cursor, userSelect}" class="vue-splitter-container clearfix" @mouseup="onMouseUp" @mousemove="onMouseMove">
<pane class="splitter-pane splitter-paneL" :split="split" :style="{ [type]: percent+'%'}">
<slot name="paneL"></slot>
</Pane>
<Resizer :style="{ [resizeType]: percent+'%'}" :split="split" :onMouseDown="onMouseDown"
@click="onClick"></Resizer>
<Pane class="splitter-pane splitter-paneR" :split="split" :style="{ [type]: 100-percent+'%'}">
</pane>
<resizer :style="{ [resizeType]: percent+'%'}" :split="split" :onMouseDown="onMouseDown" @click="onClick"></resizer>
<pane class="splitter-pane splitter-paneR" :split="split" :style="{ [type]: 100-percent+'%'}">
<slot name="paneR"></slot>
</Pane>
</pane>
</div>
</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>
import Resizer from './Resizer';
@ -109,3 +92,20 @@
}
}
</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>
</template>
<script>
export default {
name: 'Sticky',

View File

@ -149,7 +149,7 @@
destroyed() {
tinymce.get(this.id).destroy();
}
}
}
</script>
<style scoped>

View File

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

View File

@ -1,13 +1,6 @@
<template>
<div class="singleImageUpload2 upload-container">
<el-upload
class="image-uploader"
:data="dataObj"
drag
:multiple="false"
:show-file-list="false"
action="https://httpbin.org/post"
<el-upload class="image-uploader" :data="dataObj" drag :multiple="false" :show-file-list="false" action="https://httpbin.org/post"
:on-success="handleImageScucess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">Drag或<em>点击上传</em></div>
@ -22,6 +15,7 @@
</div>
</div>
</template>
<script>
//
import { getToken } from 'api/qiniu';
@ -72,11 +66,11 @@
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.upload-container {
.upload-container {
width: 100%;
height: 100%;
position: relative;
.image-uploader{
.image-uploader {
height: 100%;
}
.image-preview {
@ -121,6 +115,5 @@
}
}
}
}
}
</style>

View File

@ -1,13 +1,6 @@
<template>
<div class="upload-container">
<el-upload
class="image-uploader"
:data="dataObj"
drag
:multiple="false"
:show-file-list="false"
action="https://httpbin.org/post"
<el-upload class="image-uploader" :data="dataObj" drag :multiple="false" :show-file-list="false" action="https://httpbin.org/post"
:on-success="handleImageScucess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -31,6 +24,7 @@
</div>
</div>
</template>
<script>
//
import { getToken } from 'api/qiniu';
@ -81,8 +75,8 @@
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.upload-container {
@import "src/styles/mixin.scss";
.upload-container {
width: 100%;
position: relative;
@include clearfix;
@ -132,23 +126,21 @@
}
}
}
.image-app-preview{
.image-app-preview {
width: 320px;
height: 180px;
position: relative;
border: 1px dashed #d9d9d9;
float: left;
margin-left: 50px;
.app-fake-conver{
.app-fake-conver {
height: 44px;
position: absolute;
width: 100%;
// background: rgba(0, 0, 0, .1);
width: 100%; // background: rgba(0, 0, 0, .1);
text-align: center;
line-height: 64px;
color: #fff;
}
}
}
}
</style>

View File

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

View File

@ -3,7 +3,7 @@
<div class="twoDndList-list" :style="{width:width1}">
<h3>{{list1Title}}</h3>
<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 style="position:absolute;right:0px;">
<span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)">
@ -17,7 +17,7 @@
<div class="twoDndList-list" :style="{width:width2}">
<h3>{{list2Title}}</h3>
<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>
</draggable>
@ -97,7 +97,7 @@
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.twoDndList {
.twoDndList {
background: #fff;
padding-bottom: 40px;
&:after {
@ -117,9 +117,9 @@
padding-bottom: 30px;
}
}
}
}
.list-complete-item {
.list-complete-item {
cursor: pointer;
position: relative;
font-size: 14px;
@ -127,30 +127,32 @@
margin-top: 4px;
border: 1px solid #bfcbd9;
transition: all 1s;
}
}
.list-complete-item-handle {
.list-complete-item-handle {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 50px;
}
.list-complete-item-handle2{
}
.list-complete-item-handle2 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 20px;
}
}
.list-complete-item.sortable-chosen {
.list-complete-item.sortable-chosen {
background: #4AB7BD;
}
}
.list-complete-item.sortable-ghost {
.list-complete-item.sortable-ghost {
background: #30B08F;
}
}
.list-complete-enter, .list-complete-leave-active {
.list-complete-enter,
.list-complete-leave-active {
opacity: 0;
}
}
</style>

View File

@ -24,7 +24,6 @@ export function parseTime(time, cFormat) {
time = +time * 1000
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
let date;
if (typeof time == 'object') {
@ -75,8 +74,6 @@ export function formatTime(time, option) {
}
}
/* 数字 格式化*/
export function nFormatter(num, digits) {
const si = [
@ -95,14 +92,12 @@ export function nFormatter(num, digits) {
return num.toString();
}
export function html2Text(val) {
const div = document.createElement('div');
div.innerHTML = val;
return div.textContent || div.innerText;
}
export function toThousandslsFilter(num) {
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 './mock/index.js'; // 该项目所有请求使用mockjs模拟
// register globally
Vue.component('multiselect', Multiselect);
Vue.component('Sticky', Sticky);
@ -28,8 +27,6 @@ Vue.component('icon-svg', IconSvg)
Vue.use(ElementUI);
Vue.use(vueWaves);
Vue.config.productionTip = false;
// register global utility filters.
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
@ -78,11 +75,12 @@ router.beforeEach((to, from, next) => {
}
});
router.afterEach(() => {
NProgress.done(); // 结束Progress
});
Vue.config.productionTip = false;
// 生产环境错误日志
if (process.env === 'production') {
Vue.config.errorHandler = function(err, vm) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
<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'
: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;'>
<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>

View File

@ -2,13 +2,15 @@
<div class="components-container">
<code>drag-list base on <a href="https://github.com/SortableJS/Vue.Draggable" target="_blank">Vue.Draggable</a></code>
<div class="editor-container">
<DndList :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池" />
<dnd-list :list1="list1" :list2="list2" list1Title="头条列表" list2Title="文章池"></dnd-list>
</div>
</div>
</template>
<script>
import DndList from 'components/twoDndList'
import { getList } from 'api/article';
export default {
components: { DndList },
data() {

View File

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

View File

@ -10,6 +10,7 @@
<script>
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":"能源化工"}]';
export default {
components: { jsonEditor },
data() {

View File

@ -2,7 +2,7 @@
<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>
<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>
<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>

View File

@ -1,16 +1,16 @@
<template>
<div class="components-container">
<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>
</div>
<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>
</div>
@ -18,15 +18,15 @@
<el-button v-waves type="primary">水波纹效果</el-button>
<code class='code-part'>水波纹 v-directive</code>
</div>
</div>
</template>
<script>
import MDinput from 'components/MDinput';
import MdInput from 'components/MDinput';
import PanThumb from 'components/PanThumb';
export default {
components: { MDinput, PanThumb },
components: { MdInput, PanThumb },
data() {
return {
title: ''

View File

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

View File

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

View File

@ -1,16 +1,17 @@
<template>
<div class="dashboard-editor-container">
<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>
</PanThumb>
</pan-thumb>
<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;"
aria-hidden="true">
<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"
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>
</a>
<div class="info-container">
@ -19,7 +20,7 @@
</div>
</div>
<div>
<img class='emptyGif' :src="emptyGif" >
<img class='emptyGif' :src="emptyGif">
</div>
</div>
</template>
@ -27,6 +28,7 @@
<script>
import { mapGetters } from 'vuex';
import PanThumb from 'components/PanThumb';
export default {
name: 'dashboard-default',
components: { PanThumb },
@ -39,9 +41,6 @@
...mapGetters([
'name',
'avatar',
'email',
'uid',
'introduction',
'roles'
])
}
@ -54,6 +53,7 @@
width: 45%;
margin: 0 auto;
}
.dashboard-editor-container {
background-color: #e3e3e3;
min-height: 100vh;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@
<el-table-column width="100px" label="重要性">
<template scope="scope">
<icon-svg v-for="n in +scope.row.importance" icon-class="wujiaoxing" class="meta-item__icon" :key="n" ></icon-svg>
<icon-svg v-for="n in +scope.row.importance" icon-class="wujiaoxing" class="meta-item__icon" :key="n"></icon-svg>
</template>
</el-table-column>

View File

@ -60,7 +60,7 @@
<el-table-column width="80px" label="重要性">
<template scope="scope">
<icon-svg v-for="n in +scope.row.importance" icon-class="wujiaoxing" class="meta-item__icon" :key="n" ></icon-svg>
<icon-svg v-for="n in +scope.row.importance" icon-class="wujiaoxing" class="meta-item__icon" :key="n"></icon-svg>
</template>
</el-table-column>

View File

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

View File

@ -14,5 +14,5 @@
return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
}
}
}
}
</script>

View File

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

View File

@ -41,9 +41,9 @@
font-size: 14px;
line-height: 50px;
margin-left: 10px;
.no-redirect{
.no-redirect {
color: #97a8be;
cursor:text;
cursor: text;
}
}
</style>

View File

@ -85,7 +85,7 @@
position: absolute;
right: 150px;
}
.screenfull{
.screenfull {
position: absolute;
right: 90px;
top: 16px;
@ -98,7 +98,7 @@
right: 35px;
.avatar-wrapper {
cursor: pointer;
margin-top:5px;
margin-top: 5px;
position: relative;
.user-avatar {
width: 40px;

View File

@ -3,12 +3,12 @@
<template v-for="item in routes">
<router-link v-if="!item.hidden&&item.noDropdown&&item.children.length>0" :to="item.path+'/'+item.children[0].path">
<el-menu-item :index="item.path+'/'+item.children[0].path">
<icon-svg v-if='item.icon' :icon-class="item.icon" ></icon-svg>{{item.children[0].name}}
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg>{{item.children[0].name}}
</el-menu-item>
</router-link>
<el-submenu :index="item.name" v-if="!item.noDropdown&&!item.hidden">
<template slot="title">
<icon-svg v-if='item.icon' :icon-class="item.icon" ></icon-svg> {{item.name}}
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg> {{item.name}}
</template>
<template v-for="child in item.children" v-if='!child.hidden'>
<sidebar-item class='menu-indent' v-if='child.children&&child.children.length>0' :routes='[child]'> </sidebar-item>
@ -24,7 +24,6 @@
</template>
<script>
export default {
name: 'SidebarItem',
props: {
@ -39,7 +38,8 @@
.svg-icon {
margin-right: 10px;
}
.hideSidebar .menu-indent{
.hideSidebar .menu-indent {
display: block;
text-indent: 10px;
}

View File

@ -40,13 +40,12 @@
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.tabs-view-container{
.tabs-view-container {
display: inline-block;
vertical-align: top;
margin-left: 10px;
.tabs-view{
.tabs-view {
margin-left: 10px;
}
}
</style>

View File

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

View File

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

View File

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

View File

@ -45,19 +45,36 @@
<script>
import { toggleClass } from 'utils';
import { toggleClass } from 'utils';
export default {
export default {
data() {
return {
theme: false,
tags: [
{ name: '标签一', type: '' },
{ name: '标签二', type: 'gray' },
{ name: '标签三', type: 'primary' },
{ name: '标签四', type: 'success' },
{ name: '标签五', type: 'warning' },
{ name: '标签六', type: 'danger' }
tags: [{
name: '标签一',
type: ''
},
{
name: '标签二',
type: 'gray'
},
{
name: '标签三',
type: 'primary'
},
{
name: '标签四',
type: 'success'
},
{
name: '标签五',
type: 'warning'
},
{
name: '标签六',
type: 'danger'
}
],
inputVisible: false,
inputValue: ''
@ -69,7 +86,7 @@ export default {
// this.$store.dispatch('setTheme', value);
}
}
};
};
</script>
<style scoped>