pub trait Action {
Show 33 methods
// Required methods
fn title(&mut self) -> &'static str;
fn api(&mut self) -> &'static str;
fn index(&mut self, header: JsonValue, request: JsonValue) -> Response;
// Provided methods
fn author(&mut self) -> &'static str { ... }
fn mode(&mut self) -> Vec<&'static str> { ... }
fn menu(&mut self) -> bool { ... }
fn icon(&mut self) -> &'static str { ... }
fn menu_sort(&mut self) -> usize { ... }
fn tags(&mut self) -> Vec<&'static str> { ... }
fn is_openapi(&mut self) -> bool { ... }
fn token(&mut self) -> bool { ... }
fn describe(&mut self) -> &'static str { ... }
fn public(&mut self) -> bool { ... }
fn auth(&mut self) -> bool { ... }
fn interface_type(&mut self) -> &'static str { ... }
fn dependent(&mut self) -> Vec<&'static str> { ... }
fn params(&mut self) -> JsonValue { ... }
fn _check(&mut self, request: JsonValue) -> (bool, String, JsonValue) { ... }
fn run(&mut self, header: JsonValue, request: JsonValue) -> Response { ... }
fn success(&mut self, data: JsonValue, msg: &str) -> Response { ... }
fn fail(&mut self, msg: &str) -> Response { ... }
fn notify(
&mut self,
msg: &str,
caption: &str,
mode: NotifyMode,
timeout: usize,
path: &str
) -> Response { ... }
fn login(&mut self, msg: &str) -> Response { ... }
fn download(&mut self, filename: &str) -> Response { ... }
fn redirect(&mut self, url: &str) -> Response { ... }
fn tools(&mut self) -> Tools { ... }
fn ws_send(&mut self, header: JsonValue, api: &str, data: JsonValue) -> bool { ... }
fn ws_rx(&self) -> JsonValue { ... }
fn menu_info(&mut self, title: &str) -> JsonValue { ... }
fn btn_info_data(&mut self, title: &str) -> JsonValue { ... }
fn btn_info(
&mut self,
title: &str,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>
) -> JsonValue { ... }
fn btn_info_to(
&mut self,
title: &str,
path: &str,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>
) -> JsonValue { ... }
fn btn_custom_info(&mut self, title: &str) -> JsonValue { ... }
}Expand description
动作
Required Methods§
Provided Methods§
作者
菜单
菜单排序
标签
sourcefn is_openapi(&mut self) -> bool
fn is_openapi(&mut self) -> bool
是否开放接口
sourcefn interface_type(&mut self) -> &'static str
fn interface_type(&mut self) -> &'static str
接口类型 btn api
fn notify( &mut self, msg: &str, caption: &str, mode: NotifyMode, timeout: usize, path: &str ) -> Response
sourcefn ws_send(&mut self, header: JsonValue, api: &str, data: JsonValue) -> bool
fn ws_send(&mut self, header: JsonValue, api: &str, data: JsonValue) -> bool
获取共享消息通道
- org_org 接收的企业
- user_user 接收的用户
获取菜单信息
- title 菜单名称
fn btn_info_data(&mut self, title: &str) -> JsonValue
sourcefn btn_info(
&mut self,
title: &str,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>
) -> JsonValue
fn btn_info( &mut self, title: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue
获取按钮信息
- title 菜单名称
- mode 按钮模式
- color 按钮颜色
- match_condition 显示条件
sourcefn btn_info_to(
&mut self,
title: &str,
path: &str,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>
) -> JsonValue
fn btn_info_to( &mut self, title: &str, path: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue
获取跳转按钮信息
- title 菜单名称
- mode 按钮模式
- color 按钮颜色
- match_condition 显示条件
sourcefn btn_custom_info(&mut self, title: &str) -> JsonValue
fn btn_custom_info(&mut self, title: &str) -> JsonValue
获取自定义页面按钮信息
- title 菜单名称
- mode 按钮模式
- color 按钮颜色
- match_condition 显示条件