vue

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FSHandler

func FSHandler(root string, tryFiles string, base string) fw.HandlerFunc

Types

type PageMiddleware

type PageMiddleware struct {
	*fw.MiddlewareGlobal
	// contains filtered or unexported fields
}

PageMiddleware 页面中间件

func NewPageMiddleware

func NewPageMiddleware(dir ...string) *PageMiddleware

func (*PageMiddleware) DoInitOnce

func (p *PageMiddleware) DoInitOnce()

func (*PageMiddleware) Router

func (p *PageMiddleware) Router(ctx *fw.MiddlewareContext) []*fw.RouteItem

type PageOptions

type PageOptions struct {
	DirPath   string `yaml:"dir_path" default:"./dist"`       // 资源目录
	RoutePath string `yaml:"route_path" default:"/"`          // 路由
	TryFiles  string `yaml:"try_files" default:"/index.html"` // try_files 兼容nginx的try_files
	Base      string `yaml:"base" default:""`                 //打包时的base (例如vite的base, 即前端打包时的根路径) 例如 /web
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址