1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-09 13:47:25 +08:00
This commit is contained in:
Pan 2018-08-17 17:14:59 +08:00
parent 3012ae38cb
commit 8b8e005b19
76 changed files with 365 additions and 149 deletions

View File

@ -5,7 +5,7 @@
</template>
<script>
export default{
name: 'App'
}
export default{
name: 'App'
}
</script>

View File

@ -2,9 +2,18 @@
<div v-if="errorLogs.length>0">
<el-badge :is-dot="true" style="line-height: 30px;" @click.native="dialogTableVisible=true">
<el-button size="small" type="danger" class="bug-btn">
<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="128" height="128">
<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"
<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="128"
height="128">
<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>
@ -43,7 +52,7 @@
<script>
export default {
name: 'errorLog',
name: 'ErrorLog',
data() {
return {
dialogTableVisible: false

View File

@ -1,12 +1,21 @@
<template>
<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:#40c9c6; color:#fff;"
<svg
width="80"
height="80"
viewBox="0 0 250 250"
style="fill:#40c9c6; color:#fff;"
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="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>
</svg>
</a>
</template>

View File

@ -1,12 +1,26 @@
<template>
<div>
<svg t="1492500959545" @click="toggleClick" class="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"
<svg
t="1492500959545"
@click="toggleClick"
class="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"
<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"
<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>
@ -14,7 +28,7 @@
<script>
export default {
name: 'hamburger',
name: 'Hamburger',
props: {
isActive: {
type: Boolean,

View File

@ -28,7 +28,11 @@
<div class="vicp-crop">
<div class="vicp-crop-left" v-show="true">
<div class="vicp-img-container">
<img :src="sourceImgUrl" :style="sourceImgStyle" class="vicp-img" draggable="false"
<img
:src="sourceImgUrl"
:style="sourceImgStyle"
class="vicp-img"
draggable="false"
@drag="preventDefault"
@dragstart="preventDefault"
@dragend="preventDefault"
@ -103,7 +107,7 @@
</template>
<script>
/* eslint-disable */
/* eslint-disable */
'use strict'
import request from '@/utils/request'
import language from './utils/language.js'

View File

@ -15,7 +15,7 @@ import 'codemirror/addon/lint/lint'
import 'codemirror/addon/lint/json-lint'
export default {
name: 'jsonEditor',
name: 'JsonEditor',
data() {
return {
jsonEditor: false

View File

@ -17,7 +17,7 @@
import draggable from 'vuedraggable'
export default {
name: 'dragKanban-demo',
name: 'DragKanbanDemo',
components: {
draggable
},

View File

@ -38,4 +38,3 @@ export default {
}
</style>

View File

@ -2,24 +2,99 @@
<div class="material-input__component" :class="computedClasses">
<div :class="{iconClass:icon}">
<i class="el-input__icon material-input__icon" :class="['el-icon-' + icon]" v-if="icon"></i>
<input v-if="type === 'email'" type="email" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
@blur="handleMdBlur" @input="handleModelInput">
<input v-if="type === 'url'" type="url" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
@blur="handleMdBlur" @input="handleModelInput">
<input v-if="type === 'number'" type="number" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:step="step" :readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :max="max" :min="min" :minlength="minlength"
:maxlength="maxlength" :required="required" @focus="handleMdFocus" @blur="handleMdBlur" @input="handleModelInput">
<input v-if="type === 'password'" type="password" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :max="max" :min="min" :required="required" @focus="handleMdFocus"
@blur="handleMdBlur" @input="handleModelInput">
<input v-if="type === 'tel'" type="tel" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
@blur="handleMdBlur" @input="handleModelInput">
<input v-if="type === 'text'" type="text" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :minlength="minlength" :maxlength="maxlength"
:required="required" @focus="handleMdFocus" @blur="handleMdBlur" @input="handleModelInput">
<input
v-if="type === 'email'"
type="email"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<input
v-if="type === 'url'"
type="url"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<input
v-if="type === 'number'"
type="number"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:step="step"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:max="max"
:min="min"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<input
v-if="type === 'password'"
type="password"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:max="max"
:min="min"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<input
v-if="type === 'tel'"
type="tel"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<input
v-if="type === 'text'"
type="text"
class="material-input"
:name="name"
:placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly"
:disabled="disabled"
:autoComplete="autoComplete"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput">
<span class="material-input-bar"></span>
<label class="material-label">
<slot></slot>
@ -32,7 +107,7 @@
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
export default {
name: 'md-input',
name: 'MdInput',
props: {
icon: String,
name: String,

View File

@ -11,7 +11,7 @@ import 'simplemde/dist/simplemde.min.css'
import SimpleMDE from 'simplemde'
export default {
name: 'simplemde-md',
name: 'SimplemdeMd',
props: {
value: String,
id: {

View File

@ -1,14 +1,27 @@
<template>
<div>
<svg t="1508738709248" @click='click' class="screenfull-svg" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="2069" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32">
<path d="M333.493443 428.647617 428.322206 333.832158 262.572184 168.045297 366.707916 64.444754 64.09683 64.444754 63.853283 366.570793 167.283957 262.460644Z"
<svg
t="1508738709248"
@click='click'
class="screenfull-svg"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2069"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="32"
height="32">
<path
d="M333.493443 428.647617 428.322206 333.832158 262.572184 168.045297 366.707916 64.444754 64.09683 64.444754 63.853283 366.570793 167.283957 262.460644Z"
p-id="2070"></path>
<path d="M854.845439 760.133334 688.61037 593.95864 593.805144 688.764889 759.554142 854.56096 655.44604 958.161503 958.055079 958.161503 958.274066 656.035464Z"
<path
d="M854.845439 760.133334 688.61037 593.95864 593.805144 688.764889 759.554142 854.56096 655.44604 958.161503 958.055079 958.161503 958.274066 656.035464Z"
p-id="2071"></path>
<path d="M688.535669 428.550403 854.31025 262.801405 957.935352 366.921787 957.935352 64.34754 655.809313 64.081481 759.919463 167.535691 593.70793 333.731874Z"
<path
d="M688.535669 428.550403 854.31025 262.801405 957.935352 366.921787 957.935352 64.34754 655.809313 64.081481 759.919463 167.535691 593.70793 333.731874Z"
p-id="2072"></path>
<path d="M333.590658 594.033341 167.8171 759.804852 64.218604 655.67219 64.218604 958.270996 366.342596 958.502263 262.234493 855.071589 428.421466 688.86108Z"
<path
d="M333.590658 594.033341 167.8171 759.804852 64.218604 655.67219 64.218604 958.270996 366.342596 958.502263 262.234493 855.071589 428.421466 688.86108Z"
p-id="2073"></path>
</svg>
</div>
@ -18,7 +31,7 @@
import screenfull from 'screenfull'
export default {
name: 'screenfull',
name: 'Screenfull',
props: {
width: {
type: Number,

View File

@ -10,7 +10,7 @@
const padding = 15 // tag's padding
export default {
name: 'scrollPane',
name: 'ScrollPane',
data() {
return {
left: 0

View File

@ -6,7 +6,7 @@
<script>
export default {
name: 'svg-icon',
name: 'SvgIcon',
props: {
iconClass: {
type: String,

View File

@ -20,7 +20,6 @@ export default {
}
</script>
<style>
/* Mallki */

View File

@ -3,8 +3,16 @@
<el-button icon='el-icon-upload' size="mini" :style="{background:color,borderColor:color}" @click=" dialogVisible=true" type="primary">上传图片
</el-button>
<el-dialog :visible.sync="dialogVisible">
<el-upload class="editor-slide-upload" action="https://httpbin.org/post" :multiple="true" :file-list="fileList" :show-file-list="true"
list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="beforeUpload">
<el-upload
class="editor-slide-upload"
action="https://httpbin.org/post"
:multiple="true"
:file-list="fileList"
:show-file-list="true"
list-type="picture-card"
:on-remove="handleRemove"
:on-success="handleSuccess"
:before-upload="beforeUpload">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
<el-button @click="dialogVisible = false"> </el-button>
@ -17,7 +25,7 @@
// import { getToken } from 'api/qiniu'
export default {
name: 'editorSlideUpload',
name: 'EditorSlideUpload',
props: {
color: {
type: String,

View File

@ -13,7 +13,7 @@ import plugins from './plugins'
import toolbar from './toolbar'
export default {
name: 'tinymce',
name: 'Tinymce',
components: { editorImage },
props: {
id: {

View File

@ -31,7 +31,7 @@
*/
import treeToArray from './eval'
export default {
name: 'treeTable',
name: 'TreeTable',
props: {
data: {
type: [Array, Object],

View File

@ -1,6 +1,12 @@
<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="handleImageSuccess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -21,7 +27,7 @@
import { getToken } from '@/api/qiniu'
export default {
name: 'singleImageUpload',
name: 'SingleImageUpload',
props: {
value: String
},

View File

@ -1,6 +1,12 @@
<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="handleImageSuccess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">Drag或<em>点击上传</em></div>
@ -20,7 +26,7 @@
import { getToken } from '@/api/qiniu'
export default {
name: 'singleImageUpload2',
name: 'SingleImageUpload2',
props: {
value: String
},

View File

@ -1,6 +1,12 @@
<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="handleImageSuccess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -28,7 +34,7 @@
import { getToken } from '@/api/qiniu'
export default {
name: 'singleImageUpload3',
name: 'SingleImageUpload3',
props: {
value: String
},

View File

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

View File

@ -8,7 +8,7 @@
import Chart from '@/components/Charts/lineMarker'
export default {
name: 'lineChart',
name: 'LineChart',
components: { Chart }
}
</script>

View File

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

View File

@ -18,7 +18,7 @@ import clip from '@/utils/clipboard' // use clipboard directly
import clipboard from '@/directive/clipboard/index.js' // use clipboard by v-directive
export default {
name: 'clipboardDemo',
name: 'ClipboardDemo',
directives: {
clipboard
},

View File

@ -10,8 +10,15 @@
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">Change avatar
</el-button>
<image-cropper :width="300" :height="300" url="https://httpbin.org/post" @close='close' @crop-upload-success="cropSuccess" langType="en"
:key="imagecropperKey" v-show="imagecropperShow"></image-cropper>
<image-cropper
:width="300"
:height="300"
url="https://httpbin.org/post"
@close='close'
@crop-upload-success="cropSuccess"
langType="en"
:key="imagecropperKey"
v-show="imagecropperShow"></image-cropper>
</div>
</template>
@ -20,7 +27,7 @@ import ImageCropper from '@/components/ImageCropper'
import PanThumb from '@/components/PanThumb'
export default {
name: 'avatarUpload-demo',
name: 'AvatarUploadDemo',
components: { ImageCropper, PanThumb },
data() {
return {

View File

@ -125,7 +125,7 @@
import BackToTop from '@/components/BackToTop'
export default {
name: 'backToTop-demo',
name: 'BackToTopDemo',
components: { BackToTop },
data() {
return {

View File

@ -3,8 +3,17 @@
<p class="warn-content">
<a href="https://github.com/PanJiaChen/vue-countTo" target="_blank">countTo-component</a>
</p>
<count-to ref="example" class="example" :start-val="_startVal" :end-val="_endVal" :duration="_duration" :decimals="_decimals"
:separator="_separator" :prefix="_prefix" :suffix="_suffix" :autoplay="false"></count-to>
<count-to
ref="example"
class="example"
:start-val="_startVal"
:end-val="_endVal"
:duration="_duration"
:decimals="_decimals"
: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" />
@ -41,7 +50,7 @@
import countTo from 'vue-count-to'
export default {
name: 'countTo-demo',
name: 'CountToDemo',
components: { countTo },
data() {
return {
@ -202,4 +211,3 @@ input {
}
</style>

View File

@ -14,7 +14,7 @@ import DndList from '@/components/DndList'
import { fetchList } from '@/api/article'
export default {
name: 'dndList-demo',
name: 'DndListDemo',
components: { DndList },
data() {
return {
@ -37,4 +37,3 @@ export default {
}
</script>

View File

@ -19,7 +19,7 @@
import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
export default {
name: 'dragDialog-demo',
name: 'DragDialogDemo',
directives: { elDragDialog },
data() {
return {

View File

@ -9,7 +9,7 @@
import Kanban from '@/components/Kanban'
export default {
name: 'dragKanban-demo',
name: 'DragKanbanDemo',
components: {
Kanban
},

View File

@ -14,7 +14,7 @@
import Dropzone from '@/components/Dropzone'
export default {
name: 'dropzone-demo',
name: 'DropzoneDemo',
components: { Dropzone },
methods: {
dropzoneS(file) {
@ -29,4 +29,3 @@ export default {
}
</script>

View File

@ -13,7 +13,7 @@ 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 {
name: 'jsonEditor-demo',
name: 'JsonEditorDemo',
components: { JsonEditor },
data() {
return {

View File

@ -27,7 +27,7 @@ const content = `
`
export default {
name: 'markdown-demo',
name: 'MarkdownDemo',
components: { MarkdownEditor },
data() {
return {
@ -46,4 +46,3 @@ export default {
}
</script>

View File

@ -104,7 +104,7 @@ import DropdownMenu from '@/components/Share/dropdownMenu'
import waves from '@/directive/waves/index.js' //
export default {
name: 'componentMixin-demo',
name: 'ComponentMixinDemo',
components: {
PanThumb,
MdInput,

View File

@ -27,7 +27,7 @@
import splitPane from 'vue-splitpane'
export default {
name: 'splitpane-demo',
name: 'SplitpaneDemo',
components: { splitPane },
methods: {
resize() {

View File

@ -92,12 +92,11 @@
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
export default {
name: 'sticky-demo',
name: 'StickyDemo',
components: { Sticky },
data() {
return {

View File

@ -15,7 +15,7 @@
import Tinymce from '@/components/Tinymce'
export default {
name: 'tinymce-demo',
name: 'TinymceDemo',
components: { Tinymce },
data() {
return {
@ -34,4 +34,3 @@ export default {
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<li class="todo" :class="{ completed: todo.done, editing: editing }">
<div class="view">
<input class="toggle"
<input
class="toggle"
type="checkbox"
:checked="todo.done"
@change="toggleTodo( todo)">
<label v-text="todo.text" @dblclick="editing = true"></label>
<button class="destroy" @click="deleteTodo( todo )"></button>
</div>
<input class="edit"
<input
class="edit"
v-show="editing"
v-focus="editing"
:value="todo.text"

View File

@ -9,7 +9,12 @@
<input class="toggle-all" id="toggle-all" type="checkbox" :checked="allChecked" @change="toggleAll({ done: !allChecked })">
<label for="toggle-all"></label>
<ul class="todo-list">
<todo @toggleTodo='toggleTodo' @editTodo='editTodo' @deleteTodo='deleteTodo' v-for="(todo, index) in filteredTodos" :key="index"
<todo
@toggleTodo='toggleTodo'
@editTodo='editTodo'
@deleteTodo='deleteTodo'
v-for="(todo, index) in filteredTodos"
:key="index"
:todo="todo"></todo>
</ul>
</section>

View File

@ -42,7 +42,6 @@
</div>
</template>
<script>
import GithubCorner from '@/components/GithubCorner'
import PanelGroup from './components/PanelGroup'
@ -74,7 +73,7 @@ const lineChartData = {
}
export default {
name: 'dashboard-admin',
name: 'DashboardAdmin',
components: {
GithubCorner,
PanelGroup,

View File

@ -22,7 +22,7 @@ import PanThumb from '@/components/PanThumb'
import GithubCorner from '@/components/GithubCorner'
export default {
name: 'dashboard-editor',
name: 'DashboardEditor',
components: { PanThumb, GithubCorner },
data() {
return {

View File

@ -10,7 +10,7 @@ import adminDashboard from './admin'
import editorDashboard from './editor'
export default {
name: 'dashboard',
name: 'Dashboard',
components: { adminDashboard, editorDashboard },
data() {
return {

View File

@ -9,7 +9,7 @@
import DropdownMenu from '@/components/Share/dropdownMenu'
export default {
name: 'documentation',
name: 'Documentation',
components: { DropdownMenu },
data() {
return {

View File

@ -8,6 +8,6 @@
<script>
export default {
name: 'errorTestA'
name: 'ErrorTestA'
}
</script>

View File

@ -21,7 +21,7 @@ import errorA from './errorTestA'
import errorB from './errorTestB'
export default {
name: 'errorLog',
name: 'ErrorLog',
components: { errorA, errorB }
}
</script>

View File

@ -30,7 +30,7 @@
import errGif from '@/assets/401_images/401.gif'
export default {
name: 'page401',
name: 'Page401',
data() {
return {
errGif: errGif + '?' + +new Date(),

View File

@ -23,7 +23,7 @@
<script>
export default {
name: 'page404',
name: 'Page404',
computed: {
message() {
return '网管说这个页面你不能进......'

View File

@ -43,7 +43,12 @@
<el-col :span="6">
<el-form-item label-width="60px" label="重要性:" class="postInfo-container-item">
<el-rate style="margin-top:8px;" v-model="postForm.importance" :max='3' :colors="['#99A9BF', '#F7BA2A', '#FF9900']" :low-threshold="1"
<el-rate
style="margin-top:8px;"
v-model="postForm.importance"
:max='3'
:colors="['#99A9BF', '#F7BA2A', '#FF9900']"
:low-threshold="1"
:high-threshold="3">
</el-rate>
</el-form-item>
@ -100,7 +105,7 @@ const defaultForm = {
}
export default {
name: 'articleDetail',
name: 'ArticleDetail',
components: { Tinymce, MDinput, Upload, Multiselect, Sticky, Warning, CommentDropdown, PlatformDropdown, SourceUrlDropdown },
props: {
isEdit: {

View File

@ -2,7 +2,8 @@
<p class="warn-content">
创建和编辑页面是不能被keep-alive 缓存的因为keep-alive 的include 目前不支持根据路由来缓存所以目前都是基于component name 来缓存的如果你想要实现缓存的效果可以使用localstorage 等游览器缓存方案或者不要使用keep-alive
的include直接缓存所有页面详情见
<a href="https://panjiachen.github.io/vue-element-admin-site/guide/essentials/tags-view.html"
<a
href="https://panjiachen.github.io/vue-element-admin-site/guide/essentials/tags-view.html"
target="_blank">文档</a>
</p>
</template>

View File

@ -6,7 +6,7 @@
import ArticleDetail from './components/ArticleDetail'
export default {
name: 'createForm',
name: 'CreateForm',
components: { ArticleDetail }
}
</script>

View File

@ -6,7 +6,7 @@
import ArticleDetail from './components/ArticleDetail'
export default {
name: 'editForm',
name: 'EditForm',
components: { ArticleDetail }
}
</script>

View File

@ -51,8 +51,15 @@
</el-table>
<div class="pagination-container">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listQuery.page"
:page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.page"
:page-sizes="[10,20,30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
@ -63,7 +70,7 @@
import { fetchList } from '@/api/article'
export default {
name: 'articleList',
name: 'ArticleList',
data() {
return {
list: null,

View File

@ -47,7 +47,7 @@ import { fetchList } from '@/api/article'
import { parseTime } from '@/utils'
export default {
name: 'exportExcel',
name: 'ExportExcel',
data() {
return {
list: null,

View File

@ -3,7 +3,14 @@
<!-- $t is vue-i18n global function to translate lang -->
<el-input style='width:340px;' :placeholder="$t('excel.placeholder')" prefix-icon="el-icon-document" v-model="filename"></el-input>
<el-button style='margin-bottom:20px' type="primary" icon="document" @click="handleDownload" :loading="downloadLoading">{{$t('excel.selectedExport')}}</el-button>
<el-table :data="list" v-loading="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row @selection-change="handleSelectionChange"
<el-table
:data="list"
v-loading="listLoading"
element-loading-text="拼命加载中"
border
fit
highlight-current-row
@selection-change="handleSelectionChange"
ref="multipleTable">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column align="center" label='Id' width="95">
@ -40,7 +47,7 @@
import { fetchList } from '@/api/article'
export default {
name: 'selectExcel',
name: 'SelectExcel',
data() {
return {
list: null,

View File

@ -12,7 +12,7 @@
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
export default {
name: 'uploadExcel',
name: 'UploadExcel',
components: { UploadExcelComponent },
data() {
return {

View File

@ -15,7 +15,7 @@ import 'driver.js/dist/driver.min.css' // import driver.js css
import steps from './defineSteps'
export default {
name: 'guide',
name: 'Guide',
data() {
return {
driver: null

View File

@ -20,7 +20,12 @@
<el-date-picker v-model="date" type="date" :placeholder="$t('i18nView.datePlaceholder')"></el-date-picker>
</div>
<div class="block">
<el-pagination background :current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next"
<el-pagination
background
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
layout="total, sizes, prev, pager, next"
:total="400">
</el-pagination>
</div>
@ -49,7 +54,7 @@ import local from './local'
const viewName = 'i18nView'
export default {
name: 'i18n',
name: 'I18n',
data() {
return {
date: '',

View File

@ -15,7 +15,7 @@ import { Navbar, Sidebar, AppMain, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'layout',
name: 'Layout',
components: {
Navbar,
Sidebar,

View File

@ -1,8 +1,14 @@
<template>
<div class="tags-view-container">
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)"
:to="tag" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
<router-link
ref='tag'
class="tags-view-item"
:class="isActive(tag)?'active':''"
v-for="tag in Array.from(visitedViews)"
:to="tag"
:key="tag.path"
@contextmenu.prevent.native="openMenu(tag,$event)">
{{generateTitle(tag.title)}}
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
</router-link>

View File

@ -1,10 +1,10 @@
<script>
export default {
name: 'authredirect',
created() {
const hash = window.location.search.slice(1)
window.opener.location.href = window.location.origin + '/login#' + hash
window.close()
}
export default {
name: 'Authredirect',
created() {
const hash = window.location.search.slice(1)
window.opener.location.href = window.location.origin + '/login#' + hash
window.close()
}
}
</script>

View File

@ -12,7 +12,12 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" :placeholder="$t('login.username')"
<el-input
name="username"
type="text"
v-model="loginForm.username"
autoComplete="on"
:placeholder="$t('login.username')"
/>
</el-form-item>
@ -20,7 +25,12 @@
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input name="password" :type="passwordType" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
<el-input
name="password"
:type="passwordType"
@keyup.enter.native="handleLogin"
v-model="loginForm.password"
autoComplete="on"
:placeholder="$t('login.password')" />
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
@ -59,7 +69,7 @@ import SocialSign from './socialsignin'
export default {
components: { LangSelect, SocialSign },
name: 'login',
name: 'Login',
data() {
const validateUsername = (rule, value, callback) => {
if (!isvalidUsername(value)) {
@ -144,7 +154,7 @@ export default {
<style rel="stylesheet/scss" lang="scss">
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg:#283443;
$light_gray:#eee;
$cursor: #fff;

View File

@ -13,7 +13,7 @@
import openWindow from '@/utils/openWindow'
export default {
name: 'social-signin',
name: 'SocialSignin',
methods: {
wechatHandleClick(thirdpart) {
this.$store.commit('SET_AUTH_TYPE', thirdpart)

View File

@ -36,7 +36,7 @@ import checkPermission from '@/utils/permission' // 权限判断函数
import SwitchRoles from './components/SwitchRoles'
export default{
name: 'directivePermission',
name: 'DirectivePermission',
components: { SwitchRoles },
directives: { permission },
data() {

View File

@ -8,7 +8,7 @@
import SwitchRoles from './components/SwitchRoles'
export default{
name: 'pagePermission',
name: 'PagePermission',
components: { SwitchRoles },
methods: {
handleRolesChange() {

View File

@ -5,7 +5,6 @@
</el-upload>
</template>
<script>
import { getToken } from '@/api/qiniu'
// token Access Key,Secret Key,buckettoken

View File

@ -25,7 +25,7 @@ import icons from './generateIconsView'
import clipboard from '@/utils/clipboard'
export default {
name: 'icons',
name: 'Icons',
data() {
return {
iconsMap: []

View File

@ -1,7 +1,11 @@
<template>
<el-table :data="list" border fit highlight-current-row style="width: 100%">
<el-table-column align="center" label="ID" width="65" v-loading="loading"
<el-table-column
align="center"
label="ID"
width="65"
v-loading="loading"
element-loading-text="请给我点时间!">
<template slot-scope="scope">
<span>{{scope.row.id}}</span>

View File

@ -17,7 +17,7 @@
import tabPane from './components/tabPane'
export default {
name: 'tab',
name: 'Tab',
components: { tabPane },
data() {
return {

View File

@ -21,7 +21,13 @@
<el-checkbox class="filter-item" style='margin-left:15px;' @change='tableKey=tableKey+1' v-model="showReviewer">{{$t('table.reviewer')}}</el-checkbox>
</div>
<el-table :key='tableKey' :data="list" v-loading="listLoading" border fit highlight-current-row
<el-table
:key='tableKey'
:data="list"
v-loading="listLoading"
border
fit
highlight-current-row
style="width: 100%;min-height:1000px;">
<el-table-column align="center" :label="$t('table.id')" width="65">
<template slot-scope="scope">
@ -151,7 +157,7 @@ const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
}, {})
export default {
name: 'complexTable',
name: 'ComplexTable',
directives: {
waves
},

View File

@ -64,7 +64,7 @@ import { fetchList } from '@/api/article'
import Sortable from 'sortablejs'
export default {
name: 'dragTable',
name: 'DragTable',
data() {
return {
list: null,

View File

@ -13,7 +13,7 @@ import fixedThead from './fixedThead'
import unfixedThead from './unfixedThead'
export default {
name: 'dynamicTable',
name: 'DynamicTable',
components: { fixedThead, unfixedThead }
}
</script>

View File

@ -58,7 +58,7 @@
import { fetchList } from '@/api/article'
export default {
name: 'inlineEditTable',
name: 'InlineEditTable',
data() {
return {
list: null,

View File

@ -16,7 +16,9 @@
<template slot-scope="scope">
<el-tooltip effect="dark" :content="scope.row.timeLine+'ms'" placement="left">
<div class="processContainer">
<div class="process" :style="{ width:scope.row._width * 500+'px',
<div
class="process"
:style="{ width:scope.row._width * 500+'px',
background:scope.row._width>0.5?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
marginLeft:scope.row._marginLeft * 500+'px' }">
<span style="display:inline-block"></span>
@ -43,7 +45,7 @@ import treeTable from '@/components/TreeTable'
import treeToArray from './customEval'
export default {
name: 'customTreeTableDemo',
name: 'CustomTreeTableDemo',
components: { treeTable },
data() {
return {

View File

@ -18,7 +18,7 @@
import treeTable from '@/components/TreeTable'
export default {
name: 'treeTableDemo',
name: 'TreeTableDemo',
components: { treeTable },
data() {
return {

View File

@ -58,7 +58,7 @@ import { toggleClass } from '@/utils'
import '@/assets/custom-theme/index.css' // the theme changed version element-ui css
export default {
name: 'theme',
name: 'Theme',
data() {
return {
theme: false,

View File

@ -38,7 +38,7 @@
import { fetchList } from '@/api/article'
export default {
name: 'exportZip',
name: 'ExportZip',
data() {
return {
list: null,