Documentation
¶
Index ¶
- Variables
- func GetBasePathScript() string
- func GetCSS(oneFileMode bool) (cssString string)
- func GetData(filePath string) []byte
- func GetDataBase64(filePath string) string
- func GetFileStr(filePath string) string
- func GetImageData(imageName string) []byte
- func GetImageDataSrc(imageName string) string
- func GetImageSrc(filePath string) string
- func GetJavaScript(oneFileMode bool, insertScript []string) (jsString string)
- func IsWailsBuild() bool
- func IsWailsWebViewRequest(_ *http.Request) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Epub embed.FS
View Source
var Frontend embed.FS
View Source
var FrontendFS fs.FS
View Source
var Images embed.FS
View Source
var ImagesFS fs.FS
View Source
var Pwa embed.FS
View Source
var Robots embed.FS
Functions ¶
func GetBasePathScript ¶ added in v1.2.27
func GetBasePathScript() string
GetBasePathScript 暴露前端路径工具,供静态 JS 与模板内联脚本统一处理反向代理基础路径。
func GetDataBase64 ¶ added in v1.2.26
GetDataBase64 从 Static 获取 Base64 字符串,便于把 wasm 等二进制资源内联到静态 HTML。
func GetImageData ¶ added in v1.2.0
GetImageData 从Images embed.FS获取图片字节数据
func GetImageDataSrc ¶ added in v1.2.26
GetImageDataSrc 从 Images embed.FS 获取图片并返回 data URL,便于静态 HTML 内联图片资源。
func GetJavaScript ¶
GetJavaScript 在页面中插入需要的js代码
func IsWailsBuild ¶ added in v1.3.0
func IsWailsBuild() bool
IsWailsBuild 告诉模板和静态脚本当前是否为 Wails 桌面壳构建。
func IsWailsWebViewRequest ¶ added in v1.3.0
IsWailsWebViewRequest 非 Wails 构建不存在 WebView 请求。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.