Webix front-end architecture project and webix front-end architecture
The webix framework is compatible with javascript, HTML, and CSS. Its Applications are flexible. In combination with the background webAPI, the App folder in the entire web project stores front-end multilingual files and image files, webix original code js, css, and view files. All view files use js files to compile page layout and function implementation. define (["locale ", "/app/views/shared/components. js "], function (_, com ){... Page code segment} to call the child pages of the parent page, including calling the UI and method (the UI and method must be returned from the Child page, that is, return, for example: return {
$ Ui: show. The UI layout is returned.
Additem: Additem Return Method
}; The parent page can be called ).
Add [AllowAnonymous, HttpGet, HttpPost, Route ("listProject")] in the background for verification. You must specify the method name to find the Controller called by the foreground correctly.
The following describes several flexible attribute applications:
1: The template attribute is a basic attribute. It can be used with any control to set the template and basic content of the control. It supports html in string format and writing functions, returns the processed string and modifies the effect of the displayed content.
Example: function (obj, type, value ){
Return "<span class = 'webix _ icon_btn enter_btn 'style = 'cursor: pointer; 'title ='" + _ ("spmsreport ") + "'> </span> ";
} // Used to format the displayed content
2: set the first line of the datatable search;
{Id: "officeName", header: [_ ("Office "),{
Content: "serverSelectFilterByParameter", search type, which can be modified to another method
Options: "/api/spms/GetOffices", Url Processing in the background
Para: function () {parameters required for background requests
Var regionName =$ $ ("maindata"). getFilter ("regionName"). value;
Return {regionId: regionName };
}
}],}