Skip to content

Commit

Permalink
update to zbxtable 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
canghai908 committed Jul 15, 2022
1 parent 8fcafce commit dcb929f
Show file tree
Hide file tree
Showing 304 changed files with 50,695 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
VUE_APP_PUBLIC_PATH=/
VUE_APP_NAME=ZbxTable
VUE_APP_ROUTES_KEY=admin.routes
VUE_APP_PERMISSIONS_KEY=admin.permissions
VUE_APP_ROLES_KEY=admin.roles
VUE_APP_USER_KEY=admin.user
VUE_APP_SETTING_KEY=admin.setting
VUE_APP_TBAS_KEY=admin.tabs
VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VUE_APP_API_BASE_URL=http://127.0.0.1:8085
VUE_APP_WS_BASE_URL=ws://127.0.0.1:8085
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules/
admindb/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
/dist/
/web/
selenium-debug.log

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
.env.production.local
.drone.yml
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 iczer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)

const plugins = []
if (IS_PROD) {
plugins.push('transform-remove-console')
}

module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins
}
42 changes: 42 additions & 0 deletions docs/.vuepress/components/Alert.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div class="alert" :style="`top: ${top}px`">
<slot></slot>
</div>
</template>

<script>
export default {
name: 'Alert',
props: ['show'],
data() {
return {
top: 100
}
},
mounted() {
console.log(this)
// this.$page.alert = this.$page.alert ? this.$page.alert : {top: 100}
// this.$page.alert.top += 20
// this.top = this.$page.alert.top
setTimeout(() => {
this.$el.remove()
}, 1000)
}
}
</script>

<style scoped>
.alert{
position: absolute;
padding: 6px 8px;
background-color: #f0f2f5;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
border-radius: 4px;
margin: 0 auto;
z-index: 999;
top: 100px;
width: fit-content;
left: 0;
right: 0;
}
</style>
35 changes: 35 additions & 0 deletions docs/.vuepress/components/Color.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div :data-clipboard-text="color" class="color" @click="onClick" :style="`background-color:${color}`" />
</template>

<script>
import Clipboard from 'clipboard'
export default {
name: 'Color',
props: ['color'],
data() {
return {
alert: false
}
},
methods: {
onClick() {
let clipboard = new Clipboard('.color')
clipboard.on('success', () => {
this.$alert(`颜色代码已复制:${this.color}`)
clipboard.destroy()
})
}
}
}
</script>

<style scoped>
.color{
border: 1px dashed #a0d911;
display: inline-block;
width: 20px;
height: 20px;
cursor: pointer;
}
</style>
18 changes: 18 additions & 0 deletions docs/.vuepress/components/ColorList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div>
<color class="color" :key="index" v-for="(color, index) in colors" :color="color" ></color>
</div>
</template>

<script>
export default {
name: 'ColorList',
props: ['colors']
}
</script>

<style scoped>
.color{
margin: 0 2px;
}
</style>
58 changes: 58 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
title: 'Vue Antd Admin',
description: 'Vue Antd Admin',
base: '/vue-antd-admin-docs/',
head: [
['link', { rel: 'icon', href: '/favicon.ico' }]
],
themeConfig: {
logo: '/logo.png',
repo: 'iczer/vue-antd-admin',
docsDir: 'docs',
editLinks: true,
editLinkText: '在 Github 上帮助我们编辑此页',
nav: [
{text: '指南', link: '/'},
{text: '配置', link: '/develop/layout'},
{text: '主题', link: '/advance/theme'},
],
lastUpdated: 'Last Updated',
sidebar: [
{
title: '开始',
collapsable: false,
children: [
'/start/use', '/start/faq'
]
},
{
title: '开发',
collapsable: false,
children: [
'/develop/layout', '/develop/router', '/develop/page', '/develop/theme', '/develop/service', '/develop/mock'
]
},
{
title: '进阶',
collapsable: false,
children: [
'/advance/i18n', '/advance/async', '/advance/authority', '/advance/login', '/advance/guard', '/advance/interceptors',
'/advance/api'
]
},
{
title: '其它',
collapsable: false,
children: [
'/other/upgrade', '/other/community'
]
}
],
nextLinks: true,
prevLinks: true,
},
plugins: ['@vuepress/back-to-top', require('./plugins/alert')],
markdown: {
lineNumbers: true
}
}
46 changes: 46 additions & 0 deletions docs/.vuepress/plugins/alert/Alert.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<template>
<div class="alert" :style="`top: ${top}px`">
<slot></slot>
</div>
</template>

