refactor: add eslint-plugin-vue && lint code (#976)
This commit is contained in:
parent
8f58baf617
commit
e5d4290938
28
.eslintrc.js
28
.eslintrc.js
|
@ -1,7 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: 'babel-eslint',
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint',
|
||||||
sourceType: 'module'
|
sourceType: 'module'
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
|
@ -9,22 +9,19 @@ module.exports = {
|
||||||
node: true,
|
node: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
},
|
},
|
||||||
extends: 'eslint:recommended',
|
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||||
// required to lint *.vue files
|
|
||||||
plugins: [
|
|
||||||
'html'
|
|
||||||
],
|
|
||||||
// check if imports actually resolve
|
|
||||||
'settings': {
|
|
||||||
'import/resolver': {
|
|
||||||
'webpack': {
|
|
||||||
'config': 'build/webpack.base.conf.js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// add your custom rules here
|
// add your custom rules here
|
||||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||||
'rules': {
|
rules: {
|
||||||
|
"vue/max-attributes-per-line": [2, {
|
||||||
|
"singleline": 10,
|
||||||
|
"multiline": {
|
||||||
|
"max": 1,
|
||||||
|
"allowFirstLine": false
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"vue/name-property-casing": ["error", "PascalCase"],
|
||||||
'accessor-pairs': 2,
|
'accessor-pairs': 2,
|
||||||
'arrow-spacing': [2, {
|
'arrow-spacing': [2, {
|
||||||
'before': true,
|
'before': true,
|
||||||
|
@ -196,4 +193,3 @@ module.exports = {
|
||||||
'array-bracket-spacing': [2, 'never']
|
'array-bracket-spacing': [2, 'never']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,10 +82,10 @@
|
||||||
"eslint": "4.19.1",
|
"eslint": "4.19.1",
|
||||||
"eslint-friendly-formatter": "4.0.1",
|
"eslint-friendly-formatter": "4.0.1",
|
||||||
"eslint-loader": "2.0.0",
|
"eslint-loader": "2.0.0",
|
||||||
"eslint-plugin-html": "4.0.5",
|
"eslint-plugin-vue": "4.7.1",
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"friendly-errors-webpack-plugin": "1.7.0",
|
"friendly-errors-webpack-plugin": "1.7.0",
|
||||||
"hash-sum": "^1.0.2",
|
"hash-sum": "1.0.2",
|
||||||
"html-webpack-plugin": "^4.0.0-alpha",
|
"html-webpack-plugin": "^4.0.0-alpha",
|
||||||
"husky": "0.14.3",
|
"husky": "0.14.3",
|
||||||
"lint-staged": "7.2.2",
|
"lint-staged": "7.2.2",
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view></router-view>
|
<router-view/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
name: 'App'
|
name: 'App'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<transition :name="transitionName">
|
<transition :name="transitionName">
|
||||||
<div class="back-to-ceiling" @click="backToTop" v-show="visible" :style="customStyle">
|
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
|
||||||
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height: 16px; width: 16px;">
|
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height: 16px; width: 16px;">
|
||||||
<title>回到顶部</title>
|
<title>回到顶部</title>
|
||||||
<g>
|
<g>
|
||||||
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd"></path>
|
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd"/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path" v-if='item.meta.title'>
|
<el-breadcrumb-item v-for="(item,index) in levelList" v-if="item.meta.title" :key="item.path">
|
||||||
<span v-if='item.redirect==="noredirect"||index==levelList.length-1' class="no-redirect">{{generateTitle(item.meta.title)}}</span>
|
<span v-if="item.redirect==="noredirect"||index==levelList.length-1" class="no-redirect">{{ generateTitle(item.meta.title) }}</span>
|
||||||
<router-link v-else :to="item.redirect||item.path">{{generateTitle(item.meta.title)}}</router-link>
|
<router-link v-else :to="item.redirect||item.path">{{ generateTitle(item.meta.title) }}</router-link>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
|
@ -13,9 +13,6 @@
|
||||||
import { generateTitle } from '@/utils/i18n'
|
import { generateTitle } from '@/utils/i18n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
|
||||||
this.getBreadcrumb()
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
levelList: null
|
levelList: null
|
||||||
|
@ -26,12 +23,15 @@ export default {
|
||||||
this.getBreadcrumb()
|
this.getBreadcrumb()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getBreadcrumb()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateTitle,
|
generateTitle,
|
||||||
getBreadcrumb() {
|
getBreadcrumb() {
|
||||||
let matched = this.$route.matched.filter(item => item.name)
|
let matched = this.$route.matched.filter(item => item.name)
|
||||||
const first = matched[0]
|
const first = matched[0]
|
||||||
if (first && first.name !== 'dashboard') {
|
if (first && first.name.trim().toLocaleLowerCase() !== 'Dashboard'.toLocaleLowerCase()) {
|
||||||
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
|
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
|
||||||
}
|
}
|
||||||
this.levelList = matched
|
this.levelList = matched
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :id="id" :style="{height:height,width:width}"></div>
|
<div :class="className" :id="id" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :id="id" :style="{height:height,width:width}"></div>
|
<div :class="className" :id="id" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :id="id" :style="{height:height,width:width}"></div>
|
<div :class="className" :id="id" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dndList">
|
<div class="dndList">
|
||||||
<div class="dndList-list" :style="{width:width1}">
|
<div :style="{width:width1}" class="dndList-list">
|
||||||
<h3>{{list1Title}}</h3>
|
<h3>{{ list1Title }}</h3>
|
||||||
<draggable :list="list1" class="dragArea" :options="{group:'article'}">
|
<draggable :list="list1" :options="{group:'article'}" class="dragArea">
|
||||||
<div class="list-complete-item" v-for="element in list1" :key='element.id'>
|
<div v-for="element in list1" :key="element.id" class="list-complete-item">
|
||||||
<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)">
|
||||||
<i style="color:#ff4949" class="el-icon-delete"></i>
|
<i style="color:#ff4949" class="el-icon-delete"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
</div>
|
</div>
|
||||||
<div class="dndList-list" :style="{width:width2}">
|
<div :style="{width:width2}" class="dndList-list">
|
||||||
<h3>{{list2Title}}</h3>
|
<h3>{{ list2Title }}</h3>
|
||||||
<draggable :list="filterList2" class="dragArea" :options="{group:'article'}">
|
<draggable :list="filterList2" :options="{group:'article'}" class="dragArea">
|
||||||
<div class="list-complete-item" v-for="element in filterList2" :key='element.id'>
|
<div v-for="element in filterList2" :key="element.id" class="list-complete-item">
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,16 +30,6 @@ import draggable from 'vuedraggable'
|
||||||
export default {
|
export default {
|
||||||
name: 'DndList',
|
name: 'DndList',
|
||||||
components: { draggable },
|
components: { draggable },
|
||||||
computed: {
|
|
||||||
filterList2() {
|
|
||||||
return this.list2.filter(v => {
|
|
||||||
if (this.isNotInList1(v)) {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
list1: {
|
list1: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -70,6 +60,16 @@ export default {
|
||||||
default: '48%'
|
default: '48%'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
filterList2() {
|
||||||
|
return this.list2.filter(v => {
|
||||||
|
if (this.isNotInList1(v)) {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isNotInList1(v) {
|
isNotInList1(v) {
|
||||||
return this.list1.every(k => v.id !== k.id)
|
return this.list1.every(k => v.id !== k.id)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :ref="id" :action="url" class="dropzone" :id="id">
|
<div :ref="id" :action="url" :id="id" class="dropzone">
|
||||||
<input type="file" name="file">
|
<input type="file" name="file">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -12,12 +12,81 @@ import 'dropzone/dist/dropzone.css'
|
||||||
Dropzone.autoDiscover = false
|
Dropzone.autoDiscover = false
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
clickable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
defaultMsg: {
|
||||||
|
type: String,
|
||||||
|
default: '上传图片'
|
||||||
|
},
|
||||||
|
acceptedFiles: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
thumbnailHeight: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
thumbnailWidth: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
showRemoveLink: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
maxFilesize: {
|
||||||
|
type: Number,
|
||||||
|
default: 2
|
||||||
|
},
|
||||||
|
maxFiles: {
|
||||||
|
type: Number,
|
||||||
|
default: 3
|
||||||
|
},
|
||||||
|
autoProcessQueue: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
useCustomDropzoneOptions: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
defaultImg: {
|
||||||
|
default: '',
|
||||||
|
type: [String, Array]
|
||||||
|
},
|
||||||
|
couldPaste: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dropzone: '',
|
dropzone: '',
|
||||||
initOnce: true
|
initOnce: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
defaultImg(val) {
|
||||||
|
if (val.length === 0) {
|
||||||
|
this.initOnce = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.initOnce) return
|
||||||
|
this.initImages(val)
|
||||||
|
this.initOnce = false
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const element = document.getElementById(this.id)
|
const element = document.getElementById(this.id)
|
||||||
const vm = this
|
const vm = this
|
||||||
|
@ -95,6 +164,10 @@ export default {
|
||||||
vm.$emit('dropzone-successmultiple', file, error, xhr)
|
vm.$emit('dropzone-successmultiple', file, error, xhr)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
destroyed() {
|
||||||
|
document.removeEventListener('paste', this.pasteImg)
|
||||||
|
this.dropzone.destroy()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeAllFiles() {
|
removeAllFiles() {
|
||||||
this.dropzone.removeAllFiles(true)
|
this.dropzone.removeAllFiles(true)
|
||||||
|
@ -128,76 +201,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
document.removeEventListener('paste', this.pasteImg)
|
|
||||||
this.dropzone.destroy()
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
defaultImg(val) {
|
|
||||||
if (val.length === 0) {
|
|
||||||
this.initOnce = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.initOnce) return
|
|
||||||
this.initImages(val)
|
|
||||||
this.initOnce = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
url: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
clickable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
defaultMsg: {
|
|
||||||
type: String,
|
|
||||||
default: '上传图片'
|
|
||||||
},
|
|
||||||
acceptedFiles: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
thumbnailHeight: {
|
|
||||||
type: Number,
|
|
||||||
default: 200
|
|
||||||
},
|
|
||||||
thumbnailWidth: {
|
|
||||||
type: Number,
|
|
||||||
default: 200
|
|
||||||
},
|
|
||||||
showRemoveLink: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
maxFilesize: {
|
|
||||||
type: Number,
|
|
||||||
default: 2
|
|
||||||
},
|
|
||||||
maxFiles: {
|
|
||||||
type: Number,
|
|
||||||
default: 3
|
|
||||||
},
|
|
||||||
autoProcessQueue: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
useCustomDropzoneOptions: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
defaultImg: {
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
couldPaste: {
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,15 +2,24 @@
|
||||||
<div v-if="errorLogs.length>0">
|
<div v-if="errorLogs.length>0">
|
||||||
<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="danger" class="bug-btn">
|
<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"
|
<svg
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128">
|
t="1492682037685"
|
||||||
<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"
|
class="bug-svg"
|
||||||
p-id="1864"></path>
|
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"/>
|
||||||
</svg>
|
</svg>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
|
|
||||||
<el-dialog title="Error Log" :visible.sync="dialogTableVisible" width="80%">
|
<el-dialog :visible.sync="dialogTableVisible" title="Error Log" width="80%">
|
||||||
<el-table :data="errorLogs" border>
|
<el-table :data="errorLogs" border>
|
||||||
<el-table-column label="Message">
|
<el-table-column label="Message">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -18,21 +27,21 @@
|
||||||
<span class="message-title">Msg:</span>
|
<span class="message-title">Msg:</span>
|
||||||
<el-tag type="danger">{{ scope.row.err.message }}</el-tag>
|
<el-tag type="danger">{{ scope.row.err.message }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
<span class="message-title" style="padding-right: 10px;">Info: </span>
|
<span class="message-title" style="padding-right: 10px;">Info: </span>
|
||||||
<el-tag type="warning">{{scope.row.vm.$vnode.tag}} error in {{scope.row.info}}</el-tag>
|
<el-tag type="warning">{{ scope.row.vm.$vnode.tag }} error in {{ scope.row.info }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
<span class="message-title" style="padding-right: 16px;">Url: </span>
|
<span class="message-title" style="padding-right: 16px;">Url: </span>
|
||||||
<el-tag type="success">{{scope.row.url}}</el-tag>
|
<el-tag type="success">{{ scope.row.url }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Stack">
|
<el-table-column label="Stack">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.err.stack}}
|
{{ scope.row.err.stack }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -43,7 +52,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'errorLog',
|
name: 'ErrorLog',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogTableVisible: false
|
dialogTableVisible: false
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<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:#40c9c6; color:#fff;"
|
<svg
|
||||||
|
width="80"
|
||||||
|
height="80"
|
||||||
|
viewBox="0 0 250 250"
|
||||||
|
style="fill:#40c9c6; color:#fff;"
|
||||||
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 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
|
||||||
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></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="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"
|
||||||
fill="currentColor" class="octo-body"></path>
|
style="transform-origin: 130px 106px;"
|
||||||
|
class="octo-arm"/>
|
||||||
|
<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"/>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,20 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<svg t="1492500959545" @click="toggleClick" class="hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024"
|
<svg
|
||||||
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">
|
:class="{'is-active':isActive}"
|
||||||
<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"
|
t="1492500959545"
|
||||||
p-id="1692"></path>
|
class="hamburger"
|
||||||
<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"
|
style=""
|
||||||
p-id="1693"></path>
|
viewBox="0 0 1024 1024"
|
||||||
<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"
|
version="1.1"
|
||||||
p-id="1694"></path>
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
p-id="1691"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="64"
|
||||||
|
height="64"
|
||||||
|
@click="toggleClick">
|
||||||
|
<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
|
||||||
|
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
|
||||||
|
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"/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'hamburger',
|
name: 'Hamburger',
|
||||||
props: {
|
props: {
|
||||||
isActive: {
|
isActive: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -1,109 +1,113 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="vue-image-crop-upload" v-show="value">
|
<div v-show="value" class="vue-image-crop-upload">
|
||||||
<div class="vicp-wrap">
|
<div class="vicp-wrap">
|
||||||
<div class="vicp-close" @click="off">
|
<div class="vicp-close" @click="off">
|
||||||
<i class="vicp-icon4"></i>
|
<i class="vicp-icon4"/>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vicp-step1" v-show="step == 1">
|
|
||||||
<div class="vicp-drop-area" @dragleave="preventDefault" @dragover="preventDefault" @dragenter="preventDefault" @click="handleClick" @drop="handleChange">
|
|
||||||
<i class="vicp-icon1" v-show="loading != 1">
|
|
||||||
<i class="vicp-icon1-arrow"></i>
|
|
||||||
<i class="vicp-icon1-body"></i>
|
|
||||||
<i class="vicp-icon1-bottom"></i>
|
|
||||||
</i>
|
|
||||||
<span class="vicp-hint" v-show="loading !== 1">{{ lang.hint }}</span>
|
|
||||||
<span class="vicp-no-supported-hint" v-show="!isSupported">{{ lang.noSupported }}</span>
|
|
||||||
<input type="file" v-show="false" v-if="step == 1" @change="handleChange" ref="fileinput">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-error" v-show="hasError">
|
|
||||||
<i class="vicp-icon2"></i> {{ errorMsg }}
|
|
||||||
</div>
|
|
||||||
<div class="vicp-operate">
|
|
||||||
<a @click="off" @mousedown="ripple">{{ lang.btn.off }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vicp-step2" v-if="step == 2">
|
<div v-show="step == 1" class="vicp-step1">
|
||||||
<div class="vicp-crop">
|
<div class="vicp-drop-area" @dragleave="preventDefault" @dragover="preventDefault" @dragenter="preventDefault" @click="handleClick" @drop="handleChange">
|
||||||
<div class="vicp-crop-left" v-show="true">
|
<i v-show="loading != 1" class="vicp-icon1">
|
||||||
<div class="vicp-img-container">
|
<i class="vicp-icon1-arrow"/>
|
||||||
<img :src="sourceImgUrl" :style="sourceImgStyle" class="vicp-img" draggable="false"
|
<i class="vicp-icon1-body"/>
|
||||||
@drag="preventDefault"
|
<i class="vicp-icon1-bottom"/>
|
||||||
@dragstart="preventDefault"
|
</i>
|
||||||
@dragend="preventDefault"
|
<span v-show="loading !== 1" class="vicp-hint">{{ lang.hint }}</span>
|
||||||
@dragleave="preventDefault"
|
<span v-show="!isSupported" class="vicp-no-supported-hint">{{ lang.noSupported }}</span>
|
||||||
@dragover="preventDefault"
|
<input v-show="false" v-if="step == 1" ref="fileinput" type="file" @change="handleChange">
|
||||||
@dragenter="preventDefault"
|
|
||||||
@drop="preventDefault"
|
|
||||||
@touchstart="imgStartMove"
|
|
||||||
@touchmove="imgMove"
|
|
||||||
@touchend="createImg"
|
|
||||||
@touchcancel="createImg"
|
|
||||||
@mousedown="imgStartMove"
|
|
||||||
@mousemove="imgMove"
|
|
||||||
@mouseup="createImg"
|
|
||||||
@mouseout="createImg"
|
|
||||||
ref="img">
|
|
||||||
<div class="vicp-img-shade vicp-img-shade-1" :style="sourceImgShadeStyle"></div>
|
|
||||||
<div class="vicp-img-shade vicp-img-shade-2" :style="sourceImgShadeStyle"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vicp-range">
|
|
||||||
<input type="range" :value="scale.range" step="1" min="0" max="100" @input="zoomChange">
|
|
||||||
<i @mousedown="startZoomSub" @mouseout="endZoomSub" @mouseup="endZoomSub" class="vicp-icon5"></i>
|
|
||||||
<i @mousedown="startZoomAdd" @mouseout="endZoomAdd" @mouseup="endZoomAdd" class="vicp-icon6"></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vicp-rotate" v-if="!noRotate">
|
|
||||||
<i @mousedown="startRotateLeft" @mouseout="endRotate" @mouseup="endRotate">↺</i>
|
|
||||||
<i @mousedown="startRotateRight" @mouseout="endRotate" @mouseup="endRotate">↻</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-crop-right" v-show="true">
|
<div v-show="hasError" class="vicp-error">
|
||||||
<div class="vicp-preview">
|
<i class="vicp-icon2"/> {{ errorMsg }}
|
||||||
<div class="vicp-preview-item" v-if="!noSquare">
|
</div>
|
||||||
<img :src="createImgUrl" :style="previewStyle">
|
<div class="vicp-operate">
|
||||||
<span>{{ lang.preview }}</span>
|
<a @click="off" @mousedown="ripple">{{ lang.btn.off }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="step == 2" class="vicp-step2">
|
||||||
|
<div class="vicp-crop">
|
||||||
|
<div v-show="true" class="vicp-crop-left">
|
||||||
|
<div class="vicp-img-container">
|
||||||
|
<img
|
||||||
|
ref="img"
|
||||||
|
:src="sourceImgUrl"
|
||||||
|
:style="sourceImgStyle"
|
||||||
|
class="vicp-img"
|
||||||
|
draggable="false"
|
||||||
|
@drag="preventDefault"
|
||||||
|
@dragstart="preventDefault"
|
||||||
|
@dragend="preventDefault"
|
||||||
|
@dragleave="preventDefault"
|
||||||
|
@dragover="preventDefault"
|
||||||
|
@dragenter="preventDefault"
|
||||||
|
@drop="preventDefault"
|
||||||
|
@touchstart="imgStartMove"
|
||||||
|
@touchmove="imgMove"
|
||||||
|
@touchend="createImg"
|
||||||
|
@touchcancel="createImg"
|
||||||
|
@mousedown="imgStartMove"
|
||||||
|
@mousemove="imgMove"
|
||||||
|
@mouseup="createImg"
|
||||||
|
@mouseout="createImg">
|
||||||
|
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-1"/>
|
||||||
|
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-2"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-preview-item vicp-preview-item-circle" v-if="!noCircle">
|
|
||||||
<img :src="createImgUrl" :style="previewStyle">
|
<div class="vicp-range">
|
||||||
<span>{{ lang.preview }}</span>
|
<input :value="scale.range" type="range" step="1" min="0" max="100" @input="zoomChange">
|
||||||
|
<i class="vicp-icon5" @mousedown="startZoomSub" @mouseout="endZoomSub" @mouseup="endZoomSub"/>
|
||||||
|
<i class="vicp-icon6" @mousedown="startZoomAdd" @mouseout="endZoomAdd" @mouseup="endZoomAdd"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!noRotate" class="vicp-rotate">
|
||||||
|
<i @mousedown="startRotateLeft" @mouseout="endRotate" @mouseup="endRotate">↺</i>
|
||||||
|
<i @mousedown="startRotateRight" @mouseout="endRotate" @mouseup="endRotate">↻</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-show="true" class="vicp-crop-right">
|
||||||
|
<div class="vicp-preview">
|
||||||
|
<div v-if="!noSquare" class="vicp-preview-item">
|
||||||
|
<img :src="createImgUrl" :style="previewStyle">
|
||||||
|
<span>{{ lang.preview }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="!noCircle" class="vicp-preview-item vicp-preview-item-circle">
|
||||||
|
<img :src="createImgUrl" :style="previewStyle">
|
||||||
|
<span>{{ lang.preview }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="vicp-operate">
|
||||||
|
<a @click="setStep(1)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
||||||
|
<a class="vicp-operate-btn" @click="prepareUpload" @mousedown="ripple">{{ lang.btn.save }}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-operate">
|
|
||||||
<a @click="setStep(1)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
|
||||||
<a class="vicp-operate-btn" @click="prepareUpload" @mousedown="ripple">{{ lang.btn.save }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="vicp-step3" v-if="step == 3">
|
<div v-if="step == 3" class="vicp-step3">
|
||||||
<div class="vicp-upload">
|
<div class="vicp-upload">
|
||||||
<span class="vicp-loading" v-show="loading === 1">{{ lang.loading }}</span>
|
<span v-show="loading === 1" class="vicp-loading">{{ lang.loading }}</span>
|
||||||
<div class="vicp-progress-wrap">
|
<div class="vicp-progress-wrap">
|
||||||
<span class="vicp-progress" v-show="loading === 1" :style="progressStyle"></span>
|
<span v-show="loading === 1" :style="progressStyle" class="vicp-progress"/>
|
||||||
|
</div>
|
||||||
|
<div v-show="hasError" class="vicp-error">
|
||||||
|
<i class="vicp-icon2"/> {{ errorMsg }}
|
||||||
|
</div>
|
||||||
|
<div v-show="loading === 2" class="vicp-success">
|
||||||
|
<i class="vicp-icon3"/> {{ lang.success }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-error" v-show="hasError">
|
<div class="vicp-operate">
|
||||||
<i class="vicp-icon2"></i> {{ errorMsg }}
|
<a @click="setStep(2)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
||||||
</div>
|
<a @click="off" @mousedown="ripple">{{ lang.btn.close }}</a>
|
||||||
<div class="vicp-success" v-show="loading === 2">
|
|
||||||
<i class="vicp-icon3"></i> {{ lang.success }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="vicp-operate">
|
<canvas v-show="false" ref="canvas" :width="width" :height="height"/>
|
||||||
<a @click="setStep(2)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
|
||||||
<a @click="off" @mousedown="ripple">{{ lang.btn.close }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<canvas v-show="false" :width="width" :height="height" ref="canvas"></canvas>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
'use strict'
|
'use strict'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import language from './utils/language.js'
|
import language from './utils/language.js'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="json-editor">
|
<div class="json-editor">
|
||||||
<textarea ref="textarea"></textarea>
|
<textarea ref="textarea"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -15,13 +15,14 @@ import 'codemirror/addon/lint/lint'
|
||||||
import 'codemirror/addon/lint/json-lint'
|
import 'codemirror/addon/lint/json-lint'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'jsonEditor',
|
name: 'JsonEditor',
|
||||||
|
/* eslint-disable vue/require-prop-types */
|
||||||
|
props: ['value'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
jsonEditor: false
|
jsonEditor: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ['value'],
|
|
||||||
watch: {
|
watch: {
|
||||||
value(value) {
|
value(value) {
|
||||||
const editor_value = this.jsonEditor.getValue()
|
const editor_value = this.jsonEditor.getValue()
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="board-column">
|
<div class="board-column">
|
||||||
<div class="board-column-header">
|
<div class="board-column-header">
|
||||||
{{headerText}}
|
{{ headerText }}
|
||||||
</div>
|
</div>
|
||||||
<draggable
|
<draggable
|
||||||
class="board-column-content"
|
|
||||||
:list="list"
|
:list="list"
|
||||||
:options="options">
|
:options="options"
|
||||||
<div class="board-item" v-for="element in list" :key="element.id">
|
class="board-column-content">
|
||||||
{{element.name}} {{element.id}}
|
<div v-for="element in list" :key="element.id" class="board-item">
|
||||||
|
{{ element.name }} {{ element.id }}
|
||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dragKanban-demo',
|
name: 'DragKanbanDemo',
|
||||||
components: {
|
components: {
|
||||||
draggable
|
draggable
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" class='international' @command="handleSetLanguage">
|
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
|
||||||
<div>
|
<div>
|
||||||
<svg-icon class-name='international-icon' icon-class="language" />
|
<svg-icon class-name="international-icon" icon-class="language" />
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="zh" :disabled="language==='zh'">中文</el-dropdown-item>
|
<el-dropdown-item :disabled="language==='zh'" command="zh">中文</el-dropdown-item>
|
||||||
<el-dropdown-item command="en" :disabled="language==='en'">English</el-dropdown-item>
|
<el-dropdown-item :disabled="language==='en'" command="en">English</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
@ -38,4 +38,3 @@ export default {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,103 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="material-input__component" :class="computedClasses">
|
<div :class="computedClasses" class="material-input__component">
|
||||||
<div :class="{iconClass:icon}">
|
<div :class="{iconClass:icon}">
|
||||||
<i class="el-input__icon material-input__icon" :class="['el-icon-' + icon]" v-if="icon"></i>
|
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon"/>
|
||||||
<input v-if="type === 'email'" type="email" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
<input
|
||||||
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
|
v-if="type === 'email'"
|
||||||
@blur="handleMdBlur" @input="handleModelInput">
|
:name="name"
|
||||||
<input v-if="type === 'url'" type="url" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
:placeholder="fillPlaceHolder"
|
||||||
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
|
v-model="currentValue"
|
||||||
@blur="handleMdBlur" @input="handleModelInput">
|
:readonly="readonly"
|
||||||
<input v-if="type === 'number'" type="number" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
:disabled="disabled"
|
||||||
:step="step" :readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :max="max" :min="min" :minlength="minlength"
|
:autoComplete="autoComplete"
|
||||||
:maxlength="maxlength" :required="required" @focus="handleMdFocus" @blur="handleMdBlur" @input="handleModelInput">
|
:required="required"
|
||||||
<input v-if="type === 'password'" type="password" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
type="email"
|
||||||
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :max="max" :min="min" :required="required" @focus="handleMdFocus"
|
class="material-input"
|
||||||
@blur="handleMdBlur" @input="handleModelInput">
|
@focus="handleMdFocus"
|
||||||
<input v-if="type === 'tel'" type="tel" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
@blur="handleMdBlur"
|
||||||
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :required="required" @focus="handleMdFocus"
|
@input="handleModelInput">
|
||||||
@blur="handleMdBlur" @input="handleModelInput">
|
<input
|
||||||
<input v-if="type === 'text'" type="text" class="material-input" :name="name" :placeholder="fillPlaceHolder" v-model="currentValue"
|
v-if="type === 'url'"
|
||||||
:readonly="readonly" :disabled="disabled" :autoComplete="autoComplete" :minlength="minlength" :maxlength="maxlength"
|
:name="name"
|
||||||
:required="required" @focus="handleMdFocus" @blur="handleMdBlur" @input="handleModelInput">
|
:placeholder="fillPlaceHolder"
|
||||||
<span class="material-input-bar"></span>
|
v-model="currentValue"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:autoComplete="autoComplete"
|
||||||
|
:required="required"
|
||||||
|
type="url"
|
||||||
|
class="material-input"
|
||||||
|
@focus="handleMdFocus"
|
||||||
|
@blur="handleMdBlur"
|
||||||
|
@input="handleModelInput">
|
||||||
|
<input
|
||||||
|
v-if="type === 'number'"
|
||||||
|
: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"
|
||||||
|
type="number"
|
||||||
|
class="material-input"
|
||||||
|
@focus="handleMdFocus"
|
||||||
|
@blur="handleMdBlur"
|
||||||
|
@input="handleModelInput">
|
||||||
|
<input
|
||||||
|
v-if="type === 'password'"
|
||||||
|
:name="name"
|
||||||
|
:placeholder="fillPlaceHolder"
|
||||||
|
v-model="currentValue"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:autoComplete="autoComplete"
|
||||||
|
:max="max"
|
||||||
|
:min="min"
|
||||||
|
:required="required"
|
||||||
|
type="password"
|
||||||
|
class="material-input"
|
||||||
|
@focus="handleMdFocus"
|
||||||
|
@blur="handleMdBlur"
|
||||||
|
@input="handleModelInput">
|
||||||
|
<input
|
||||||
|
v-if="type === 'tel'"
|
||||||
|
:name="name"
|
||||||
|
:placeholder="fillPlaceHolder"
|
||||||
|
v-model="currentValue"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:autoComplete="autoComplete"
|
||||||
|
:required="required"
|
||||||
|
type="tel"
|
||||||
|
class="material-input"
|
||||||
|
@focus="handleMdFocus"
|
||||||
|
@blur="handleMdBlur"
|
||||||
|
@input="handleModelInput">
|
||||||
|
<input
|
||||||
|
v-if="type === 'text'"
|
||||||
|
:name="name"
|
||||||
|
:placeholder="fillPlaceHolder"
|
||||||
|
v-model="currentValue"
|
||||||
|
:readonly="readonly"
|
||||||
|
:disabled="disabled"
|
||||||
|
:autoComplete="autoComplete"
|
||||||
|
:minlength="minlength"
|
||||||
|
:maxlength="maxlength"
|
||||||
|
:required="required"
|
||||||
|
type="text"
|
||||||
|
class="material-input"
|
||||||
|
@focus="handleMdFocus"
|
||||||
|
@blur="handleMdBlur"
|
||||||
|
@input="handleModelInput">
|
||||||
|
<span class="material-input-bar"/>
|
||||||
<label class="material-label">
|
<label class="material-label">
|
||||||
<slot></slot>
|
<slot/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,8 +107,9 @@
|
||||||
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
|
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'md-input',
|
name: 'MdInput',
|
||||||
props: {
|
props: {
|
||||||
|
/* eslint-disable */
|
||||||
icon: String,
|
icon: String,
|
||||||
name: String,
|
name: String,
|
||||||
type: {
|
type: {
|
||||||
|
@ -62,6 +138,13 @@ export default {
|
||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentValue: this.value,
|
||||||
|
focus: false,
|
||||||
|
fillPlaceHolder: null
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
computedClasses() {
|
computedClasses() {
|
||||||
return {
|
return {
|
||||||
|
@ -76,13 +159,6 @@ export default {
|
||||||
this.currentValue = newValue
|
this.currentValue = newValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
currentValue: this.value,
|
|
||||||
focus: false,
|
|
||||||
fillPlaceHolder: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
handleModelInput(event) {
|
handleModelInput(event) {
|
||||||
const value = event.target.value
|
const value = event.target.value
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="simplemde-container" :style="{height:height+'px',zIndex:zIndex}">
|
<div :style="{height:height+'px',zIndex:zIndex}" class="simplemde-container">
|
||||||
<textarea :id="id">
|
<textarea :id="id"/>
|
||||||
</textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -11,11 +10,16 @@ import 'simplemde/dist/simplemde.min.css'
|
||||||
import SimpleMDE from 'simplemde'
|
import SimpleMDE from 'simplemde'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'simplemde-md',
|
name: 'SimplemdeMd',
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
id: {
|
id: {
|
||||||
type: String
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: 'markdown-editor-' + +new Date()
|
||||||
},
|
},
|
||||||
autofocus: {
|
autofocus: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -34,7 +38,10 @@ export default {
|
||||||
default: 10
|
default: 10
|
||||||
},
|
},
|
||||||
toolbar: {
|
toolbar: {
|
||||||
type: Array
|
type: Array,
|
||||||
|
default: function() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -51,10 +58,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.simplemde = new SimpleMDE({
|
this.simplemde = new SimpleMDE({
|
||||||
element: document.getElementById(this.id || 'markdown-editor-' + +new Date()),
|
element: document.getElementById(this.id),
|
||||||
autoDownloadFontAwesome: false,
|
autoDownloadFontAwesome: false,
|
||||||
autofocus: this.autofocus,
|
autofocus: this.autofocus,
|
||||||
toolbar: this.toolbar,
|
toolbar: this.toolbar.length > 0 ? this.toolbar : undefined,
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
insertTexts: {
|
insertTexts: {
|
||||||
link: ['[', ']( )']
|
link: ['[', ']( )']
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="pan-item" :style="{zIndex:zIndex,height:height,width:width}">
|
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
|
||||||
<div class="pan-info">
|
<div class="pan-info">
|
||||||
<div class="pan-info-roles-container">
|
<div class="pan-info-roles-container">
|
||||||
<slot></slot>
|
<slot/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img class="pan-thumb" :src="image">
|
<img :src="image" class="pan-thumb">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,28 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<svg t="1508738709248" @click='click' class="screenfull-svg" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
<svg
|
||||||
p-id="2069" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32">
|
t="1508738709248"
|
||||||
<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"
|
class="screenfull-svg"
|
||||||
p-id="2070"></path>
|
viewBox="0 0 1024 1024"
|
||||||
<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"
|
version="1.1"
|
||||||
p-id="2071"></path>
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<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="2069"
|
||||||
p-id="2072"></path>
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
<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"
|
width="32"
|
||||||
p-id="2073"></path>
|
height="32"
|
||||||
|
@click="click">
|
||||||
|
<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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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"/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,7 +31,7 @@
|
||||||
import screenfull from 'screenfull'
|
import screenfull from 'screenfull'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'screenfull',
|
name: 'Screenfull',
|
||||||
props: {
|
props: {
|
||||||
width: {
|
width: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="scroll-container" ref="scrollContainer" @wheel.prevent="handleScroll">
|
<div ref="scrollContainer" class="scroll-container" @wheel.prevent="handleScroll">
|
||||||
<div class="scroll-wrapper" ref="scrollWrapper" :style="{left: left + 'px'}">
|
<div ref="scrollWrapper" :style="{left: left + 'px'}" class="scroll-wrapper">
|
||||||
<slot></slot>
|
<slot/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
const padding = 15 // tag's padding
|
const padding = 15 // tag's padding
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'scrollPane',
|
name: 'ScrollPane',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
left: 0
|
left: 0
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="share-dropdown-menu" :class="{active:isActive}">
|
<div :class="{active:isActive}" class="share-dropdown-menu">
|
||||||
<div class="share-dropdown-menu-wrapper">
|
<div class="share-dropdown-menu-wrapper">
|
||||||
<span class="share-dropdown-menu-title" @click.self="clickTitle">{{title}}</span>
|
<span class="share-dropdown-menu-title" @click.self="clickTitle">{{ title }}</span>
|
||||||
<div class="share-dropdown-menu-item" v-for="(item,index) of items" :key='index'>
|
<div v-for="(item,index) of items" :key="index" class="share-dropdown-menu-item">
|
||||||
<a v-if="item.href" :href="item.href" target="_blank">{{item.title}}</a>
|
<a v-if="item.href" :href="item.href" target="_blank">{{ item.title }}</a>
|
||||||
<span v-else>{{item.title}}</span>
|
<span v-else>{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,10 @@
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
items: {
|
items: {
|
||||||
type: Array
|
type: Array,
|
||||||
|
default: function() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -21,7 +21,8 @@ export default {
|
||||||
default: 1
|
default: 1
|
||||||
},
|
},
|
||||||
className: {
|
className: {
|
||||||
type: String
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<svg :class="svgClass" aria-hidden="true">
|
<svg :class="svgClass" aria-hidden="true">
|
||||||
<use :xlink:href="iconName"></use>
|
<use :xlink:href="iconName"/>
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'svg-icon',
|
name: 'SvgIcon',
|
||||||
props: {
|
props: {
|
||||||
iconClass: {
|
iconClass: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
className: {
|
className: {
|
||||||
type: String
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<a class="link--mallki" :class="className" href="#">
|
<a :class="className" class="link--mallki" href="#">
|
||||||
{{text}}
|
{{ text }}
|
||||||
<span :data-letters="text"></span>
|
<span :data-letters="text"/>
|
||||||
<span :data-letters="text"></span>
|
<span :data-letters="text"/>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String
|
type: String,
|
||||||
|
default: ''
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -20,7 +21,6 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Mallki */
|
/* Mallki */
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
|
v-model="theme"
|
||||||
class="theme-picker"
|
class="theme-picker"
|
||||||
popper-class="theme-picker-dropdown"
|
popper-class="theme-picker-dropdown"/>
|
||||||
v-model="theme"></el-color-picker>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="upload-container">
|
<div class="upload-container">
|
||||||
<el-button icon='el-icon-upload' size="mini" :style="{background:color,borderColor:color}" @click=" dialogVisible=true" type="primary">上传图片
|
<el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">上传图片
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dialog :visible.sync="dialogVisible">
|
<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"
|
<el-upload
|
||||||
list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="beforeUpload">
|
:multiple="true"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="true"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
class="editor-slide-upload"
|
||||||
|
action="https://httpbin.org/post"
|
||||||
|
list-type="picture-card">
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
@ -17,7 +25,7 @@
|
||||||
// import { getToken } from 'api/qiniu'
|
// import { getToken } from 'api/qiniu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editorSlideUpload',
|
name: 'EditorSlideUpload',
|
||||||
props: {
|
props: {
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="tinymce-container editor-container" :class="{fullscreen:fullscreen}">
|
<div :class="{fullscreen:fullscreen}" class="tinymce-container editor-container">
|
||||||
<textarea class="tinymce-textarea" :id="tinymceId"></textarea>
|
<textarea :id="tinymceId" class="tinymce-textarea"/>
|
||||||
<div class="editor-custom-btn-container">
|
<div class="editor-custom-btn-container">
|
||||||
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK"></editorImage>
|
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,11 +13,12 @@ import plugins from './plugins'
|
||||||
import toolbar from './toolbar'
|
import toolbar from './toolbar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'tinymce',
|
name: 'Tinymce',
|
||||||
components: { editorImage },
|
components: { editorImage },
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
type: String
|
type: String,
|
||||||
|
default: 'vue-tinymce-' + +new Date()
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -31,6 +32,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
menubar: {
|
menubar: {
|
||||||
|
type: String,
|
||||||
default: 'file edit insert view format table'
|
default: 'file edit insert view format table'
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
|
@ -43,7 +45,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
hasChange: false,
|
hasChange: false,
|
||||||
hasInit: false,
|
hasInit: false,
|
||||||
tinymceId: this.id || 'vue-tinymce-' + +new Date(),
|
tinymceId: this.id,
|
||||||
fullscreen: false
|
fullscreen: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -64,6 +66,9 @@ export default {
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.destroyTinymce()
|
this.destroyTinymce()
|
||||||
},
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.destroyTinymce()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTinymce() {
|
initTinymce() {
|
||||||
const _this = this
|
const _this = this
|
||||||
|
@ -152,9 +157,6 @@ export default {
|
||||||
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`)
|
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
this.destroyTinymce()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,25 +2,27 @@
|
||||||
<el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
|
<el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
|
||||||
<el-table-column v-if="columns.length===0" width="150">
|
<el-table-column v-if="columns.length===0" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-for="space in scope.row._level" class="ms-tree-space" :key="space"></span>
|
<span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
|
||||||
<span class="tree-ctrl" v-if="iconShow(0,scope.row)" @click="toggleExpanded(scope.$index)">
|
<span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
|
||||||
<i v-if="!scope.row._expanded" class="el-icon-plus"></i>
|
<i v-if="!scope.row._expanded" class="el-icon-plus"/>
|
||||||
<i v-else class="el-icon-minus"></i>
|
<i v-else class="el-icon-minus"/>
|
||||||
</span>
|
</span>
|
||||||
{{scope.$index}}
|
{{ scope.$index }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-else v-for="(column, index) in columns" :key="column.value" :label="column.text" :width="column.width">
|
<el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="index === 0" v-for="space in scope.row._level" class="ms-tree-space" :key="space"></span>
|
<!-- Todo -->
|
||||||
<span class="tree-ctrl" v-if="iconShow(index,scope.row)" @click="toggleExpanded(scope.$index)">
|
<!-- eslint-disable-next-line vue/no-confusing-v-for-v-if -->
|
||||||
<i v-if="!scope.row._expanded" class="el-icon-plus"></i>
|
<span v-for="space in scope.row._level" v-if="index === 0" :key="space" class="ms-tree-space"/>
|
||||||
<i v-else class="el-icon-minus"></i>
|
<span v-if="iconShow(index,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
|
||||||
|
<i v-if="!scope.row._expanded" class="el-icon-plus"/>
|
||||||
|
<i v-else class="el-icon-minus"/>
|
||||||
</span>
|
</span>
|
||||||
{{scope.row[column.value]}}
|
{{ scope.row[column.value] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<slot></slot>
|
<slot/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -31,8 +33,9 @@
|
||||||
*/
|
*/
|
||||||
import treeToArray from './eval'
|
import treeToArray from './eval'
|
||||||
export default {
|
export default {
|
||||||
name: 'treeTable',
|
name: 'TreeTable',
|
||||||
props: {
|
props: {
|
||||||
|
/* eslint-disable */
|
||||||
data: {
|
data: {
|
||||||
type: [Array, Object],
|
type: [Array, Object],
|
||||||
required: true
|
required: true
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="upload-container">
|
<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
|
||||||
:on-success="handleImageSuccess">
|
:data="dataObj"
|
||||||
<i class="el-icon-upload"></i>
|
:multiple="false"
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
:show-file-list="false"
|
||||||
</el-upload>
|
:on-success="handleImageSuccess"
|
||||||
<div class="image-preview">
|
class="image-uploader"
|
||||||
<div class="image-preview-wrapper" v-show="imageUrl.length>1">
|
drag
|
||||||
<img :src="imageUrl+'?imageView2/1/w/200/h/200'">
|
action="https://httpbin.org/post">
|
||||||
<div class="image-preview-action">
|
<i class="el-icon-upload"/>
|
||||||
<i @click="rmImage" class="el-icon-delete"></i>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
</div>
|
</el-upload>
|
||||||
</div>
|
<div class="image-preview">
|
||||||
|
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||||
|
<img :src="imageUrl+'?imageView2/1/w/200/h/200'">
|
||||||
|
<div class="image-preview-action">
|
||||||
|
<i class="el-icon-delete" @click="rmImage"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -21,13 +27,11 @@
|
||||||
import { getToken } from '@/api/qiniu'
|
import { getToken } from '@/api/qiniu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'singleImageUpload',
|
name: 'SingleImageUpload',
|
||||||
props: {
|
props: {
|
||||||
value: String
|
value: {
|
||||||
},
|
type: String,
|
||||||
computed: {
|
default: ''
|
||||||
imageUrl() {
|
|
||||||
return this.value
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -36,6 +40,11 @@ export default {
|
||||||
dataObj: { token: '', key: '' }
|
dataObj: { token: '', key: '' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
imageUrl() {
|
||||||
|
return this.value
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rmImage() {
|
rmImage() {
|
||||||
this.emitInput('')
|
this.emitInput('')
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="singleImageUpload2 upload-container">
|
<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
|
||||||
:on-success="handleImageSuccess">
|
:data="dataObj"
|
||||||
<i class="el-icon-upload"></i>
|
:multiple="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleImageSuccess"
|
||||||
|
class="image-uploader"
|
||||||
|
drag
|
||||||
|
action="https://httpbin.org/post">
|
||||||
|
<i class="el-icon-upload"/>
|
||||||
<div class="el-upload__text">Drag或<em>点击上传</em></div>
|
<div class="el-upload__text">Drag或<em>点击上传</em></div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div v-show="imageUrl.length>0" class="image-preview">
|
<div v-show="imageUrl.length>0" class="image-preview">
|
||||||
<div class="image-preview-wrapper" v-show="imageUrl.length>1">
|
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||||
<img :src="imageUrl">
|
<img :src="imageUrl">
|
||||||
<div class="image-preview-action">
|
<div class="image-preview-action">
|
||||||
<i @click="rmImage" class="el-icon-delete"></i>
|
<i class="el-icon-delete" @click="rmImage"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,13 +26,11 @@
|
||||||
import { getToken } from '@/api/qiniu'
|
import { getToken } from '@/api/qiniu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'singleImageUpload2',
|
name: 'SingleImageUpload2',
|
||||||
props: {
|
props: {
|
||||||
value: String
|
value: {
|
||||||
},
|
type: String,
|
||||||
computed: {
|
default: ''
|
||||||
imageUrl() {
|
|
||||||
return this.value
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -35,6 +39,11 @@ export default {
|
||||||
dataObj: { token: '', key: '' }
|
dataObj: { token: '', key: '' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
imageUrl() {
|
||||||
|
return this.value
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rmImage() {
|
rmImage() {
|
||||||
this.emitInput('')
|
this.emitInput('')
|
||||||
|
|
|
@ -1,23 +1,29 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="upload-container">
|
<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
|
||||||
:on-success="handleImageSuccess">
|
:data="dataObj"
|
||||||
<i class="el-icon-upload"></i>
|
:multiple="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleImageSuccess"
|
||||||
|
class="image-uploader"
|
||||||
|
drag
|
||||||
|
action="https://httpbin.org/post">
|
||||||
|
<i class="el-icon-upload"/>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="image-preview image-app-preview">
|
<div class="image-preview image-app-preview">
|
||||||
<div class="image-preview-wrapper" v-show="imageUrl.length>1">
|
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||||
<img :src="imageUrl">
|
<img :src="imageUrl">
|
||||||
<div class="image-preview-action">
|
<div class="image-preview-action">
|
||||||
<i @click="rmImage" class="el-icon-delete"></i>
|
<i class="el-icon-delete" @click="rmImage"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="image-preview">
|
<div class="image-preview">
|
||||||
<div class="image-preview-wrapper" v-show="imageUrl.length>1">
|
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||||
<img :src="imageUrl">
|
<img :src="imageUrl">
|
||||||
<div class="image-preview-action">
|
<div class="image-preview-action">
|
||||||
<i @click="rmImage" class="el-icon-delete"></i>
|
<i class="el-icon-delete" @click="rmImage"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,13 +34,11 @@
|
||||||
import { getToken } from '@/api/qiniu'
|
import { getToken } from '@/api/qiniu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'singleImageUpload3',
|
name: 'SingleImageUpload3',
|
||||||
props: {
|
props: {
|
||||||
value: String
|
value: {
|
||||||
},
|
type: String,
|
||||||
computed: {
|
default: ''
|
||||||
imageUrl() {
|
|
||||||
return this.value
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -43,6 +47,11 @@ export default {
|
||||||
dataObj: { token: '', key: '' }
|
dataObj: { token: '', key: '' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
imageUrl() {
|
||||||
|
return this.value
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rmImage() {
|
rmImage() {
|
||||||
this.emitInput('')
|
this.emitInput('')
|
||||||
|
|
|
@ -13,8 +13,8 @@ import XLSX from 'xlsx'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
beforeUpload: Function,
|
beforeUpload: Function, // eslint-disable-line
|
||||||
onSuccess: Function
|
onSuccess: Function// eslint-disable-line
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
||||||
},
|
},
|
||||||
excel: {
|
excel: {
|
||||||
export: 'Export',
|
export: 'Export',
|
||||||
selectedExport: 'Export selected items',
|
selectedExport: 'Export Selected Items',
|
||||||
placeholder: 'Please enter the file name(default excel-list)'
|
placeholder: 'Please enter the file name(default excel-list)'
|
||||||
},
|
},
|
||||||
zip: {
|
zip: {
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
||||||
placeholder: 'Please enter the file name(default file)'
|
placeholder: 'Please enter the file name(default file)'
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
change: 'Theme change',
|
change: 'Change Theme',
|
||||||
documentation: 'Theme documentation',
|
documentation: 'Theme documentation',
|
||||||
tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
|
tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const constantRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
component: () => import('@/views/dashboard/index'),
|
component: () => import('@/views/dashboard/index'),
|
||||||
name: 'dashboard',
|
name: 'Dashboard',
|
||||||
meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
|
meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -72,7 +72,7 @@ export const constantRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/documentation/index'),
|
component: () => import('@/views/documentation/index'),
|
||||||
name: 'documentation',
|
name: 'Documentation',
|
||||||
meta: { title: 'documentation', icon: 'documentation', noCache: true }
|
meta: { title: 'documentation', icon: 'documentation', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -85,7 +85,7 @@ export const constantRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/guide/index'),
|
component: () => import('@/views/guide/index'),
|
||||||
name: 'guide',
|
name: 'Guide',
|
||||||
meta: { title: 'guide', icon: 'guide', noCache: true }
|
meta: { title: 'guide', icon: 'guide', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -113,7 +113,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'page',
|
path: 'page',
|
||||||
component: () => import('@/views/permission/page'),
|
component: () => import('@/views/permission/page'),
|
||||||
name: 'pagePermission',
|
name: 'PagePermission',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'pagePermission',
|
title: 'pagePermission',
|
||||||
roles: ['admin'] // or you can only set roles in sub nav
|
roles: ['admin'] // or you can only set roles in sub nav
|
||||||
|
@ -122,7 +122,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'directive',
|
path: 'directive',
|
||||||
component: () => import('@/views/permission/directive'),
|
component: () => import('@/views/permission/directive'),
|
||||||
name: 'directivePermission',
|
name: 'DirectivePermission',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'directivePermission'
|
title: 'directivePermission'
|
||||||
// if do not set roles, means: this page does not require permission
|
// if do not set roles, means: this page does not require permission
|
||||||
|
@ -138,7 +138,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/svg-icons/index'),
|
component: () => import('@/views/svg-icons/index'),
|
||||||
name: 'icons',
|
name: 'Icons',
|
||||||
meta: { title: 'icons', icon: 'icon', noCache: true }
|
meta: { title: 'icons', icon: 'icon', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -154,7 +154,7 @@ export const asyncRouterMap = [
|
||||||
path: '/example',
|
path: '/example',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/example/list',
|
redirect: '/example/list',
|
||||||
name: 'example',
|
name: 'Example',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'example',
|
title: 'example',
|
||||||
icon: 'example'
|
icon: 'example'
|
||||||
|
@ -163,20 +163,20 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
component: () => import('@/views/example/create'),
|
component: () => import('@/views/example/create'),
|
||||||
name: 'createArticle',
|
name: 'CreateArticle',
|
||||||
meta: { title: 'createArticle', icon: 'edit' }
|
meta: { title: 'createArticle', icon: 'edit' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'edit/:id(\\d+)',
|
path: 'edit/:id(\\d+)',
|
||||||
component: () => import('@/views/example/edit'),
|
component: () => import('@/views/example/edit'),
|
||||||
name: 'editArticle',
|
name: 'EditArticle',
|
||||||
meta: { title: 'editArticle', noCache: true },
|
meta: { title: 'editArticle', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'list',
|
path: 'list',
|
||||||
component: () => import('@/views/example/list'),
|
component: () => import('@/views/example/list'),
|
||||||
name: 'articleList',
|
name: 'ArticleList',
|
||||||
meta: { title: 'articleList', icon: 'list' }
|
meta: { title: 'articleList', icon: 'list' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -189,7 +189,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/tab/index'),
|
component: () => import('@/views/tab/index'),
|
||||||
name: 'tab',
|
name: 'Tab',
|
||||||
meta: { title: 'tab', icon: 'tab' }
|
meta: { title: 'tab', icon: 'tab' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -199,7 +199,7 @@ export const asyncRouterMap = [
|
||||||
path: '/error',
|
path: '/error',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
name: 'errorPages',
|
name: 'ErrorPages',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'errorPages',
|
title: 'errorPages',
|
||||||
icon: '404'
|
icon: '404'
|
||||||
|
@ -208,13 +208,13 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: '401',
|
path: '401',
|
||||||
component: () => import('@/views/errorPage/401'),
|
component: () => import('@/views/errorPage/401'),
|
||||||
name: 'page401',
|
name: 'Page401',
|
||||||
meta: { title: 'page401', noCache: true }
|
meta: { title: 'page401', noCache: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '404',
|
path: '404',
|
||||||
component: () => import('@/views/errorPage/404'),
|
component: () => import('@/views/errorPage/404'),
|
||||||
name: 'page404',
|
name: 'Page404',
|
||||||
meta: { title: 'page404', noCache: true }
|
meta: { title: 'page404', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -228,7 +228,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'log',
|
path: 'log',
|
||||||
component: () => import('@/views/errorLog/index'),
|
component: () => import('@/views/errorLog/index'),
|
||||||
name: 'errorLog',
|
name: 'ErrorLog',
|
||||||
meta: { title: 'errorLog', icon: 'bug' }
|
meta: { title: 'errorLog', icon: 'bug' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -238,7 +238,7 @@ export const asyncRouterMap = [
|
||||||
path: '/excel',
|
path: '/excel',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/excel/export-excel',
|
redirect: '/excel/export-excel',
|
||||||
name: 'excel',
|
name: 'Excel',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'excel',
|
title: 'excel',
|
||||||
icon: 'excel'
|
icon: 'excel'
|
||||||
|
@ -247,19 +247,19 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'export-excel',
|
path: 'export-excel',
|
||||||
component: () => import('@/views/excel/exportExcel'),
|
component: () => import('@/views/excel/exportExcel'),
|
||||||
name: 'exportExcel',
|
name: 'ExportExcel',
|
||||||
meta: { title: 'exportExcel' }
|
meta: { title: 'exportExcel' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'export-selected-excel',
|
path: 'export-selected-excel',
|
||||||
component: () => import('@/views/excel/selectExcel'),
|
component: () => import('@/views/excel/selectExcel'),
|
||||||
name: 'selectExcel',
|
name: 'EelectExcel',
|
||||||
meta: { title: 'selectExcel' }
|
meta: { title: 'selectExcel' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'upload-excel',
|
path: 'upload-excel',
|
||||||
component: () => import('@/views/excel/uploadExcel'),
|
component: () => import('@/views/excel/uploadExcel'),
|
||||||
name: 'uploadExcel',
|
name: 'UploadExcel',
|
||||||
meta: { title: 'uploadExcel' }
|
meta: { title: 'uploadExcel' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -275,7 +275,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'download',
|
path: 'download',
|
||||||
component: () => import('@/views/zip/index'),
|
component: () => import('@/views/zip/index'),
|
||||||
name: 'exportZip',
|
name: 'ExportZip',
|
||||||
meta: { title: 'exportZip' }
|
meta: { title: 'exportZip' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -289,7 +289,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/theme/index'),
|
component: () => import('@/views/theme/index'),
|
||||||
name: 'theme',
|
name: 'Theme',
|
||||||
meta: { title: 'theme', icon: 'theme' }
|
meta: { title: 'theme', icon: 'theme' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -303,7 +303,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/clipboard/index'),
|
component: () => import('@/views/clipboard/index'),
|
||||||
name: 'clipboardDemo',
|
name: 'ClipboardDemo',
|
||||||
meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -316,7 +316,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/i18n-demo/index'),
|
component: () => import('@/views/i18n-demo/index'),
|
||||||
name: 'i18n',
|
name: 'I18n',
|
||||||
meta: { title: 'i18n', icon: 'international' }
|
meta: { title: 'i18n', icon: 'international' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,7 @@ const chartsRouter = {
|
||||||
path: '/charts',
|
path: '/charts',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
name: 'charts',
|
name: 'Charts',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'charts',
|
title: 'charts',
|
||||||
icon: 'chart'
|
icon: 'chart'
|
||||||
|
@ -15,19 +15,19 @@ const chartsRouter = {
|
||||||
{
|
{
|
||||||
path: 'keyboard',
|
path: 'keyboard',
|
||||||
component: () => import('@/views/charts/keyboard'),
|
component: () => import('@/views/charts/keyboard'),
|
||||||
name: 'keyboardChart',
|
name: 'KeyboardChart',
|
||||||
meta: { title: 'keyboardChart', noCache: true }
|
meta: { title: 'keyboardChart', noCache: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'line',
|
path: 'line',
|
||||||
component: () => import('@/views/charts/line'),
|
component: () => import('@/views/charts/line'),
|
||||||
name: 'lineChart',
|
name: 'LineChart',
|
||||||
meta: { title: 'lineChart', noCache: true }
|
meta: { title: 'lineChart', noCache: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mixchart',
|
path: 'mixchart',
|
||||||
component: () => import('@/views/charts/mixChart'),
|
component: () => import('@/views/charts/mixChart'),
|
||||||
name: 'mixChart',
|
name: 'MixChart',
|
||||||
meta: { title: 'mixChart', noCache: true }
|
meta: { title: 'mixChart', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,7 @@ const componentsRouter = {
|
||||||
path: '/components',
|
path: '/components',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
name: 'component-demo',
|
name: 'ComponentDemo',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'components',
|
title: 'components',
|
||||||
icon: 'component'
|
icon: 'component'
|
||||||
|
@ -15,79 +15,79 @@ const componentsRouter = {
|
||||||
{
|
{
|
||||||
path: 'tinymce',
|
path: 'tinymce',
|
||||||
component: () => import('@/views/components-demo/tinymce'),
|
component: () => import('@/views/components-demo/tinymce'),
|
||||||
name: 'tinymce-demo',
|
name: 'TinymceDemo',
|
||||||
meta: { title: 'tinymce' }
|
meta: { title: 'tinymce' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'markdown',
|
path: 'markdown',
|
||||||
component: () => import('@/views/components-demo/markdown'),
|
component: () => import('@/views/components-demo/markdown'),
|
||||||
name: 'markdown-demo',
|
name: 'MarkdownDemo',
|
||||||
meta: { title: 'markdown' }
|
meta: { title: 'markdown' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'json-editor',
|
path: 'json-editor',
|
||||||
component: () => import('@/views/components-demo/jsonEditor'),
|
component: () => import('@/views/components-demo/jsonEditor'),
|
||||||
name: 'jsonEditor-demo',
|
name: 'JsonEditorDemo',
|
||||||
meta: { title: 'jsonEditor' }
|
meta: { title: 'jsonEditor' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'splitpane',
|
path: 'splitpane',
|
||||||
component: () => import('@/views/components-demo/splitpane'),
|
component: () => import('@/views/components-demo/splitpane'),
|
||||||
name: 'splitpane-demo',
|
name: 'SplitpaneDemo',
|
||||||
meta: { title: 'splitPane' }
|
meta: { title: 'splitPane' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'avatar-upload',
|
path: 'avatar-upload',
|
||||||
component: () => import('@/views/components-demo/avatarUpload'),
|
component: () => import('@/views/components-demo/avatarUpload'),
|
||||||
name: 'avatarUpload-demo',
|
name: 'AvatarUploadDemo',
|
||||||
meta: { title: 'avatarUpload' }
|
meta: { title: 'avatarUpload' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'dropzone',
|
path: 'dropzone',
|
||||||
component: () => import('@/views/components-demo/dropzone'),
|
component: () => import('@/views/components-demo/dropzone'),
|
||||||
name: 'dropzone-demo',
|
name: 'DropzoneDemo',
|
||||||
meta: { title: 'dropzone' }
|
meta: { title: 'dropzone' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'sticky',
|
path: 'sticky',
|
||||||
component: () => import('@/views/components-demo/sticky'),
|
component: () => import('@/views/components-demo/sticky'),
|
||||||
name: 'sticky-demo',
|
name: 'StickyDemo',
|
||||||
meta: { title: 'sticky' }
|
meta: { title: 'sticky' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'count-to',
|
path: 'count-to',
|
||||||
component: () => import('@/views/components-demo/countTo'),
|
component: () => import('@/views/components-demo/countTo'),
|
||||||
name: 'countTo-demo',
|
name: 'CountToDemo',
|
||||||
meta: { title: 'countTo' }
|
meta: { title: 'countTo' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mixin',
|
path: 'mixin',
|
||||||
component: () => import('@/views/components-demo/mixin'),
|
component: () => import('@/views/components-demo/mixin'),
|
||||||
name: 'componentMixin-demo',
|
name: 'ComponentMixinDemo',
|
||||||
meta: { title: 'componentMixin' }
|
meta: { title: 'componentMixin' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'back-to-top',
|
path: 'back-to-top',
|
||||||
component: () => import('@/views/components-demo/backToTop'),
|
component: () => import('@/views/components-demo/backToTop'),
|
||||||
name: 'backToTop-demo',
|
name: 'BackToTopDemo',
|
||||||
meta: { title: 'backToTop' }
|
meta: { title: 'backToTop' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'drag-dialog',
|
path: 'drag-dialog',
|
||||||
component: () => import('@/views/components-demo/dragDialog'),
|
component: () => import('@/views/components-demo/dragDialog'),
|
||||||
name: 'dragDialog-demo',
|
name: 'DragDialogDemo',
|
||||||
meta: { title: 'dragDialog' }
|
meta: { title: 'dragDialog' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'dnd-list',
|
path: 'dnd-list',
|
||||||
component: () => import('@/views/components-demo/dndList'),
|
component: () => import('@/views/components-demo/dndList'),
|
||||||
name: 'dndList-demo',
|
name: 'DndListDemo',
|
||||||
meta: { title: 'dndList' }
|
meta: { title: 'dndList' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'drag-kanban',
|
path: 'drag-kanban',
|
||||||
component: () => import('@/views/components-demo/dragKanban'),
|
component: () => import('@/views/components-demo/dragKanban'),
|
||||||
name: 'dragKanban-demo',
|
name: 'DragKanbanDemo',
|
||||||
meta: { title: 'dragKanban' }
|
meta: { title: 'dragKanban' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,7 @@ const nestedRouter = {
|
||||||
path: '/nested',
|
path: '/nested',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/nested/menu1/menu1-1',
|
redirect: '/nested/menu1/menu1-1',
|
||||||
name: 'nested',
|
name: 'Nested',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'nested',
|
title: 'nested',
|
||||||
icon: 'nested'
|
icon: 'nested'
|
||||||
|
@ -15,33 +15,33 @@ const nestedRouter = {
|
||||||
{
|
{
|
||||||
path: 'menu1',
|
path: 'menu1',
|
||||||
component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
||||||
name: 'menu1',
|
name: 'Menu1',
|
||||||
meta: { title: 'menu1' },
|
meta: { title: 'menu1' },
|
||||||
redirect: '/nested/menu1/menu1-1',
|
redirect: '/nested/menu1/menu1-1',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'menu1-1',
|
path: 'menu1-1',
|
||||||
component: () => import('@/views/nested/menu1/menu1-1'),
|
component: () => import('@/views/nested/menu1/menu1-1'),
|
||||||
name: 'menu1-1',
|
name: 'Menu1-1',
|
||||||
meta: { title: 'menu1-1' }
|
meta: { title: 'menu1-1' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'menu1-2',
|
path: 'menu1-2',
|
||||||
component: () => import('@/views/nested/menu1/menu1-2'),
|
component: () => import('@/views/nested/menu1/menu1-2'),
|
||||||
name: 'menu1-2',
|
name: 'Menu1-2',
|
||||||
redirect: '/nested/menu1/menu1-2/menu1-2-1',
|
redirect: '/nested/menu1/menu1-2/menu1-2-1',
|
||||||
meta: { title: 'menu1-2' },
|
meta: { title: 'menu1-2' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'menu1-2-1',
|
path: 'menu1-2-1',
|
||||||
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
||||||
name: 'menu1-2-1',
|
name: 'Menu1-2-1',
|
||||||
meta: { title: 'menu1-2-1' }
|
meta: { title: 'menu1-2-1' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'menu1-2-2',
|
path: 'menu1-2-2',
|
||||||
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
||||||
name: 'menu1-2-2',
|
name: 'Menu1-2-2',
|
||||||
meta: { title: 'menu1-2-2' }
|
meta: { title: 'menu1-2-2' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -49,14 +49,14 @@ const nestedRouter = {
|
||||||
{
|
{
|
||||||
path: 'menu1-3',
|
path: 'menu1-3',
|
||||||
component: () => import('@/views/nested/menu1/menu1-3'),
|
component: () => import('@/views/nested/menu1/menu1-3'),
|
||||||
name: 'menu1-3',
|
name: 'Menu1-3',
|
||||||
meta: { title: 'menu1-3' }
|
meta: { title: 'menu1-3' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'menu2',
|
path: 'menu2',
|
||||||
name: 'menu2',
|
name: 'Menu2',
|
||||||
component: () => import('@/views/nested/menu2/index'),
|
component: () => import('@/views/nested/menu2/index'),
|
||||||
meta: { title: 'menu2' }
|
meta: { title: 'menu2' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ const tableRouter = {
|
||||||
path: '/table',
|
path: '/table',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/table/complex-table',
|
redirect: '/table/complex-table',
|
||||||
name: 'table',
|
name: 'Table',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Table',
|
title: 'Table',
|
||||||
icon: 'table'
|
icon: 'table'
|
||||||
|
@ -15,37 +15,37 @@ const tableRouter = {
|
||||||
{
|
{
|
||||||
path: 'dynamic-table',
|
path: 'dynamic-table',
|
||||||
component: () => import('@/views/table/dynamicTable/index'),
|
component: () => import('@/views/table/dynamicTable/index'),
|
||||||
name: 'dynamicTable',
|
name: 'DynamicTable',
|
||||||
meta: { title: 'dynamicTable' }
|
meta: { title: 'dynamicTable' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'drag-table',
|
path: 'drag-table',
|
||||||
component: () => import('@/views/table/dragTable'),
|
component: () => import('@/views/table/dragTable'),
|
||||||
name: 'dragTable',
|
name: 'DragTable',
|
||||||
meta: { title: 'dragTable' }
|
meta: { title: 'dragTable' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'inline-edit-table',
|
path: 'inline-edit-table',
|
||||||
component: () => import('@/views/table/inlineEditTable'),
|
component: () => import('@/views/table/inlineEditTable'),
|
||||||
name: 'inlineEditTable',
|
name: 'InlineEditTable',
|
||||||
meta: { title: 'inlineEditTable' }
|
meta: { title: 'inlineEditTable' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tree-table',
|
path: 'tree-table',
|
||||||
component: () => import('@/views/table/treeTable/treeTable'),
|
component: () => import('@/views/table/treeTable/treeTable'),
|
||||||
name: 'treeTableDemo',
|
name: 'TreeTableDemo',
|
||||||
meta: { title: 'treeTable' }
|
meta: { title: 'treeTable' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'custom-tree-table',
|
path: 'custom-tree-table',
|
||||||
component: () => import('@/views/table/treeTable/customTreeTable'),
|
component: () => import('@/views/table/treeTable/customTreeTable'),
|
||||||
name: 'customTreeTableDemo',
|
name: 'CustomTreeTableDemo',
|
||||||
meta: { title: 'customTreeTable' }
|
meta: { title: 'customTreeTable' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'complex-table',
|
path: 'complex-table',
|
||||||
component: () => import('@/views/table/complexTable'),
|
component: () => import('@/views/table/complexTable'),
|
||||||
name: 'complexTable',
|
name: 'ComplexTable',
|
||||||
meta: { title: 'complexTable' }
|
meta: { title: 'complexTable' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
margin-right: 25px;
|
|
||||||
transition: 600ms ease all;
|
transition: 600ms ease all;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class='chart-container'>
|
<div class="chart-container">
|
||||||
<chart height='100%' width='100%'></chart>
|
<chart height="100%" width="100%"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
import Chart from '@/components/Charts/keyboard'
|
import Chart from '@/components/Charts/keyboard'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'keyboardChart',
|
name: 'KeyboardChart',
|
||||||
components: { Chart }
|
components: { Chart }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class='chart-container'>
|
<div class="chart-container">
|
||||||
<chart height='100%' width='100%'></chart>
|
<chart height="100%" width="100%"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
import Chart from '@/components/Charts/lineMarker'
|
import Chart from '@/components/Charts/lineMarker'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'lineChart',
|
name: 'LineChart',
|
||||||
components: { Chart }
|
components: { Chart }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class='chart-container'>
|
<div class="chart-container">
|
||||||
<chart height='100%' width='100%'></chart>
|
<chart height="100%" width="100%"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
import Chart from '@/components/Charts/mixChart'
|
import Chart from '@/components/Charts/mixChart'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'mixChart',
|
name: 'MixChart',
|
||||||
components: { Chart }
|
components: { Chart }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<el-tab-pane label="use clipboard directly" name="directly">
|
<el-tab-pane label="use clipboard directly" name="directly">
|
||||||
<el-input v-model="inputData" placeholder="Please input" style='width:400px;'></el-input>
|
<el-input v-model="inputData" placeholder="Please input" style="width:400px;"/>
|
||||||
<el-button type="primary" icon="document" @click='handleCopy(inputData,$event)'>copy</el-button>
|
<el-button type="primary" icon="document" @click="handleCopy(inputData,$event)">copy</el-button>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="use clipboard by v-directive" name="v-directive">
|
<el-tab-pane label="use clipboard by v-directive" name="v-directive">
|
||||||
<el-input v-model="inputData" placeholder="Please input" style='width:400px;'></el-input>
|
<el-input v-model="inputData" placeholder="Please input" style="width:400px;"/>
|
||||||
<el-button type="primary" icon="document" v-clipboard:copy='inputData' v-clipboard:success='clipboardSuccess'>copy</el-button>
|
<el-button v-clipboard:copy="inputData" v-clipboard:success="clipboardSuccess" type="primary" icon="document">copy</el-button>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@ import clip from '@/utils/clipboard' // use clipboard directly
|
||||||
import clipboard from '@/directive/clipboard/index.js' // use clipboard by v-directive
|
import clipboard from '@/directive/clipboard/index.js' // use clipboard by v-directive
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'clipboardDemo',
|
name: 'ClipboardDemo',
|
||||||
directives: {
|
directives: {
|
||||||
clipboard
|
clipboard
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,16 +2,23 @@
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>This is based on
|
<code>This is based on
|
||||||
<a class="link-type" href="//github.com/dai-siki/vue-image-crop-upload"> vue-image-crop-upload</a>.
|
<a class="link-type" href="//github.com/dai-siki/vue-image-crop-upload"> vue-image-crop-upload</a>.
|
||||||
{{$t('components.imageUploadTips')}}
|
{{ $t('components.imageUploadTips') }}
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
<pan-thumb :image="image"></pan-thumb>
|
<pan-thumb :image="image"/>
|
||||||
|
|
||||||
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">Change avatar
|
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">Change Avatar
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<image-cropper :width="300" :height="300" url="https://httpbin.org/post" @close='close' @crop-upload-success="cropSuccess" langType="en"
|
<image-cropper
|
||||||
:key="imagecropperKey" v-show="imagecropperShow"></image-cropper>
|
v-show="imagecropperShow"
|
||||||
|
:width="300"
|
||||||
|
:height="300"
|
||||||
|
:key="imagecropperKey"
|
||||||
|
url="https://httpbin.org/post"
|
||||||
|
lang-type="en"
|
||||||
|
@close="close"
|
||||||
|
@crop-upload-success="cropSuccess"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -20,7 +27,7 @@ import ImageCropper from '@/components/ImageCropper'
|
||||||
import PanThumb from '@/components/PanThumb'
|
import PanThumb from '@/components/PanThumb'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'avatarUpload-demo',
|
name: 'AvatarUploadDemo',
|
||||||
components: { ImageCropper, PanThumb },
|
components: { ImageCropper, PanThumb },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>{{$t('components.backToTopTips1')}}</code>
|
<code>{{ $t('components.backToTopTips1') }}</code>
|
||||||
<code>{{$t('components.backToTopTips2')}}</code>
|
<code>{{ $t('components.backToTopTips2') }}</code>
|
||||||
<div class="placeholder-container">
|
<div class="placeholder-container">
|
||||||
<div>placeholder</div>
|
<div>placeholder</div>
|
||||||
<div>placeholder</div>
|
<div>placeholder</div>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<!--可自定义按钮的样式、show/hide临界点、返回的位置 -->
|
<!--可自定义按钮的样式、show/hide临界点、返回的位置 -->
|
||||||
<!--如需文字提示,可在外部添加element的<el-tooltip></el-tooltip>元素 -->
|
<!--如需文字提示,可在外部添加element的<el-tooltip></el-tooltip>元素 -->
|
||||||
<el-tooltip placement="top" content="tooltip">
|
<el-tooltip placement="top" content="tooltip">
|
||||||
<back-to-top transitionName="fade" :customStyle="myBackToTopStyle" :visibilityHeight="300" :backPosition="50"></back-to-top>
|
<back-to-top :custom-style="myBackToTopStyle" :visibility-height="300" :back-position="50" transition-name="fade"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
import BackToTop from '@/components/BackToTop'
|
import BackToTop from '@/components/BackToTop'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'backToTop-demo',
|
name: 'BackToTopDemo',
|
||||||
components: { BackToTop },
|
components: { BackToTop },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -3,37 +3,46 @@
|
||||||
<p class="warn-content">
|
<p class="warn-content">
|
||||||
<a href="https://github.com/PanJiaChen/vue-countTo" target="_blank">countTo-component</a>
|
<a href="https://github.com/PanJiaChen/vue-countTo" target="_blank">countTo-component</a>
|
||||||
</p>
|
</p>
|
||||||
<count-to ref="example" class="example" :start-val="_startVal" :end-val="_endVal" :duration="_duration" :decimals="_decimals"
|
<count-to
|
||||||
:separator="_separator" :prefix="_prefix" :suffix="_suffix" :autoplay="false"></count-to>
|
ref="example"
|
||||||
|
:start-val="_startVal"
|
||||||
|
:end-val="_endVal"
|
||||||
|
:duration="_duration"
|
||||||
|
:decimals="_decimals"
|
||||||
|
:separator="_separator"
|
||||||
|
:prefix="_prefix"
|
||||||
|
:suffix="_suffix"
|
||||||
|
:autoplay="false"
|
||||||
|
class="example"/>
|
||||||
<div style="margin-left: 25%;margin-top: 40px;">
|
<div style="margin-left: 25%;margin-top: 40px;">
|
||||||
<label class="label" for="startValInput">startVal:
|
<label class="label" for="startValInput">startVal:
|
||||||
<input type="number" v-model.number="setStartVal" name="startValInput" />
|
<input v-model.number="setStartVal" type="number" name="startValInput" >
|
||||||
</label>
|
</label>
|
||||||
<label class="label" for="endValInput">endVal:
|
<label class="label" for="endValInput">endVal:
|
||||||
<input type="number" v-model.number="setEndVal" name="endVaInput" />
|
<input v-model.number="setEndVal" type="number" name="endVaInput" >
|
||||||
</label>
|
</label>
|
||||||
<label class="label" for="durationInput">duration:
|
<label class="label" for="durationInput">duration:
|
||||||
<input type="number" v-model.number="setDuration" name="durationInput" />
|
<input v-model.number="setDuration" type="number" name="durationInput" >
|
||||||
</label>
|
</label>
|
||||||
<div class="startBtn example-btn" @click="start">开始</div>
|
<div class="startBtn example-btn" @click="start">开始</div>
|
||||||
<div class="pause-resume-btn example-btn" @click="pauseResume">暂停/恢复</div>
|
<div class="pause-resume-btn example-btn" @click="pauseResume">暂停/恢复</div>
|
||||||
<br/>
|
<br>
|
||||||
<label class="label" for="decimalsInput">decimals:
|
<label class="label" for="decimalsInput">decimals:
|
||||||
<input type="number" v-model.number="setDecimals" name="decimalsInput" />
|
<input v-model.number="setDecimals" type="number" name="decimalsInput" >
|
||||||
</label>
|
</label>
|
||||||
<label class="label" for="separatorInput">separator:
|
<label class="label" for="separatorInput">separator:
|
||||||
<input v-model="setSeparator" name="separatorInput" />
|
<input v-model="setSeparator" name="separatorInput" >
|
||||||
</label>
|
</label>
|
||||||
<label class="label" for="prefixInput">prefix:
|
<label class="label" for="prefixInput">prefix:
|
||||||
<input v-model="setPrefix" name="prefixInput" />
|
<input v-model="setPrefix" name="prefixInput" >
|
||||||
</label>
|
</label>
|
||||||
<label class="label" for="suffixInput">suffix:
|
<label class="label" for="suffixInput">suffix:
|
||||||
<input v-model="setSuffix" name="suffixInput" />
|
<input v-model="setSuffix" name="suffixInput" >
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<code><count-to :start-val='{{_startVal}}' :end-val='{{_endVal}}' :duration='{{_duration}}'
|
<code><count-to :start-val='{{ _startVal }}' :end-val='{{ _endVal }}' :duration='{{ _duration }}'
|
||||||
:decimals='{{_decimals}}' :separator='{{_separator}}' :prefix='{{_prefix}}' :suffix='{{_suffix}}'
|
:decimals='{{ _decimals }}' :separator='{{ _separator }}' :prefix='{{ _prefix }}' :suffix='{{ _suffix }}'
|
||||||
:autoplay=false></code>
|
:autoplay=false></code>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -41,7 +50,7 @@
|
||||||
import countTo from 'vue-count-to'
|
import countTo from 'vue-count-to'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'countTo-demo',
|
name: 'CountToDemo',
|
||||||
components: { countTo },
|
components: { countTo },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -202,4 +211,3 @@ input {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<a href="https://github.com/SortableJS/Vue.Draggable" target="_blank">Vue.Draggable</a>
|
<a href="https://github.com/SortableJS/Vue.Draggable" target="_blank">Vue.Draggable</a>
|
||||||
</code>
|
</code>
|
||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<dnd-list :list1="list1" :list2="list2" list1Title="List" list2Title="Article pool"></dnd-list>
|
<dnd-list :list1="list1" :list2="list2" list1-title="List" list2-title="Article pool"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,7 +14,7 @@ import DndList from '@/components/DndList'
|
||||||
import { fetchList } from '@/api/article'
|
import { fetchList } from '@/api/article'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dndList-demo',
|
name: 'DndListDemo',
|
||||||
components: { DndList },
|
components: { DndList },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -37,4 +37,3 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<el-button type="primary" @click="dialogTableVisible = true">open a Drag Dialog</el-button>
|
<el-button type="primary" @click="dialogTableVisible = true">open a Drag Dialog</el-button>
|
||||||
<el-dialog v-el-drag-dialog @dragDialog="handleDrag" title="Shipping address" :visible.sync="dialogTableVisible">
|
<el-dialog v-el-drag-dialog :visible.sync="dialogTableVisible" title="Shipping address" @dragDialog="handleDrag">
|
||||||
<el-select ref="select" v-model="value" placeholder="请选择">
|
<el-select ref="select" v-model="value" placeholder="请选择">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-table :data="gridData">
|
<el-table :data="gridData">
|
||||||
<el-table-column property="date" label="Date" width="150"></el-table-column>
|
<el-table-column property="date" label="Date" width="150"/>
|
||||||
<el-table-column property="name" label="Name" width="200"></el-table-column>
|
<el-table-column property="name" label="Name" width="200"/>
|
||||||
<el-table-column property="address" label="Address"></el-table-column>
|
<el-table-column property="address" label="Address"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +18,7 @@
|
||||||
import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
|
import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dragDialog-demo',
|
name: 'DragDialogDemo',
|
||||||
directives: { elDragDialog },
|
directives: { elDragDialog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="components-container board">
|
<div class="components-container board">
|
||||||
<Kanban :key="1" class="kanban todo" :list="list1" :options="options" header-text="Todo"/>
|
<Kanban :key="1" :list="list1" :options="options" class="kanban todo" header-text="Todo"/>
|
||||||
<Kanban :key="2" class="kanban working" :list="list2" :options="options" header-text="Working"/>
|
<Kanban :key="2" :list="list2" :options="options" class="kanban working" header-text="Working"/>
|
||||||
<Kanban :key="3" class="kanban done" :list="list3" :options="options" header-text="Done"/>
|
<Kanban :key="3" :list="list3" :options="options" class="kanban done" header-text="Done"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Kanban from '@/components/Kanban'
|
import Kanban from '@/components/Kanban'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dragKanban-demo',
|
name: 'DragKanbanDemo',
|
||||||
components: {
|
components: {
|
||||||
Kanban
|
Kanban
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>
|
<code>
|
||||||
Based on <a class="link-type" href="https://github.com/rowanwins/vue-dropzone"> dropzone </a>.
|
Based on <a class="link-type" href="https://github.com/rowanwins/vue-dropzone"> dropzone </a>.
|
||||||
{{$t('components.dropzoneTips')}}
|
{{ $t('components.dropzoneTips') }}
|
||||||
</code>
|
</code>
|
||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<dropzone v-on:dropzone-removedFile="dropzoneR" v-on:dropzone-success="dropzoneS" id="myVueDropzone" url="https://httpbin.org/post"></dropzone>
|
<dropzone id="myVueDropzone" url="https://httpbin.org/post" @dropzone-removedFile="dropzoneR" @dropzone-success="dropzoneS"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
import Dropzone from '@/components/Dropzone'
|
import Dropzone from '@/components/Dropzone'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dropzone-demo',
|
name: 'DropzoneDemo',
|
||||||
components: { Dropzone },
|
components: { Dropzone },
|
||||||
methods: {
|
methods: {
|
||||||
dropzoneS(file) {
|
dropzoneS(file) {
|
||||||
|
@ -29,4 +29,3 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>JsonEditor is base on <a href="https://github.com/codemirror/CodeMirror" target="_blank">CodeMirrorr</a> , lint base on json-lint </code>
|
<code>JsonEditor is base on <a href="https://github.com/codemirror/CodeMirror" target="_blank">CodeMirrorr</a> , lint base on json-lint </code>
|
||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<json-editor ref="jsonEditor" v-model="value"></json-editor>
|
<json-editor ref="jsonEditor" v-model="value"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -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":"能源化工"}]'
|
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 {
|
||||||
name: 'jsonEditor-demo',
|
name: 'JsonEditorDemo',
|
||||||
components: { JsonEditor },
|
components: { JsonEditor },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
相关文章 </a>
|
相关文章 </a>
|
||||||
</code>
|
</code>
|
||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<markdown-editor id="contentEditor" ref="contentEditor" v-model="content" :height="300" :zIndex="20"></markdown-editor>
|
<markdown-editor id="contentEditor" ref="contentEditor" v-model="content" :height="300" :z-index="20"/>
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="markdown2Html" style="margin-top:80px;" type="primary" icon="el-icon-document">To HTML</el-button>
|
<el-button style="margin-top:80px;" type="primary" icon="el-icon-document" @click="markdown2Html">To HTML</el-button>
|
||||||
<div v-html="html"></div>
|
<div v-html="html"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ const content = `
|
||||||
`
|
`
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'markdown-demo',
|
name: 'MarkdownDemo',
|
||||||
components: { MarkdownEditor },
|
components: { MarkdownEditor },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -46,4 +46,3 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<div style="height:100px;">
|
<div style="height:100px;">
|
||||||
<el-form :model="demo" :rules="demoRules">
|
<el-form :model="demo" :rules="demoRules">
|
||||||
<el-form-item prop="title">
|
<el-form-item prop="title">
|
||||||
<md-input icon="search" name="title" placeholder="输入标题" v-model="demo.title">标题</md-input>
|
<md-input v-model="demo.title" icon="search" name="title" placeholder="输入标题">标题</md-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,20 +74,20 @@
|
||||||
<span>hover text</span>
|
<span>hover text</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-item">
|
<div class="component-item">
|
||||||
<mallki className="mallki-text" text="vue-element-admin"></mallki>
|
<mallki class-name="mallki-text" text="vue-element-admin"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20" style="margin-top:50px;">
|
<el-row :gutter="20" style="margin-top:50px;">
|
||||||
<el-col :span="6">
|
<el-col :span="8">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>Share</span>
|
<span>Share</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-item" style="height:420px;">
|
<div class="component-item" style="height:420px;">
|
||||||
<dropdown-menu style="margin:0 auto;" title='系列文章' :items='articleList'></dropdown-menu>
|
<dropdown-menu :items="articleList" style="margin:0 auto;" title="系列文章"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -104,7 +104,7 @@ import DropdownMenu from '@/components/Share/dropdownMenu'
|
||||||
import waves from '@/directive/waves/index.js' // 水波纹指令
|
import waves from '@/directive/waves/index.js' // 水波纹指令
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'componentMixin-demo',
|
name: 'ComponentMixinDemo',
|
||||||
components: {
|
components: {
|
||||||
PanThumb,
|
PanThumb,
|
||||||
MdInput,
|
MdInput,
|
||||||
|
@ -134,10 +134,7 @@ export default {
|
||||||
{ title: '登录权限篇', href: 'https://juejin.im/post/591aa14f570c35006961acac' },
|
{ title: '登录权限篇', href: 'https://juejin.im/post/591aa14f570c35006961acac' },
|
||||||
{ title: '实战篇', href: 'https://juejin.im/post/593121aa0ce4630057f70d35' },
|
{ title: '实战篇', href: 'https://juejin.im/post/593121aa0ce4630057f70d35' },
|
||||||
{ title: 'vue-admin-template 篇', href: 'https://juejin.im/post/595b4d776fb9a06bbe7dba56' },
|
{ title: 'vue-admin-template 篇', href: 'https://juejin.im/post/595b4d776fb9a06bbe7dba56' },
|
||||||
{ title: '自行封装 component', href: 'https://segmentfault.com/a/1190000009090836' },
|
{ title: '优雅的使用 icon', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' }
|
||||||
{ title: '优雅的使用 icon', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' },
|
|
||||||
{ title: 'webpack4(上)', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' },
|
|
||||||
{ title: 'webpack4(下)', href: 'https://juejin.im/post/5b5d6d6f6fb9a04fea58aabc' }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,19 +3,19 @@
|
||||||
<code><strong>SplitPane</strong> If you've used
|
<code><strong>SplitPane</strong> If you've used
|
||||||
<a href="http://codepen.io/" target="_blank"> codepen</a>,
|
<a href="http://codepen.io/" target="_blank"> codepen</a>,
|
||||||
<a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>will not be unfamiliar.
|
<a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>will not be unfamiliar.
|
||||||
<a href="https://github.com/PanJiaChen/vue-split-pane" target='_blank'> Github repository</a>
|
<a href="https://github.com/PanJiaChen/vue-split-pane" target="_blank"> Github repository</a>
|
||||||
</code>
|
</code>
|
||||||
<split-pane v-on:resize="resize" split="vertical">
|
<split-pane split="vertical" @resize="resize">
|
||||||
<template slot="paneL">
|
<template slot="paneL">
|
||||||
<div class="left-container"></div>
|
<div class="left-container"/>
|
||||||
</template>
|
</template>
|
||||||
<template slot="paneR">
|
<template slot="paneR">
|
||||||
<split-pane split="horizontal">
|
<split-pane split="horizontal">
|
||||||
<template slot="paneL">
|
<template slot="paneL">
|
||||||
<div class="top-container"></div>
|
<div class="top-container"/>
|
||||||
</template>
|
</template>
|
||||||
<template slot="paneR">
|
<template slot="paneR">
|
||||||
<div class="bottom-container"></div>
|
<div class="bottom-container"/>
|
||||||
</template>
|
</template>
|
||||||
</split-pane>
|
</split-pane>
|
||||||
</template>
|
</template>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
import splitPane from 'vue-splitpane'
|
import splitPane from 'vue-splitpane'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'splitpane-demo',
|
name: 'SplitpaneDemo',
|
||||||
components: { splitPane },
|
components: { splitPane },
|
||||||
methods: {
|
methods: {
|
||||||
resize() {
|
resize() {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<sticky className="sub-navbar">
|
<sticky class-name="sub-navbar">
|
||||||
<el-dropdown trigger="click">
|
<el-dropdown trigger="click">
|
||||||
<el-button plain>
|
<el-button plain>
|
||||||
Platform<i class="el-icon-caret-bottom el-icon--right"></i>
|
Platform<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu class="no-border" slot="dropdown">
|
<el-dropdown-menu slot="dropdown" class="no-border">
|
||||||
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
|
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
|
||||||
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key">
|
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key">
|
||||||
{{item.name}}
|
{{ item.name }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
@ -16,18 +16,17 @@
|
||||||
|
|
||||||
<el-dropdown trigger="click">
|
<el-dropdown trigger="click">
|
||||||
<el-button plain>
|
<el-button plain>
|
||||||
Link<i class="el-icon-caret-bottom el-icon--right"></i>
|
Link<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu class="no-padding no-border" style="width:300px" slot="dropdown">
|
<el-dropdown-menu slot="dropdown" class="no-padding no-border" style="width:300px">
|
||||||
<el-input placeholder="Please enter the content" v-model="url">
|
<el-input v-model="url" placeholder="Please enter the content">
|
||||||
<template slot="prepend">Url</template>
|
<template slot="prepend">Url</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
||||||
<div class="time-container">
|
<div class="time-container">
|
||||||
<el-date-picker v-model="time" type="datetime" :picker-options="pickerOptions" format="yyyy-MM-dd HH:mm:ss" placeholder="Release time">
|
<el-date-picker v-model="time" :picker-options="pickerOptions" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Release time"/>
|
||||||
</el-date-picker>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button style="margin-left: 10px;" type="success">publish
|
<el-button style="margin-left: 10px;" type="success">publish
|
||||||
|
@ -35,7 +34,7 @@
|
||||||
</sticky>
|
</sticky>
|
||||||
|
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>Sticky header, {{$t('components.stickyTips')}}</code>
|
<code>Sticky header, {{ $t('components.stickyTips') }}</code>
|
||||||
<div>placeholder</div>
|
<div>placeholder</div>
|
||||||
<div>placeholder</div>
|
<div>placeholder</div>
|
||||||
<div>placeholder</div>
|
<div>placeholder</div>
|
||||||
|
@ -92,12 +91,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Sticky from '@/components/Sticky'
|
import Sticky from '@/components/Sticky'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'sticky-demo',
|
name: 'StickyDemo',
|
||||||
components: { Sticky },
|
components: { Sticky },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="components-container">
|
<div class="components-container">
|
||||||
<code>
|
<code>
|
||||||
{{$t('components.tinymceTips')}}
|
{{ $t('components.tinymceTips') }}
|
||||||
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/component/rich-editor.html"> {{$t('components.documentation')}}</a>
|
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/component/rich-editor.html"> {{ $t('components.documentation') }}</a>
|
||||||
</code>
|
</code>
|
||||||
<div>
|
<div>
|
||||||
<tinymce :height="300" v-model="content"></tinymce>
|
<tinymce :height="300" v-model="content"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="editor-content" v-html="content"></div>
|
<div class="editor-content" v-html="content"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
import Tinymce from '@/components/Tinymce'
|
import Tinymce from '@/components/Tinymce'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'tinymce-demo',
|
name: 'TinymceDemo',
|
||||||
components: { Tinymce },
|
components: { Tinymce },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -34,4 +34,3 @@ export default {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}"></div>
|
<div :class="className" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card class="box-card-component" style="margin-left:8px;">
|
<el-card class="box-card-component" style="margin-left:8px;">
|
||||||
<div slot="header" class="box-card-header">
|
<div slot="header" class="box-card-header">
|
||||||
<img src='https://wpimg.wallstcn.com/e7d23d71-cf19-4b90-a1cc-f56af8c0903d.png'>
|
<img src="https://wpimg.wallstcn.com/e7d23d71-cf19-4b90-a1cc-f56af8c0903d.png">
|
||||||
</div>
|
</div>
|
||||||
<div style="position:relative;">
|
<div style="position:relative;">
|
||||||
<pan-thumb class="panThumb" :image="avatar"></pan-thumb>
|
<pan-thumb :image="avatar" class="panThumb"/>
|
||||||
<mallki className='mallki-text' text='vue-element-admin'></mallki>
|
<mallki class-name="mallki-text" text="vue-element-admin"/>
|
||||||
<div style="padding-top:35px;" class='progress-item'>
|
<div style="padding-top:35px;" class="progress-item">
|
||||||
<span>Vue</span>
|
<span>Vue</span>
|
||||||
<el-progress :percentage="70"></el-progress>
|
<el-progress :percentage="70"/>
|
||||||
</div>
|
</div>
|
||||||
<div class='progress-item'>
|
<div class="progress-item">
|
||||||
<span>JavaScript</span>
|
<span>JavaScript</span>
|
||||||
<el-progress :percentage="18"></el-progress>
|
<el-progress :percentage="18"/>
|
||||||
</div>
|
</div>
|
||||||
<div class='progress-item'>
|
<div class="progress-item">
|
||||||
<span>Css</span>
|
<span>Css</span>
|
||||||
<el-progress :percentage="12"></el-progress>
|
<el-progress :percentage="12"/>
|
||||||
</div>
|
</div>
|
||||||
<div class='progress-item'>
|
<div class="progress-item">
|
||||||
<span>ESLint</span>
|
<span>ESLint</span>
|
||||||
<el-progress :percentage="100" status="success"></el-progress>
|
<el-progress :percentage="100" status="success"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -34,6 +34,15 @@ import Mallki from '@/components/TextHoverEffect/Mallki'
|
||||||
export default {
|
export default {
|
||||||
components: { PanThumb, Mallki },
|
components: { PanThumb, Mallki },
|
||||||
|
|
||||||
|
filters: {
|
||||||
|
statusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
success: 'success',
|
||||||
|
pending: 'danger'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
statisticsData: {
|
statisticsData: {
|
||||||
|
@ -48,15 +57,6 @@ export default {
|
||||||
'avatar',
|
'avatar',
|
||||||
'roles'
|
'roles'
|
||||||
])
|
])
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
statusFilter(status) {
|
|
||||||
const statusMap = {
|
|
||||||
success: 'success',
|
|
||||||
pending: 'danger'
|
|
||||||
}
|
|
||||||
return statusMap[status]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}"></div>
|
<div :class="className" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -26,7 +26,8 @@ export default {
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
chartData: {
|
chartData: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -34,6 +35,14 @@ export default {
|
||||||
chart: null
|
chart: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
chartData: {
|
||||||
|
deep: true,
|
||||||
|
handler(val) {
|
||||||
|
this.setOptions(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
if (this.autoResize) {
|
if (this.autoResize) {
|
||||||
|
@ -63,14 +72,6 @@ export default {
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
chartData: {
|
|
||||||
deep: true,
|
|
||||||
handler(val) {
|
|
||||||
this.setOptions(val)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
setOptions({ expectedData, actualData } = {}) {
|
setOptions({ expectedData, actualData } = {}) {
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<el-row class="panel-group" :gutter="40">
|
<el-row :gutter="40" class="panel-group">
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||||
<div class='card-panel' @click="handleSetLineChartData('newVisitis')">
|
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
|
||||||
<div class="card-panel-icon-wrapper icon-people">
|
<div class="card-panel-icon-wrapper icon-people">
|
||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">New Visits</div>
|
<div class="card-panel-text">New Visits</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="102400" :duration="2600"></count-to>
|
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Messages</div>
|
<div class="card-panel-text">Messages</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="81212" :duration="3000"></count-to>
|
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Purchases</div>
|
<div class="card-panel-text">Purchases</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="9280" :duration="3200"></count-to>
|
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Shoppings</div>
|
<div class="card-panel-text">Shoppings</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="13600" :duration="3600"></count-to>
|
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}"></div>
|
<div :class="className" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}"></div>
|
<div :class="className" :style="{height:height,width:width}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<li class="todo" :class="{ completed: todo.done, editing: editing }">
|
<li :class="{ completed: todo.done, editing: editing }" class="todo">
|
||||||
<div class="view">
|
<div class="view">
|
||||||
<input class="toggle"
|
<input
|
||||||
type="checkbox"
|
|
||||||
:checked="todo.done"
|
:checked="todo.done"
|
||||||
|
class="toggle"
|
||||||
|
type="checkbox"
|
||||||
@change="toggleTodo( todo)">
|
@change="toggleTodo( todo)">
|
||||||
<label v-text="todo.text" @dblclick="editing = true"></label>
|
<label @dblclick="editing = true" v-text="todo.text"/>
|
||||||
<button class="destroy" @click="deleteTodo( todo )"></button>
|
<button class="destroy" @click="deleteTodo( todo )"/>
|
||||||
</div>
|
</div>
|
||||||
<input class="edit"
|
<input
|
||||||
v-show="editing"
|
|
||||||
v-focus="editing"
|
v-focus="editing"
|
||||||
|
v-show="editing"
|
||||||
:value="todo.text"
|
:value="todo.text"
|
||||||
|
class="edit"
|
||||||
@keyup.enter="doneEdit"
|
@keyup.enter="doneEdit"
|
||||||
@keyup.esc="cancelEdit"
|
@keyup.esc="cancelEdit"
|
||||||
@blur="doneEdit">
|
@blur="doneEdit">
|
||||||
|
@ -21,12 +23,6 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Todo',
|
name: 'Todo',
|
||||||
props: ['todo'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editing: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
directives: {
|
directives: {
|
||||||
focus(el, { value }, { context }) {
|
focus(el, { value }, { context }) {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -36,6 +32,19 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
todo: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
editing: false
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
deleteTodo(todo) {
|
deleteTodo(todo) {
|
||||||
this.$emit('deleteTodo', todo)
|
this.$emit('deleteTodo', todo)
|
||||||
|
|
|
@ -201,6 +201,7 @@
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #cc9a9a;
|
color: #cc9a9a;
|
||||||
transition: color 0.2s ease-out;
|
transition: color 0.2s ease-out;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.todo-list li .destroy:hover {
|
.todo-list li .destroy:hover {
|
||||||
color: #af5b5e;
|
color: #af5b5e;
|
||||||
|
|
|
@ -5,16 +5,21 @@
|
||||||
<input class="new-todo" autocomplete="off" placeholder="Todo List" @keyup.enter="addTodo">
|
<input class="new-todo" autocomplete="off" placeholder="Todo List" @keyup.enter="addTodo">
|
||||||
</header>
|
</header>
|
||||||
<!-- main section -->
|
<!-- main section -->
|
||||||
<section class="main" v-show="todos.length">
|
<section v-show="todos.length" class="main">
|
||||||
<input class="toggle-all" id="toggle-all" type="checkbox" :checked="allChecked" @change="toggleAll({ done: !allChecked })">
|
<input id="toggle-all" :checked="allChecked" class="toggle-all" type="checkbox" @change="toggleAll({ done: !allChecked })">
|
||||||
<label for="toggle-all"></label>
|
<label for="toggle-all"/>
|
||||||
<ul class="todo-list">
|
<ul class="todo-list">
|
||||||
<todo @toggleTodo='toggleTodo' @editTodo='editTodo' @deleteTodo='deleteTodo' v-for="(todo, index) in filteredTodos" :key="index"
|
<todo
|
||||||
:todo="todo"></todo>
|
v-for="(todo, index) in filteredTodos"
|
||||||
|
:key="index"
|
||||||
|
:todo="todo"
|
||||||
|
@toggleTodo="toggleTodo"
|
||||||
|
@editTodo="editTodo"
|
||||||
|
@deleteTodo="deleteTodo"/>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<footer class="footer" v-show="todos.length">
|
<footer v-show="todos.length" class="footer">
|
||||||
<span class="todo-count">
|
<span class="todo-count">
|
||||||
<strong>{{ remaining }}</strong>
|
<strong>{{ remaining }}</strong>
|
||||||
{{ remaining | pluralize('item') }} left
|
{{ remaining | pluralize('item') }} left
|
||||||
|
@ -52,6 +57,10 @@ const defalutList = [
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
components: { Todo },
|
components: { Todo },
|
||||||
|
filters: {
|
||||||
|
pluralize: (n, w) => n === 1 ? w : w + 's',
|
||||||
|
capitalize: s => s.charAt(0).toUpperCase() + s.slice(1)
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visibility: 'all',
|
visibility: 'all',
|
||||||
|
@ -108,10 +117,6 @@ export default {
|
||||||
this.setLocalStorage()
|
this.setLocalStorage()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
pluralize: (n, w) => n === 1 ? w : w + 's',
|
|
||||||
capitalize: s => s.charAt(0).toUpperCase() + s.slice(1)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
<el-table :data="list" style="width: 100%;padding-top: 15px;">
|
<el-table :data="list" style="width: 100%;padding-top: 15px;">
|
||||||
<el-table-column label="Order_No" min-width="200">
|
<el-table-column label="Order_No" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.order_no | orderNoFilter}}
|
{{ scope.row.order_no | orderNoFilter }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Price" width="195" align="center">
|
<el-table-column label="Price" width="195" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
¥{{scope.row.price | toThousandslsFilter}}
|
¥{{ scope.row.price | toThousandslsFilter }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Status" width="100" align="center">
|
<el-table-column label="Status" width="100" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.status | statusFilter"> {{scope.row.status}}</el-tag>
|
<el-tag :type="scope.row.status | statusFilter"> {{ scope.row.status }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -22,11 +22,6 @@
|
||||||
import { fetchList } from '@/api/transaction'
|
import { fetchList } from '@/api/transaction'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
list: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filters: {
|
filters: {
|
||||||
statusFilter(status) {
|
statusFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
|
@ -39,6 +34,11 @@ export default {
|
||||||
return str.substring(0, 30)
|
return str.substring(0, 30)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: null
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,48 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-editor-container">
|
<div class="dashboard-editor-container">
|
||||||
|
|
||||||
<github-corner style="position: absolute; top: 0px; border: 0; right: 0;"></github-corner>
|
<github-corner style="position: absolute; top: 0px; border: 0; right: 0;"/>
|
||||||
|
|
||||||
<panel-group @handleSetLineChartData="handleSetLineChartData"></panel-group>
|
<panel-group @handleSetLineChartData="handleSetLineChartData"/>
|
||||||
|
|
||||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||||
<line-chart :chart-data="lineChartData"></line-chart>
|
<line-chart :chart-data="lineChartData"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="32">
|
<el-row :gutter="32">
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
<raddar-chart></raddar-chart>
|
<raddar-chart/>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
<pie-chart></pie-chart>
|
<pie-chart/>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<el-col :xs="24" :sm="24" :lg="8">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
<bar-chart></bar-chart>
|
<bar-chart/>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 24}" :lg="{span: 12}" :xl="{span: 12}" style="padding-right:8px;margin-bottom:30px;">
|
<el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 24}" :lg="{span: 12}" :xl="{span: 12}" style="padding-right:8px;margin-bottom:30px;">
|
||||||
<transaction-table></transaction-table>
|
<transaction-table/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
<el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
||||||
<todo-list></todo-list>
|
<todo-list/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
<el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">
|
||||||
<box-card></box-card>
|
<box-card/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GithubCorner from '@/components/GithubCorner'
|
import GithubCorner from '@/components/GithubCorner'
|
||||||
import PanelGroup from './components/PanelGroup'
|
import PanelGroup from './components/PanelGroup'
|
||||||
|
@ -74,7 +73,7 @@ const lineChartData = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dashboard-admin',
|
name: 'DashboardAdmin',
|
||||||
components: {
|
components: {
|
||||||
GithubCorner,
|
GithubCorner,
|
||||||
PanelGroup,
|
PanelGroup,
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-editor-container">
|
<div class="dashboard-editor-container">
|
||||||
<div class=" clearfix">
|
<div class=" clearfix">
|
||||||
<pan-thumb style="float: left" :image="avatar"> Your roles:
|
<pan-thumb :image="avatar" style="float: left"> Your roles:
|
||||||
<span class="pan-info-roles" :key='item' v-for="item in roles">{{item}}</span>
|
<span v-for="item in roles" :key="item" class="pan-info-roles">{{ item }}</span>
|
||||||
</pan-thumb>
|
</pan-thumb>
|
||||||
<github-corner style="position: absolute; top: 0px; border: 0; right: 0;"></github-corner>
|
<github-corner style="position: absolute; top: 0px; border: 0; right: 0;"/>
|
||||||
<div class="info-container">
|
<div class="info-container">
|
||||||
<span class="display_name">{{name}}</span>
|
<span class="display_name">{{ name }}</span>
|
||||||
<span style="font-size:20px;padding-top:20px;display:inline-block;">Editor's Dashboard</span>
|
<span style="font-size:20px;padding-top:20px;display:inline-block;">Editor's Dashboard</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<img class="emptyGif" :src="emptyGif">
|
<img :src="emptyGif" class="emptyGif">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,7 +22,7 @@ import PanThumb from '@/components/PanThumb'
|
||||||
import GithubCorner from '@/components/GithubCorner'
|
import GithubCorner from '@/components/GithubCorner'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dashboard-editor',
|
name: 'DashboardEditor',
|
||||||
components: { PanThumb, GithubCorner },
|
components: { PanThumb, GithubCorner },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container">
|
<div class="dashboard-container">
|
||||||
<component :is="currentRole"></component>
|
<component :is="currentRole"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import adminDashboard from './admin'
|
||||||
import editorDashboard from './editor'
|
import editorDashboard from './editor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dashboard',
|
name: 'Dashboard',
|
||||||
components: { adminDashboard, editorDashboard },
|
components: { adminDashboard, editorDashboard },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container documentation-container">
|
<div class="app-container documentation-container">
|
||||||
<a class="document-btn" target='_blank' href="https://panjiachen.github.io/vue-element-admin-site/">{{$t('documentation.documentation')}}</a>
|
<a class="document-btn" target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/">{{ $t('documentation.documentation') }}</a>
|
||||||
<a class="document-btn" target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">{{$t('documentation.github')}}</a>
|
<a class="document-btn" target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">{{ $t('documentation.github') }}</a>
|
||||||
<dropdown-menu style="float:left;margin-left:50px;" title='系列文章' :items='articleList'></dropdown-menu>
|
<dropdown-menu :items="articleList" style="float:left;margin-left:50px;" title="系列文章"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import DropdownMenu from '@/components/Share/dropdownMenu'
|
import DropdownMenu from '@/components/Share/dropdownMenu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'documentation',
|
name: 'Documentation',
|
||||||
components: { DropdownMenu },
|
components: { DropdownMenu },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!--error code-->
|
<!--error code-->
|
||||||
{{a.a}}
|
{{ a.a }}
|
||||||
<!--error code-->
|
<!--error code-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'errorTestA'
|
name: 'ErrorTestA'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div></div>
|
<div/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="errPage-container">
|
<div class="errPage-container">
|
||||||
<errorA></errorA>
|
<errorA/>
|
||||||
<errorB></errorB>
|
<errorB/>
|
||||||
<!-- $t is vue-i18n global function to translate lang -->
|
<!-- $t is vue-i18n global function to translate lang -->
|
||||||
<h3>{{$t('errorLog.tips')}}</h3>
|
<h3>{{ $t('errorLog.tips') }}</h3>
|
||||||
<code>
|
<code>
|
||||||
{{$t('errorLog.description')}}
|
{{ $t('errorLog.description') }}
|
||||||
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/guide/advanced/error.html">
|
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/guide/advanced/error.html">
|
||||||
{{$t('errorLog.documentation')}}
|
{{ $t('errorLog.documentation') }}
|
||||||
</a>
|
</a>
|
||||||
</code>
|
</code>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img src='https://wpimg.wallstcn.com/360e4842-4db5-42d0-b078-f9a84a825546.gif'>
|
<img src="https://wpimg.wallstcn.com/360e4842-4db5-42d0-b078-f9a84a825546.gif">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -21,7 +21,7 @@ import errorA from './errorTestA'
|
||||||
import errorB from './errorTestB'
|
import errorB from './errorTestB'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'errorLog',
|
name: 'ErrorLog',
|
||||||
components: { errorA, errorB }
|
components: { errorA, errorB }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="errPage-container">
|
<div class="errPage-container">
|
||||||
<el-button @click="back" icon='arrow-left' class="pan-back-btn">返回</el-button>
|
<el-button icon="arrow-left" class="pan-back-btn" @click="back">返回</el-button>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<h1 class="text-jumbo text-ginormous">Oops!</h1>
|
<h1 class="text-jumbo text-ginormous">Oops!</h1>
|
||||||
gif来源<a href='https://zh.airbnb.com/' target='_blank'>airbnb</a> 页面
|
gif来源<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> 页面
|
||||||
<h2>你没有权限去该页面</h2>
|
<h2>你没有权限去该页面</h2>
|
||||||
<h6>如有不满请联系你领导</h6>
|
<h6>如有不满请联系你领导</h6>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
@ -13,15 +13,15 @@
|
||||||
<router-link to="/dashboard">回首页</router-link>
|
<router-link to="/dashboard">回首页</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li class="link-type"><a href="https://www.taobao.com/">随便看看</a></li>
|
<li class="link-type"><a href="https://www.taobao.com/">随便看看</a></li>
|
||||||
<li><a @click.prevent="dialogVisible=true" href="#">点我看图</a></li>
|
<li><a href="#" @click.prevent="dialogVisible=true">点我看图</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
|
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-dialog title="随便看" :visible.sync="dialogVisible">
|
<el-dialog :visible.sync="dialogVisible" title="随便看">
|
||||||
<img class="pan-img" :src="ewizardClap">
|
<img :src="ewizardClap" class="pan-img">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
import errGif from '@/assets/401_images/401.gif'
|
import errGif from '@/assets/401_images/401.gif'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'page401',
|
name: 'Page401',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
errGif: errGif + '?' + +new Date(),
|
errGif: errGif + '?' + +new Date(),
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="bullshit">
|
<div class="bullshit">
|
||||||
<div class="bullshit__oops">OOPS!</div>
|
<div class="bullshit__oops">OOPS!</div>
|
||||||
<div class="bullshit__info">版权所有
|
<div class="bullshit__info">版权所有
|
||||||
<a class='link-type' href='https://wallstreetcn.com' target='_blank'>华尔街见闻</a>
|
<a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="bullshit__headline">{{ message }}</div>
|
<div class="bullshit__headline">{{ message }}</div>
|
||||||
<div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
|
<div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'page404',
|
name: 'Page404',
|
||||||
computed: {
|
computed: {
|
||||||
message() {
|
message() {
|
||||||
return '网管说这个页面你不能进......'
|
return '网管说这个页面你不能进......'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="createPost-container">
|
<div class="createPost-container">
|
||||||
<el-form class="form-container" :model="postForm" :rules="rules" ref="postForm">
|
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||||
|
|
||||||
<sticky :className="'sub-navbar '+postForm.status">
|
<sticky :class-name="'sub-navbar '+postForm.status">
|
||||||
<CommentDropdown v-model="postForm.comment_disabled" />
|
<CommentDropdown v-model="postForm.comment_disabled" />
|
||||||
<PlatformDropdown v-model="postForm.platforms" />
|
<PlatformDropdown v-model="postForm.platforms" />
|
||||||
<SourceUrlDropdown v-model="postForm.source_uri" />
|
<SourceUrlDropdown v-model="postForm.source_uri" />
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item style="margin-bottom: 40px;" prop="title">
|
<el-form-item style="margin-bottom: 40px;" prop="title">
|
||||||
<MDinput name="name" v-model="postForm.title" required :maxlength="100">
|
<MDinput v-model="postForm.title" :maxlength="100" name="name" required>
|
||||||
标题
|
标题
|
||||||
</MDinput>
|
</MDinput>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -27,25 +27,27 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label-width="45px" label="作者:" class="postInfo-container-item">
|
<el-form-item label-width="45px" label="作者:" class="postInfo-container-item">
|
||||||
<el-select v-model="postForm.author" filterable remote placeholder="搜索用户" :remote-method="getRemoteUserList">
|
<el-select v-model="postForm.author" :remote-method="getRemoteUserList" filterable remote placeholder="搜索用户">
|
||||||
<el-option v-for="(item,index) in userListOptions" :key="item+index" :label="item" :value="item">
|
<el-option v-for="(item,index) in userListOptions" :key="item+index" :label="item" :value="item"/>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label-width="80px" label="发布时间:" class="postInfo-container-item">
|
<el-form-item label-width="80px" label="发布时间:" class="postInfo-container-item">
|
||||||
<el-date-picker v-model="postForm.display_time" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
|
<el-date-picker v-model="postForm.display_time" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间"/>
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label-width="60px" label="重要性:" class="postInfo-container-item">
|
<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
|
||||||
:high-threshold="3">
|
v-model="postForm.importance"
|
||||||
</el-rate>
|
:max="3"
|
||||||
|
:colors="['#99A9BF', '#F7BA2A', '#FF9900']"
|
||||||
|
:low-threshold="1"
|
||||||
|
:high-threshold="3"
|
||||||
|
style="margin-top:8px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -54,13 +56,12 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item style="margin-bottom: 40px;" label-width="45px" label="摘要:">
|
<el-form-item style="margin-bottom: 40px;" label-width="45px" label="摘要:">
|
||||||
<el-input type="textarea" class="article-textarea" :rows="1" autosize placeholder="请输入内容" v-model="postForm.content_short">
|
<el-input :rows="1" v-model="postForm.content_short" type="textarea" class="article-textarea" autosize placeholder="请输入内容"/>
|
||||||
</el-input>
|
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}字</span>
|
||||||
<span class="word-counter" v-show="contentShortLength">{{contentShortLength}}字</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<Tinymce :height=400 ref="editor" v-model="postForm.content" />
|
<Tinymce ref="editor" :height="400" v-model="postForm.content" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-bottom: 20px;">
|
<div style="margin-bottom: 20px;">
|
||||||
|
@ -100,7 +101,7 @@ const defaultForm = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'articleDetail',
|
name: 'ArticleDetail',
|
||||||
components: { Tinymce, MDinput, Upload, Multiselect, Sticky, Warning, CommentDropdown, PlatformDropdown, SourceUrlDropdown },
|
components: { Tinymce, MDinput, Upload, Multiselect, Sticky, Warning, CommentDropdown, PlatformDropdown, SourceUrlDropdown },
|
||||||
props: {
|
props: {
|
||||||
isEdit: {
|
isEdit: {
|
||||||
|
@ -115,7 +116,7 @@ export default {
|
||||||
message: rule.field + '为必传项',
|
message: rule.field + '为必传项',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
callback(null)
|
callback(new Error(rule.field + '为必传项'))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
@ -129,7 +130,7 @@ export default {
|
||||||
message: '外链url填写不正确',
|
message: '外链url填写不正确',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
callback(null)
|
callback(new Error('外链url填写不正确'))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" :show-timeout="100">
|
<el-dropdown :show-timeout="100" trigger="click">
|
||||||
<el-button plain>{{!comment_disabled?'评论已打开':'评论已关闭'}}
|
<el-button plain>{{ !comment_disabled?'评论已打开':'评论已关闭' }}
|
||||||
<i class="el-icon-caret-bottom el-icon--right"></i>
|
<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu class="no-padding" slot="dropdown">
|
<el-dropdown-menu slot="dropdown" class="no-padding">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-radio-group style="padding: 10px;" v-model="comment_disabled">
|
<el-radio-group v-model="comment_disabled" style="padding: 10px;">
|
||||||
<el-radio :label="true">关闭评论</el-radio>
|
<el-radio :label="true">关闭评论</el-radio>
|
||||||
<el-radio :label="false">打开评论</el-radio>
|
<el-radio :label="false">打开评论</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
@ -16,7 +16,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
comment_disabled: {
|
comment_disabled: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown :hide-on-click="false" :show-timeout="100" trigger="click">
|
<el-dropdown :hide-on-click="false" :show-timeout="100" trigger="click">
|
||||||
<el-button plain>
|
<el-button plain>
|
||||||
平台({{platforms.length}})
|
平台({{ platforms.length }})
|
||||||
<i class="el-icon-caret-bottom el-icon--right"></i>
|
<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu class="no-border" slot="dropdown">
|
<el-dropdown-menu slot="dropdown" class="no-border">
|
||||||
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
|
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
|
||||||
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key">
|
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key">
|
||||||
{{item.name}}
|
{{ item.name }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
@ -16,7 +16,13 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: {
|
||||||
|
value: {
|
||||||
|
required: true,
|
||||||
|
default: () => [],
|
||||||
|
type: Array
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
platformsOptions: [
|
platformsOptions: [
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<el-dropdown :show-timeout="100" trigger="click">
|
<el-dropdown :show-timeout="100" trigger="click">
|
||||||
<el-button plain>
|
<el-button plain>
|
||||||
外链
|
外链
|
||||||
<i class="el-icon-caret-bottom el-icon--right"></i>
|
<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu class="no-padding no-border" style="width:400px" slot="dropdown">
|
<el-dropdown-menu slot="dropdown" class="no-padding no-border" style="width:400px">
|
||||||
<el-form-item label-width="0px" style="margin-bottom: 0px" prop="source_uri">
|
<el-form-item label-width="0px" style="margin-bottom: 0px" prop="source_uri">
|
||||||
<el-input placeholder="请输入内容" v-model="source_uri">
|
<el-input v-model="source_uri" placeholder="请输入内容">
|
||||||
<template slot="prepend">填写url</template>
|
<template slot="prepend">填写url</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -16,7 +16,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
source_uri: {
|
source_uri: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<p class="warn-content">
|
<p class="warn-content">
|
||||||
创建和编辑页面是不能被keep-alive 缓存的,因为keep-alive 的include 目前不支持根据路由来缓存,所以目前都是基于component name 来缓存的,如果你想要实现缓存的效果,可以使用localstorage 等浏览器缓存方案。或者不要使用keep-alive
|
创建和编辑页面是不能被keep-alive 缓存的,因为keep-alive 的include 目前不支持根据路由来缓存,所以目前都是基于component name 来缓存的,如果你想要实现缓存的效果,可以使用localstorage 等浏览器缓存方案。或者不要使用keep-alive
|
||||||
的include,直接缓存所有页面。详情见
|
的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>
|
target="_blank">文档</a>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<article-detail :is-edit='false'></article-detail>
|
<article-detail :is-edit="false"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ArticleDetail from './components/ArticleDetail'
|
import ArticleDetail from './components/ArticleDetail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'createForm',
|
name: 'CreateForm',
|
||||||
components: { ArticleDetail }
|
components: { ArticleDetail }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<article-detail :is-edit='true'></article-detail>
|
<article-detail :is-edit="true"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ArticleDetail from './components/ArticleDetail'
|
import ArticleDetail from './components/ArticleDetail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editForm',
|
name: 'EditForm',
|
||||||
components: { ArticleDetail }
|
components: { ArticleDetail }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-table :data="list" v-loading.body="listLoading" border fit highlight-current-row style="width: 100%">
|
<el-table v-loading.body="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
||||||
<el-table-column align="center" label="ID" width="80">
|
<el-table-column align="center" label="ID" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.id}}</span>
|
<span>{{ scope.row.id }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column width="180px" align="center" label="Date">
|
<el-table-column width="180px" align="center" label="Date">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>
|
<span>{{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column width="120px" align="center" label="Author">
|
<el-table-column width="120px" align="center" label="Author">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.author}}</span>
|
<span>{{ scope.row.author }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column width="100px" label="Importance">
|
<el-table-column width="100px" label="Importance">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg-icon v-for="n in +scope.row.importance" icon-class="star" class="meta-item__icon" :key="n"></svg-icon>
|
<svg-icon v-for="n in +scope.row.importance" :key="n" icon-class="star" class="meta-item__icon"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column class-name="status-col" label="Status" width="110">
|
<el-table-column class-name="status-col" label="Status" width="110">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.status | statusFilter">{{scope.row.status}}</el-tag>
|
<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column min-width="300px" label="Title">
|
<el-table-column min-width="300px" label="Title">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<router-link class="link-type" :to="'/example/edit/'+scope.row.id">
|
<router-link :to="'/example/edit/'+scope.row.id" class="link-type">
|
||||||
<span>{{ scope.row.title }}</span>
|
<span>{{ scope.row.title }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -51,9 +51,15 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listQuery.page"
|
<el-pagination
|
||||||
:page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
|
:current-page="listQuery.page"
|
||||||
</el-pagination>
|
:page-sizes="[10,20,30, 50]"
|
||||||
|
:page-size="listQuery.limit"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +69,17 @@
|
||||||
import { fetchList } from '@/api/article'
|
import { fetchList } from '@/api/article'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'articleList',
|
name: 'ArticleList',
|
||||||
|
filters: {
|
||||||
|
statusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
published: 'success',
|
||||||
|
draft: 'info',
|
||||||
|
deleted: 'danger'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: null,
|
list: null,
|
||||||
|
@ -75,16 +91,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
|
||||||
statusFilter(status) {
|
|
||||||
const statusMap = {
|
|
||||||
published: 'success',
|
|
||||||
draft: 'info',
|
|
||||||
deleted: 'danger'
|
|
||||||
}
|
|
||||||
return statusMap[status]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,39 +3,39 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<label class="radio-label" style="padding-left:0;">Filename: </label>
|
<label class="radio-label" style="padding-left:0;">Filename: </label>
|
||||||
<el-input style='width:340px;' :placeholder="$t('excel.placeholder')" prefix-icon="el-icon-document" v-model="filename"></el-input>
|
<el-input :placeholder="$t('excel.placeholder')" v-model="filename" style="width:340px;" prefix-icon="el-icon-document"/>
|
||||||
<label class="radio-label">Cell Auto Width: </label>
|
<label class="radio-label">Cell Auto-Width: </label>
|
||||||
<el-radio-group v-model="autoWidth">
|
<el-radio-group v-model="autoWidth">
|
||||||
<el-radio :label="true" border>True</el-radio>
|
<el-radio :label="true" border>True</el-radio>
|
||||||
<el-radio :label="false" border>False</el-radio>
|
<el-radio :label="false" border>False</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-button style='margin:0 0 20px 20px;' type="primary" icon="document" @click="handleDownload" :loading="downloadLoading">{{$t('excel.export')}} excel</el-button>
|
<el-button :loading="downloadLoading" style="margin:0 0 20px 20px;" type="primary" icon="document" @click="handleDownload">{{ $t('excel.export') }} Excel</el-button>
|
||||||
|
|
||||||
<el-table :data="list" v-loading="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row>
|
<el-table v-loading="listLoading" :data="list" element-loading-text="拼命加载中" border fit highlight-current-row>
|
||||||
<el-table-column align="center" label='Id' width="95">
|
<el-table-column align="center" label="Id" width="95">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.$index}}
|
{{ scope.$index }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Title">
|
<el-table-column label="Title">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.title}}
|
{{ scope.row.title }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Author" width="110" align="center">
|
<el-table-column label="Author" width="110" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag>{{scope.row.author}}</el-tag>
|
<el-tag>{{ scope.row.author }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Readings" width="115" align="center">
|
<el-table-column label="Readings" width="115" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.pageviews}}
|
{{ scope.row.pageviews }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="Date" width="220">
|
<el-table-column align="center" label="Date" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<i class="el-icon-time"></i>
|
<i class="el-icon-time"/>
|
||||||
<span>{{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>
|
<span>{{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -47,7 +47,7 @@ import { fetchList } from '@/api/article'
|
||||||
import { parseTime } from '@/utils'
|
import { parseTime } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'exportExcel',
|
name: 'ExportExcel',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: null,
|
list: null,
|
||||||
|
|
|
@ -1,35 +1,42 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- $t is vue-i18n global function to translate lang -->
|
<!-- $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-input :placeholder="$t('excel.placeholder')" v-model="filename" style="width:340px;" prefix-icon="el-icon-document"/>
|
||||||
<el-button style='margin-bottom:20px' type="primary" icon="document" @click="handleDownload" :loading="downloadLoading">{{$t('excel.selectedExport')}}</el-button>
|
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="document" @click="handleDownload">{{ $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
|
||||||
ref="multipleTable">
|
v-loading="listLoading"
|
||||||
<el-table-column type="selection" align="center"></el-table-column>
|
ref="multipleTable"
|
||||||
<el-table-column align="center" label='Id' width="95">
|
:data="list"
|
||||||
|
element-loading-text="拼命加载中"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" align="center"/>
|
||||||
|
<el-table-column align="center" label="Id" width="95">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.$index}}
|
{{ scope.$index }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Title">
|
<el-table-column label="Title">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.title}}
|
{{ scope.row.title }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Author" width="110" align="center">
|
<el-table-column label="Author" width="110" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag>{{scope.row.author}}</el-tag>
|
<el-tag>{{ scope.row.author }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Readings" width="115" align="center">
|
<el-table-column label="Readings" width="115" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.pageviews}}
|
{{ scope.row.pageviews }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="PDate" width="220">
|
<el-table-column align="center" label="PDate" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<i class="el-icon-time"></i>
|
<i class="el-icon-time"/>
|
||||||
<span>{{scope.row.display_time}}</span>
|
<span>{{ scope.row.display_time }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -40,7 +47,7 @@
|
||||||
import { fetchList } from '@/api/article'
|
import { fetchList } from '@/api/article'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'selectExcel',
|
name: 'SelectExcel',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: null,
|
list: null,
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<upload-excel-component :on-success='handleSuccess' :before-upload="beforeUpload"></upload-excel-component>
|
<upload-excel-component :on-success="handleSuccess" :before-upload="beforeUpload"/>
|
||||||
<el-table :data="tableData" border highlight-current-row style="width: 100%;margin-top:20px;">
|
<el-table :data="tableData" border highlight-current-row style="width: 100%;margin-top:20px;">
|
||||||
<el-table-column v-for='item of tableHeader' :prop="item" :label="item" :key='item'>
|
<el-table-column v-for="item of tableHeader" :prop="item" :label="item" :key="item"/>
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -12,7 +11,7 @@
|
||||||
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
|
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'uploadExcel',
|
name: 'UploadExcel',
|
||||||
components: { UploadExcelComponent },
|
components: { UploadExcelComponent },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<p class="warn-content">
|
<p class="warn-content">
|
||||||
{{$t('guide.description')}}
|
{{ $t('guide.description') }}
|
||||||
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.
|
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<el-button icon='el-icon-question' type="primary" @click.prevent.stop="guide">{{$t('guide.button')}}</el-button>
|
<el-button icon="el-icon-question" type="primary" @click.prevent.stop="guide">{{ $t('guide.button') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import 'driver.js/dist/driver.min.css' // import driver.js css
|
||||||
import steps from './defineSteps'
|
import steps from './defineSteps'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'guide',
|
name: 'Guide',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
driver: null
|
driver: null
|
||||||
|
|
|
@ -3,41 +3,45 @@
|
||||||
<el-card class="box-card" style="margin-top:40px;">
|
<el-card class="box-card" style="margin-top:40px;">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<svg-icon icon-class="international" />
|
<svg-icon icon-class="international" />
|
||||||
<span style='margin-left:10px;'>{{$t('i18nView.title')}}</span>
|
<span style="margin-left:10px;">{{ $t('i18nView.title') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group v-model="lang" size="small">
|
<el-radio-group v-model="lang" size="small">
|
||||||
<el-radio label="zh" border>简体中文</el-radio>
|
<el-radio label="zh" border>简体中文</el-radio>
|
||||||
<el-radio label="en" border>English</el-radio>
|
<el-radio label="en" border>English</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-tag style='margin-top:15px;display:block;' type="info">{{$t('i18nView.note')}}</el-tag>
|
<el-tag style="margin-top:15px;display:block;" type="info">{{ $t('i18nView.note') }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-row :gutter="20" style="margin:100px 15px 50px;">
|
<el-row :gutter="20" style="margin:100px 15px 50px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-date-picker v-model="date" type="date" :placeholder="$t('i18nView.datePlaceholder')"></el-date-picker>
|
<el-date-picker v-model="date" :placeholder="$t('i18nView.datePlaceholder')" type="date"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="block">
|
<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
|
||||||
:total="400">
|
:current-page="currentPage"
|
||||||
</el-pagination>
|
:page-sizes="[100, 200, 300, 400]"
|
||||||
|
:page-size="100"
|
||||||
|
:total="400"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-button class="item-btn" size="small">{{$t('i18nView.default')}}</el-button>
|
<el-button class="item-btn" size="small">{{ $t('i18nView.default') }}</el-button>
|
||||||
<el-button class="item-btn" size="small" type="primary">{{$t('i18nView.primary')}}</el-button>
|
<el-button class="item-btn" size="small" type="primary">{{ $t('i18nView.primary') }}</el-button>
|
||||||
<el-button class="item-btn" size="small" type="success">{{$t('i18nView.success')}}</el-button>
|
<el-button class="item-btn" size="small" type="success">{{ $t('i18nView.success') }}</el-button>
|
||||||
<el-button class="item-btn" size="small" type="info">{{$t('i18nView.info')}}</el-button>
|
<el-button class="item-btn" size="small" type="info">{{ $t('i18nView.info') }}</el-button>
|
||||||
<el-button class="item-btn" size="small" type="warning">{{$t('i18nView.warning')}}</el-button>
|
<el-button class="item-btn" size="small" type="warning">{{ $t('i18nView.warning') }}</el-button>
|
||||||
<el-button class="item-btn" size="small" type="danger">{{$t('i18nView.danger')}}</el-button>
|
<el-button class="item-btn" size="small" type="danger">{{ $t('i18nView.danger') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-table :data="tableData" fit highlight-current-row border style="width: 100%">
|
<el-table :data="tableData" fit highlight-current-row border style="width: 100%">
|
||||||
<el-table-column prop="name" :label="$t('i18nView.tableName')" width="100" align="center"></el-table-column>
|
<el-table-column :label="$t('i18nView.tableName')" prop="name" width="100" align="center"/>
|
||||||
<el-table-column prop="date" :label="$t('i18nView.tableDate')" width="120" align="center"></el-table-column>
|
<el-table-column :label="$t('i18nView.tableDate')" prop="date" width="120" align="center"/>
|
||||||
<el-table-column prop="address" :label="$t('i18nView.tableAddress')"></el-table-column>
|
<el-table-column :label="$t('i18nView.tableAddress')" prop="address"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -49,7 +53,7 @@ import local from './local'
|
||||||
const viewName = 'i18nView'
|
const viewName = 'i18nView'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'i18n',
|
name: 'I18n',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
date: '',
|
date: '',
|
||||||
|
@ -76,12 +80,6 @@ export default {
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
if (!this.$i18n.getLocaleMessage('en')[viewName]) {
|
|
||||||
this.$i18n.mergeLocaleMessage('en', local.en)
|
|
||||||
this.$i18n.mergeLocaleMessage('zh', local.zh)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
lang: {
|
lang: {
|
||||||
get() {
|
get() {
|
||||||
|
@ -92,6 +90,12 @@ export default {
|
||||||
this.$store.dispatch('setLanguage', lang)
|
this.$store.dispatch('setLanguage', lang)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (!this.$i18n.getLocaleMessage('en')[viewName]) {
|
||||||
|
this.$i18n.mergeLocaleMessage('en', local.en)
|
||||||
|
this.$i18n.mergeLocaleMessage('zh', local.zh)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,7 +3,7 @@ export default {
|
||||||
zh: {
|
zh: {
|
||||||
i18nView: {
|
i18nView: {
|
||||||
title: '切换语言',
|
title: '切换语言',
|
||||||
note: '目前只翻译了当前页面和侧边栏和导航,未完待续,敬请期待...',
|
note: '本项目国际化基于 vue-i18n',
|
||||||
datePlaceholder: '请选择日期',
|
datePlaceholder: '请选择日期',
|
||||||
tableDate: '日期',
|
tableDate: '日期',
|
||||||
tableName: '姓名',
|
tableName: '姓名',
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
||||||
en: {
|
en: {
|
||||||
i18nView: {
|
i18nView: {
|
||||||
title: 'Switch Language',
|
title: 'Switch Language',
|
||||||
note: 'Currently only translated the i18n page and the sidebar and levelbar, please look forword to...',
|
note: 'The internationalization of this project is based on vue-i18n',
|
||||||
datePlaceholder: 'Pick a day',
|
datePlaceholder: 'Pick a day',
|
||||||
tableDate: 'tableDate',
|
tableDate: 'tableDate',
|
||||||
tableName: 'tableName',
|
tableName: 'tableName',
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-wrapper" :class="classObj">
|
<div :class="classObj" class="app-wrapper">
|
||||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"></div>
|
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||||
<sidebar class="sidebar-container"></sidebar>
|
<sidebar class="sidebar-container"/>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<navbar></navbar>
|
<navbar/>
|
||||||
<tags-view></tags-view>
|
<tags-view/>
|
||||||
<app-main></app-main>
|
<app-main/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -15,7 +15,7 @@ import { Navbar, Sidebar, AppMain, TagsView } from './components'
|
||||||
import ResizeMixin from './mixin/ResizeHandler'
|
import ResizeMixin from './mixin/ResizeHandler'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'layout',
|
name: 'Layout',
|
||||||
components: {
|
components: {
|
||||||
Navbar,
|
Navbar,
|
||||||
Sidebar,
|
Sidebar,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<section class="app-main">
|
<section class="app-main">
|
||||||
<transition name="fade-transform" mode="out-in">
|
<transition name="fade-transform" mode="out-in">
|
||||||
<keep-alive :include="cachedViews">
|
<keep-alive :include="cachedViews">
|
||||||
<router-view :key="key"></router-view>
|
<router-view :key="key"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</transition>
|
</transition>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
<template>
|
<template>
|
||||||
<el-menu class="navbar" mode="horizontal">
|
<el-menu class="navbar" mode="horizontal">
|
||||||
<hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger>
|
<hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/>
|
||||||
|
|
||||||
<breadcrumb class="breadcrumb-container"></breadcrumb>
|
<breadcrumb class="breadcrumb-container"/>
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<error-log class="errLog-container right-menu-item"></error-log>
|
<error-log class="errLog-container right-menu-item"/>
|
||||||
|
|
||||||
<el-tooltip effect="dark" :content="$t('navbar.screenfull')" placement="bottom">
|
<el-tooltip :content="$t('navbar.screenfull')" effect="dark" placement="bottom">
|
||||||
<screenfull class="screenfull right-menu-item"></screenfull>
|
<screenfull class="screenfull right-menu-item"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<lang-select class="international right-menu-item"></lang-select>
|
<lang-select class="international right-menu-item"/>
|
||||||
|
|
||||||
<el-tooltip effect="dark" :content="$t('navbar.theme')" placement="bottom">
|
<el-tooltip :content="$t('navbar.theme')" effect="dark" placement="bottom">
|
||||||
<theme-picker class="theme-switch right-menu-item"></theme-picker>
|
<theme-picker class="theme-switch right-menu-item"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-dropdown class="avatar-container right-menu-item" trigger="click">
|
<el-dropdown class="avatar-container right-menu-item" trigger="click">
|
||||||
<div class="avatar-wrapper">
|
<div class="avatar-wrapper">
|
||||||
<img class="user-avatar" :src="avatar+'?imageView2/1/w/80/h/80'">
|
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
|
||||||
<i class="el-icon-caret-bottom"></i>
|
<i class="el-icon-caret-bottom"/>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
{{$t('navbar.dashboard')}}
|
{{ $t('navbar.dashboard') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<a target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">
|
<a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
{{$t('navbar.github')}}
|
{{ $t('navbar.github') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</a>
|
</a>
|
||||||
<el-dropdown-item divided>
|
<el-dropdown-item divided>
|
||||||
<span @click="logout" style="display:block;">{{$t('navbar.logOut')}}</span>
|
<span style="display:block;" @click="logout">{{ $t('navbar.logOut') }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
|
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
|
||||||
|
|
||||||
<router-link v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow" :to="resolvePath(onlyOneChild.path)">
|
<router-link v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow" :to="resolvePath(onlyOneChild.path)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<svg-icon v-if="onlyOneChild.meta&&onlyOneChild.meta.icon" :icon-class="onlyOneChild.meta.icon"></svg-icon>
|
<svg-icon v-if="onlyOneChild.meta&&onlyOneChild.meta.icon" :icon-class="onlyOneChild.meta.icon"/>
|
||||||
<span v-if="onlyOneChild.meta&&onlyOneChild.meta.title" slot="title">{{generateTitle(onlyOneChild.meta.title)}}</span>
|
<span v-if="onlyOneChild.meta&&onlyOneChild.meta.title" slot="title">{{ generateTitle(onlyOneChild.meta.title) }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<el-submenu v-else :index="item.name||item.path">
|
<el-submenu v-else :index="item.name||item.path">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon"></svg-icon>
|
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon"/>
|
||||||
<span v-if="item.meta&&item.meta.title" slot="title">{{generateTitle(item.meta.title)}}</span>
|
<span v-if="item.meta&&item.meta.title" slot="title">{{ generateTitle(item.meta.title) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-for="child in item.children" v-if="!child.hidden">
|
<template v-for="child in item.children" v-if="!child.hidden">
|
||||||
<sidebar-item :is-nest="true" class="nest-menu" v-if="child.children&&child.children.length>0" :item="child" :key="child.path" :base-path="resolvePath(child.path)"></sidebar-item>
|
<sidebar-item v-if="child.children&&child.children.length>0" :is-nest="true" :item="child" :key="child.path" :base-path="resolvePath(child.path)" class="nest-menu"/>
|
||||||
|
|
||||||
<router-link v-else :to="resolvePath(child.path)" :key="child.name">
|
<router-link v-else :to="resolvePath(child.path)" :key="child.name">
|
||||||
<el-menu-item :index="resolvePath(child.path)">
|
<el-menu-item :index="resolvePath(child.path)">
|
||||||
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
|
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"/>
|
||||||
<span v-if="child.meta&&child.meta.title" slot="title">{{generateTitle(child.meta.title)}}</span>
|
<span v-if="child.meta&&child.meta.title" slot="title">{{ generateTitle(child.meta.title) }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<el-menu
|
<el-menu
|
||||||
mode="vertical"
|
|
||||||
:show-timeout="200"
|
:show-timeout="200"
|
||||||
:default-active="$route.path"
|
:default-active="$route.path"
|
||||||
:collapse="isCollapse"
|
:collapse="isCollapse"
|
||||||
|
mode="vertical"
|
||||||
background-color="#304156"
|
background-color="#304156"
|
||||||
text-color="#bfcbd9"
|
text-color="#bfcbd9"
|
||||||
active-text-color="#409EFF"
|
active-text-color="#409EFF"
|
||||||
>
|
>
|
||||||
<sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"></sidebar-item>
|
<sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"/>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="tags-view-container">
|
<div class="tags-view-container">
|
||||||
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
|
<scroll-pane ref="scrollPane" class="tags-view-wrapper">
|
||||||
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)"
|
<router-link
|
||||||
:to="tag" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
|
v-for="tag in Array.from(visitedViews)"
|
||||||
{{generateTitle(tag.title)}}
|
ref="tag"
|
||||||
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
|
:class="isActive(tag)?'active':''"
|
||||||
|
:to="tag"
|
||||||
|
:key="tag.path"
|
||||||
|
class="tags-view-item"
|
||||||
|
@contextmenu.prevent.native="openMenu(tag,$event)">
|
||||||
|
{{ generateTitle(tag.title) }}
|
||||||
|
<span class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</scroll-pane>
|
</scroll-pane>
|
||||||
<ul class='contextmenu' v-show="visible" :style="{left:left+'px',top:top+'px'}">
|
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||||
<li @click="closeSelectedTag(selectedTag)">{{$t('tagsView.close')}}</li>
|
<li @click="closeSelectedTag(selectedTag)">{{ $t('tagsView.close') }}</li>
|
||||||
<li @click="closeOthersTags">{{$t('tagsView.closeOthers')}}</li>
|
<li @click="closeOthersTags">{{ $t('tagsView.closeOthers') }}</li>
|
||||||
<li @click="closeAllTags">{{$t('tagsView.closeAll')}}</li>
|
<li @click="closeAllTags">{{ $t('tagsView.closeAll') }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'authredirect',
|
name: 'Authredirect',
|
||||||
created() {
|
created() {
|
||||||
const hash = window.location.search.slice(1)
|
const hash = window.location.search.slice(1)
|
||||||
window.opener.location.href = window.location.origin + '/login#' + hash
|
window.opener.location.href = window.location.origin + '/login#' + hash
|
||||||
window.close()
|
window.close()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
|
|
||||||
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
|
||||||
|
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3 class="title">{{$t('login.title')}}</h3>
|
<h3 class="title">{{ $t('login.title') }}</h3>
|
||||||
<lang-select class="set-language"></lang-select>
|
<lang-select class="set-language"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<span class="svg-container svg-container_login">
|
<span class="svg-container svg-container_login">
|
||||||
<svg-icon icon-class="user" />
|
<svg-icon icon-class="user" />
|
||||||
</span>
|
</span>
|
||||||
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" :placeholder="$t('login.username')"
|
<el-input
|
||||||
|
v-model="loginForm.username"
|
||||||
|
:placeholder="$t('login.username')"
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
auto-complete="on"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -20,32 +25,37 @@
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input name="password" :type="passwordType" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
|
<el-input
|
||||||
:placeholder="$t('login.password')" />
|
:type="passwordType"
|
||||||
|
v-model="loginForm.password"
|
||||||
|
:placeholder="$t('login.password')"
|
||||||
|
name="password"
|
||||||
|
auto-complete="on"
|
||||||
|
@keyup.enter.native="handleLogin" />
|
||||||
<span class="show-pwd" @click="showPwd">
|
<span class="show-pwd" @click="showPwd">
|
||||||
<svg-icon icon-class="eye" />
|
<svg-icon icon-class="eye" />
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" style="width:100%;margin-bottom:30px;" :loading="loading" @click.native.prevent="handleLogin">{{$t('login.logIn')}}</el-button>
|
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">{{ $t('login.logIn') }}</el-button>
|
||||||
|
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<span>{{$t('login.username')}} : admin</span>
|
<span>{{ $t('login.username') }} : admin</span>
|
||||||
<span>{{$t('login.password')}} : {{$t('login.any')}}</span>
|
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<span style="margin-right:18px;">{{$t('login.username')}} : editor</span>
|
<span style="margin-right:18px;">{{ $t('login.username') }} : editor</span>
|
||||||
<span>{{$t('login.password')}} : {{$t('login.any')}}</span>
|
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">{{$t('login.thirdparty')}}</el-button>
|
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">{{ $t('login.thirdparty') }}</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-dialog :title="$t('login.thirdparty')" :visible.sync="showDialog" append-to-body>
|
<el-dialog :title="$t('login.thirdparty')" :visible.sync="showDialog" append-to-body>
|
||||||
{{$t('login.thirdpartyTips')}}
|
{{ $t('login.thirdpartyTips') }}
|
||||||
<br/>
|
<br>
|
||||||
<br/>
|
<br>
|
||||||
<br/>
|
<br>
|
||||||
<social-sign />
|
<social-sign />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
@ -58,8 +68,8 @@ import LangSelect from '@/components/LangSelect'
|
||||||
import SocialSign from './socialsignin'
|
import SocialSign from './socialsignin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'Login',
|
||||||
components: { LangSelect, SocialSign },
|
components: { LangSelect, SocialSign },
|
||||||
name: 'login',
|
|
||||||
data() {
|
data() {
|
||||||
const validateUsername = (rule, value, callback) => {
|
const validateUsername = (rule, value, callback) => {
|
||||||
if (!isvalidUsername(value)) {
|
if (!isvalidUsername(value)) {
|
||||||
|
@ -89,6 +99,12 @@ export default {
|
||||||
showDialog: false
|
showDialog: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
// window.addEventListener('hashchange', this.afterQRScan)
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
// window.removeEventListener('hashchange', this.afterQRScan)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === 'password') {
|
if (this.passwordType === 'password') {
|
||||||
|
@ -131,12 +147,6 @@ export default {
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// window.addEventListener('hashchange', this.afterQRScan)
|
|
||||||
},
|
|
||||||
destroyed() {
|
|
||||||
// window.removeEventListener('hashchange', this.afterQRScan)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="social-signup-container">
|
<div class="social-signup-container">
|
||||||
<div class="sign-btn" @click="wechatHandleClick('wechat')">
|
<div class="sign-btn" @click="wechatHandleClick('wechat')">
|
||||||
<span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon"></svg-icon></span> 微信
|
<span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon"/></span> 微信
|
||||||
</div>
|
</div>
|
||||||
<div class="sign-btn" @click="tencentHandleClick('tencent')">
|
<div class="sign-btn" @click="tencentHandleClick('tencent')">
|
||||||
<span class="qq-svg-container"><svg-icon icon-class="qq" class="icon"></svg-icon></span> QQ
|
<span class="qq-svg-container"><svg-icon icon-class="qq" class="icon"/></span> QQ
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
import openWindow from '@/utils/openWindow'
|
import openWindow from '@/utils/openWindow'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'social-signin',
|
name: 'SocialSignin',
|
||||||
methods: {
|
methods: {
|
||||||
wechatHandleClick(thirdpart) {
|
wechatHandleClick(thirdpart) {
|
||||||
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue