A web
@ -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)
|
||||
|
0
web+/.gitignore → web/.gitignore
vendored
6
web/Web.go
Normal file
@ -0,0 +1,6 @@
|
||||
package web
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed dist
|
||||
var Dist embed.FS
|
12
web/babel.config.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/app',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'entry',
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: ['transform-class-properties'],
|
||||
}
|
@ -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",
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 955 B After Width: | Height: | Size: 955 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 821 B |
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 1002 B After Width: | Height: | Size: 1002 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
@ -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
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
@ -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)
|
@ -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')
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|