2025-10-27 15:24:08 +08:00

54 lines
3.2 KiB
Go

// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package component
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func Upload(avatar string) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<button type=\"button\" class=\"layui-btn pear-btn-primary\" id=\"upload_img_btn_logo\"><i class=\"layui-icon layui-icon-upload\"></i> 上传</button><div style=\"width: 132px;\"><div class=\"layui-upload-list\"><i class=\"btn-remove layui-icon layui-icon-clear\" id=\"upload_img_remove_logo\" title=\"删除\"></i> <img class=\"layui-upload-img\" id=\"upload_img_preview_logo\"> <input type=\"hidden\" id=\"upload_img_input_logo\" name=\"File\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(avatar)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/erpserver/templ/component/upload.templ`, Line: 11, Col: 86}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\"><div id=\"upload_img_tips_logo\"></div></div><div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" lay-filter=\"upload_img_progress_logo\"><div class=\"layui-progress-bar\" lay-percent=\"\"></div></div></div><style>\n .layui-upload-list {\n position: relative;\n cursor: pointer;\n }\n\n .layui-upload-img {\n display: none;\n width: 100%;\n height: 92px;\n }\n\n .layui-upload-list:hover .btn-remove {\n display: inline-block;\n }\n\n .layui-upload-list .btn-remove {\n display: none;\n position: absolute;\n top: -12px;\n right: -11px;\n width: 20px;\n height: 20px;\n font-size: 24px;\n color: red;\n cursor: pointer;\n }\n </style>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate