Example code of Angular zTree integration, angularztree
1. Prerequisites
1.1 create an angular4 Project
Refer to blog: Click to go
1.2 Go To The zTree official website to download zTree
ZTree Official Website: Click to go
2 programming steps
From the output of the zTree object, we can see that the zTree object uses the init method to implement the zTree structure. The init method receives three parameters.
Parameter 1: DOM Node object of a ul label
Parameter 2: basic configuration object
Para
"section Functions and properties Introduction"
Core: Ztree (setting, [Ztreenodes])This function takes a JSON-formatted data object setting and a JSON-formatted data object Ztreenodes to build the Tree.
Core parameter: SettingZtree parameter configuration is done here, simply say: Tree style, events, access path, etc. are configured heresetting Example:JS Code
var setting = {
ShowLine: True,
Checkable: True
};
. fck. inserthtml (Code ());
Window. Parent. Cancel ();
BecauseTherefore, the built-in inserthtml function is used to add a string to the FCKeditor editor. The Code () function is used to transmit the string.The HTML code is changed to the insertcode.htm code in the compiler editor. (I will not provide the code here. I will put the changed code here. Here I will just give a brief description ).
Next we modify the code in the "Code. js" file and
Window. returnvalue = formatecode (STR, language,
checkbox or radio Selection
9. Multiple Event Response callbacks
10. flexible editing (add, delete, modify, and query) functions. You can drag and drop nodes at will, or drag multiple nodes.
11. Multiple Tree instances can be generated simultaneously on one page.
Core functions and attributes:
Core:ZTree (setting, [zTreeNodes])
This function uses a JSON Data Object setting and a JSON Data Object zTreeNodes to create a Tree.
Core parameters:Setting
The zTree parameter configuration is completed
checkbox or radio Selection9. Multiple Event Response callbacks10. flexible editing (add, delete, modify, and query) functions. You can drag and drop nodes at will, or drag multiple nodes.11. Multiple Tree instances can be generated simultaneously on one page.12. Simple parameter configuration for flexible and Variable FunctionsCore functions and attributes:
Core: zTree (setting, [zTreeNodes])This function uses a JSON Data Object setting and a JSON Data Object zTreeNodes to create a Tree.
Core
data is a single user or multiple users, so as to load the corresponding role tree resources.
Var rowData; function groupDistributeRole () {// obtain the selected data rowData =$ (dg_student ). datagrid ("getSelections"); // if no row is selected, the message if (rowData. length = 0) {$. messager. alert ("prompt message", "select the user to assign a role! ", 'Info'); return;} // open the role allocation window $ ('# groupDistributeRole '). window ('open') addedRoleTree. pFunction. loadTree ()
radio Selection9. Multiple Event Response callbacks10. flexible editing (add, delete, modify, and query) functions. You can drag and drop nodes at will, or drag multiple nodes.11. Multiple Tree instances can be generated simultaneously on one page.12. Simple parameter configuration for flexible and Variable FunctionsCore functions and attributes:
Core: zTree (setting, [zTreeNodes])This function uses a JSON Data Object setting and a JSON Data Object zTreeNodes to create a Tree.
Core parameter: s
Import flash.geom.*;
var photo:sprite=new Sprite ();
AddChild (photo);
IMG is a picture class that inherits from BitmapData
var bitmapsource = new Img (400,300);
var showline = true;
var inbitmapwidth = 1/bitmapsource.width;
var inbitmapheight = 1/bitmapsource.height;
var bitmapwidth = bitmapsource.width;
var bitmapheight = bitmapsource.height;
Bitmap transformation distance of mouse
var Bitmapmtrx = new Matrix ();
var Subbitmapmtix = new Matrix ();
S
camera, in the camera coordinate system, Z-value The Source:
--------------------------------Render Part------------------------------------
Reads bitmap data and stores it in an array
var bitmapary = new Array ();
var BitmapSource = Flash.display.BitmapData.loadBitmap ("data2");
For (i=0 ivar face = new Flash.display.BitmapData (Bitmapsource.width, Bitmapsource.width, false);
Face.copypixels (BitmapSource, New Flash.geom.Rectangle (0, Bitmapsource.width*i, Bitmapsource.width, bitmapsource.widt
calendar.php?/******************************** A function to determine whether a leap year* Can be improved according to more complex algorithms ********************************/function Leap_year ($year){if ($year% 4 = 0)//Basic rule{return true; is leap year}Else{return false;}}/******************************** Assign operations to some variables ** Pay special attention to the February assignment ********************************/function Setup (){Global $mon _num;$mon _num=array (31,30,31,30,
same parameters in grid
ShadowOffset: 1.25, // refer to the same parameters in grid
ShadowDepth: 3, // refer to the same parameters in grid
ShadowAlpha: 0.1, // refer to the same parameters in grid
ShowLine: true, // shows the line in the chart (line in the line chart)
ShowMarker: true, // whether to emphasize the data nodes in the graph
Fill: false, // whether to fill the area below the line in the chart (the fill color is the same as the line color
chart (especially the line chart)Shadow: true, // whether the shadow area of each graph is displayed in the chartShadowAngle: 45, // refer to the same parameters in gridShadowOffset: 1.25, // refer to the same parameters in gridShadowDepth: 3, // refer to the same parameters in gridShadowAlpha: 0.1, // refer to the same parameters in gridShowLine: true, // shows the line in the chart (line in the line chart)ShowMarker: true, // whether to emphasize the data nodes in the graphFill: false, // whe
Json-generated Tree defined in js, jsjsontree
The name here is the json arry generated in js. The json tree plug-in defined in js is jquery. ztree.
Var param = {
};
$. Post ("manager_treeList", param, function (data ){
// Loop list
Var setting = {
View :{
DblClickExpand: false,
ShowLine: true,
SelectedMulti: false
},
Data :{
SimpleData :{
Enable: true,
IdKey: "id ",
PIdKey: "pId ",
RootPId :""
}
},
Callback :{
OnClick: zTreeOnClick
}
};
Var arry = [
line color) and legend// Set the category color in the category Name box. Note that if fill is true,// The value of showLine must be true; otherwise, the result is not displayed.FillAndStroke: false, // when fill is true, a line is displayed at the top of the fill area (this line is displayed if it is a line chart)FillColor: undefined, // set the color of the fill areaFillAlpha: undefined, // opacity sets the transparency of the filled AreaRenderer:
Turn the subject of phpstorm into the black of the official website:SettingsAppearance,ThemeDrop-down box selectDarculaReboot, it should be connected.DOCDocuments: Right-clickExternalLibrariese-ConfigurePHPInclude paths remove wavy lines:Settings-Editor-ColorsFonts- General-TYPO-EffectsShow line number:Settings-Editor-appearance-ShowLine numbers remove the browser icon in the upper right corner:SettingsTools-webbrowsersAdd toVIMPlug - ins:Settings->ed
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.