diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..e2849c4
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,7 @@
+src/assets
+src/icons
+public
+dist
+node_modules
+vab-icon
+layouts
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 6316ee7..b7a0d05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,7 +17,7 @@ yarn-error.log*
public/video
*.zip
*.7z
-/src/layouts/components/zx-layouts
+/src/layouts/components/layouts
/zx-templates
/package-lock.json
/src/styles/themes/green.scss
diff --git a/layouts/Permissions/index.js b/layouts/Permissions/index.js
new file mode 100644
index 0000000..7d2d86e
--- /dev/null
+++ b/layouts/Permissions/index.js
@@ -0,0 +1,13 @@
+import permissions from './permissions'
+
+const install = function (Vue) {
+ Vue.directive('permissions', permissions)
+}
+
+if (window.Vue) {
+ window['permissions'] = permissions
+ Vue.use(install)
+}
+
+permissions.install = install
+export default permissions
diff --git a/layouts/Permissions/permissions.js b/layouts/Permissions/permissions.js
new file mode 100644
index 0000000..74ac1f6
--- /dev/null
+++ b/layouts/Permissions/permissions.js
@@ -0,0 +1,13 @@
+import store from '@/store'
+
+export default {
+ inserted(element, binding) {
+ const { value } = binding
+ const permissions = store.getters['user/permissions']
+ if (value && value instanceof Array && value.length > 0) {
+ const hasPermission = permissions.some((role) => value.includes(role))
+ if (!hasPermission)
+ element.parentNode && element.parentNode.removeChild(element)
+ }
+ },
+}
diff --git a/layouts/VabColorfullIcon/index.vue b/layouts/VabColorfullIcon/index.vue
new file mode 100644
index 0000000..840de3c
--- /dev/null
+++ b/layouts/VabColorfullIcon/index.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
diff --git a/layouts/VabErrorLog/index.vue b/layouts/VabErrorLog/index.vue
new file mode 100644
index 0000000..fd7170a
--- /dev/null
+++ b/layouts/VabErrorLog/index.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
diff --git a/layouts/VabFullScreenBar/index.vue b/layouts/VabFullScreenBar/index.vue
new file mode 100644
index 0000000..fedf502
--- /dev/null
+++ b/layouts/VabFullScreenBar/index.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
diff --git a/layouts/VabGithubCorner/index.vue b/layouts/VabGithubCorner/index.vue
new file mode 100644
index 0000000..23341f3
--- /dev/null
+++ b/layouts/VabGithubCorner/index.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
diff --git a/layouts/VabQueryForm/VabQueryFormBottomPanel.vue b/layouts/VabQueryForm/VabQueryFormBottomPanel.vue
new file mode 100644
index 0000000..53bd186
--- /dev/null
+++ b/layouts/VabQueryForm/VabQueryFormBottomPanel.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabQueryForm/VabQueryFormLeftPanel.vue b/layouts/VabQueryForm/VabQueryFormLeftPanel.vue
new file mode 100644
index 0000000..ee23a78
--- /dev/null
+++ b/layouts/VabQueryForm/VabQueryFormLeftPanel.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabQueryForm/VabQueryFormRightPanel.vue b/layouts/VabQueryForm/VabQueryFormRightPanel.vue
new file mode 100644
index 0000000..e74aa14
--- /dev/null
+++ b/layouts/VabQueryForm/VabQueryFormRightPanel.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabQueryForm/VabQueryFormTopPanel.vue b/layouts/VabQueryForm/VabQueryFormTopPanel.vue
new file mode 100644
index 0000000..7a48e3f
--- /dev/null
+++ b/layouts/VabQueryForm/VabQueryFormTopPanel.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabQueryForm/index.vue b/layouts/VabQueryForm/index.vue
new file mode 100644
index 0000000..f49a6bb
--- /dev/null
+++ b/layouts/VabQueryForm/index.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabRemixIcon/index.vue b/layouts/VabRemixIcon/index.vue
new file mode 100644
index 0000000..1f45271
--- /dev/null
+++ b/layouts/VabRemixIcon/index.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
diff --git a/layouts/VabSideBar/components/VabMenuItem.vue b/layouts/VabSideBar/components/VabMenuItem.vue
new file mode 100644
index 0000000..3ed8d1b
--- /dev/null
+++ b/layouts/VabSideBar/components/VabMenuItem.vue
@@ -0,0 +1,84 @@
+
+
+
+ {{ routeChildren.meta.title }}
+
+ {{ routeChildren.meta.badge }}
+
+
+
+
+
diff --git a/layouts/VabSideBar/components/VabSideBarItem.vue b/layouts/VabSideBar/components/VabSideBarItem.vue
new file mode 100644
index 0000000..baaac70
--- /dev/null
+++ b/layouts/VabSideBar/components/VabSideBarItem.vue
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabSideBar/components/VabSubmenu.vue b/layouts/VabSideBar/components/VabSubmenu.vue
new file mode 100644
index 0000000..58d90c5
--- /dev/null
+++ b/layouts/VabSideBar/components/VabSubmenu.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+ {{ item.meta.title }}
+
+
+
+
+
+
diff --git a/layouts/VabSideBar/index.vue b/layouts/VabSideBar/index.vue
new file mode 100644
index 0000000..c01103f
--- /dev/null
+++ b/layouts/VabSideBar/index.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabTabsBar/index.vue b/layouts/VabTabsBar/index.vue
new file mode 100644
index 0000000..dfa2c1e
--- /dev/null
+++ b/layouts/VabTabsBar/index.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+ 更多操作
+
+
+
+
+
+ 关闭其他
+
+
+
+ 关闭左侧
+
+
+
+ 关闭右侧
+
+
+
+ 关闭全部
+
+
+
+
+
+
+
+
+
diff --git a/layouts/VabTopBar/index.vue b/layouts/VabTopBar/index.vue
new file mode 100644
index 0000000..07602f6
--- /dev/null
+++ b/layouts/VabTopBar/index.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layouts/index.js b/layouts/index.js
new file mode 100644
index 0000000..4fc760c
--- /dev/null
+++ b/layouts/index.js
@@ -0,0 +1,35 @@
+module.exports = {
+ webpackBarName: 'vue-admin-better',
+ webpackBanner:
+ ' build: vue-admin-better \n vue-admin-beautiful.com \n https://gitee.com/chu1204505056/vue-admin-better \n time: ',
+ donationConsole() {
+ const chalk = require('chalk')
+ console.log(
+ chalk.green(
+ `> 欢迎使用vue-admin-better,github开源地址:https://github.com/chuzhixin/vue-admin-better`
+ )
+ )
+ console.log(
+ chalk.green(
+ `> 欢迎使用vue-admin-better,码云开源地址:https://gitee.com/chu1204505056/vue-admin-better`
+ )
+ )
+
+ console.log(
+ chalk.green(`> pro版演示地址:http://vue-admin-beautiful.com/admin-pro`)
+ )
+
+ console.log(
+ chalk.green(`> plus版演示地址:http://vue-admin-beautiful.com/admin-plus`)
+ )
+
+ console.log(
+ chalk.green(
+ `> 使用中出现任何问题可加QQ群反馈,获取基础版、文档,请我们喝杯咖啡(如若情况不允许,请勿勉强):https://gitee.com/chu1204505056/vue-admin-better#-%E5%89%8D%E7%AB%AF%E8%AE%A8%E8%AE%BA-qq-%E7%BE%A4`
+ )
+ )
+
+ console.log(chalk.green(`> 如果您不希望显示以上信息,可在config中配置关闭`))
+ console.log('\n')
+ },
+}
diff --git a/layouts/package.json b/layouts/package.json
new file mode 100644
index 0000000..b1482a0
--- /dev/null
+++ b/layouts/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "layouts",
+ "main": "index.js"
+}
diff --git a/layouts/prettier.config.js b/layouts/prettier.config.js
new file mode 100644
index 0000000..eb510f0
--- /dev/null
+++ b/layouts/prettier.config.js
@@ -0,0 +1,16 @@
+module.exports = {
+ printWidth: 80,
+ tabWidth: 2,
+ useTabs: false,
+ semi: false,
+ singleQuote: true,
+ quoteProps: 'as-needed',
+ jsxSingleQuote: false,
+ trailingComma: 'es5',
+ bracketSpacing: true,
+ jsxBracketSameLine: false,
+ arrowParens: 'always',
+ htmlWhitespaceSensitivity: 'ignore',
+ vueIndentScriptAndStyle: true,
+ endOfLine: 'lf',
+}
diff --git a/mock/controller/changeLog.js b/mock/controller/changeLog.js
index 08f7095..300b69a 100644
--- a/mock/controller/changeLog.js
+++ b/mock/controller/changeLog.js
@@ -146,7 +146,7 @@ const data = [
timestamp: '2020-07-11',
},
{
- content: '修改zx-layouts引入方式',
+ content: '修改layouts引入方式',
timestamp: '2020-07-15',
},
{
diff --git a/mock/controller/router.js b/mock/controller/router.js
index 16f3b26..e83ea4f 100644
--- a/mock/controller/router.js
+++ b/mock/controller/router.js
@@ -158,36 +158,12 @@ const data = [
},
],
},
- {
- path: 'magnifier',
- name: 'Magnifier',
- component: '@/views/vab/magnifier/index',
- meta: { title: '放大镜', permissions: ['admin'] },
- },
{
path: 'loading',
name: 'Loading',
component: '@/views/vab/loading/index',
meta: { title: 'loading', permissions: ['admin'] },
},
- {
- path: 'player',
- name: 'Player',
- component: '@/views/vab/player/index',
- meta: { title: '视频播放器', permissions: ['admin'] },
- },
- {
- path: 'markdownEditor',
- name: 'MarkdownEditor',
- component: '@/views/vab/markdownEditor/index',
- meta: { title: 'markdown编辑器', permissions: ['admin'] },
- },
- {
- path: 'editor',
- name: 'Editor',
- component: '@/views/vab/editor/index',
- meta: { title: '富文本编辑器', permissions: ['admin'], badge: 'New' },
- },
{
path: 'backToTop',
name: 'BackToTop',
diff --git a/package.json b/package.json
index c56406a..8f14c61 100644
--- a/package.json
+++ b/package.json
@@ -1,26 +1,17 @@
{
- "name": "vue-admin-beautiful",
+ "name": "vue-admin-better",
"version": "1.0.0",
- "author": "vue-admin-beautiful",
+ "author": "vue-admin-better",
"participants": [],
"homepage": "https://chu1204505056.gitee.io/vue-admin-better",
- "publishConfig": {
- "registry": "https://npm.pkg.github.com/"
- },
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
- "build:report": "vue-cli-service build --report",
- "globle": "npm install -g cnpm --registry=http://mirrors.cloud.tencent.com/npm/&&cnpm i rimraf npm-check-updates nrm -g&&rimraf node_modules&&cnpm i",
"lint": "vue-cli-service lint",
- "lint:style": "stylelint-config-prettier-check",
- "inspect": "vue-cli-service inspect",
"clear": "rimraf node_modules&&npm install --registry=http://mirrors.cloud.tencent.com/npm/",
"image-webpack-loader": "cnpm i image-webpack-loader -D",
"update": "ncu -u --reject sass-loader,sass,screenfull,eslint,chalk,vue-echarts,vue,vue-template-compiler,vue-router,vuex,@vue/cli-plugin-babel,@vue/cli-plugin-eslint,@vue/cli-service,eslint-plugin-vue --registry=http://mirrors.cloud.tencent.com/npm/&&npm i --registry=http://mirrors.cloud.tencent.com/npm/",
- "update:globle": "ncu -g --concurrency 10 --timeout 80000",
- "push": "start ./push.sh",
- "deploy": "start ./deploy.sh"
+ "push": "start ./push.sh"
},
"repository": {
"type": "git",
@@ -58,14 +49,7 @@
"vue-router": "^3.5.3",
"vue-template-compiler": "~2.6.14",
"vuex": "^3.6.2",
- "zx-count": "^0.3.7",
- "zx-layouts": "^0.6.29",
- "zx-magnifie": "^0.4.0",
- "zx-markdown-editor": "^0.0.2",
- "zx-player": "^1.0.2",
- "zx-quill": "^0.0.3",
- "zx-templates": "^0.0.26",
- "zx-verify": "^0.0.2"
+ "layouts": "file:layouts"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.15",
@@ -83,7 +67,6 @@
"filemanager-webpack-plugin": "^8.0.0",
"image-webpack-loader": "^8.1.0",
"lint-staged": "^13.1.0",
- "plop": "^3.1.1",
"prettier": "^2.8.1",
"sass": "~1.32.13",
"sass-loader": "^10.1.1",
diff --git a/plopfile.js b/plopfile.js
deleted file mode 100644
index 85993c3..0000000
--- a/plopfile.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @author https://vue-admin-beautiful.com (不想保留author可删除)
- * @description 代码生成机
- */
-const viewGenerator = require('zx-templates/view/prompt')
-const curdGenerator = require('zx-templates/curd/prompt')
-const componentGenerator = require('zx-templates/component/prompt')
-const mockGenerator = require('zx-templates/mock/prompt')
-const vuexGenerator = require('zx-templates/vuex/prompt')
-module.exports = (plop) => {
- plop.setGenerator('view', viewGenerator)
- plop.setGenerator('curd', curdGenerator)
- plop.setGenerator('component', componentGenerator)
- plop.setGenerator('mock&api', mockGenerator)
- plop.setGenerator('vuex', vuexGenerator)
-}
diff --git a/src/components/VabCharge/index.vue b/src/components/VabCharge/index.vue
index 609da97..39de737 100644
--- a/src/components/VabCharge/index.vue
+++ b/src/components/VabCharge/index.vue
@@ -2,15 +2,7 @@
-
+ {{ endVal }}
diff --git a/src/layouts/export.js b/src/layouts/export.js
index eda3fa2..b67c6ea 100644
--- a/src/layouts/export.js
+++ b/src/layouts/export.js
@@ -12,7 +12,7 @@ requireComponents.keys().forEach((fileName) => {
Vue.component(componentName, componentConfig.default || componentConfig)
})
-const requireZxLayouts = require.context('zx-layouts', true, /\.vue$/)
+const requireZxLayouts = require.context('layouts', true, /\.vue$/)
requireZxLayouts.keys().forEach((fileName) => {
const componentConfig = requireZxLayouts(fileName)
const componentName = componentConfig.default.name
diff --git a/src/plugins/index.js b/src/plugins/index.js
index 2d4322a..98d706c 100644
--- a/src/plugins/index.js
+++ b/src/plugins/index.js
@@ -8,10 +8,8 @@ import '@/colorfulIcon'
import '@/config/permission'
import '@/utils/errorLog'
import './vabIcon'
-import VabPermissions from 'zx-layouts/Permissions'
+import VabPermissions from 'layouts/Permissions'
import Vab from '@/utils/vab'
-import VabCount from 'zx-count'
Vue.use(Vab)
Vue.use(VabPermissions)
-Vue.use(VabCount)
diff --git a/src/plugins/support.js b/src/plugins/support.js
index 3910649..de975ef 100644
--- a/src/plugins/support.js
+++ b/src/plugins/support.js
@@ -16,5 +16,5 @@ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
dangerouslyUseHTMLString: true,
})
}
-if (!dependencies['vab-icon'] || !dependencies['zx-layouts'])
+if (!dependencies['vab-icon'] || !dependencies['layouts'])
document.body.innerHTML = ''
diff --git a/src/plugins/vabMagnifier.js b/src/plugins/vabMagnifier.js
deleted file mode 100644
index 748fda2..0000000
--- a/src/plugins/vabMagnifier.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import VabMagnifier from 'zx-magnifie'
-
-export default VabMagnifier
diff --git a/src/plugins/vabMarkdownEditor.js b/src/plugins/vabMarkdownEditor.js
deleted file mode 100644
index 03686b6..0000000
--- a/src/plugins/vabMarkdownEditor.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import ZxMarkdownEditor from 'zx-markdown-editor'
-import 'zx-markdown-editor/dist/zx-markdown-editor.css'
-
-const VabMarkdownEditor = ZxMarkdownEditor
-export default VabMarkdownEditor
diff --git a/src/plugins/vabPlayer.js b/src/plugins/vabPlayer.js
deleted file mode 100644
index 69bf8a7..0000000
--- a/src/plugins/vabPlayer.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { VabPlayerMp4, VabPlayerHls, VabPlayerFlv } from 'zx-player'
-
-export { VabPlayerMp4, VabPlayerHls, VabPlayerFlv }
diff --git a/src/plugins/vabQuill.js b/src/plugins/vabQuill.js
deleted file mode 100644
index eae4bbf..0000000
--- a/src/plugins/vabQuill.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import 'zx-quill/dist/zx-quill.css'
-import VabQuill from 'zx-quill'
-
-export default VabQuill
diff --git a/src/plugins/vabVerify.js b/src/plugins/vabVerify.js
deleted file mode 100644
index e98ae43..0000000
--- a/src/plugins/vabVerify.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import VabVerify from 'zx-verify'
-import 'zx-verify/dist/zx-verify.css'
-
-export default VabVerify
diff --git a/src/router/index.js b/src/router/index.js
index a7ec7dd..6c8520d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -155,12 +155,6 @@ export const asyncRoutes = [
component: () => import('@/views/vab/tree/index'),
meta: { title: '树', permissions: ['admin'] },
},
- {
- path: 'verify',
- name: 'Verify',
- component: () => import('@/views/vab/verify/index'),
- meta: { title: '验证码', permissions: ['admin'] },
- },
{
path: 'menu1',
component: () => import('@/views/vab/nested/menu1/index'),
@@ -190,40 +184,12 @@ export const asyncRoutes = [
},
],
},
- {
- path: 'magnifier',
- name: 'Magnifier',
- component: () => import('@/views/vab/magnifier/index'),
- meta: { title: '放大镜', permissions: ['admin'] },
- },
{
path: 'loading',
name: 'Loading',
component: () => import('@/views/vab/loading/index'),
meta: { title: 'loading', permissions: ['admin'] },
},
- {
- path: 'player',
- name: 'Player',
- component: () => import('@/views/vab/player/index'),
- meta: { title: '视频播放器', permissions: ['admin'] },
- },
- {
- path: 'markdownEditor',
- name: 'MarkdownEditor',
- component: () => import('@/views/vab/markdownEditor/index'),
- meta: { title: 'markdown编辑器', permissions: ['admin'] },
- },
- {
- path: 'editor',
- name: 'Editor',
- component: () => import('@/views/vab/editor/index'),
- meta: {
- title: '富文本编辑器',
- permissions: ['admin'],
- badge: 'New',
- },
- },
{
path: 'backToTop',
name: 'BackToTop',
diff --git a/src/views/index/index.vue b/src/views/index/index.vue
index c787261..6570735 100644
--- a/src/views/index/index.vue
+++ b/src/views/index/index.vue
@@ -29,15 +29,7 @@
日均访问量:
-
+ {{ config1.endVal }}
@@ -51,15 +43,7 @@
总授权数:
-
+ {{ config2.endVal }}
@@ -154,8 +138,8 @@
{{ dependencies['mockjs'] }} |
- zx-layouts版本 |
- {{ dependencies['zx-layouts'] }} |
+ layouts版本 |
+ {{ dependencies['layouts'] }} |
lodash版本 |
{{ dependencies['lodash'] }} |
diff --git a/src/views/vab/editor/index.vue b/src/views/vab/editor/index.vue
deleted file mode 100644
index 7e931a0..0000000
--- a/src/views/vab/editor/index.vue
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 预览效果
- 保存
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/vab/magnifier/index.vue b/src/views/vab/magnifier/index.vue
deleted file mode 100644
index 460dce4..0000000
--- a/src/views/vab/magnifier/index.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- 放大镜1
-
-
-
-
-
- 放大镜2
-
-
-
-
-
-
-
-
diff --git a/src/views/vab/markdownEditor/index.vue b/src/views/vab/markdownEditor/index.vue
deleted file mode 100644
index c93b9d5..0000000
--- a/src/views/vab/markdownEditor/index.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
- 增加文本
- 增加图片
-
-
-
-
- markdown转换html实时演示区域
-
-
-
-
-
-
-
-
-
diff --git a/src/views/vab/player/index.vue b/src/views/vab/player/index.vue
deleted file mode 100644
index af3f943..0000000
--- a/src/views/vab/player/index.vue
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
- 视频地址采用cdn加速服务,开发时需部署到到本地
-
-
-
-
- 播放传统MP4
-
-
-
-
-
- 播放m3u8,且不暴露视频地址
-
-
-
-
-
-
-
-
-
diff --git a/src/views/vab/verify/index.vue b/src/views/vab/verify/index.vue
deleted file mode 100644
index 899d7e3..0000000
--- a/src/views/vab/verify/index.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
diff --git a/vab-icon b/vab-icon
new file mode 120000
index 0000000..5aea8df
--- /dev/null
+++ b/vab-icon
@@ -0,0 +1 @@
+D:/Development/VSCodeProjects/vue-admin-beautiful/node_modules/_vab-icon@0.0.1@vab-icon
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index ffb9c73..bbc3cb1 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -18,7 +18,7 @@ const {
donation,
imageCompression,
} = require('./src/config')
-const { webpackBarName, webpackBanner, donationConsole } = require('zx-layouts')
+const { webpackBarName, webpackBanner, donationConsole } = require('layouts')
if (donation) donationConsole()
const { version, author } = require('./package.json')