This commit is contained in:
zhenorzz 2021-05-27 17:05:57 +08:00
parent d72f656b69
commit 7d507b28b5
144 changed files with 26 additions and 9 deletions

View File

@ -50,7 +50,7 @@ func (rt *Router) Start() {
if err != nil {
log.Fatal(err)
}
http.Handle("/static/", http.FileServer(http.FS(subFS)))
http.Handle("/assets/", http.FileServer(http.FS(subFS)))
http.Handle("/favicon.ico", http.FileServer(http.FS(subFS)))
}
http.Handle("/", rt)

View File

6
web/Web.go Normal file
View File

@ -0,0 +1,6 @@
package web
import "embed"
//go:embed dist
var Dist embed.FS

12
web/babel.config.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
presets: [
'@vue/app',
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
},
],
],
plugins: ['transform-class-properties'],
}

View File

@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
@ -12,11 +12,13 @@
"cronstrue": "^1.113.0",
"element-plus": "^1.0.2-beta.44",
"js-cookie": "^2.2.1",
"listenercount": "^1.0.1",
"normalize.css": "^8.0.1",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.0",
"qrcode": "^1.4.4",
"unzipper": "^0.10.11",
"vue": "^3.0.5",
"vue-i18n": "^9.1.6",
"vue-router": "^4.0.6",

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 955 B

After

Width:  |  Height:  |  Size: 955 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 497 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 944 B

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 661 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 285 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 847 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 821 B

View File

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 623 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 944 B

View File

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 1002 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 597 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

View File

@ -3,7 +3,6 @@ import Cookies from 'js-cookie'
import elementEnLocale from 'element-plus/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-plus/lib/locale/lang/zh-cn'
import localMessages from '@intlify/vite-plugin-vue-i18n/messages'
const messages = {
[elementEnLocale.name]: {
// el 这个属性很关键,一定要保证有这个属性,
@ -37,5 +36,4 @@ const i18n = createI18n({
locale: getLanguage(),
messages,
})
export default i18n

View File

Before

Width:  |  Height:  |  Size: 867 B

After

Width:  |  Height:  |  Size: 867 B

View File

@ -10,10 +10,8 @@ import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css'
import 'vite-plugin-svg-icons/register' // register svg sprite map
import App from './App.vue'
const app = createApp(App)
app.use(ElementPlus, {
i18n: i18n.global.t,
size: 'mini',
})
app.use(router)

View File

@ -1,16 +1,17 @@
export default {
data() {
return {
tableHeight: window.innerHeight - 160 // table高度
tableHeight: window.innerHeight - 160, // table高度
}
},
mounted() {
try {
const outHeight = document.getElementsByClassName('app-bar')[0].clientHeight + 140 // 除了table外 查询与按钮的高度 + 其他的高度150
const outHeight =
document.getElementsByClassName('app-bar')[0].clientHeight + 140 // 除了table外 查询与按钮的高度 + 其他的高度150
const maxHeight = window.innerHeight - outHeight
this.tableHeight = maxHeight
} catch (e) {
console.log('缺少节点app-bar')
}
}
},
}

Some files were not shown because too many files have changed in this diff Show More