Merge branch 'i18n' into deploy
This commit is contained in:
commit
b6929ca915
|
@ -49,6 +49,7 @@ Vue Element Admin es una solución práctica basada en la nueva plataforma de de
|
||||||
- Plantilla base recomendada para usar: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
- Plantilla base recomendada para usar: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
||||||
- Aplicación de Escritorio: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
- Aplicación de Escritorio: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||||
- Plantilla de Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Créditos: [@Armour](https://github.com/Armour))
|
- Plantilla de Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Créditos: [@Armour](https://github.com/Armour))
|
||||||
|
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||||
|
|
||||||
**Después de la versión `v4.1.0+`, la rama por defecto master no tendrá soporte para i18n. Por favor use [i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), los cambios serán incluidos en la rama master**
|
**Después de la versión `v4.1.0+`, la rama por defecto master no tendrá soporte para i18n. Por favor use [i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), los cambios serán incluidos en la rama master**
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
||||||
- デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
- デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||||
- Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
|
- Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
|
||||||
|
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||||
|
|
||||||
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
|
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ It is a magical vue admin based on the newest development stack of vue, built-in
|
||||||
- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
||||||
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||||
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
|
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
|
||||||
|
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||||
|
|
||||||
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
|
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
- 基础模板建议使用: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
- 基础模板建议使用: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
|
||||||
- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||||
- Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
|
- Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
|
||||||
|
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||||
|
|
||||||
**`v4.1.0+`版本之后默认 master 分支将不支持国际化,有需要的请使用[i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)分支,它会和 master 保持同步更新**
|
**`v4.1.0+`版本之后默认 master 分支将不支持国际化,有需要的请使用[i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)分支,它会和 master 保持同步更新**
|
||||||
|
|
||||||
|
@ -164,7 +165,7 @@ cd vue-element-admin
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||||
npm install --registry=https://registry.npm.taobao.org
|
npm install --registry=https://registry.npm.taobao.org
|
||||||
|
|
||||||
# 启动服务
|
# 启动服务
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exclude": ["node_modules", "dist"]
|
||||||
|
}
|
|
@ -44,7 +44,7 @@
|
||||||
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
|
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "0.18.0",
|
"axios": "0.18.1",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "2.0.4",
|
||||||
"codemirror": "5.45.0",
|
"codemirror": "5.45.0",
|
||||||
"driver.js": "0.9.5",
|
"driver.js": "0.9.5",
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
"@babel/core": "7.0.0",
|
"@babel/core": "7.0.0",
|
||||||
"@babel/register": "7.0.0",
|
"@babel/register": "7.0.0",
|
||||||
"@vue/cli-plugin-babel": "3.5.3",
|
"@vue/cli-plugin-babel": "3.5.3",
|
||||||
"@vue/cli-plugin-eslint": "3.5.1",
|
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||||
"@vue/cli-service": "3.5.3",
|
"@vue/cli-service": "3.5.3",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.29",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,7 +5,8 @@
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img :src="image" class="pan-thumb">
|
<!-- eslint-disable-next-line -->
|
||||||
|
<div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -52,7 +53,8 @@ export default {
|
||||||
.pan-thumb {
|
.pan-thumb {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-size: 100%;
|
background-position: center center;
|
||||||
|
background-size: cover;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -60,7 +62,7 @@ export default {
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pan-thumb:after {
|
/* .pan-thumb:after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
@ -71,7 +73,7 @@ export default {
|
||||||
margin: -4px 0 0 -4px;
|
margin: -4px 0 0 -4px;
|
||||||
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
|
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
|
||||||
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
|
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
|
||||||
}
|
} */
|
||||||
|
|
||||||
.pan-info {
|
.pan-info {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||||
<use :xlink:href="iconName" />
|
<use :href="iconName" />
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ export function numberFormatter(num, digits) {
|
||||||
]
|
]
|
||||||
for (let i = 0; i < si.length; i++) {
|
for (let i = 0; i < si.length; i++) {
|
||||||
if (num >= si[i].value) {
|
if (num >= si[i].value) {
|
||||||
return (num / si[i].value + 0.1).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol
|
return (num / si[i].value).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return num.toString()
|
return num.toString()
|
||||||
|
|
|
@ -9,27 +9,18 @@
|
||||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
||||||
tag="span"
|
tag="span"
|
||||||
class="tags-view-item"
|
class="tags-view-item"
|
||||||
@click.middle.native="closeSelectedTag(tag)"
|
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
|
||||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
@contextmenu.prevent.native="openMenu(tag,$event)"
|
||||||
>
|
>
|
||||||
{{ generateTitle(tag.title) }}
|
{{ generateTitle(tag.title) }}
|
||||||
<span v-if="!tag.meta.affix" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
|
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
|
||||||
</router-link>
|
</router-link>
|
||||||
</scroll-pane>
|
</scroll-pane>
|
||||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||||
<li @click="refreshSelectedTag(selectedTag)">
|
<li @click="refreshSelectedTag(selectedTag)">{{ $t('tagsView.refresh') }}</li>
|
||||||
{{ $t('tagsView.refresh') }}
|
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">{{ $t('tagsView.close') }}</li>
|
||||||
</li>
|
<li @click="closeOthersTags">{{ $t('tagsView.closeOthers') }}</li>
|
||||||
<li v-if="!(selectedTag.meta&&selectedTag.meta.affix)" @click="closeSelectedTag(selectedTag)">
|
<li @click="closeAllTags(selectedTag)">{{ $t('tagsView.closeAll') }}</li>
|
||||||
{{
|
|
||||||
$t('tagsView.close') }}
|
|
||||||
</li>
|
|
||||||
<li @click="closeOthersTags">
|
|
||||||
{{ $t('tagsView.closeOthers') }}
|
|
||||||
</li>
|
|
||||||
<li @click="closeAllTags(selectedTag)">
|
|
||||||
{{ $t('tagsView.closeAll') }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -80,6 +71,9 @@ export default {
|
||||||
isActive(route) {
|
isActive(route) {
|
||||||
return route.path === this.$route.path
|
return route.path === this.$route.path
|
||||||
},
|
},
|
||||||
|
isAffix(tag) {
|
||||||
|
return tag.meta && tag.meta.affix
|
||||||
|
},
|
||||||
filterAffixTags(routes, basePath = '/') {
|
filterAffixTags(routes, basePath = '/') {
|
||||||
let tags = []
|
let tags = []
|
||||||
routes.forEach(route => {
|
routes.forEach(route => {
|
||||||
|
@ -166,7 +160,7 @@ export default {
|
||||||
toLastView(visitedViews, view) {
|
toLastView(visitedViews, view) {
|
||||||
const latestView = visitedViews.slice(-1)[0]
|
const latestView = visitedViews.slice(-1)[0]
|
||||||
if (latestView) {
|
if (latestView) {
|
||||||
this.$router.push(latestView)
|
this.$router.push(latestView.fullPath)
|
||||||
} else {
|
} else {
|
||||||
// now the default is to redirect to the home page if there is no tags-view,
|
// now the default is to redirect to the home page if there is no tags-view,
|
||||||
// you can adjust it according to your needs.
|
// you can adjust it according to your needs.
|
||||||
|
|
|
@ -28,13 +28,8 @@ const mutations = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DEL_CACHED_VIEW: (state, view) => {
|
DEL_CACHED_VIEW: (state, view) => {
|
||||||
for (const i of state.cachedViews) {
|
const index = state.cachedViews.indexOf(view.name)
|
||||||
if (i === view.name) {
|
index > -1 && state.cachedViews.splice(index, 1)
|
||||||
const index = state.cachedViews.indexOf(i)
|
|
||||||
state.cachedViews.splice(index, 1)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
||||||
|
@ -43,12 +38,12 @@ const mutations = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
||||||
for (const i of state.cachedViews) {
|
const index = state.cachedViews.indexOf(view.name)
|
||||||
if (i === view.name) {
|
if (index > -1) {
|
||||||
const index = state.cachedViews.indexOf(i)
|
|
||||||
state.cachedViews = state.cachedViews.slice(index, index + 1)
|
state.cachedViews = state.cachedViews.slice(index, index + 1)
|
||||||
break
|
} else {
|
||||||
}
|
// if index = -1, there is no cached tags
|
||||||
|
state.cachedViews = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -73,13 +73,18 @@ const actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// user logout
|
// user logout
|
||||||
logout({ commit, state }) {
|
logout({ commit, state, dispatch }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token).then(() => {
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
commit('SET_ROLES', [])
|
commit('SET_ROLES', [])
|
||||||
removeToken()
|
removeToken()
|
||||||
resetRouter()
|
resetRouter()
|
||||||
|
|
||||||
|
// reset visited views and cached views
|
||||||
|
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
||||||
|
dispatch('tagsView/delAllViews', null, { root: true })
|
||||||
|
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
|
@ -22,14 +22,10 @@ export default function handleClipboard(text, event) {
|
||||||
})
|
})
|
||||||
clipboard.on('success', () => {
|
clipboard.on('success', () => {
|
||||||
clipboardSuccess()
|
clipboardSuccess()
|
||||||
clipboard.off('error')
|
|
||||||
clipboard.off('success')
|
|
||||||
clipboard.destroy()
|
clipboard.destroy()
|
||||||
})
|
})
|
||||||
clipboard.on('error', () => {
|
clipboard.on('error', () => {
|
||||||
clipboardError()
|
clipboardError()
|
||||||
clipboard.off('error')
|
|
||||||
clipboard.off('success')
|
|
||||||
clipboard.destroy()
|
clipboard.destroy()
|
||||||
})
|
})
|
||||||
clipboard.onClick(event)
|
clipboard.onClick(event)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Parse the time to string
|
* Parse the time to string
|
||||||
* @param {(Object|string|number)} time
|
* @param {(Object|string|number)} time
|
||||||
* @param {string} cFormat
|
* @param {string} cFormat
|
||||||
* @returns {string}
|
* @returns {string | null}
|
||||||
*/
|
*/
|
||||||
export function parseTime(time, cFormat) {
|
export function parseTime(time, cFormat) {
|
||||||
if (arguments.length === 0) {
|
if (arguments.length === 0) {
|
||||||
|
@ -34,14 +34,11 @@ export function parseTime(time, cFormat) {
|
||||||
s: date.getSeconds(),
|
s: date.getSeconds(),
|
||||||
a: date.getDay()
|
a: date.getDay()
|
||||||
}
|
}
|
||||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
||||||
let value = formatObj[key]
|
const value = formatObj[key]
|
||||||
// Note: getDay() returns 0 on Sunday
|
// Note: getDay() returns 0 on Sunday
|
||||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
|
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
|
||||||
if (result.length > 0 && value < 10) {
|
return value.toString().padStart(2, '0')
|
||||||
value = '0' + value
|
|
||||||
}
|
|
||||||
return value || 0
|
|
||||||
})
|
})
|
||||||
return time_str
|
return time_str
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
require('script-loader!file-saver');
|
import { saveAs } from 'file-saver'
|
||||||
import XLSX from 'xlsx'
|
import XLSX from 'xlsx'
|
||||||
|
|
||||||
function generateArray(table) {
|
function generateArray(table) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
require('script-loader!file-saver');
|
import { saveAs } from 'file-saver'
|
||||||
import JSZip from 'jszip'
|
import JSZip from 'jszip'
|
||||||
|
|
||||||
export function export_txt_to_zip(th, jsonData, txtName, zipName) {
|
export function export_txt_to_zip(th, jsonData, txtName, zipName) {
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<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;max-width:100%;" />
|
<el-input v-model="inputData" placeholder="Please input" style="width:400px;max-width:100%;" />
|
||||||
<el-button type="primary" icon="document" @click="handleCopy(inputData,$event)">
|
<el-button type="primary" icon="el-icon-document" @click="handleCopy(inputData,$event)">
|
||||||
copy
|
copy
|
||||||
</el-button>
|
</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;max-width:100%;" />
|
<el-input v-model="inputData" placeholder="Please input" style="width:400px;max-width:100%;" />
|
||||||
<el-button v-clipboard:copy="inputData" v-clipboard:success="clipboardSuccess" type="primary" icon="document">
|
<el-button v-clipboard:copy="inputData" v-clipboard:success="clipboardSuccess" type="primary" icon="el-icon-document">
|
||||||
copy
|
copy
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<pan-thumb :image="image" />
|
<pan-thumb :image="image" />
|
||||||
|
|
||||||
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">
|
<el-button type="primary" icon="el-icon-upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">
|
||||||
Change Avatar
|
Change Avatar
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,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 v-model="demo.title" icon="search" name="title" placeholder="输入标题">
|
<md-input v-model="demo.title" icon="el-icon-search" name="title" placeholder="输入标题">
|
||||||
标题
|
标题
|
||||||
</md-input>
|
</md-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -3,10 +3,16 @@ import { debounce } from '@/utils'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
$_sidebarElm: null
|
$_sidebarElm: null,
|
||||||
|
$_resizeHandler: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$_resizeHandler = debounce(() => {
|
||||||
|
if (this.chart) {
|
||||||
|
this.chart.resize()
|
||||||
|
}
|
||||||
|
}, 100)
|
||||||
this.$_initResizeEvent()
|
this.$_initResizeEvent()
|
||||||
this.$_initSidebarResizeEvent()
|
this.$_initSidebarResizeEvent()
|
||||||
},
|
},
|
||||||
|
@ -27,13 +33,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// use $_ for mixins properties
|
// use $_ for mixins properties
|
||||||
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
$_resizeHandler() {
|
|
||||||
return debounce(() => {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
}, 100)()
|
|
||||||
},
|
|
||||||
$_initResizeEvent() {
|
$_initResizeEvent() {
|
||||||
window.addEventListener('resize', this.$_resizeHandler)
|
window.addEventListener('resize', this.$_resizeHandler)
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
<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>
|
||||||
<a class="document-btn" target="_blank" href="https://panjiachen.gitee.io/vue-element-admin-site/zh/">国内文档</a>
|
<a class="document-btn" target="_blank" href="https://panjiachen.gitee.io/vue-element-admin-site/zh/">国内文档</a>
|
||||||
<dropdown-menu :items="articleList" style="float:left;margin-left:50px;" title="系列文章" />
|
<dropdown-menu :items="articleList" style="float:left;margin-left:50px;" title="系列文章" />
|
||||||
|
<a
|
||||||
|
class="document-btn"
|
||||||
|
target="_blank"
|
||||||
|
href="https://panjiachen.github.io/vue-element-admin-site/zh/job/"
|
||||||
|
>内推招聘</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -33,8 +38,9 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.documentation-container {
|
.documentation-container {
|
||||||
margin: 50px;
|
margin: 50px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
.document-btn {
|
.document-btn {
|
||||||
float: left;
|
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
display: block;
|
display: block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -42,6 +48,7 @@ export default {
|
||||||
color: white;
|
color: white;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
margin-bottom: 16px;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="errPage-container">
|
<div class="errPage-container">
|
||||||
<el-button icon="arrow-left" class="pan-back-btn" @click="back">
|
<el-button icon="el-icon-arrow-left" class="pan-back-btn" @click="back">
|
||||||
返回
|
返回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
|
@ -172,8 +172,6 @@ export default {
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
const id = this.$route.params && this.$route.params.id
|
const id = this.$route.params && this.$route.params.id
|
||||||
this.fetchData(id)
|
this.fetchData(id)
|
||||||
} else {
|
|
||||||
this.postForm = Object.assign({}, defaultForm)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why need to make a copy of this.$route here?
|
// Why need to make a copy of this.$route here?
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import ArticleDetail from './components/ArticleDetail'
|
import ArticleDetail from './components/ArticleDetail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateForm',
|
name: 'CreateArticle',
|
||||||
components: { ArticleDetail }
|
components: { ArticleDetail }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<FilenameOption v-model="filename" />
|
<FilenameOption v-model="filename" />
|
||||||
<AutoWidthOption v-model="autoWidth" />
|
<AutoWidthOption v-model="autoWidth" />
|
||||||
<BookTypeOption v-model="bookType" />
|
<BookTypeOption v-model="bookType" />
|
||||||
<el-button :loading="downloadLoading" style="margin:0 0 20px 20px;" type="primary" icon="document" @click="handleDownload">
|
<el-button :loading="downloadLoading" style="margin:0 0 20px 20px;" type="primary" icon="el-icon-document" @click="handleDownload">
|
||||||
{{ $t('excel.export') }} Excel
|
{{ $t('excel.export') }} Excel
|
||||||
</el-button>
|
</el-button>
|
||||||
<a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;">
|
<a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="document" @click="handleDownload">Export</el-button>
|
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="el-icon-document" @click="handleDownload">Export</el-button>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<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 v-model="filename" :placeholder="$t('excel.placeholder')" style="width:350px;" prefix-icon="el-icon-document" />
|
<el-input v-model="filename" :placeholder="$t('excel.placeholder')" style="width:350px;" prefix-icon="el-icon-document" />
|
||||||
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="document" @click="handleDownload">
|
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="el-icon-document" @click="handleDownload">
|
||||||
{{ $t('excel.selectedExport') }}
|
{{ $t('excel.selectedExport') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;">
|
<a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;">
|
||||||
|
|
|
@ -241,7 +241,7 @@ export default {
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
message: `
|
message: `
|
||||||
<div>Role Key: ${key}</div>
|
<div>Role Key: ${key}</div>
|
||||||
<div>Role Nmae: ${name}</div>
|
<div>Role Name: ${name}</div>
|
||||||
<div>Description: ${description}</div>
|
<div>Description: ${description}</div>
|
||||||
`,
|
`,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
<el-table-column :label="$t('table.id')" prop="id" sortable="custom" align="center" width="80">
|
<el-table-column :label="$t('table.id')" prop="id" sortable="custom" align="center" width="80" :class-name="getSortClass('id')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.id }}</span>
|
<span>{{ scope.row.id }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -375,6 +375,14 @@ export default {
|
||||||
return v[j]
|
return v[j]
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
},
|
||||||
|
getSortClass: function(key) {
|
||||||
|
const sort = this.listQuery.sort
|
||||||
|
return sort === `+${key}`
|
||||||
|
? 'ascending'
|
||||||
|
: sort === `-${key}`
|
||||||
|
? 'descending'
|
||||||
|
: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<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 v-model="filename" :placeholder="$t('zip.placeholder')" style="width:300px;" prefix-icon="el-icon-document" />
|
<el-input v-model="filename" :placeholder="$t('zip.placeholder')" style="width:300px;" prefix-icon="el-icon-document" />
|
||||||
<el-button :loading="downloadLoading" style="margin-bottom:20px;" type="primary" icon="document" @click="handleDownload">
|
<el-button :loading="downloadLoading" style="margin-bottom:20px;" type="primary" icon="el-icon-document" @click="handleDownload">
|
||||||
{{ $t('zip.export') }} Zip
|
{{ $t('zip.export') }} Zip
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-table v-loading="listLoading" :data="list" element-loading-text="拼命加载中" border fit highlight-current-row>
|
<el-table v-loading="listLoading" :data="list" element-loading-text="拼命加载中" border fit highlight-current-row>
|
||||||
|
|
|
@ -7,10 +7,13 @@ function resolve(dir) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = defaultSettings.title || 'vue Element Admin' // page title
|
const name = defaultSettings.title || 'vue Element Admin' // page title
|
||||||
|
|
||||||
// If your port is set to 80,
|
// If your port is set to 80,
|
||||||
// use administrator privileges to execute the command line.
|
// use administrator privileges to execute the command line.
|
||||||
// For example, Mac: sudo npm run
|
// For example, Mac: sudo npm run
|
||||||
const port = 9527 // dev port
|
// You can change the port by the following method:
|
||||||
|
// port = 9527 npm run dev OR npm run dev --port = 9527
|
||||||
|
const port = process.env.port || process.env.npm_config_port || 9527 // dev port
|
||||||
|
|
||||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in New Issue