<script>
export default {
name: 'Alert',
props: ['alert'],
data() {
return {
top: 0
}
},
beforeMount() {
this.top = this.alert.top
},
mounted() {
window.addEventListener('alert_remove', (e) => {
this.top -= e.detail.height
})
},
watch: {
'page.alert.top': function (value) {
}
}
}
</script>

<style scoped>
.alert{
position: fixed;
padding: 6px 8px;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
border-radius: 4px;
margin: 0 auto;
z-index: 999;
top: 100px;
width: fit-content;
left: 0;
right: 0;
transition: top 0.3s;
}
</style>
38 changes: 38 additions & 0 deletions docs/.vuepress/plugins/alert/alertMixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import Alert from './Alert'

const AlertMixin = {
install(Vue) {
Vue.mixin({
methods: {
$alert(message, duration = 2000) {
let Constructor= Vue.extend(Alert)
let alert = new Constructor()
alert.$slots.default = message
alert.$props.alert = this.$page.alert
alert.$mount()
document.body.appendChild(alert.$el)

const appendHeight = alert.$el.offsetHeight + 16
this.$page.alert.top += appendHeight

setTimeout(() => {
this.$page.alert.top -= appendHeight
this.triggerRemoveAlert(appendHeight)
setTimeout(() => {
alert.$destroy()
alert.$el.remove()
}, 100)
}, duration)
},
triggerRemoveAlert(height) {
const event = new CustomEvent('alert_remove', {
detail: {height}
})
window.dispatchEvent(event)
}
}
})
}
}

export default AlertMixin
5 changes: 5 additions & 0 deletions docs/.vuepress/plugins/alert/clientRootMixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
updated() {
this.$page.alert.top = 100
}
}
5 changes: 5 additions & 0 deletions docs/.vuepress/plugins/alert/enhanceApp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import AlertMixin from './alertMixin'

export default ({Vue}) => {
Vue.use(AlertMixin)
}
13 changes: 13 additions & 0 deletions docs/.vuepress/plugins/alert/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const path = require('path')

module.exports = (options, ctx) => {
return {
clientRootMixin: path.resolve(__dirname, 'clientRootMixin.js'),
extendPageData($page) {
$page.alert = {
top: 100
}
},
enhanceAppFiles: path.resolve(__dirname, 'enhanceApp.js')
}
}
Binary file added docs/.vuepress/public/favicon.ico
Binary file not shown.
Binary file added docs/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.custom-block.tip{
border-color: #1890ff
}
.theme-default-content code .token.inserted{
color: #60bd90;
}
//.custom-block.warning{
// border-color: #fa8c16
//}
//.custom-block.error{
// border-color: #f5222d
//}
2 changes: 2 additions & 0 deletions docs/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$accentColor = #1890ff
$contentWidth = 940px
17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 首页
home: true
heroImage: /logo.png
heroText: Vue Antd Admin
tagline: 开箱即用的中台前端/设计解决方案
actionText: 快速上手 →
actionLink: /start/use
features:
- title: 简洁
details: 以 Markdown 为中心的项目结构,以最少的配置帮助你专注于写作。
- title: 优雅
details: 享受 Vue + webpack 的开发体验,在 Markdown 中使用 Vue 组件,同时可以使用 Vue 来开发自定义主题。
- title: 自然
details: VuePress 为每个页面预渲染生成静态的 HTML,同时在页面被加载的时候,将作为 SPA 运行。
footer: MIT Licensed | Copyright © 2018-present iczer
---
5 changes: 5 additions & 0 deletions docs/advance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 进阶
lang: zn-CN
---
# 进阶
Loading

0 comments on commit dcb929f

Please sign in to comment.