pub trait Action {
Show 32 methods
// Required methods
fn title(&mut self) -> &'static str;
fn index(&mut self, header: JsonValue, request: JsonValue) -> Response;
// Provided methods
fn author(&mut self) -> &'static str { ... }
fn api(&mut self) -> String { ... }
fn mode(&mut self) -> Vec<&'static str> { ... }
fn icon(&mut self) -> &'static str { ... }
fn menu_sort(&mut self) -> usize { ... }
fn 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) -> InterfaceType { ... }
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 get(
&mut self,
header: JsonValue,
request: JsonValue,
) -> Result<JsonValue, String> { ... }
fn success(&mut self, data: JsonValue, msg: &str) -> Response { ... }
fn fail(&mut self, msg: &str) -> Response { ... }
fn error(&mut self, code: usize, msg: String) -> Response { ... }
fn notify(&mut self, msg: &str, btn_name: &str, path: &str) -> Response { ... }
fn login(&mut self, msg: &str) -> Response { ... }
fn download(&mut self, filename: &str) -> Response { ... }
fn download_delete_dir(&mut self, filename: &str) -> Response { ... }
fn redirect(&mut self, url: &str) -> Response { ... }
fn tools(&mut self) -> Tools { ... }
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 interface_type(&mut self) -> InterfaceType
fn interface_type(&mut self) -> InterfaceType
接口类型 btn api menu
Sourcefn get(
&mut self,
header: JsonValue,
request: JsonValue,
) -> Result<JsonValue, String>
fn get( &mut self, header: JsonValue, request: JsonValue, ) -> Result<JsonValue, String>
执行参数入口
fn notify(&mut self, msg: &str, btn_name: &str, path: &str) -> Response
Sourcefn download_delete_dir(&mut self, filename: &str) -> Response
fn download_delete_dir(&mut self, filename: &str) -> Response
下载并删除文件所在目录
获取菜单信息
- 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 显示条件