diff --git a/README.es.md b/README.es.md
index 396556f5..472adb60 100644
--- a/README.es.md
+++ b/README.es.md
@@ -51,24 +51,26 @@ Vue Element Admin es una solución práctica basada en la nueva plataforma de de
- 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 utilice la rama [i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), los cambios serán incluidos en la rama master**
**la versión actual es `v4.0+` construida con `vue-cli`. Si encuentra algún problema, por favor coloque un [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). Si desea usar la versión anterior, puede cambiar de rama a [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), no relacionado con `vue-cli`**
-**Este proyecto no está soportado para versiones muy viejas de navegadores (e.g. IE).**
+**Este proyecto no está soportado para versiones antigüas de navegadores (ej. IE).**
## Preparación
Necesita instalar [node](https://nodejs.org/) y [git](https://git-scm.com/) localmente. El proyecto es basado en [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), toda la solicitud de datos simulada se realiza a través de [Mock.js](https://github.com/nuysoft/Mock).
Entendiendo y aprendiendo esto pudiera ayudarle con su proyecto.
-
+[](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
+
+
## Patrocinantes
-Se un patrocinante y pon tu logo en nuestro README on GitHub con un enlace directo a tu sitio web. [[Se un Patrocinante]](https://www.patreon.com/panjiachen)
+Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un enlace directo a su sitio web. [[Se un Patrocinante]](https://www.patreon.com/panjiachen)
Plantilla de Dashboard de administración hecha con Vue, React y Angular.
@@ -77,25 +79,28 @@ Se un patrocinante y pon tu logo en nuestro README on GitHub con un enlace direc
```
- Iniciar / Cerrar Sesión
-- Permisos de Authentication
+- Permisos de Autenticación
- Página de Permisos
- Directivas de permisos
- Página de configuración de permisos
- Autenticación por dos pasos
- Construcción Multi-entorno
- - dev sit stage producción
+ - Desarrollo (dev)
+ - sit
+ - Escenario de pruebas (stage),
+ - Producción (prod)
- Características Globales
- I18n
- Temas dinámicos
- - Dynamic sidebar (soporte a rutas multi-nivel)
+ - Menu lateral dinámico (soporte a rutas multi-nivel)
- Barra de rutas dinámica
- - Tags-view (Tab page Support right-click operation)
+ - Tags-view (Pestañas de página, Soporta operación de clic derecho)
- Svg Sprite
- Datos de simulación con Mock
- Pantalla completa
- - Responsive Sidebar
+ - Menu lateral responsivo
- Editor
- Editor de Texto Enriquecido
@@ -106,7 +111,7 @@ Se un patrocinante y pon tu logo en nuestro README on GitHub con un enlace direc
- Exportación a Excel
- Carga de Excel
- Visualización de Excel
- - Exportación como zip
+ - Exportación como ZIP
- Tabla
- Tabla Dinámica
@@ -135,7 +140,7 @@ Se un patrocinante y pon tu logo en nuestro README on GitHub con un enlace direc
- Página de Guías
- ECharts (Gráficos)
- Portapapeles
-- Convertidor de Markdown a html
+- Convertidor de Markdown a HTML
```
## Iniciando
@@ -208,7 +213,7 @@ Navegadores modernos e Internet Explorer 10+.
| [](https://godban.github.io/browsers-support-badges/)IE / Edge | [](https://godban.github.io/browsers-support-badges/)Firefox | [](https://godban.github.io/browsers-support-badges/)Chrome | [](https://godban.github.io/browsers-support-badges/)Safari |
| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| últimas 2 versiones| últimas 2 versiones| últimas 2 versiones
+| IE10, IE11, Edge | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones |
## Licencia
diff --git a/README.ja.md b/README.ja.md
index f0bc0ac1..7e23674b 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -30,7 +30,7 @@
## 概要
-[vue-element-admin](https://panjiachen.github.io/vue-element-admin) は管理画面のフロントエンドのインタフェース,[vue](https://github.com/vuejs/vue) と [element-ui](https://github.com/ElemeFE/element)を使っています。i18nの多言語対応、可変ルート、権限、典型的なビジネスアプリテンプレートであり、豊富なコンポーネントを提供しています、素早くビジネス用の管理画面の現型を構築に役立ちます。
+[vue-element-admin](https://panjiachen.github.io/vue-element-admin) は管理画面のフロントエンドのインタフェースで、[vue](https://github.com/vuejs/vue) と [element-ui](https://github.com/ElemeFE/element)を使っています。i18nの多言語対応、可変ルート、権限、典型的なビジネスアプリテンプレートであり、豊富なコンポーネントを提供しています。素早くビジネス用の管理画面の現型を構築に役立ちます。
- [デモページ](https://panjiachen.github.io/vue-element-admin)
@@ -44,22 +44,24 @@
- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
- デスクトップバージョン: [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**
+**バージョン`v4.1.0+`以降について、デフォルトのmasterブランチではi18nをサポートしていません。masterブランチと共にアップデートされる[i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)を使用してください。 **
-**現在のバージョン `v4.0+` は `vue-cli` で構築,バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。`vue-cli`に依存しないです。**
+**現在のバージョン `v4.0+` は `vue-cli` で構築していて、バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。こちらは`vue-cli`に依存しないです。**
**低いバージョンのブラウザはサーポートしないです(例えば ie),必要があれば polyfill を追加してください。 [詳細はこちら](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
## 前準備
-ローカル環境に [node](http://nodejs.org/) と [git](https://git-scm.com/)をインストールが必要です。[ES2015+](http://es6.ruanyifeng.com/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element)で開発しています。Requestは[Mock.js](https://github.com/nuysoft/Mock)のモックデータを使っています。
+ローカル環境に [node](http://nodejs.org/) と [git](https://git-scm.com/)のインストールが必要です。[ES2015+](http://es6.ruanyifeng.com/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) と [element-ui](https://github.com/ElemeFE/element)で開発しています。Requestは[Mock.js](https://github.com/nuysoft/Mock)のモックデータを使っています。
**バグ修正や新規機能追加のissue と pull requestは大歓迎です。**
-
+[](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
+
+
@@ -81,15 +83,18 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
- 外部IDでログイン
- 複数環境デプロイ
- - dev sit stage prod
+ - dev
+ - sit
+ - stage
+ - prod
- 共通機能
- 多言語切替
- テーマ切替
- サイトメニュー(ルートから生成)
- - Breadcrumb Navigation
- - Tag Navigation
- - Svg Sprite Icon
+ - パンくずリストナビゲーション
+ - タブナビゲーション
+ - Svg Sprite アイコン
- ローカル/バックエンド モック データ
- Screenfull
@@ -104,33 +109,33 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
- リード
- Zip
-- Table
- - Dynamic Table
- - Drag And Drop Table
- - Inline Edit Table
+- テーブル
+ - ダイナミックテーブル
+ - ドラッグアンドドロップテーブル
+ - インラインエディットテーブル
-- Error Page
+- エラーページ
- 401
- 404
- コンポーネント
- - Avatar Upload
- - Back To Top
- - Drag Dialog
- - Drag Select
- - Drag Kanban
- - Drag List
- - SplitPane
+ - アバターアップロード
+ - トップに戻る
+ - ドラッグダイアログ
+ - ドラッグ選択
+ - ドラッグKanban
+ - ドラッグリスト
+ - ペインの分割
- Dropzone
- - Sticky
+ - スティッキー
- CountTo
-- Advanced Example
-- Error Log
-- Dashboard
-- Guide Page
+- 高度なサンプル
+- エラーログ
+- ダッシュボード
+- ガイドページ
- ECharts
-- Clipboard
+- クリップボード
- Markdown to html
```
@@ -150,7 +155,7 @@ npm install
npm run dev
```
-This will automatically open http://localhost:9527
+http://localhost:9527 が自動的に開きます。
## Build
@@ -178,11 +183,11 @@ npm run lint
npm run lint -- --fix
```
-Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
+詳細は [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) を参照してください。
## Changelog
-Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases).
+各リリースの詳細は [release notes](https://github.com/PanJiaChen/vue-element-admin/releases) にあります。
## Online Demo
@@ -204,7 +209,7 @@ Modern browsers and Internet Explorer 10+.
| [](https://godban.github.io/browsers-support-badges/)IE / Edge | [](https://godban.github.io/browsers-support-badges/)Firefox | [](https://godban.github.io/browsers-support-badges/)Chrome | [](https://godban.github.io/browsers-support-badges/)Safari |
| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
## License
diff --git a/README.md b/README.md
index 360407c9..754c5963 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,9 @@ English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) | [Spa
You need to install [node](https://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock).
Understanding and learning this knowledge in advance will greatly help the use of this project.
-
+[](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
+
+
@@ -84,7 +86,10 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
- Two-step login
- Multi-environment build
- - dev sit stage prod
+ - Develop (dev)
+ - sit
+ - Stage Test (stage)
+ - Production (prod)
- Global Features
- I18n
@@ -208,7 +213,7 @@ Modern browsers and Internet Explorer 10+.
| [](https://godban.github.io/browsers-support-badges/)IE / Edge | [](https://godban.github.io/browsers-support-badges/)Firefox | [](https://godban.github.io/browsers-support-badges/)Chrome | [](https://godban.github.io/browsers-support-badges/)Safari |
| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
## License
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 78a88e4a..cb6fd073 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -77,7 +77,9 @@
**如有问题请先看上述使用文档和文章,若不能满足,欢迎 issue 和 pr**
-
+[](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
+
+
@@ -99,7 +101,10 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
- 二步登录
- 多环境发布
- - dev sit stage prod
+ - dev
+ - sit
+ - stage
+ - prod
- 全局功能
- 国际化多语言
@@ -221,13 +226,17 @@ Detailed changes for each release are documented in the [release notes](https://
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
+## 购买贴纸
+
+你也可以通过 购买[官方授权的贴纸](https://smallsticker.com/product/vue-element-admin) 的方式来支持 vue-element-admin - 每售出一张贴纸,本项目将获得 2 元的捐赠。
+
## Browsers support
Modern browsers and Internet Explorer 10+.
| [](https://godban.github.io/browsers-support-badges/)IE / Edge | [](https://godban.github.io/browsers-support-badges/)Firefox | [](https://godban.github.io/browsers-support-badges/)Chrome | [](https://godban.github.io/browsers-support-badges/)Safari |
| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
## License
diff --git a/mock/index.js b/mock/index.js
index 217ee3d5..196e2927 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -54,18 +54,4 @@ export function mockXHR() {
}
}
-// for mock server
-const responseFake = (url, type, respond) => {
- return {
- url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
- type: type || 'get',
- response(req, res) {
- console.log('request invoke:' + req.path)
- res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
- }
- }
-}
-
-export default mocks.map(route => {
- return responseFake(route.url, route.type, route.response)
-})
+export default mocks
diff --git a/mock/mock-server.js b/mock/mock-server.js
index 4c4cb2af..806fdacc 100644
--- a/mock/mock-server.js
+++ b/mock/mock-server.js
@@ -2,17 +2,21 @@ const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
+const Mock = require('mockjs')
const mockDir = path.join(process.cwd(), 'mock')
function registerRoutes(app) {
let mockLastIndex
const { default: mocks } = require('./index.js')
- for (const mock of mocks) {
+ const mocksForServer = mocks.map(route => {
+ return responseFake(route.url, route.type, route.response)
+ })
+ for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
- const mockRoutesLength = Object.keys(mocks).length
+ const mockRoutesLength = Object.keys(mocksForServer).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength
@@ -27,6 +31,18 @@ function unregisterRoutes() {
})
}
+// for mock server
+const responseFake = (url, type, respond) => {
+ return {
+ url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
+ type: type || 'get',
+ response(req, res) {
+ console.log('request invoke:' + req.path)
+ res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
+ }
+ }
+}
+
module.exports = app => {
// es6 polyfill
require('@babel/register')
diff --git a/package.json b/package.json
index 7ef29082..c829a00d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-element-admin",
- "version": "4.2.1",
+ "version": "4.3.0",
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "Pan ",
"license": "MIT",
@@ -59,7 +59,9 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
+ "pinyin": "2.9.0",
"screenfull": "4.2.0",
+ "script-loader": "0.7.2",
"showdown": "1.9.0",
"sortablejs": "1.8.4",
"tui-editor": "1.3.3",
@@ -94,12 +96,11 @@
"husky": "1.3.1",
"lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3",
- "node-sass": "^4.9.0",
"plop": "2.3.0",
"runjs": "^4.3.2",
+ "sass": "^1.26.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
- "script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
diff --git a/src/components/DragSelect/index.vue b/src/components/DragSelect/index.vue
index 28256a8b..47f42474 100644
--- a/src/components/DragSelect/index.vue
+++ b/src/components/DragSelect/index.vue
@@ -48,14 +48,18 @@ export default {
}
-
diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue
index 90eea067..5d61ba37 100644
--- a/src/components/HeaderSearch/index.vue
+++ b/src/components/HeaderSearch/index.vue
@@ -41,6 +41,9 @@ export default {
},
lang() {
return this.$store.getters.language
+ },
+ supportPinyinSearch() {
+ return this.$store.state.settings.supportPinyinSearch
}
},
watch: {
@@ -51,6 +54,10 @@ export default {
this.searchPool = this.generateRoutes(this.routes)
},
searchPool(list) {
+ // Support pinyin search
+ if (this.lang === 'zh' && this.supportPinyinSearch) {
+ this.addPinyinField(list)
+ }
this.initFuse(list)
},
show(value) {
@@ -65,6 +72,23 @@ export default {
this.searchPool = this.generateRoutes(this.routes)
},
methods: {
+ async addPinyinField(list) {
+ const { default: pinyin } = await import('pinyin')
+ if (Array.isArray(list)) {
+ list.forEach(element => {
+ const title = element.title
+ if (Array.isArray(title)) {
+ title.forEach(v => {
+ v = pinyin(v, {
+ style: pinyin.STYLE_NORMAL
+ }).join('')
+ element.pinyinTitle = v
+ })
+ }
+ })
+ return list
+ }
+ },
click() {
this.show = !this.show
if (this.show) {
@@ -95,6 +119,9 @@ export default {
keys: [{
name: 'title',
weight: 0.7
+ }, {
+ name: 'pinyinTitle',
+ weight: 0.3
}, {
name: 'path',
weight: 0.3
@@ -105,29 +132,23 @@ export default {
// And generate the internationalized title
generateRoutes(routes, basePath = '/', prefixTitle = []) {
let res = []
-
for (const router of routes) {
// skip hidden router
if (router.hidden) { continue }
-
const data = {
path: path.resolve(basePath, router.path),
title: [...prefixTitle]
}
-
if (router.meta && router.meta.title) {
// generate internationalized title
const i18ntitle = i18n.t(`route.${router.meta.title}`)
-
data.title = [...data.title, i18ntitle]
-
if (router.redirect !== 'noRedirect') {
// only push the routes with title
// special case: need to exclude parent router without redirect
res.push(data)
}
}
-
// recursive child routes
if (router.children) {
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
@@ -152,13 +173,11 @@ export default {
diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue
index 9a3318e5..b07ded2a 100644
--- a/src/components/SvgIcon/index.vue
+++ b/src/components/SvgIcon/index.vue
@@ -1,7 +1,7 @@
diff --git a/src/components/Tinymce/components/EditorImage.vue b/src/components/Tinymce/components/EditorImage.vue
index d4a98e84..07d48e6c 100644
--- a/src/components/Tinymce/components/EditorImage.vue
+++ b/src/components/Tinymce/components/EditorImage.vue
@@ -104,7 +104,7 @@ export default {