提交 0802695f 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

css

上级 c9079a53
......@@ -21,7 +21,7 @@ mac: prepare_res compile_mac copy_files package
prepare_res:
@echo 'start prepare res'
@cp res/zh/sample.yaml demo/default.yaml
@go-bindata -o=res/res.go -pkg=res res/ res/en res/zh
@go-bindata -o=res/res.go -pkg=res res/... ui/dist/...
@rm -rf ${BIN_DIR}
compile_all: compile_win64 compile_win32 compile_linux compile_mac
......
......@@ -10,8 +10,10 @@ require (
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/akavel/rsrc v0.9.0 // indirect
github.com/denisenkom/go-mssqldb v0.9.0 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.1 // indirect
github.com/emirpasic/gods v1.12.0
github.com/fatih/color v1.10.0
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
......
......@@ -30,6 +30,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6RO
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk=
github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw=
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
......@@ -44,6 +46,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
......
此差异已折叠。
......@@ -4,6 +4,7 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/easysoft/zendata/res"
"github.com/easysoft/zendata/src/action"
"github.com/easysoft/zendata/src/gen"
"github.com/easysoft/zendata/src/model"
......@@ -20,6 +21,7 @@ import (
logUtils "github.com/easysoft/zendata/src/utils/log"
stringUtils "github.com/easysoft/zendata/src/utils/string"
"github.com/easysoft/zendata/src/utils/vari"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/fatih/color"
"io"
"io/ioutil"
......@@ -339,11 +341,22 @@ func (s *Server) Run() {
func (s *Server) Handler() http.Handler {
mux := http.NewServeMux()
mux.Handle("/client",
http.FileServer(&assetfs.AssetFS{Asset: res.Asset, AssetDir: res.AssetDir,
AssetInfo: res.AssetInfo, Prefix: "ui/dist", Fallback: "index.html"}))
mux.HandleFunc("/", DataHandler)
mux.HandleFunc("/admin", s.admin)
mux.HandleFunc("/dist", s.dist)
return mux
}
func (s *Server) dist(w http.ResponseWriter, r*http.Request) {
p := path.Dir("./ui/dist/index.html")
// set header
w.Header().Set("Content-type", "text/html")
http.ServeFile(w, r, p)
}
func (s *Server) admin(writer http.ResponseWriter, req *http.Request) {
serverUtils.SetupCORS(&writer, req)
......
......@@ -22,3 +22,4 @@ pnpm-debug.log*
*.sln
*.sw?
/yarn.lock
/server.js
......@@ -13,16 +13,17 @@
</a-form-model-item>
</a-row>
<a-row class="form-model-item-line">
<a-form-model-item label="前缀" prop="prefix" class="c2-1">
<a-input v-model="model.prefix" />
</a-form-model-item>
<div class="zui-input-group-addon" style="width: 50px;">
<span>后缀</span>
</div>
<a-form-model-item label="" prop="postfix" class="c2-2" style="width: calc(50% - 50px);">
<a-input v-model="model.postfix" />
</a-form-model-item>
<a-row gutter="colsFull">
<a-col :span="colsHalf">
<a-form-model-item label="前缀" prop="prefix" :labelCol="labelColHalf" :wrapperCol="wrapperColHalf">
<a-input v-model="model.prefix" />
</a-form-model-item>
</a-col>
<a-col :span="colsHalf">
<a-form-model-item label="后缀" prop="postfix" :labelCol="labelColHalf2" :wrapperCol="wrapperColHalf">
<a-input v-model="model.postfix" />
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="colsFull">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册