跳至主要內容

跳转动作UrlAction

Mr.Hope大约 2 分钟

跳转动作UrlAction

动作注解属性

@UxLink(value = "",url = "",openType = ActionTargetEnum.ROUTER,model = "",compute = "",mapping = {},context = {})

这段代码定义了一个名为 UxLink 的注解,用于表示链接动作。它具有以下属性:

  • value/ url: 链接表达式。
  • openType: 打开方式,默认为 ROUTER。
  • model: 链接计算函数模型。
  • compute: 链接计算函数编码。
  • mapping: 数据传输映射DSL。
  • context: 上下文配置。

@UxLinkButton

@UxLinkButton(
    action = @UxAction(name = "", displayName = "", label = "", summary = "", contextType = ActionContextTypeEnum.SINGLE, bindingType = ViewTypeEnum.TABLE, invisible = "", rule = "", disable = "", bindingView = "", priority = 99, props = {}), 
    value = @UxLink(value = "", url = "", openType = ActionTargetEnum.ROUTER, model = "", compute = "", mapping = {}, context = {})
)

这段代码定义了一个名为 UxClientButton 的注解,用于表示链接按钮。它具有以下属性:

  • action: 返回动作的基本配置。
  • value: 返回客户端动作的配置。

@UxAction

@UxAction(name = "", 
          label = "",
          contextType = ActionContextTypeEnum.SINGLE, 
          bindingType = ViewTypeEnum.FORM)

这段代码定义了一个名为 UxAction 的注解,用于配置动作的基本信息,具有以下属性:

  • name: 指定动作的名称。
  • displayName: 设置动作的展示名称,默认为空。
  • label: 指定动作的显示文字,默认为空。
  • summary: 设置动作的描述信息,默认为空。
  • contextType: 指定动作的上下文类型,默认为单个对象的上下文。
  • bindingType: 表示动作绑定在源模型的哪些视图上,默认为 TABLE 视图。
  • invisible: 设置动作的客户端显隐表达式,默认为空。
  • rule: 指定动作的服务端过滤表达式,默认为空。
  • disable: 设置动作的禁用规则,默认为空。
  • bindingView: 绑定特定视图,设置动作只出现在指定视图,默认为空。
  • priority: 设置动作的优先级,默认为99。
  • props: 扩展属性,用于定义动作的额外属性,默认为空。

@UxClientButton.UxClientButtons

@UxClientButton.UxClientButtons()

这段代码定义了一个名为 UxClientButtons 的注解,用于表示按钮配置列表。它具有以下属性:

  • value: 按钮配置,返回一个 UxClientButton 数组。

使用@UxMenu定义了一个Oinone官网的菜单,该菜单背后就是一个普通的UrlAction

@UxMenu("Oinone官网")
@UxLink(value = "http://www.oinone.top",openType= ActionTargetEnum.OPEN_WINDOW) 
class SsLink{
    
}

跳转动作UxLinkButton(举例)

使用UxLinkButton


@UxLinkButton(
        action = @UxAction(name = "测试", label = "测试跳转", contextType = ActionContextTypeEnum.SINGLE, bindingType = ViewTypeEnum.FORM),
        value =  @UxLink(value = "http://www.baidu.com/", openType = ActionTargetEnum.OPEN_WINDOW)
)
@Component
public class PetShopProxyAction{