├── 2020 ├── 码技拓展_利用异常分析源码 │ ├── db │ │ └── .gitkeep │ └── source │ │ └── springboot-exception │ │ └── src │ │ └── main │ │ ├── resources │ │ └── application.yaml │ │ └── java │ │ └── com │ │ └── yuboon │ │ └── springboot │ │ └── exception │ │ ├── stack │ │ ├── Demo3.java │ │ ├── Demo.java │ │ ├── Demo1.java │ │ └── Demo2.java │ │ ├── HelloApplication.java │ │ └── HelloController.java ├── 突破CRUD_万能树构造工具类封装 │ ├── db │ │ └── .gitkeep │ └── source │ │ └── springboot-tree │ │ └── src │ │ └── main │ │ ├── resources │ │ ├── public │ │ │ └── zTree_v3 │ │ │ │ ├── api │ │ │ │ ├── apiCss │ │ │ │ │ └── img │ │ │ │ │ │ ├── close.png │ │ │ │ │ │ ├── apiMenu.gif │ │ │ │ │ │ ├── apiMenu.png │ │ │ │ │ │ ├── chinese.png │ │ │ │ │ │ ├── english.png │ │ │ │ │ │ ├── background.jpg │ │ │ │ │ │ ├── contact-bg.png │ │ │ │ │ │ ├── header-bg.png │ │ │ │ │ │ ├── lightbulb.png │ │ │ │ │ │ ├── overlay_bg.png │ │ │ │ │ │ ├── overlay_arrow.gif │ │ │ │ │ │ ├── overlay_arrow.png │ │ │ │ │ │ ├── zTreeStandard.gif │ │ │ │ │ │ ├── zTreeStandard.png │ │ │ │ │ │ └── overlay_close_IE6.gif │ │ │ │ ├── cn │ │ │ │ │ ├── setting.treeObj.html │ │ │ │ │ ├── setting.treeId.html │ │ │ │ │ ├── fn.zTree._z.html │ │ │ │ │ ├── zTreeObj.setting.html │ │ │ │ │ ├── treeNode.diy.html │ │ │ │ │ ├── setting.async.headers.html │ │ │ │ │ ├── setting.async.xhrFields.html │ │ │ │ │ ├── setting.data.key.name.html │ │ │ │ │ ├── treeNode.isHover.html │ │ │ │ │ ├── setting.data.key.children.html │ │ │ │ │ ├── treeNode.editNameFlag.html │ │ │ │ │ ├── treeNode.check_Focus.html │ │ │ │ │ ├── setting.view.showLine.html │ │ │ │ │ ├── setting.data.key.isHidden.html │ │ │ │ │ ├── setting.check.enable.html │ │ │ │ │ ├── setting.data.key.isParent.html │ │ │ │ │ ├── setting.data.key.checked.html │ │ │ │ │ ├── setting.data.key.url.html │ │ │ │ │ ├── setting.view.txtSelectedEnable.html │ │ │ │ │ ├── setting.edit.drag.autoOpenTime.html │ │ │ │ │ ├── setting.edit.drag.borderMax.html │ │ │ │ │ ├── setting.edit.drag.borderMin.html │ │ │ │ │ ├── setting.edit.drag.maxShowNodeNum.html │ │ │ │ │ ├── setting.edit.drag.minMoveSize.html │ │ │ │ │ ├── zTreeObj.getSelectedNodes.html │ │ │ │ │ ├── setting.data.key.title.html │ │ │ │ │ ├── treeNode.name.html │ │ │ │ │ ├── treeNode.level.html │ │ │ │ │ ├── treeNode.tId.html │ │ │ │ │ ├── treeNode.target.html │ │ │ │ │ ├── setting.data.keep.leaf.html │ │ │ │ │ ├── zTreeObj.refresh.html │ │ │ │ │ ├── setting.view.autoCancelSelected.html │ │ │ │ │ ├── setting.data.keep.parent.html │ │ │ │ │ ├── setting.view.nameIsHTML.html │ │ │ │ │ ├── treeNode.isAjaxing.html │ │ │ │ │ ├── setting.edit.editNameSelectAll.html │ │ │ │ │ ├── treeNode.url.html │ │ │ │ │ ├── treeNode.getIndex.html │ │ │ │ │ ├── treeNode.getPath.html │ │ │ │ │ ├── setting.edit.drag.autoExpandTrigger.html │ │ │ │ │ ├── setting.view.selectedMulti.html │ │ │ │ │ ├── setting.async.enable.html │ │ │ │ │ ├── setting.async.dataType.html │ │ │ │ │ ├── treeNode.getPreNode.html │ │ │ │ │ ├── zTreeObj.destroy.html │ │ │ │ │ ├── treeNode.getNextNode.html │ │ │ │ │ ├── treeNode.getParentNode.html │ │ │ │ │ ├── setting.check.radioType.html │ │ │ │ │ ├── treeNode.click.html │ │ │ │ │ ├── setting.async.type.html │ │ │ │ │ ├── treeNode.isHidden.html │ │ │ │ │ ├── zTreeObj.setEditable.html │ │ │ │ │ ├── setting.view.expandSpeed.html │ │ │ │ │ ├── setting.data.simpleData.idKey.html │ │ │ │ │ ├── setting.data.simpleData.pIdKey.html │ │ │ │ │ ├── zTreeObj.getNodes.html │ │ │ │ │ ├── zTreeObj.transformToArray.html │ │ │ │ │ ├── setting.check.nocheckInherit.html │ │ │ │ │ ├── setting.data.simpleData.rootPId.html │ │ │ │ │ ├── treeNode.isFirstNode.html │ │ │ │ │ ├── treeNode.isLastNode.html │ │ │ │ │ ├── fn.zTree.getZTreeObj.html │ │ │ │ │ ├── zTreeObj.getNodeByTId.html │ │ │ │ │ ├── treeNode.nocheck.html │ │ │ │ │ ├── zTreeObj.getChangeCheckedNodes.html │ │ │ │ │ ├── treeNode.zAsync.html │ │ │ │ │ ├── setting.edit.drag.isCopy.html │ │ │ │ │ ├── setting.edit.drag.isMove.html │ │ │ │ │ ├── setting.async.contentType.html │ │ │ │ │ ├── setting.check.chkDisabledInherit.html │ │ │ │ │ ├── setting.check.chkboxType.html │ │ │ │ │ ├── treeNode.checkedOld.html │ │ │ │ │ ├── treeNode.parentTId.html │ │ │ │ │ ├── treeNode.isParent.html │ │ │ │ │ ├── setting.check.autoCheckTrigger.html │ │ │ │ │ ├── zTreeObj.hideNode.html │ │ │ │ │ ├── zTreeObj.expandAll.html │ │ │ │ │ ├── zTreeObj.cancelEditName.html │ │ │ │ │ ├── zTreeObj.getNodeIndex.html │ │ │ │ │ ├── zTreeObj.editName.html │ │ │ │ │ ├── zTreeObj.hideNodes.html │ │ │ │ │ ├── treeNode.iconClose.html │ │ │ │ │ ├── treeNode.iconOpen.html │ │ │ │ │ ├── zTreeObj.showNodes.html │ │ │ │ │ ├── fn.zTree.destroy.html │ │ │ │ │ ├── zTreeObj.showNode.html │ │ │ │ │ ├── treeNode.open.html │ │ │ │ │ ├── zTreeObj.getCheckedNodes.html │ │ │ │ │ ├── treeNode.children.html │ │ │ │ │ ├── treeNode.icon.html │ │ │ │ │ ├── zTreeObj.checkAllNodes.html │ │ │ │ │ ├── setting.callback.beforeExpand.html │ │ │ │ │ ├── setting.callback.beforeCollapse.html │ │ │ │ │ ├── setting.callback.beforeCheck.html │ │ │ │ │ ├── setting.edit.enable.html │ │ │ │ │ └── setting.callback.beforeRemove.html │ │ │ │ └── en │ │ │ │ │ ├── setting.treeObj.html │ │ │ │ │ ├── setting.treeId.html │ │ │ │ │ ├── treeNode.diy.html │ │ │ │ │ ├── setting.async.headers.html │ │ │ │ │ ├── setting.async.xhrFields.html │ │ │ │ │ ├── setting.data.key.name.html │ │ │ │ │ ├── fn.zTree._z.html │ │ │ │ │ ├── setting.data.key.children.html │ │ │ │ │ ├── zTreeObj.setting.html │ │ │ │ │ ├── setting.view.showLine.html │ │ │ │ │ ├── treeNode.isHover.html │ │ │ │ │ ├── treeNode.editNameFlag.html │ │ │ │ │ ├── setting.data.key.isHidden.html │ │ │ │ │ ├── setting.data.key.isParent.html │ │ │ │ │ ├── setting.check.enable.html │ │ │ │ │ ├── treeNode.check_Focus.html │ │ │ │ │ ├── setting.data.key.checked.html │ │ │ │ │ ├── setting.data.key.url.html │ │ │ │ │ ├── setting.edit.drag.borderMax.html │ │ │ │ │ ├── setting.edit.drag.borderMin.html │ │ │ │ │ ├── treeNode.tId.html │ │ │ │ │ ├── treeNode.level.html │ │ │ │ │ ├── treeNode.name.html │ │ │ │ │ ├── setting.edit.drag.autoOpenTime.html │ │ │ │ │ ├── setting.data.key.title.html │ │ │ │ │ ├── setting.view.txtSelectedEnable.html │ │ │ │ │ ├── zTreeObj.getSelectedNodes.html │ │ │ │ │ ├── setting.edit.drag.maxShowNodeNum.html │ │ │ │ │ ├── setting.edit.drag.minMoveSize.html │ │ │ │ │ ├── treeNode.target.html │ │ │ │ │ ├── setting.view.nameIsHTML.html │ │ │ │ │ ├── treeNode.getIndex.html │ │ │ │ │ ├── treeNode.getPath.html │ │ │ │ │ ├── setting.async.type.html │ │ │ │ │ ├── zTreeObj.refresh.html │ │ │ │ │ ├── setting.edit.editNameSelectAll.html │ │ │ │ │ ├── setting.async.dataType.html │ │ │ │ │ ├── setting.data.keep.leaf.html │ │ │ │ │ ├── setting.data.simpleData.idKey.html │ │ │ │ │ ├── setting.view.selectedMulti.html │ │ │ │ │ ├── treeNode.getParentNode.html │ │ │ │ │ ├── setting.data.simpleData.pIdKey.html │ │ │ │ │ ├── setting.view.autoCancelSelected.html │ │ │ │ │ ├── setting.data.simpleData.rootPId.html │ │ │ │ │ ├── setting.edit.drag.autoExpandTrigger.html │ │ │ │ │ ├── treeNode.getNextNode.html │ │ │ │ │ ├── treeNode.getPreNode.html │ │ │ │ │ ├── treeNode.isAjaxing.html │ │ │ │ │ ├── zTreeObj.setEditable.html │ │ │ │ │ ├── treeNode.url.html │ │ │ │ │ ├── setting.check.radioType.html │ │ │ │ │ ├── setting.data.keep.parent.html │ │ │ │ │ ├── zTreeObj.destroy.html │ │ │ │ │ ├── setting.async.enable.html │ │ │ │ │ ├── setting.view.expandSpeed.html │ │ │ │ │ └── treeNode.nocheck.html │ │ │ │ ├── css │ │ │ │ ├── metroStyle │ │ │ │ │ └── img │ │ │ │ │ │ ├── metro.gif │ │ │ │ │ │ ├── metro.png │ │ │ │ │ │ ├── line_conn.png │ │ │ │ │ │ └── loading.gif │ │ │ │ ├── zTreeStyle │ │ │ │ │ └── img │ │ │ │ │ │ ├── diy │ │ │ │ │ │ ├── 2.png │ │ │ │ │ │ ├── 3.png │ │ │ │ │ │ ├── 4.png │ │ │ │ │ │ ├── 5.png │ │ │ │ │ │ ├── 6.png │ │ │ │ │ │ ├── 7.png │ │ │ │ │ │ ├── 8.png │ │ │ │ │ │ ├── 9.png │ │ │ │ │ │ ├── 1_close.png │ │ │ │ │ │ └── 1_open.png │ │ │ │ │ │ ├── line_conn.gif │ │ │ │ │ │ ├── loading.gif │ │ │ │ │ │ ├── zTreeStandard.gif │ │ │ │ │ │ └── zTreeStandard.png │ │ │ │ └── awesomeStyle │ │ │ │ │ └── img │ │ │ │ │ └── loading.gif │ │ │ │ ├── demo │ │ │ │ ├── cn │ │ │ │ │ ├── super │ │ │ │ │ │ ├── left_menuForOutLook.gif │ │ │ │ │ │ └── left_menuForOutLook.png │ │ │ │ │ └── asyncData │ │ │ │ │ │ ├── getNodesForBigData.php │ │ │ │ │ │ └── getNodes.php │ │ │ │ └── en │ │ │ │ │ ├── super │ │ │ │ │ ├── left_menuForOutLook.gif │ │ │ │ │ └── left_menuForOutLook.png │ │ │ │ │ └── asyncData │ │ │ │ │ ├── getNodesForBigData.php │ │ │ │ │ └── getNodes.php │ │ │ │ └── package.json │ │ └── application.yaml │ │ └── java │ │ └── com │ │ └── yuboon │ │ └── springboot │ │ └── tree │ │ ├── Application.java │ │ └── tree │ │ └── MenuEntityTreeNode.java ├── 码技拓展_springboot配置依赖分离打包 │ ├── db │ │ └── .gitkeep │ └── source │ │ └── springboot-package-segment │ │ ├── config │ │ ├── application-dev.yaml │ │ ├── application-test.yaml │ │ └── application.yaml │ │ └── demo │ │ └── src │ │ └── main │ │ ├── resources │ │ ├── application-test.yaml │ │ ├── application.yaml │ │ └── application-dev.yaml │ │ └── java │ │ └── cn │ │ └── test │ │ ├── DemoApplication.java │ │ └── DemoController.java ├── 程序员规范_个人PC工作目录模板 │ └── example │ │ └── example.rar └── 突破CRUD_简单优雅的代码生成工具诞生记 │ ├── source │ └── springboot-gencode │ │ ├── .gitignore │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yuboon │ │ │ │ └── springboot │ │ │ │ └── gencode │ │ │ │ ├── template │ │ │ │ ├── VoCodeTemplate.java │ │ │ │ ├── EntityCodeTemplate.java │ │ │ │ └── ControllerCodeTemplate.java │ │ │ │ ├── command │ │ │ │ ├── GenControllerAndEntityCommand.java │ │ │ │ ├── GenVoCommand.java │ │ │ │ ├── GenControllerCommand.java │ │ │ │ ├── GenEntityCommand.java │ │ │ │ ├── Command.java │ │ │ │ └── ComposeCommand.java │ │ │ │ ├── exception │ │ │ │ └── GenCodeException.java │ │ │ │ ├── output │ │ │ │ ├── CodeOutput.java │ │ │ │ ├── ConsoleOutput.java │ │ │ │ └── FileOutput.java │ │ │ │ └── db │ │ │ │ └── DbConnection.java │ │ └── resources │ │ │ ├── templates │ │ │ ├── Entity.tpl │ │ │ ├── Controller.tpl │ │ │ └── Vo.tpl │ │ │ ├── logback.xml │ │ │ └── application.yaml │ │ └── test │ │ └── java │ │ └── com │ │ └── yuboon │ │ └── gencode │ │ └── test │ │ └── GenCodeTest.java │ └── db │ └── sys_user.sql ├── doc └── image │ ├── csdn.png │ ├── muke.png │ ├── new.png │ ├── juejin.png │ ├── qrcode.jpg │ ├── zhihu.png │ ├── cnblogs.png │ ├── jianshu.png │ └── oschina.png ├── .gitattributes └── .gitignore /2020/码技拓展_利用异常分析源码/db/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/db/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/db/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/image/csdn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/csdn.png -------------------------------------------------------------------------------- /doc/image/muke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/muke.png -------------------------------------------------------------------------------- /doc/image/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/new.png -------------------------------------------------------------------------------- /doc/image/juejin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/juejin.png -------------------------------------------------------------------------------- /doc/image/qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/qrcode.jpg -------------------------------------------------------------------------------- /doc/image/zhihu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/zhihu.png -------------------------------------------------------------------------------- /doc/image/cnblogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/cnblogs.png -------------------------------------------------------------------------------- /doc/image/jianshu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/jianshu.png -------------------------------------------------------------------------------- /doc/image/oschina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/doc/image/oschina.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=java 2 | *.vue linguist-language=java 3 | *.js linguist-language=java -------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/config/application-dev.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8085 -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/config/application-test.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8085 3 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/config/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: 3 | active: dev -------------------------------------------------------------------------------- /2020/程序员规范_个人PC工作目录模板/example/example.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/程序员规范_个人PC工作目录模板/example/example.rar -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/demo/src/main/resources/application-test.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: 3 | active: dev -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/demo/src/main/resources/application-dev.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | 5 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/close.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/apiMenu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/apiMenu.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/apiMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/apiMenu.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/chinese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/chinese.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/english.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/english.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/background.jpg -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/contact-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/contact-bg.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/header-bg.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/lightbulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/lightbulb.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_bg.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/metro.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/metro.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_arrow.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_arrow.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/zTreeStandard.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/zTreeStandard.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/awesomeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/awesomeStyle/img/loading.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/line_conn.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/metroStyle/img/loading.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_close_IE6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/apiCss/img/overlay_close_IE6.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/super/left_menuForOutLook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/super/left_menuForOutLook.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/super/left_menuForOutLook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/super/left_menuForOutLook.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/super/left_menuForOutLook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/super/left_menuForOutLook.gif -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/super/left_menuForOutLook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuboon/OpenClass/HEAD/2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/super/left_menuForOutLook.png -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | spring: 5 | datasource: 6 | url: jdbc:mysql://localhost:3306/openclass?characterEncoding=utf8&useSSL=false 7 | username: root 8 | password: root 9 | driver-class-name: com.mysql.jdbc.Driver 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # private # 2 | _* 3 | 4 | 5 | logs 6 | 7 | # maven # 8 | target/ 9 | 10 | # eclipse # 11 | .settings 12 | .project 13 | .classpath 14 | .log 15 | 16 | # Package Files # 17 | *.war 18 | *.ear 19 | 20 | # idea # 21 | .idea/ 22 | *.iml 23 | *.lck 24 | *.tmp 25 | *.class 26 | vcx.xml 27 | 28 | # Package Files # 29 | *.jar 30 | *.bak 31 | *.tmp 32 | *.log 33 | *.gz 34 | 35 | 36 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/.gitignore: -------------------------------------------------------------------------------- 1 | # maven # 2 | target/ 3 | logs 4 | 5 | # eclipse # 6 | .settings 7 | .project 8 | .classpath 9 | .log 10 | 11 | # Package Files # 12 | *.war 13 | *.ear 14 | 15 | # idea # 16 | .idea/ 17 | *.iml 18 | *.lck 19 | *.tmp 20 | *.class 21 | vcx.xml 22 | 23 | # Package Files # 24 | *.jar 25 | *.bak 26 | *.tmp 27 | *.log 28 | *.gz 29 | 30 | 31 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/demo/src/main/java/cn/test/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package cn.test; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2020/码技拓展_springboot配置依赖分离打包/source/springboot-package-segment/demo/src/main/java/cn/test/DemoController.java: -------------------------------------------------------------------------------- 1 | package cn.test; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | public class DemoController { 9 | 10 | @RequestMapping("/hello") 11 | public String hello(){ 12 | return "hello"; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/stack/Demo3.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception.stack; 2 | 3 | /** 4 | * @author yuboon 5 | * @version v1.0 6 | * @date 2020/01/20 7 | */ 8 | public class Demo3 { 9 | 10 | public void hello(){ 11 | String nullString = null; 12 | nullString.toString(); 13 | } 14 | 15 | public static void main(String[] args) { 16 | new Demo3().hello(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.treeObj.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.treeObj

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 容器的 jQuery 对象,主要功能:便于操作。

9 |

请勿进行初始化 或 修改,属于内部参数。

10 |
11 |
12 | 13 |
14 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.treeId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.treeId

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 的唯一标识,初始化后,等于 用户定义的 zTree 容器的 id 属性值。

9 |

请勿进行初始化 或 修改,属于内部参数。

10 |
11 |
12 | 13 |
14 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/template/VoCodeTemplate.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.template; 2 | 3 | /** 4 | * VO模板 5 | * 6 | * @author yuboon 7 | * @version v1.0 8 | * @date 2020/01/04 9 | */ 10 | public class VoCodeTemplate extends CodeTemplate { 11 | 12 | public VoCodeTemplate() { 13 | this.tplName = "VO模板"; 14 | this.tplPath = "templates/Vo.tpl"; 15 | this.fileTag = "Vo"; 16 | this.fileSuffix = ".java"; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/resources/templates/Entity.tpl: -------------------------------------------------------------------------------- 1 | import lombok.Data; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * [(${comment})]-实体 7 | * 8 | * @author yuboon 9 | * @version v1.0 10 | * @date [(${createDate})] 11 | */ 12 | @Data 13 | public class [(${className})] implements Serializable { 14 | [# th:each="column : ${columnList}"] 15 | /** [(${column.comment})] */ 16 | @Column("[(${column.code})]") 17 | private [(${column.type})] [(${column.attrName})]; 18 | 19 | [/] 20 | } 21 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/fn.zTree._z.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

JSON$.fn.zTree._z

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree v3.x 内部的全部方法都可以通过 $.fn.zTree._z 进行调用,开放出来是为了更便于大家开发制作自己的 zTree 插件。

9 |

如无特殊需求请勿使用此对象,以及修改此对象内部的各个函数。

10 |
11 |
12 |
13 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/template/EntityCodeTemplate.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.template; 2 | 3 | /** 4 | * 控制类模板 5 | * 6 | * @author yuboon 7 | * @version v1.0 8 | * @date 2020/01/04 9 | */ 10 | public class EntityCodeTemplate extends CodeTemplate { 11 | 12 | public EntityCodeTemplate() { 13 | this.tplName = "控制器模板"; 14 | this.tplPath = "templates/Entity.tpl"; 15 | this.fileTag = ""; 16 | this.fileSuffix = ".java"; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/java/com/yuboon/springboot/tree/Application.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.tree; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * 启动 8 | * 9 | * @author yuboon 10 | * @version v1.0 11 | * @date 2020/02/06 12 | */ 13 | @SpringBootApplication 14 | public class Application { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(Application.class); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/resources/templates/Controller.tpl: -------------------------------------------------------------------------------- 1 | import org.springframework.web.bind.annotation.RestController; 2 | import org.springframework.web.bind.annotation.RequestMapping; 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | 5 | /** 6 | * [(${comment})]-控制层 7 | * 8 | * @author yuboon 9 | * @version v1.0 10 | * @date [(${createDate})] 11 | */ 12 | @RestController 13 | public class [(${className})]Controller { 14 | 15 | @Autowired 16 | private [(${className})]Service [(${className})]Service; 17 | 18 | } -------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/HelloApplication.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author yuboon 8 | * @version v1.0 9 | * @date 2020/01/20 10 | */ 11 | @SpringBootApplication 12 | public class HelloApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(HelloApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.treeObj.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.treeObj

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

zTree DOM's jQuery object, the main function: easy to internal operations.

9 |

Do not initialize or modify it, it is an internal argument.

10 |
11 |
12 | 13 |
14 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.setting.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

JSONzTreeObj.setting

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 对象使用的 setting 配置数据,详细请参考 “setting 配置详解”中的各个属性详细说明

9 |

v3.x 取消了原先操作 setting 的方法,让用户可以较自由的修改参数,但请注意,对于 zTree 初始化有影响的参数后期修改是不会起作用的,请对各个属性有较深入的了解以后再考虑进行修改。

10 |
11 |
12 |
13 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.diy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

?treeNode.* DIY *

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

用于保存节点的其他自定义数据信息,不要与 zTree 使用的属性相同即可,用户可随意设定。

9 |
10 |
11 |

treeNode 举例

12 |

1. 设置节点的备用英文名称

13 |
var node = { "id":1, "name":"test1", "ename":"test eName"};
14 |
15 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | logback 5 | 6 | 7 | 8 | %d [%thread] %-5level %logger{36} [%file : %line] - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/java/com/yuboon/springboot/tree/tree/MenuEntityTreeNode.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.tree.tree; 2 | 3 | import com.yuboon.springboot.tree.util.TreeNode; 4 | 5 | /** 6 | * 菜单实体扩展的树节点 7 | * 8 | * @author yuboon 9 | * @version v1.0 10 | * @date 2020/02/09 11 | */ 12 | public class MenuEntityTreeNode extends TreeNode { 13 | 14 | // 扩展备注属性 15 | private String remark; 16 | 17 | public String getRemark() { 18 | return remark; 19 | } 20 | 21 | public void setRemark(String remark) { 22 | this.remark = remark; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/resources/templates/Vo.tpl: -------------------------------------------------------------------------------- 1 | import cn.wp.common.core.dao.annotation.Column; 2 | import cn.wp.common.core.dao.annotation.Table; 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * [(${comment})]-实体 9 | * 10 | * @author yuboon 11 | * @version v1.0 12 | * @date [(${createDate})] 13 | */ 14 | @Data 15 | public class [(${className})]Vo implements Serializable { 16 | [# th:each="column : ${columnList}"] 17 | /** [(${column.comment})] */ 18 | @Column("[(${column.code})]") 19 | private [(${column.type})] [(${column.attrName})]; 20 | 21 | [/] 22 | } 23 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/GenControllerAndEntityCommand.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | /** 4 | * 控制器与实体组合生成命令 5 | * 6 | * @author yuboon 7 | * @version v1.0 8 | * @date 2020/01/04 9 | */ 10 | public class GenControllerAndEntityCommand extends ComposeCommand { 11 | 12 | public GenControllerAndEntityCommand() { 13 | this.commandName = "Controller & Entity 生成命令"; 14 | this.commandCode = "03"; 15 | singleCommands.add(new GenControllerCommand()); 16 | singleCommands.add(new GenEntityCommand()); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.treeId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.treeId

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

zTree unique identifier. After the initialization, it equals to the id attribute value of the user-defined zTree container.

9 |

Do not initialize or modify it, it is an internal argument.

10 |
11 |
12 | 13 |
14 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/template/ControllerCodeTemplate.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.template; 2 | 3 | import cn.hutool.core.io.IoUtil; 4 | 5 | import java.io.InputStream; 6 | 7 | /** 8 | * 控制类模板 9 | * 10 | * @author yuboon 11 | * @version v1.0 12 | * @date 2020/01/04 13 | */ 14 | public class ControllerCodeTemplate extends CodeTemplate { 15 | 16 | public ControllerCodeTemplate() { 17 | this.tplName = "控制器模板"; 18 | this.tplPath = "templates/Controller.tpl"; 19 | this.fileTag = "Controller"; 20 | this.fileSuffix = ".java"; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/stack/Demo.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception.stack; 2 | 3 | /** 4 | * @author yuboon 5 | * @version v1.0 6 | * @date 2020/01/20 7 | */ 8 | public class Demo { 9 | 10 | public void hello(){ 11 | StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); 12 | for(StackTraceElement element : stackTraceElements){ 13 | System.out.println(element.getMethodName() + "," + element.getLineNumber()); 14 | } 15 | } 16 | 17 | public static void main(String[] args) { 18 | new Demo().hello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/asyncData/getNodesForBigData.php: -------------------------------------------------------------------------------- 1 | 2 | [] 27 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/asyncData/getNodesForBigData.php: -------------------------------------------------------------------------------- 1 | 2 | [] 27 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.headers.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.async.headers

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

[setting.async.enable = true 时生效]

9 |

默认值:"{}"

10 |

v3.5.36+

11 |
12 |
13 |

Object 格式说明

14 |
15 |

请参考 jQuery ajax 中的 headers 参数

16 |
17 |
18 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.xhrFields.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.async.xhrFields

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

[setting.async.enable = true 时生效]

9 |

默认值:"{}"

10 |

v3.5.36+

11 |
12 |
13 |

Object 格式说明

14 |
15 |

请参考 jQuery ajax 中的 xhrFields 参数

16 |
17 |
18 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.name.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.name

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点数据保存节点名称的属性名称。

9 |

默认值:"name"

10 |
11 |
12 |

setting 举例

13 |

1. 设置 zTree 显示节点时,将 treeNode 的 ename 属性当做节点名称

14 |
var setting = {
15 | 	data: {
16 | 		key: {
17 | 			name: "ename"
18 | 		}
19 | 	}
20 | };
21 | ......
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isHover.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isHover

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

记录节点 的 hover 状态,主要用于 setting.view.addHoverDom / removeHoverDom 。

9 |

zTree 内部使用,请勿进行初始化 或 随意修改

10 |

默认值:false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示节点处于 hover 状态

16 |

false 表示节点未处于 hover 状态

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/exception/GenCodeException.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.exception; 2 | 3 | /** 4 | * 代码生成异常类 5 | * 6 | * @author yuboon 7 | * @version v1.0 8 | * @date 2020/01/04 9 | */ 10 | public class GenCodeException extends RuntimeException { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | public GenCodeException() { 15 | super(); 16 | } 17 | 18 | public GenCodeException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | 22 | public GenCodeException(String message) { 23 | super(message); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.children.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.children

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点数据中保存子节点数据的属性名称。

9 |

默认值:"children"

10 |
11 |
12 |

setting 举例

13 |

1. 设置 zTree 显示节点时,将 treeNode 的 nodes 属性当做节点名称

14 |
var setting = {
15 | 	data: {
16 | 		key: {
17 | 			children: "nodes"
18 | 		}
19 | 	}
20 | };
21 | ......
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.diy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

?treeNode.* DIY *

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Used to save other custom data of node, do not use the same attribute name with ztree used, the user can freely set.

9 |
10 |
11 |

Examples of treeNode

12 |

1. Use 'ename' attribute to save more info

13 |
var node = { "id":1, "name":"test1", "ename":"test eName"};
14 |
15 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.editNameFlag.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.editNameFlag

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

用于记录节点是否处于编辑名称状态。[setting.edit.enable = true 时有效]

9 |

zTree 内部使用,请勿进行初始化 或 随意修改

10 |

默认值:false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示节点处于编辑名称状态

16 |

false 表示节点未处于编辑名称状态

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.check_Focus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.check_Focus

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

用于设置节点的 checkBox / radio 的 focus 状态。[setting.check.enable = true 时有效]

9 |

zTree 内部使用,请勿进行初始化 或 随意修改

10 |

默认值:false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示当前鼠标移动到输入框内

16 |

false 表示当前鼠标移动到输入框外

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.async.headers.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.async.headers

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

It is valid when [setting.async.enable = true]

9 |

Default:"{}"

10 |

v3.5.36+

11 |
12 |
13 |

String Format

14 |
15 |

The 'headers' in zTree and jQuery's ajax requests is same.

16 |
17 |
18 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.async.xhrFields.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Objectsetting.async.xhrFields

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

It is valid when [setting.async.enable = true]

9 |

Default:"{}"

10 |

v3.5.36+

11 |
12 |
13 |

String Format

14 |
15 |

The 'xhrFields' in zTree and jQuery's ajax requests is same.

16 |
17 |
18 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.name.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.name

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save the node name.

9 |

Default: "name"

10 |
11 |
12 |

Examples of setting

13 |

1. Set the 'ename' attribute to save the node name.

14 |
var setting = {
15 | 	data: {
16 | 		key: {
17 | 			name: "ename"
18 | 		}
19 | 	}
20 | };
21 | ......
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.showLine.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.showLine

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置 zTree 是否显示节点之间的连线。

9 |

默认值:true

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 显示 / 不显示 连线

15 |
16 |

setting 举例

17 |

1. 设置 zTree 不显示节点之间的连线

18 |
var setting = {
19 | 	view: {
20 | 		showLine: false
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/fn.zTree._z.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

JSON$.fn.zTree._z

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

All of the internal methods in zTree v3.x are available through '$. fn.zTree._z', 9 | use this if you want to develop your own zTree plug-ins.

10 |

Unless you are writing a plugin, 11 | you should not use this object.

12 |
13 |
14 |
15 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.isHidden.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.isHidden

4 |

概述[ 依赖 jquery.ztree.exhide js ]

5 |
6 |

7 |
8 |

zTree 节点数据保存节点是否隐藏的属性名称。

9 |

默认值:"isHidden"

10 |

v3.5.32+

11 |
12 |
13 |

setting 举例

14 |

1. 设置 zTree 显示节点时,将 treeNode 的 hidden 属性当做节点是否隐藏的属性名称

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			isHidden: "hidden"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.enable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.check.enable

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

设置 zTree 的节点上是否显示 checkbox / radio

9 |

默认值: false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 显示 / 不显示 复选框或单选框

15 |
16 |

setting 举例

17 |

1. 需要显示 checkbox

18 |
var setting = {
19 | 	check: {
20 | 		enable: true
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.isParent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.isParent

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点数据保存节点是否为父节点的属性名称。

9 |

默认值:"isParent"

10 |

v3.5.32+

11 |
12 |
13 |

setting 举例

14 |

1. 设置 zTree 显示节点时,将 treeNode 的 parent 属性当做节点是否为父节点的属性名称

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			isParent: "parent"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.children.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.children

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save the child nodes.

9 |

Default: "children"

10 |
11 |
12 |

Examples of setting

13 |

1. Set the 'nodes' attribute to save the child nodes.

14 |
var setting = {
15 | 	data: {
16 | 		key: {
17 | 			children: "nodes"
18 | 		}
19 | 	}
20 | };
21 | ......
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/output/CodeOutput.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.output; 2 | 3 | import com.yuboon.springboot.gencode.meta.Table; 4 | import com.yuboon.springboot.gencode.template.CodeTemplate; 5 | 6 | /** 7 | * 输出接口 8 | * 9 | * @author yuboon 10 | * @version v1.0 11 | * @date 2020/01/04 12 | */ 13 | public abstract class CodeOutput { 14 | 15 | protected String outputCode; 16 | 17 | /** 18 | * 输出文件 19 | * @param table 20 | * @param content 21 | * @param template 22 | */ 23 | public abstract void out(Table table, String content, CodeTemplate template); 24 | 25 | public String getOutputCode() { 26 | return outputCode; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | 10 | /** 11 | * @author yuboon 12 | * @version v1.0 13 | * @date 2020/01/20 14 | */ 15 | @RestController 16 | public class HelloController { 17 | 18 | @RequestMapping("/hello") 19 | public HttpServletRequest hello(String name, HttpServletRequest request){ 20 | /*String nullString = null; 21 | nullString.toString();*/ 22 | return request; 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/zTreeObj.setting.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

JSONzTreeObj.setting

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The configuration data of zTree, refer to "setting details"

9 |

zTree v3.x to cancel the original operation setting method, so users can modify.

10 |

Note: Modify the parameters which affect zTree initialization will not work, please first understand the different attributes.

11 |
12 |
13 |
14 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.checked.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.checked

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

zTree 节点数据中保存 check 状态的属性名称。

9 |

默认值:"checked"

10 |

请勿与 zTree 节点数据的其他参数冲突,例如:checkedOld

11 |
12 |
13 |

setting 举例

14 |

1. 设置 zTree 显示节点时,将 treeNode 的 isChecked 属性当做节点名称

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			checked: "isChecked"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.url.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.url

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点数据保存节点链接的目标 URL 的属性名称。

9 |

特殊用途:当后台数据只能生成 url 属性,又不想实现点击节点跳转的功能时,可以直接修改此属性为其他不存在的属性名称

10 |

默认值:"url"

11 |
12 |
13 |

setting 举例

14 |

1. 设置 zTree 显示节点时,将 treeNode 的 xUrl 属性当做节点链接的目标 URL

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			url: "xUrl"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.showLine.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.showLine

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set to show or hide line.

9 |

Default: true

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: show line.

15 |

false means: hide line.

16 |
17 |

Examples of setting

18 |

1. Hide line

19 |
var setting = {
20 | 	view: {
21 | 		showLine: false
22 | 	}
23 | };
24 | ......
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.txtSelectedEnable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.txtSelectedEnable

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置 zTree 是否允许可以选择 zTree DOM 内的文本。

9 |

默认值:false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 允许 / 不允许 选择 zTree Dom 内的文本

15 |
16 |

setting & function 举例

17 |

1. 设置 zTree 允许选择文本

18 |
var setting = {
19 | 	view: {
20 | 		txtSelectedEnable: true
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.isHover.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isHover

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

Used to record the hover status of node's DOM. For 'setting.view.addHoverDom / removeHoverDom'.

9 |

Do not initialize or modify it, it is an internal argument.

10 |

Default: false

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: the node's DOM is in hover.

16 |

false means: the node's DOM is not in hover.

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/GenVoCommand.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | import com.yuboon.springboot.gencode.meta.Table; 4 | import com.yuboon.springboot.gencode.template.EntityCodeTemplate; 5 | import com.yuboon.springboot.gencode.template.VoCodeTemplate; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * 控制器生成命令 11 | * 12 | * @author yuboon 13 | * @version v1.0 14 | * @date 2020/01/04 15 | */ 16 | public class GenVoCommand extends SingleCommand { 17 | 18 | public GenVoCommand() { 19 | this.commandName = "Vo生成命令"; 20 | this.commandCode = "04"; 21 | this.template = new VoCodeTemplate(); 22 | } 23 | 24 | @Override 25 | public void process(Table table, Map map) { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/test/java/com/yuboon/gencode/test/GenCodeTest.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.gencode.test; 2 | 3 | import com.yuboon.springboot.gencode.GenCode; 4 | import com.yuboon.springboot.gencode.configuration.GenCodeConfiguration; 5 | import com.yuboon.springboot.gencode.command.GenVoCommand; 6 | import com.yuboon.springboot.gencode.output.ConsoleOutput; 7 | 8 | /** 9 | * 此处为类介绍 10 | * 11 | * @author yuboon 12 | * @version v1.0 13 | * @date 2020/01/05 14 | */ 15 | public class GenCodeTest { 16 | 17 | public static void main(String[] args) { 18 | GenCodeConfiguration genCodeConfiguration = new GenCodeConfiguration(); 19 | GenCode genCode = new GenCode(genCodeConfiguration); 20 | genCode.process("sys_user",new GenVoCommand(),new ConsoleOutput()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.autoOpenTime.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.autoOpenTime

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽时父节点自动展开的延时间隔。 (单位:ms)[setting.edit.enable = true 时生效]

9 |

默认值:500

10 |

请根据自己的需求适当调整此值

11 |
12 |
13 |

setting 举例

14 |

1. 设置拖拽到父节点上立刻自动展开

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			autoOpenTime: 0
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.borderMax.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.borderMax

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽节点成为根节点时的 Tree 内边界范围 (单位:px)。[setting.edit.enable = true 时生效]

9 |

默认值:10

10 |

请根据自己的需求适当调整此值

11 |
12 |
13 |

setting 举例

14 |

1. 更改拖拽操作节点成为根节点时的 Tree 内边界范围为20px

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			borderMax: 20
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.borderMin.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.borderMin

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽节点成为根节点时的 Tree 外边界范围 (单位:px)。[setting.edit.enable = true 时生效]

9 |

默认值:-5

10 |

请根据自己的需求适当调整此值

11 |
12 |
13 |

setting 举例

14 |

1. 更改拖拽操作节点成为根节点时的 Tree 外边界范围为10px

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			borderMin: -10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.maxShowNodeNum.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.maxShowNodeNum

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽多个兄弟节点时,浮动图层中显示的最大节点数。 多余的节点用...代替。[setting.edit.enable = true 时生效]

9 |

默认值:5

10 |

请根据自己的需求适当调整此值

11 |
12 |
13 |

setting 举例

14 |

1. 设置拖拽时最多可显示10个节点

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			maxShowNodeNum: 10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.minMoveSize.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.minMoveSize

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

判定是否拖拽操作的最小位移值 (单位:px)。[setting.edit.enable = true 时生效]

9 |

根据自己的需求可适当调整此值,如果太小容易导致点击鼠标时误操作进行拖拽

10 |

默认值:5

11 |
12 |
13 |

setting 举例

14 |

1. 更改拖拽操作启动位移值为10px

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			minMoveSize: 10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getSelectedNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.getSelectedNodes

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取 zTree 当前被选中的节点数据集合

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值Array(JSON)

15 |

当前被选中的节点数据集合

16 |
17 |

function 举例

18 |

1. 获取当前被选中的节点数据集合

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var nodes = treeObj.getSelectedNodes();
21 | 
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.editNameFlag.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.editNameFlag

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

Used to save the node editing name status. It is valid when [setting.edit.enable = true]

9 |

Do not initialize or modify it, it is an internal argument.

10 |

Default: false

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: node is being edited.

16 |

false means: node is not being edited.

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.key.title.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.title

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点数据保存节点提示信息的属性名称。[setting.view.showTitle = true 时生效]

9 |

如果设置为 "" ,则自动与 setting.data.key.name 保持一致,避免用户反复设置

10 |

默认值:""

11 |
12 |
13 |

setting 举例

14 |

1. 设置 zTree 显示节点时,将 treeNode 的 fullName 属性当做节点名称

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			title: "fullName"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.name.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.name

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点名称。

9 |

1、如果不使用 name 属性保存节点名称,请修改 setting.data.key.name

10 |

默认值:无

11 |
12 |
13 |

String 格式说明

14 |
15 |

节点显示的名称字符串,标准 String 即可,所有特殊字符都会被自动转义

16 |
17 |

treeNode 举例

18 |

1. 设置节点的名称为 test1、test2、test3

19 |
var nodes = [
20 | 	{ "id":1, "name":"test1"},
21 | 	{ "id":2, "name":"test2"},
22 | 	{ "id":3, "name":"test3"}
23 | ]
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.isHidden.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.isHidden

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save whether the node is the parent node.

9 |

Default: "isHidden"

10 |

v3.5.32+

11 |
12 |
13 |

Examples of setting

14 |

1. Set the 'hidden' attribute to save whether the node is the parent node.

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			isHidden: "hidden"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.isParent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.isParent

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save whether the node is the parent node.

9 |

Default: "isParent"

10 |

v3.5.32+

11 |
12 |
13 |

Examples of setting

14 |

1. Set the 'parent' attribute to save whether the node is the parent node.

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			isParent: "parent"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.level.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

NumbertreeNode.level

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录节点的层级

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Number 格式说明

13 |
14 |

根节点 level = 0,依次递增

15 |
16 |

treeNode 举例

17 |

1. 查看当前被选中的节点的级数

18 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
19 | var sNodes = treeObj.getSelectedNodes();
20 | if (sNodes.length > 0) {
21 | 	var level = sNodes[0].level;
22 | }
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.tId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.tId

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

treeNode 节点的唯一标识 tId。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

String 格式说明

13 |
14 |

生成规则:setting.treeId + "_" + 内部计数

15 |
16 |

treeNode 举例

17 |

1. 查看当前被选中的节点的 tId

18 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
19 | var sNodes = treeObj.getSelectedNodes();
20 | if (sNodes.length > 0) {
21 | 	var tId = sNodes[0].tId;
22 | }
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.target.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.target

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置点击节点后在何处打开 url。[treeNode.url 存在时有效]

9 |

默认值:无

10 |
11 |
12 |

String 格式说明

13 |
14 |

同超链接 target 属性: "_blank", "_self" 或 其他指定窗口名称

15 |

省略此属性,则默认为 "_blank"

16 |
17 |

treeNode 举例

18 |

1. 设置点击某节点时,弹出新页面

19 |
var nodes = [
20 | 	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
21 | 	......
22 | ]
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.check.enable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.check.enable

4 |

Overview[ depends on jquery.ztree.excheck js ]

5 |
6 |

7 |
8 |

Set to use checkbox or radio in zTree

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: use the checkbox or radio

15 |

false means: don't use the checkbox or radio

16 |
17 |

Examples of setting

18 |

1. use the checkbox

19 |
var setting = {
20 | 	check: {
21 | 		enable: true
22 | 	}
23 | };
24 | ......
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/output/ConsoleOutput.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.output; 2 | 3 | 4 | import cn.hutool.core.lang.Console; 5 | import com.yuboon.springboot.gencode.meta.Table; 6 | import com.yuboon.springboot.gencode.template.CodeTemplate; 7 | 8 | /** 9 | * 控制台输出 10 | * 11 | * @author yuboon 12 | * @version v1.0 13 | * @date 2020/01/04 14 | */ 15 | public class ConsoleOutput extends CodeOutput { 16 | 17 | public ConsoleOutput() { 18 | this.outputCode = "01"; 19 | } 20 | 21 | @Override 22 | public void out(Table table, String content, CodeTemplate template) { 23 | Console.log("\n"); 24 | Console.log("-----------------------------"); 25 | Console.log(content); 26 | Console.log("-----------------------------"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.keep.leaf.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.data.keep.leaf

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 的节点叶子节点属性锁,是否始终保持 isParent = false

9 |

默认值:false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 锁定 / 不锁定 叶子节点属性

15 |

如果设置为 true,则所有 isParent = false 的节点,都无法添加子节点。

16 |
17 |

setting 举例

18 |

1. 需要锁定叶子节点状态

19 |
var setting = {
20 | 	data: {
21 | 		keep: {
22 | 			leaf: true
23 | 		}
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.check_Focus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.check_Focus

4 |

Overview[ depends on jquery.ztree.excheck js ]

5 |
6 |

7 |
8 |

Used to record the status which the checkbox or radio get focus. It is valid when [setting.check.enable = true]

9 |

Do not initialize or modify it, it is an internal argument.

10 |

Default: false

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: mouse move over the checkbox

16 |

false means: mouse move out the checkbox

17 |
18 |
19 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.refresh.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.refresh

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

刷新 zTree 。

9 |

没有特殊必要,尽量不要使用此方法。单个节点更新请使用 updateNode 方法,异步加载模式下请使用 reAsyncChildNodes 方法。

10 |

请通过 zTree 对象执行此方法。

11 |
12 |
13 |

Function 参数说明

14 |
15 |

返回值

16 |

目前无任何返回值

17 |
18 |

function 举例

19 |

1. 刷新 zTree

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | treeObj.refresh();
22 | 
23 |
24 |
-------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/stack/Demo1.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception.stack; 2 | 3 | /** 4 | * @author yuboon 5 | * @version v1.0 6 | * @date 2020/01/20 7 | */ 8 | public class Demo1 { 9 | 10 | public void hello(){ 11 | // JVM指令集 12 | StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); 13 | for(StackTraceElement element : stackTraceElements){ 14 | //System.out.println(element.getMethodName() + " " + element.getLineNumber() + " " + element.getClassName()); 15 | System.out.println(element.getClassName() + "." + element.getMethodName() + "(" + element.getClassName() + ".java" + ":" + element.getLineNumber()+ ")"); 16 | } 17 | } 18 | 19 | public static void main(String[] args) { 20 | new Demo1().hello(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.autoCancelSelected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.autoCancelSelected

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

点击节点时,按下 Ctrl 或 Cmd 键是否允许取消选择操作。

9 |

如果不需要此功能,请设置为 false。

10 |

默认值: true

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true / false 分别表示 支持 / 不支持 配合 Ctrl 或 Cmd 键进行取消节点选择的操作

16 |
17 |

setting 举例

18 |

1. 禁止配合 Ctrl 或 Cmd 键进行取消节点选择的操作

19 |
var setting = {
20 | 	view: {
21 | 		autoCancelSelected: false
22 | 	}
23 | };
24 | ......
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/GenControllerCommand.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | import com.yuboon.springboot.gencode.meta.Table; 4 | import com.yuboon.springboot.gencode.template.ControllerCodeTemplate; 5 | import org.thymeleaf.context.Context; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * 控制器生成命令 11 | * 12 | * @author yuboon 13 | * @version v1.0 14 | * @date 2020/01/04 15 | */ 16 | public class GenControllerCommand extends SingleCommand { 17 | 18 | public GenControllerCommand() { 19 | this.commandName = "Controller生成命令"; 20 | this.commandCode = "01"; 21 | this.template = new ControllerCodeTemplate(); 22 | } 23 | 24 | @Override 25 | public void process(Table table, Map map) { 26 | // 留给用户自定义处理过程,比如一些自定义参数的处理加一些控制等等,此处暂不需要 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.keep.parent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.data.keep.parent

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 的节点父节点属性锁,是否始终保持 isParent = true

9 |

默认值:false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 锁定 / 不锁定 父节点属性

15 |

如果设置为 true,则所有 isParent = true 的节点,即使该节点的子节点被全部删除或移走,依旧保持父节点状态。

16 |
17 |

setting 举例

18 |

1. 需要锁定父节点状态

19 |
var setting = {
20 | 	data: {
21 | 		keep: {
22 | 			parent: true
23 | 		}
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.checked.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.checked

4 |

Overview[ depends on jquery.ztree.excheck js ]

5 |
6 |

7 |
8 |

The node data's attribute to save the checked state.

9 |

Default: "checked"

10 |

Please don't set the other node attribute which zTree used. (e.g., checkedOld)

11 |
12 |
13 |

Examples of setting

14 |

1. set the 'isChecked' attribute to save the checked state.

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			checked: "isChecked"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/db/sys_user.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : local 5 | Source Server Version : 50727 6 | Source Host : localhost:3306 7 | Source Database : demo 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 50727 11 | File Encoding : 65001 12 | 13 | Date: 2020-01-06 23:05:44 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for sys_user 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `sys_user`; 22 | CREATE TABLE `sys_user` ( 23 | `id` int(11) DEFAULT NULL COMMENT '主键', 24 | `name` varchar(255) DEFAULT NULL COMMENT '姓名' 25 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户信息'; 26 | 27 | -- ---------------------------- 28 | -- Records of sys_user 29 | -- ---------------------------- 30 | INSERT INTO `sys_user` VALUES ('1', '2'); 31 | -------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/GenEntityCommand.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | import com.yuboon.springboot.gencode.meta.Table; 4 | import com.yuboon.springboot.gencode.template.ControllerCodeTemplate; 5 | import com.yuboon.springboot.gencode.template.EntityCodeTemplate; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * 控制器生成命令 11 | * 12 | * @author yuboon 13 | * @version v1.0 14 | * @date 2020/01/04 15 | */ 16 | public class GenEntityCommand extends SingleCommand { 17 | 18 | public GenEntityCommand() { 19 | this.commandName = "Entity生成命令"; 20 | this.commandCode = "02"; 21 | this.template = new EntityCodeTemplate(); 22 | } 23 | 24 | @Override 25 | public void process(Table table, Map map) { 26 | // 留给用户自定义处理过程,比如一些自定义参数的处理加一些控制等等,此处暂不需要 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.nameIsHTML.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.nameIsHTML

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置 name 属性是否支持 HTML 脚本

9 |

如果允许 HTML 脚本,请根据自己的需求做校验,避免出现 js 注入等安全问题。

10 |

默认值: false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true / false 分别表示 支持 / 不支持 HTML 脚本

16 |
17 |

setting 举例

18 |

1. 设置 name 属性支持 HTML 脚本

19 |
var setting = {
20 | 	view: {
21 | 		nameIsHTML: true
22 | 	}
23 | };
24 | var node = {"name":"<font color='red'>test</font>"};
25 | ......
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isAjaxing.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isAjaxing

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点是否正在进行异步加载。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true 表示节点正在进行异步加载

15 |

false 表示节点没有进行异步加载

16 |
17 |

treeNode 举例

18 |

1. 查看当前被选中的节点是否节点正在进行异步加载

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var isAjaxing = sNodes[0].isAjaxing;
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.editNameSelectAll.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.editNameSelectAll

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

节点编辑名称 input 初次显示时,设置 txt 内容是否为全选状态。 [setting.edit.enable = true 时生效]

9 |

默认值: false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true 表示 全选状态

15 |

false 表示 不是全选状态,光标默认在最后

16 |
17 |

setting 举例

18 |

1. 设置节点编辑名称 input 初次显示时,txt内容为全选状态

19 |
var setting = {
20 | 	edit: {
21 | 		enable: true,
22 | 		editNameSelectAll: true
23 | 	}
24 | };
25 | ......
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.url.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.url

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点链接的目标 URL

9 |

1、编辑模式 (setting.edit.enable = true) 下此属性功能失效,如果必须使用类似功能,请利用 onClick 事件回调函数自行控制。

10 |

2、如果需要在 onClick 事件回调函数中进行跳转控制,那么请将 URL 地址保存在其他自定义的属性内,请勿使用 url

11 |

默认值:无

12 |
13 |
14 |

String 格式说明

15 |
16 |

同超链接 href 属性

17 |
18 |

treeNode 举例

19 |

1. 设置某节点点击时,跳转到 g.cn

20 |
var nodes = [
21 | 	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
22 | 	......
23 | ]
24 |
25 |
-------------------------------------------------------------------------------- /2020/码技拓展_利用异常分析源码/source/springboot-exception/src/main/java/com/yuboon/springboot/exception/stack/Demo2.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.exception.stack; 2 | 3 | /** 4 | * @author yuboon 5 | * @version v1.0 6 | * @date 2020/01/20 7 | */ 8 | public class Demo2 { 9 | 10 | public void hello(){ 11 | String nullString = null; 12 | nullString.toString(); 13 | StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); 14 | for(StackTraceElement element : stackTraceElements){ 15 | System.out.println(Thread.currentThread().getName() + " " + element.getMethodName()); 16 | } 17 | } 18 | 19 | public static void main(String[] args) { 20 | //new Demo2().hello(); 21 | 22 | System.out.println("-------------------------------"); 23 | 24 | new Thread(() -> { 25 | new Demo2().hello(); 26 | }).start(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.getIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getIndex

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取 treeNode 节点在同级节点中的位置。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值Number

15 |

treeNode 节点在同级节点中的位置。(从 0 开始)

16 |
17 |

treeNode 举例

18 |

1. 获取当前被选中的节点在同级节点中的位置

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var node = sNodes[0].getIndex();
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.getPath.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getPath

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取 treeNode 节点的所有父节点(包括自己)。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值Array (JSON)

15 |

treeNode 节点的所有父节点的数据集合(包括自己)

16 |
17 |

treeNode 举例

18 |

1. 获取当前被选中的节点的所有父节点

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var node = sNodes[0].getPath();
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.autoExpandTrigger.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.drag.autoExpandTrigger

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽时父节点自动展开是否触发 onExpand 事件回调函数。[setting.edit.enable = true 时生效]

9 |

默认值:false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 触发 / 不触发 onExpand 事件回调函数。

15 |
16 |

setting 举例

17 |

1. 设置拖拽时父节点自动展开触发 onExpand 事件回调函数

18 |
var setting = {
19 | 	edit: {
20 | 		enable: true,
21 | 		drag: {
22 | 			autoExpandTrigger: true
23 | 		}
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | # 默认日志配置 5 | logging: 6 | file: logs/test.log 7 | config: # 日志配置文件,Spring Boot默认使用classpath路径下的日志配置文件,如:logback.xml 8 | level: 9 | #root: info # 全局默认级别 10 | org.thymeleaf: info # 控制thymeleaf日志级别 11 | pattern: 12 | #console: "%date{yyyy-MM-dd HH:mm:ss.SSS} %-5level[%thread]%logger{C}.%method:%line -%msg%n" 13 | #net.aooms.core: info # 项目级别,覆盖root默认 14 | 15 | spring: 16 | datasource: 17 | url: jdbc:mysql://localhost:3306/demo 18 | username: root 19 | password: root 20 | driver-class-name: com.mysql.jdbc.Driver 21 | # 连接池配置 22 | maxActive: 200 23 | initialSize: 5 24 | maxWait: 60000 25 | minIdle: 3 26 | timeBetweenEvictionRunsMillis: 60000 27 | minEvictableIdleTimeMillis: 300000 28 | validationQuery: select 'x' 29 | thymeleaf: 30 | prefix: classpath:/template -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.url.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.url

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save the node link's url.

9 |

Special: If the nodes's data can only use the 'url' attribute, and don't use the link to jump feature, you can modify this attribute to any nonexistent attribute.

10 |

Default: "url"

11 |
12 |
13 |

Examples of setting

14 |

1. Set the 'xUrl' attribute to save the node link's url.

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			url: "xUrl"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.borderMax.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.borderMax

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

When drag a node to root, the zTree's inner border width. (Unit: px) It is valid when [setting.edit.enable = true]

9 |

Default: 10

10 |

Please adjust the value according to needs.

11 |
12 |
13 |

Examples of setting

14 |

1. adjust the inner border width is 20px

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			borderMax: 20
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.borderMin.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.borderMin

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

When drag a node to root, the zTree's outer border width. (Unit: px) It is valid when [setting.edit.enable = true]

9 |

Default: -5

10 |

Please adjust the value according to needs.

11 |
12 |
13 |

Examples of setting

14 |

1. adjust the outer border width is 10px

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			borderMin: -10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.tId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.tId

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The unique identifier of node.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

String Format

13 |
14 |

tId rules: setting.treeId + "_" + zTree counter

15 |
16 |

Examples of treeNode

17 |

1. Get the first selected node's tId

18 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
19 | var sNodes = treeObj.getSelectedNodes();
20 | if (sNodes.length > 0) {
21 | 	var tId = sNodes[0].tId;
22 | }
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.selectedMulti.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.selectedMulti

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置是否允许同时选中多个节点。

9 |

默认值: true

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true / false 分别表示 支持 / 不支持 同时选中多个节点

15 |

1、设置为 true时,按下 Ctrl 或 Cmd 键可以选中多个节点

16 |

2、设置为 true / false 都不影响按下 Ctrl 或 Cmd 键可以让已选中的节点取消选中状态( 取消选中状态可以参考 setting.view.autoCancelSelected )

17 |
18 |

setting 举例

19 |

1. 禁止多点同时选中的功能

20 |
var setting = {
21 | 	view: {
22 | 		selectedMulti: false
23 | 	}
24 | };
25 | ......
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.level.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

NumbertreeNode.level

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The level of node

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Number Format

13 |
14 |

The root node's level = 0, and next level = 1, ...

15 |
16 |

Examples of treeNode

17 |

1. Get the first selected node's level

18 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
19 | var sNodes = treeObj.getSelectedNodes();
20 | if (sNodes.length > 0) {
21 | 	var level = sNodes[0].level;
22 | }
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.name.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.name

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node's name

9 |

1. If you want to change 'name' attribute, please modify the 'setting.data.key.name' attribute.

10 |

Default: undenfined

11 |
12 |
13 |

String Format

14 |
15 |

String object. The HTML special characters are escaped

16 |
17 |

Examples of treeNode

18 |

1. Set node's name to 'test1', 'test2', 'test3'

19 |
var nodes = [
20 | 	{ "id":1, "name":"test1"},
21 | 	{ "id":2, "name":"test2"},
22 | 	{ "id":3, "name":"test3"}
23 | ]
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.enable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.async.enable

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

设置 zTree 是否开启异步加载模式

9 |

默认值:false

10 |
11 |
12 |

Boolean 格式说明

13 |
14 |

true 表示 开启 异步加载模式

15 |

false 表示 关闭 异步加载模式

16 |

如果设置为 true,请务必设置 setting.async 内的其它参数。

17 |

如果需要根节点也异步加载,初始化时 treeNodes 参数设置为 null 即可。

18 |
19 |

setting 举例

20 |

1. 需要开启异步加载模式

21 |
var setting = {
22 | 	async: {
23 | 		enable: true,
24 | 		url: "http://host/getNode.php",
25 | 		autoParam: ["id", "name"]
26 | 	}
27 | };
28 | ......
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.autoOpenTime.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.autoOpenTime

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

Drag to the parent node, the parent node auto expand time interval. (Unit: ms) It is valid when [setting.edit.enable = true]

9 |

Default: 500

10 |

Please adjust the value according to needs.

11 |
12 |
13 |

Examples of setting

14 |

1. When drag node to other parent node, expand it at once.

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			autoOpenTime: 0
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.dataType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.async.dataType

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

Ajax 获取的数据类型。[setting.async.enable = true 时生效]

9 |

默认值:"text"

10 |
11 |
12 |

String 格式说明

13 |
14 |

dataType = "text" 可以满足绝大部分请求

15 |

其余 dataType 类型请参考 jQuery ajax 中的 dataType 参数

16 |
17 |

setting 举例

18 |

1. 设置 Ajax 获取的数据类型为 纯文本

19 |
var setting = {
20 | 	async: {
21 | 		enable: true,
22 | 		dataType: "text",
23 | 		url: "http://host/getNode.php",
24 | 		autoParam: ["id", "name"]
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.getPreNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getPreNode

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取与 treeNode 节点相邻的前一个节点。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值JSON

15 |

与 treeNode 节点相邻的前一个节点。

16 |

如果 treeNode 是第一个节点,返回 null 。

17 |
18 |

treeNode 举例

19 |

1. 获取当前被选中的节点的前一个节点

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getPreNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.destroy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId)zTreeObj.destroy

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

从 zTree v3.4 开始提供销毁 zTree 的方法。

9 |

1、用此方法可以销毁 zTreeObj 代表的 zTree。

10 |

2、销毁当前页面全部的 zTree,也可以使用 $.fn.zTree.destroy() 方法。

11 |

3、重新使用已经被销毁的树,必须要使用 init 方法进行初始化。

12 |
13 |
14 |

Function Parameter Descriptions

15 |
16 |

返回值

17 |

目前无任何返回值

18 |
19 |

function 举例

20 |

1. 销毁 id 为 "treeDemo" 的 zTree

21 |
var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
22 | zTreeObj.destroy();
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.key.title.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.key.title

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save the 'title' attribute of node DOM. It is valid when [setting.view.showTitle = true]

9 |

If set it to "", the title of node DOM will be same as 'setting.data.key.name' attribute.

10 |

Default: ""

11 |
12 |
13 |

Examples of setting

14 |

1. Set the 'fullName' attribute to save the title of node DOM.

15 |
var setting = {
16 | 	data: {
17 | 		key: {
18 | 			title: "fullName"
19 | 		}
20 | 	}
21 | };
22 | ......
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ztree/ztree_v3", 3 | "description": "zTree is a multi-functional 'tree plug-ins.' based on jQuery. The main advantages of zTree includes excellent performance, flexible configuration, and the combination of multiple functions.", 4 | "version": "3.5.42", 5 | "homepage": "http://www.treejs.cn/v3/main.php", 6 | "author": "zTree (https://github.com/zTree)", 7 | "licenses": [ 8 | { 9 | "type": "MIT", 10 | "url": "http://www.treejs.cn/v3/main.php#_license" 11 | } 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/zTree/zTree_v3.git" 16 | }, 17 | "dependencies": { 18 | "jquery": ">=1.4.4" 19 | }, 20 | "engines": { 21 | "node": ">=0.10.0" 22 | }, 23 | "keywords": [ 24 | "tree", 25 | "jquery", 26 | "plug-in", 27 | "plugin", 28 | "ztree", 29 | "html", 30 | "node" 31 | ], 32 | "typings": "index.d.ts" 33 | } 34 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.getNextNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getNextNode

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取与 treeNode 节点相邻的后一个节点。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值JSON

15 |

与 treeNode 节点相邻的后一个节点。

16 |

如果 treeNode 是最后一个节点,返回 null 。

17 |
18 |

treeNode 举例

19 |

1. 获取当前被选中的节点的下一个节点

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getNextNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.getParentNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getParentNode

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取 treeNode 节点的父节点。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值JSON

15 |

treeNode 节点的父节点 JSON 数据对象。

16 |

如果 treeNode 是根节点,返回 null 。

17 |
18 |

treeNode 举例

19 |

1. 获取当前被选中的节点的父节点

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getParentNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.txtSelectedEnable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.txtSelectedEnable

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set to allow or don't allow to select the text which in zTree's DOM.

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: Allow to select the txt which in zTree's DOM.

15 |

false means: Don't allow to select the txt which in zTree's DOM.

16 |
17 |

Examples of setting & function

18 |

1. Allow to select the txt which in zTree's DOM.

19 |
var setting = {
20 | 	view: {
21 | 		txtSelectedEnable: true
22 | 	}
23 | };
24 | ......
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.radioType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.check.radioType

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

radio 的分组范围。[setting.check.enable = true 且 setting.check.chkStyle = "radio" 时生效]

9 |

默认值:"level"

10 |
11 |
12 |

String 格式说明

13 |
14 |

radioType = "level" 时,在每一级节点范围内当做一个分组。 15 |
radioType = "all" 时,在整棵树范围内当做一个分组。

16 |

请注意大小写,不要改变

17 |
18 |

setting 举例

19 |

1. 设置 radio 的判别规则为整棵树内

20 |
var setting = {
21 | 	check: {
22 | 		enable: true,
23 | 		chkStyle: "radio",
24 | 		radioType: "all"
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.click.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.click

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

最简单的 click 事件操作。相当于 onclick="..." 的内容。 如果操作较复杂,请使用 onClick 事件回调函数。

9 |

由于 IE 对于 onclick 和 click事件共存时的处理与其他浏览器不同,所以请不要利用此参数控制是否允许跳转的操作(例如:treeNode.click = "return false;")。如有类似需求,请不要使用 url 属性设置网址,同时利用 onClick 回调函数控制跳转。

10 |

默认值:无

11 |
12 |
13 |

String 格式说明

14 |
15 |

标准 javascript 语法, 例如:alert("test"); 等

16 |
17 |

treeNode 举例

18 |

1. 设置某节点点击时,弹出信息框

19 |
var nodes = [
20 | 	{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
21 | 	......
22 | ]
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.type.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.async.type

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

Ajax 的 http 请求模式。[setting.async.enable = true 时生效]

9 |

默认值:"post"

10 |
11 |
12 |

String 格式说明

13 |
14 |

type = "post" 表示异步加载采用 post 方法请求

15 |

type = "get" 表示异步加载采用 get 方法请求

16 |

对应于 jQuery ajax 中的 type 参数

17 |
18 |

setting 举例

19 |

1. 设置使用 get 方式请求数据

20 |
var setting = {
21 | 	async: {
22 | 		enable: true,
23 | 		type: "get",
24 | 		url: "http://host/getNode.php",
25 | 		autoParam: ["id", "name"]
26 | 	}
27 | };
28 | ......
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isHidden.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isHidden

4 |

概述[ 依赖 jquery.ztree.exhide 扩展 js ]

5 |
6 |

7 |
8 |

判断 treeNode 节点是否被隐藏。

9 |

1、初始化 zTree 时,如果节点设置 isHidden = true,会被自动隐藏

10 |

2、请勿对已加载的节点修改此属性,隐藏 / 显示 请使用 hideNode() / hideNodes() / showNode() / showNodes() 方法

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示被隐藏

16 |

false 表示被显示

17 |
18 |

treeNode 举例

19 |

1. 查看第一个根节点是否被隐藏

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getNodes();
22 | if (sNodes.length > 0) {
23 | 	var isHidden = sNodes[0].isHidden;
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.setEditable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(editable)zTreeObj.setEditable

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

设置 zTree 进入 / 取消 编辑状态。

9 |

对于编辑状态的各种功能需要提前设置对应 setting 中的不同属性

10 |

请通过 zTree 对象执行此方法。

11 |
12 |
13 |

Function 参数说明

14 |
15 |

editableBoolean

16 |

true 表示进入 编辑状态

17 |

false 表示取消 编辑状态

18 |

返回值

19 |

目前无任何返回值

20 |
21 |

function 举例

22 |

1. 设置 zTree 进入编辑状态

23 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
24 | treeObj.setEditable(true);
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/zTreeObj.getSelectedNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.getSelectedNodes

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the JSON data objects collection of the selected nodes in zTree.

9 |

Please use zTree object to executing the method.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

Return Array(JSON)

15 |

The JSON data objects collection of the selected nodes.

16 |
17 |

Examples of function

18 |

1. get the selected nodes

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var nodes = treeObj.getSelectedNodes();
21 | 
22 |
23 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.view.expandSpeed.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

String / Numbersetting.view.expandSpeed

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree 节点展开、折叠时的动画速度,设置方法同 JQuery 动画效果中 speed 参数。

9 |

IE6 下会自动关闭动画效果,以保证 zTree 的操作速度

10 |

默认值:"fast"

11 |
12 |
13 |

String 格式说明

14 |
15 |

三种预定速度之一的字符串("slow", "normal", or "fast")

16 |

设置为 "" 时,不显示动画效果

17 |
18 |

Number 格式说明

19 |
20 |

表示动画时长的毫秒数值 (如:1000)

21 |
22 |

setting 举例

23 |

1. 设置为慢速显示动画效果

24 |
var setting = {
25 | 	view: {
26 | 		expandSpeed: "slow"
27 | 	}
28 | };
29 | ......
30 |
31 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.maxShowNodeNum.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.maxShowNodeNum

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

When dragging more than one sibling node, the floating layer shows the maximum number of nodes. zTree using '...' instead of redundant nodes. It is valid when [setting.edit.enable = true]

9 |

Default: 5

10 |

Please adjust the value according to needs.

11 |
12 |
13 |

Examples of setting

14 |

1. Set the maximum number is 10

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			maxShowNodeNum: 10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.simpleData.idKey.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.simpleData.idKey

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点数据中保存唯一标识的属性名称。[setting.data.simpleData.enable = true 时生效]

9 |

默认值:"id"

10 |
11 |
12 |

setting 举例

13 |

1. 使用简单 Array 格式的数据

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.simpleData.pIdKey.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.simpleData.pIdKey

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点数据中保存其父节点唯一标识的属性名称。[setting.data.simpleData.enable = true 时生效]

9 |

默认值:"pId"

10 |
11 |
12 |

setting 举例

13 |

1. 使用简单 Array 格式的数据

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.getNodes

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取 zTree 的全部节点数据

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值Array(JSON)

15 |

全部节点数据

16 |

1、Array 仅仅是根节点的集合(默认情况子节点都处于 children 属性下);

17 |

2、如需遍历全部节点需要利用递归,或利用 transformToArray 方法 将数据变成简单的 Array 集合

18 |

3、对于异步加载模式下,尚未加载的子节点是无法通过此方法获取的。

19 |
20 |

function 举例

21 |

1. 获取全部节点数据

22 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
23 | var nodes = treeObj.getNodes();
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.minMoveSize.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Numbersetting.edit.drag.minMoveSize

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

The minimum offset which used to determine the drag operator start. (Unit: px) It is valid when [setting.edit.enable = true]

9 |

Please adjust the value according to needs. Note: If it is too small, will easily lead to misoperation when you click mouse.

10 |

Default: 5

11 |
12 |
13 |

Examples of setting

14 |

1. Set the minimum offset is 10px.

15 |
var setting = {
16 | 	edit: {
17 | 		enable: true,
18 | 		drag: {
19 | 			minMoveSize: 10
20 | 		}
21 | 	}
22 | };
23 | ......
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.transformToArray.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNodes)zTreeObj.transformToArray

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

将 zTree 使用的标准 JSON 嵌套格式的数据转换为简单 Array 格式。(免去用户自行编写递归遍历全部节点的麻烦)

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeNodesArray(JSON) / JSON

15 |

需要被转换的 zTree 节点数据对象集合 或 某个单独节点的数据对象

16 |

返回值Array(JSON)

17 |

转换后的简单 Array 数据格式

18 |
19 |

function 举例

20 |

1. 将 zTree 节点数据转换为简单 Array 格式

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var nodes = treeObj.transformToArray(treeObj.getNodes());
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.nocheckInherit.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.check.nocheckInherit

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

当父节点设置 nocheck = true 时,设置子节点是否自动继承 nocheck = true 。[setting.check.enable = true 时生效]

9 |

1、只使用于初始化节点时,便于批量操作。 对于已存在的节点请利用 updateNode 方法单个节点设置。

10 |

默认值: false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示 新加入子节点时,自动继承父节点 nocheck = true 的属性。

16 |

false 表示 新加入子节点时,不继承父节点 nocheck 的属性。

17 |
18 |

setting 举例

19 |

1. 需要子节点自动继承 nocheck = true

20 |
var setting = {
21 | 	check: {
22 | 		enable: true,
23 | 		nocheckInherit: true
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.target.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.target

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Used to set the target where the node is clicked to open url. It is valid when [treeNode.url exists]

9 |

Default: undefined

10 |
11 |
12 |

String Format

13 |
14 |

As same as <a> tag's 'target' attribute. e.g. '_blank', '_self' or other window name.

15 |

if this attribute is omitted, zTree default set it to '_blank'

16 |
17 |

Exmaples of treeNode

18 |

1. Set target is '_blank'

19 |
var nodes = [
20 | 	{ "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
21 | 	......
22 | ]
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.data.simpleData.rootPId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

String / Numbersetting.data.simpleData.rootPId

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

用于修正根节点父节点数据,即 pIdKey 指定的属性值。[setting.data.simpleData.enable = true 时生效]

9 |

默认值:null

10 |
11 |
12 |

setting 举例

13 |

1. 使用简单 Array 格式的数据

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isFirstNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isFirstNode

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点是否为同级节点中的第一个节点。

9 |

使用 exhide 扩展后,只针对显示的节点设置此属性

10 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示是同级节点中的第一个节点

16 |

false 表示不是同级节点中的第一个节点

17 |

节点被隐藏后,isFirstNode = false

18 |
19 |

treeNode 举例

20 |

1. 查看当前被选中的节点是否是同级节点中的第一个节点

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var sNodes = treeObj.getSelectedNodes();
23 | if (sNodes.length > 0) {
24 | 	var isFirstNode = sNodes[0].isFirstNode;
25 | }
26 | 
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isLastNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isLastNode

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点是否为同级节点中的最后一个节点。

9 |

使用 exhide 扩展后,只针对显示的节点设置此属性

10 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示是同级节点中的最后一个节点

16 |

false 表示不是同级节点中的最后一个节点

17 |

节点被隐藏后,isLastNode = false

18 |
19 |

treeNode 举例

20 |

1. 查看当前被选中的节点是否是同级节点中的最后一个节点

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var sNodes = treeObj.getSelectedNodes();
23 | if (sNodes.length > 0) {
24 | 	var isLastNode = sNodes[0].isLastNode;
25 | }
26 | 
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.nameIsHTML.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.nameIsHTML

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set to use HTML in 'name' attribute.

9 |

If allow HTML, please do check to avoid security issues, e.g. JavaScript Injection...

10 |

Default: false

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: 'name' attribute can be HTML.

16 |

false means: 'name' attribute is only TEXT.

17 |
18 |

Examples of setting

19 |

1. Set to allow HTML

20 |
var setting = {
21 | 	view: {
22 | 		nameIsHTML: true
23 | 	}
24 | };
25 | var node = {"name":"<font color='red'>test</font>"};
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/fn.zTree.getZTreeObj.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId)$.fn.zTree.getZTreeObj

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

zTree v3.x 专门提供的根据 treeId 获取 zTree 对象的方法。

9 |

必须在初始化 zTree 以后才可以使用此方法。

10 |

有了这个方法,用户不再需要自己设定全局变量来保存 zTree 初始化后得到的对象了,而且在所有回调函数中全都会返回 treeId 属性,用户可以随时使用此方法获取需要进行操作的 zTree 对象

11 |
12 |
13 |

Function 参数说明

14 |
15 |

treeIdString

16 |

zTree 的 DOM 容器的 id

17 |

返回值JSON

18 |

zTree 对象,提供操作 zTree 的各种方法,对于通过 js 操作 zTree 来说必须通过此对象

19 |
20 |

function 举例

21 |

1. 获取 id 为 tree 的 zTree 对象

22 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getNodeByTId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(tId)zTreeObj.getNodeByTId

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

根据 zTree 的唯一标识 tId 快速获取节点 JSON 数据对象

9 |

通过内部的 cache 获取,不需要遍历节点。

10 |

请通过 zTree 对象执行此方法。

11 |
12 |
13 |

Function 参数说明

14 |
15 |

tIdString

16 |

节点在 zTree 内的唯一标识 tId

17 |

返回值JSON

18 |

tId 对应的节点 JSON 数据对象

19 |

如无结果,返回 null

20 |
21 |

function 举例

22 |

1. 获取 tId = "tree_10" 的节点数据

23 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
24 | var node = treeObj.getNodeByTId("tree_10");
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/Command.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | import com.yuboon.springboot.gencode.meta.Table; 4 | import com.yuboon.springboot.gencode.output.CodeOutput; 5 | import org.thymeleaf.spring5.SpringTemplateEngine; 6 | 7 | /** 8 | * 命令接口 9 | * 10 | * @author yuboon 11 | * @version v1.0 12 | * @date 2020/01/04 13 | */ 14 | public abstract class Command { 15 | 16 | // 命令名称 17 | protected String commandName; 18 | 19 | // 命名编码对应用户使用时的功能码 20 | protected String commandCode; 21 | 22 | /** 23 | * 执行命令 24 | * @param tableInfo 25 | * @param springTemplateEngine 26 | * @param codeOutput 27 | */ 28 | public abstract void execute(Table tableInfo,SpringTemplateEngine springTemplateEngine,CodeOutput codeOutput); 29 | 30 | public String getCommandCode() { 31 | return commandCode; 32 | } 33 | 34 | public String getCommandName() { 35 | return commandName; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.nocheck.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.nocheck

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

1、设置节点是否隐藏 checkbox / radio [setting.check.enable = true 时有效]

9 |

2、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

10 |

默认值:false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示此节点不显示 checkbox / radio,不影响勾选的关联关系,不影响父节点的半选状态。

16 |

false 表示节点具有正常的勾选功能

17 |
18 |

treeNode 举例

19 |

1. 不显示某个节点的 checkbox / radio

20 |
var nodes = [
21 | 	{ "id":1, "name":"test1", "nocheck":true},
22 | 	{ "id":2, "name":"test2"},
23 | 	{ "id":3, "name":"test3"}
24 | ]
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getChangeCheckedNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.getChangeCheckedNodes

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

获取输入框勾选状态被改变的节点集合(与原始数据 checkedOld 对比)。[setting.check.enable = true 时有效]

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

返回值Array(JSON)

15 |

返回全部勾选状态被改变的节点集合 Array

16 |

如果需要获取每次操作后全部被改变勾选状态的节点数据,请在每次勾选操作后,遍历所有被改变勾选状态的节点数据,让其 checkedOld = checked 就可以了。

17 |
18 |

function 举例

19 |

1. 获取当前勾选状态被改变的节点集合

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var nodes = treeObj.getChangeCheckedNodes();
22 | 
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.zAsync.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.zAsync

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点是否已经进行过异步加载,避免父节点反复异步加载数据。

9 |

初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

10 |

默认值:false (无子节点的父节点); true (有子节点的父节点 & 叶子节点)

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示父节点展开时不需要自动异步加载

16 |

false 表示父节点展开时需要自动异步加载

17 |

此参数不会对 reAsyncChildNodes 方法造成任何影响

18 |
19 |

treeNode 举例

20 |

1. 查看当前被选中的节点是否节点是否需要自动异步加载

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var sNodes = treeObj.getSelectedNodes();
23 | if (sNodes.length > 0) {
24 | 	var zAsync = sNodes[0].zAsync;
25 | }
26 | 
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.getIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getIndex

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the treeNode's index in its parent node's children.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

ReturnNumber

15 |

the treeNode's index in its parent node's children. ( start at 0 )

16 |
17 |

Examples of treeNode

18 |

1. Get the first selected node's index.

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var node = sNodes[0].getIndex();
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.getPath.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getPath

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the treeNode's all parent nodes. (Include itself)

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

ReturnArray (JSON)

15 |

Array of treeNode's all parent nodes. (Include itself)

16 |
17 |

Examples of treeNode

18 |

1. Get the first selected node's all parent nodes.

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var node = sNodes[0].getPath();
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.isCopy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.drag.isCopy

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽时, 设置是否允许复制节点。[setting.edit.enable = true 时生效]

9 |

默认值:true

10 |
11 |
12 |

规则说明

13 |
14 |

1、isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; 否则为 move

15 |

2、isCopy = true; isMove = false 时,所有拖拽操作都是 copy

16 |

3、isCopy = false; isMove = true 时,所有拖拽操作都是 move

17 |

4、isCopy = false; isMove = false 时,禁止拖拽操作

18 |
19 |

setting 举例

20 |

1. 设置所有拖拽操作都是 copy

21 |
var setting = {
22 | 	edit: {
23 | 		enable: true,
24 | 		drag: {
25 | 			isCopy: true,
26 | 			isMove: false
27 | 		}
28 | 	}
29 | };
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.drag.isMove.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.drag.isMove

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

拖拽时, 设置是否允许移动节点。[setting.edit.enable = true 时生效]

9 |

默认值:true

10 |
11 |
12 |

规则说明

13 |
14 |

1、isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; 否则为 move

15 |

2、isCopy = true; isMove = false 时,所有拖拽操作都是 copy

16 |

3、isCopy = false; isMove = true 时,所有拖拽操作都是 move

17 |

4、isCopy = false; isMove = false 时,禁止拖拽操作

18 |
19 |

setting 举例

20 |

1. 设置所有拖拽操作都是 move

21 |
var setting = {
22 | 	edit: {
23 | 		enable: true,
24 | 		drag: {
25 | 			isCopy: false,
26 | 			isMove: true
27 | 		}
28 | 	}
29 | };
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.async.type.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.async.type

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Http request tyoe in ajax. It is valid when [setting.async.enable = true]

9 |

Default: "post"

10 |
11 |
12 |

String Format

13 |
14 |

"post" - http request mode

15 |

"get" - http request mode

16 |

Both zTree and jQuery's this 'type' for ajax requests.

17 |
18 |

Examples of setting

19 |

1. Set http request mode is 'get'

20 |
var setting = {
21 | 	async: {
22 | 		enable: true,
23 | 		type: "get",
24 | 		url: "http://host/getNode.php",
25 | 		autoParam: ["id", "name"]
26 | 	}
27 | };
28 | ......
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.async.contentType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.async.contentType

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

Ajax 提交参数的数据类型。[setting.async.enable = true 时生效]

9 |

默认值:"application/x-www-form-urlencoded"

10 |
11 |
12 |

String 格式说明

13 |
14 |

contentType = "application/x-www-form-urlencoded" 可以满足绝大部分请求,按照标准的 Form 格式提交参数

15 |

contentType = "application/json" 可以满足 .Net 的编程需要,按照 JSON 格式提交参数

16 |
17 |

setting 举例

18 |

1. 设置 Ajax 提交参数的数据类型为 JSON 格式

19 |
var setting = {
20 | 	async: {
21 | 		enable: true,
22 | 		contentType: "application/json",
23 | 		url: "http://host/getNode.php",
24 | 		autoParam: ["id", "name"]
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.chkDisabledInherit.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.check.chkDisabledInherit

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

当父节点设置 chkDisabled = true 时,设置子节点是否自动继承 chkDisabled = true 。[setting.check.enable = true 时生效]

9 |

1、只使用于初始化节点时,便于批量操作。 对于已存在的节点请利用 setChkDisabled 方法单个节点设置。

10 |

默认值: false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true 表示 新加入子节点时,自动继承父节点 chkDisabled = true 的属性。

16 |

false 表示 新加入子节点时,不继承父节点 chkDisabled 的属性。

17 |
18 |

setting 举例

19 |

1. 需要子节点自动继承 chkDisabled = true

20 |
var setting = {
21 | 	check: {
22 | 		enable: true,
23 | 		chkDisabledInherit: true
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.chkboxType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

JSONsetting.check.chkboxType

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

勾选 checkbox 对于父子节点的关联关系。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]

9 |

默认值:{ "Y": "ps", "N": "ps" }

10 |
11 |
12 |

JSON 格式说明

13 |
14 |

Y 属性定义 checkbox 被勾选后的情况; 15 |
N 属性定义 checkbox 取消勾选后的情况; 16 |
"p" 表示操作会影响父级节点; 17 |
"s" 表示操作会影响子级节点。

18 |

请注意大小写,不要改变

19 |
20 |

setting 举例

21 |

1. checkbox 勾选操作,只影响父级节点;取消勾选操作,只影响子级节点

22 |
var setting = {
23 | 	check: {
24 | 		enable: true,
25 | 		chkStyle: "checkbox",
26 | 		chkboxType: { "Y": "p", "N": "s" }
27 | 	}
28 | };
29 | ......
30 |
31 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.checkedOld.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.checkedOld

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

节点的 checkBox / radio 在初始化时的 勾选状态。[setting.check.enable = true & treeNode.nocheck = false 时有效]

9 |

1、zTree 初始化节点数据时会对此属性进行赋值,因此请勿对此属性初始化

10 |

2、如需配合 zTreeObj.getChangeCheckedNodes 方法实现特殊功能,可以根据需求在使用中自行修改 checkedOld 数据

11 |

默认值:checked的初始化值

12 |
13 |
14 |

Boolean 格式说明

15 |
16 |

true 表示节点初始化时 输入框被勾选

17 |

false 表示节点初始化时 输入框未勾选

18 |
19 |

treeNode 举例

20 |

1. 获取第一个根节点的初始勾选状态

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var checkedOld = treeObj.getNodes()[0].checkedOld;
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.parentTId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.parentTId

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

treeNode 节点的父节点唯一标识 tId。

9 |

1、v3.x 用 parentTId 替换了原先的 parentNode 属性,同时增加了 getParentNode 方法,以避免原先 parentNode 造成的 clone 死循环

10 |

2、初始化节点数据时,由 zTree 增加此属性,请勿提前赋值

11 |
12 |
13 |

String 格式说明

14 |
15 |

zTree 内部生成的节点唯一标识,请参考 treeNode.tId 的说明

16 |

如果 treeNode 是根节点,则 parentTId = null

17 |
18 |

treeNode 举例

19 |

1. 查看当前被选中的节点的父节点 tId

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var parentTId = sNodes[0].parentTId;
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/zTreeObj.refresh.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()zTreeObj.refresh

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Refresh zTree

9 |

If you have no special need, try not to use this method. If you refresh single node, please use updateNode() method. If you refresh child nodes in dynamic mode, please use the reAsyncChildNodes() method.

10 |

Please use zTree object to executing the method.

11 |
12 |
13 |

Function Parameter Descriptions

14 |
15 |

Return none

16 |

no return value

17 |
18 |

Examples of function

19 |

1. refresh zTree

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | treeObj.refresh();
22 | 
23 |
24 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.editNameSelectAll.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.editNameSelectAll

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

When edit node's name, the text in input is selected or unselected. It is valid when [setting.edit.enable = true]

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: when show the input, the text in input is selected

15 |

false means: when show the input, the text in input is not selected

16 |
17 |

Examples of setting

18 |

1. When edit node's name, the text in input is selected.

19 |
var setting = {
20 | 	edit: {
21 | 		enable: true,
22 | 		editNameSelectAll: true
23 | 	}
24 | };
25 | ......
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/output/FileOutput.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.output; 2 | 3 | 4 | import cn.hutool.core.io.FileUtil; 5 | import cn.hutool.core.io.IoUtil; 6 | import cn.hutool.core.lang.Console; 7 | import com.yuboon.springboot.gencode.meta.Table; 8 | import com.yuboon.springboot.gencode.template.CodeTemplate; 9 | 10 | import java.io.File; 11 | import java.io.IOException; 12 | 13 | /** 14 | * 文件输出 15 | * 16 | * @author yuboon 17 | * @version v1.0 18 | * @date 2020/01/04 19 | */ 20 | public class FileOutput extends CodeOutput { 21 | 22 | public FileOutput() { 23 | this.outputCode = "02"; 24 | } 25 | 26 | @Override 27 | public void out(Table table, String content, CodeTemplate template) { 28 | String fileName = "dist/" + table.getClassName() + template.getFileTag() + template.getFileSuffix(); 29 | File file = new File(fileName); 30 | FileUtil.writeBytes(content.getBytes(),file); 31 | Console.log("文件位置:" + file.getAbsolutePath()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.isParent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isParent

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点是否为父节点。

9 |

1、初始化节点数据时,根据 treeNode.children 属性判断,有子节点则设置为 true,否则为 false

10 |

2、初始化节点数据时,如果设定 treeNode.isParent = true,即使无子节点数据,也会设置为父节点

11 |

3、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

12 |
13 |
14 |

Boolean 格式说明

15 |
16 |

true 表示是父节点

17 |

false 表示不是父节点

18 |
19 |

treeNode 举例

20 |

1. 查看当前被选中的节点是否是父节点

21 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
22 | var sNodes = treeObj.getSelectedNodes();
23 | if (sNodes.length > 0) {
24 | 	var isParent = sNodes[0].isParent;
25 | }
26 | 
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.async.dataType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.async.dataType

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The data type of Ajax requests. It is valid when [setting.async.enable = true]

9 |

Default:"text"

10 |
11 |
12 |

String Format

13 |
14 |

dataType = "text", There is probably no need to change this.

15 |

The 'dataType' in zTree and jQuery's ajax requests is same.

16 |
17 |

Examples of setting

18 |

1. Set the dataType which ajax retrieves to "text".

19 |
var setting = {
20 | 	async: {
21 | 		enable: true,
22 | 		dataType: "text",
23 | 		url: "http://host/getNode.php",
24 | 		autoParam: ["id", "name"]
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.keep.leaf.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.data.keep.leaf

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The leaf node's lock, the leaf node will lock the 'isParent' attribute to false.

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: lock the leaf node, and the node which 'isParent' attribute is false can't add child nodes.

15 |

false means: don't lock the leaf node, and the node which 'isParent' attribute is false can add child nodes.

16 |
17 |

Examples of setting

18 |

1. lock the leaf node

19 |
var setting = {
20 | 	data: {
21 | 		keep: {
22 | 			leaf: true
23 | 		}
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.simpleData.idKey.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.simpleData.idKey

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

9 |

Default: "id"

10 |
11 |
12 |

Examples of setting

13 |

1. use the simple data format

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.selectedMulti.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.selectedMulti

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set whether to allow select multiple nodes.

9 |

Default: true

10 |
11 |
12 |

Boolean Format

13 |
14 |

true mean: you can select multiple nodes.

15 |

false mean: you can only select one node.

16 |

1. Press Ctrl-key or Cmd-key, you can select multiple nodes.

17 |

2、This attribute don't affect the feature of cancel select node. ( please see setting.view.autoCancelSelected )

18 |
19 |

Examples of setting

20 |

1. Only select one node.

21 |
var setting = {
22 | 	view: {
23 | 		selectedMulti: false
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.getParentNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getParentNode

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the treeNode's parent node.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

ReturnJSON

15 |

JSON data object of treeNode's parent node.

16 |

If treeNode is root, return null.

17 |
18 |

Examples of treeNode

19 |

1. Get the first selected node's parent node.

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getParentNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.check.autoCheckTrigger.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.check.autoCheckTrigger

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

设置自动关联勾选时是否触发 beforeCheck / onCheck 事件回调函数。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]

9 |

1、如果设置 setting.check.chkboxType = { "Y": "", "N": "" },将不会有任何自动关联勾选的操作。

10 |

2、如果开启触发,对于节点较多的树将会影响性能,因为所有被联动勾选的操作都会触发事件回调函数,请根据需要决定是否使用此功能。

11 |

默认值: false

12 |
13 |
14 |

Boolean 格式说明

15 |
16 |

true / false 分别表示 触发 / 不触发 事件回调函数

17 |
18 |

setting 举例

19 |

1. 需要触发自动关联勾选操作

20 |
var setting = {
21 | 	check: {
22 | 		enable: true,
23 | 		autoCheckTrigger: true
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.hideNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNode)zTreeObj.hideNode

4 |

概述[ 依赖 jquery.ztree.exhide 扩展 js ]

5 |
6 |

7 |
8 |

隐藏某个节点。

9 |

1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

10 |

2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

11 |

3、请通过 zTree 对象执行此方法。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeNodeJSON

17 |

指定被隐藏的节点 JSON 数据

18 |

请务必保证此节点数据对象 是 zTree 内部的数据对象

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 隐藏根节点第一个节点

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var nodes = treeObj.getNodes();
26 | treeObj.hideNode(nodes[0]);
27 | 
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.simpleData.pIdKey.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.data.simpleData.pIdKey

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The node data's attribute to save its parent node data's unique identifier. It is valid when [setting.data.simpleData.enable = true]

9 |

Default: "pId"

10 |
11 |
12 |

Examples of setting

13 |

1. use the simple data format

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.autoCancelSelected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.view.autoCancelSelected

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

When click the selected node while pressing the Ctrl-key or Cmd-key, allow to cancel selected the node.

9 |

If you don't need this function, please set to false.

10 |

Default: true

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: press the Ctrl-key or Cmd-key, can cancel selected node.

16 |

false means: press the Ctrl-key or Cmd-key, can't cancel selected node.

17 |
18 |

Examples of setting

19 |

1. Press the Ctrl-key or Cmd-key, can't cancel selected node.

20 |
var setting = {
21 | 	view: {
22 | 		autoCancelSelected: false
23 | 	}
24 | };
25 | ......
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.simpleData.rootPId.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

String / Numbersetting.data.simpleData.rootPId

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set the default value of root's 'pIdKey' specified attribute values​​. It is valid when [setting.data.simpleData.enable = true]

9 |

Default: null

10 |
11 |
12 |

Examples of setting

13 |

1. use the simple data format

14 |
var setting = {
15 | 	data: {
16 | 		simpleData: {
17 | 			enable: true,
18 | 			idKey: "id",
19 | 			pIdKey: "pId",
20 | 			rootPId: 0
21 | 		}
22 | 	}
23 | };
24 | var treeNodes = [
25 |     {"id":1, "pId":0, "name":"test1"},
26 |     {"id":11, "pId":1, "name":"test11"},
27 |     {"id":12, "pId":1, "name":"test12"},
28 |     {"id":111, "pId":11, "name":"test111"}
29 | ];
30 | ......
31 |
32 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.edit.drag.autoExpandTrigger.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.drag.autoExpandTrigger

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

When drag node cause the parent node is automatically expanded, set whether to allow to trigger the 'onExpand' callback. It is valid when [setting.edit.enable = true]

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: trigger the 'onExpand' callback.

15 |

false means: don't trigger the 'onExpand' callback.

16 |
17 |

Examples of setting

18 |

1. Set to allow to trigger the 'onExpand' callback

19 |
var setting = {
20 | 	edit: {
21 | 		enable: true,
22 | 		drag: {
23 | 			autoExpandTrigger: true
24 | 		}
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.getNextNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getNextNode

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the treeNode's next sibling node.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

ReturnJSON

15 |

JSON data object of the treeNode's next sibling node

16 |

If have not the next node, return null.

17 |
18 |

Examples of treeNode

19 |

1. Get the first selected node's next sibling node.

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getNextNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/command/ComposeCommand.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.command; 2 | 3 | import cn.hutool.core.bean.BeanUtil; 4 | import cn.hutool.core.collection.CollectionUtil; 5 | import com.yuboon.springboot.gencode.meta.Table; 6 | import com.yuboon.springboot.gencode.output.CodeOutput; 7 | import org.thymeleaf.context.Context; 8 | import org.thymeleaf.spring5.SpringTemplateEngine; 9 | 10 | import java.util.Collection; 11 | import java.util.Iterator; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | /** 16 | * 组合生成命令 17 | * 18 | * @author yuboon 19 | * @version v1.0 20 | * @date 2020/01/05 21 | */ 22 | public abstract class ComposeCommand extends Command { 23 | 24 | protected List singleCommands = CollectionUtil.newArrayList(); 25 | 26 | // 执行命令 27 | @Override 28 | public void execute(Table table, SpringTemplateEngine springTemplateEngine, CodeOutput codeOutput){ 29 | for(SingleCommand singleCommand : singleCommands){ 30 | singleCommand.execute(table,springTemplateEngine,codeOutput); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.expandAll.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(expandFlag)zTreeObj.expandAll

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

展开 / 折叠 全部节点

9 |

此方法不会触发 beforeExpand / onExpand 和 beforeCollapse / onCollapse 事件回调函数。

10 |

请通过 zTree 对象执行此方法。

11 |
12 |
13 |

Function 参数说明

14 |
15 |

expandFlagBoolean

16 |

expandFlag = true 表示 展开 全部节点

17 |

expandFlag = false 表示 折叠 全部节点

18 |

返回值Boolean

19 |

返回值表示最终实际操作情况

20 |

true 表示 展开 全部节点

21 |

false 表示 折叠 全部节点

22 |

null 表示 不存在任何父节点

23 |
24 |

function 举例

25 |

1. 展开全部节点

26 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
27 | treeObj.expandAll(true);
28 | 
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.cancelEditName.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(newName)zTreeObj.cancelEditName

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

取消节点的编辑名称状态,可以恢复原名称,也可以强行赋给新的名称。

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

newNameString

15 |

重新给定的新名称。

16 |

如果省略此参数,则恢复原名称。

17 |

返回值

18 |

目前无任何返回值

19 |
20 |

function 举例

21 |

1. 取消 zTree 的编辑名称状态,恢复该节点原有名称

22 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
23 | treeObj.cancelEditName();
24 | 
25 |

2. 取消 zTree 的编辑名称状态,并且重新设定该节点名称

26 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
27 | treeObj.cancelEditName("test_new_name");
28 | 
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getNodeIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNode)zTreeObj.getNodeIndex

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

获取某节点在同级节点中的序号(从0开始)

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeNodeJSON

15 |

需要查询顺序的节点 JSON 数据对象

16 |

请务必保证此节点数据对象 是 zTree 内部的数据对象

17 |

返回值Number

18 |

返回值从 0 开始计数

19 |

如果不存在该节点数据,返回 -1

20 |
21 |

function 举例

22 |

1. 获取当前选中的第一个节点在同级节点中的序号

23 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
24 | var nodes = treeObj.getSelectedNodes();
25 | if (nodes.length>0) {
26 | 	var index = treeObj.getNodeIndex(nodes[0]);
27 | }
28 | 
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.getPreNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function()treeNode.getPreNode

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Get the treeNode's previous sibling node.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Function Parameter Descriptions

13 |
14 |

ReturnJSON

15 |

JSON data object of the treeNode's previous sibling node

16 |

If have not the previous node, return null.

17 |
18 |

Examples of treeNode

19 |

1. Get the first selected node's previous sibling node.

20 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
21 | var sNodes = treeObj.getSelectedNodes();
22 | if (sNodes.length > 0) {
23 | 	var node = sNodes[0].getPreNode();
24 | }
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.editName.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNode)zTreeObj.editName

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

设置某节点进入编辑名称状态。

9 |

1、如果需要用 js 取消编辑名称状态,请使用 cancelEditName(newName) 方法。

10 |

2、可利用此方法让当前正编辑的节点 input 输入框获取焦点。

11 |

3、请通过 zTree 对象执行此方法。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeNodeJSON

17 |

指定进入编辑名称状态的节点 JSON 数据

18 |

请务必保证此节点数据对象 是 zTree 内部的数据对象

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 设置根节点第一个节点进入编辑名称状态

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var nodes = treeObj.getNodes();
26 | treeObj.editName(nodes[0]);
27 | 
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.isAjaxing.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.isAjaxing

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Judge whether the node's child nodes being loaded asynchronously.

9 |

Do not initialize or modify it, it is created by the zTree.

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: the node's child nodes is being loaded asynchronously

15 |

false means: the node's child nodes is not being loaded asynchronously

16 |
17 |

Examples of treeNode

18 |

1. Judge whether the first selected node's child nodes being loaded asynchronously

19 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
20 | var sNodes = treeObj.getSelectedNodes();
21 | if (sNodes.length > 0) {
22 | 	var isAjaxing = sNodes[0].isAjaxing;
23 | }
24 | 
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/zTreeObj.setEditable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(editable)zTreeObj.setEditable

4 |

Overview[ depends on jquery.ztree.exedit js ]

5 |
6 |

7 |
8 |

Edit mode and normal mode switch.

9 |

To use edit mode, please set the attributes in 'setting.edit'

10 |

Please use zTree object to executing the method.

11 |
12 |
13 |

Function Parameter Descriptions

14 |
15 |

editableBoolean

16 |

true means: set zTree to edit mode.

17 |

false means: set zTree to normal mode.

18 |

Return none

19 |

no return value

20 |
21 |

Examples of function

22 |

1. set zTree to edit mode

23 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
24 | treeObj.setEditable(true);
25 | 
26 |
27 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.hideNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNodes)zTreeObj.hideNodes

4 |

概述[ 依赖 jquery.ztree.exhide 扩展 js ]

5 |
6 |

7 |
8 |

隐藏一批节点。

9 |

1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

10 |

2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

11 |

3、请通过 zTree 对象执行此方法。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeNodesArray(JSON)

17 |

指定被隐藏的节点 JSON 数据集合

18 |

请务必保证这些节点数据对象 是 zTree 内部的数据对象

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 隐藏根节点第一个节点的子节点

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var nodes = treeObj.getNodes();
26 | treeObj.hideNodes(nodes[0].children);
27 | 
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.url.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.url

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The URL of node link

9 |

1. In edit mode (setting.edit.enable = true) , this feature fails. If you must use a similar feature, please use the 'onClick' callback for their own control.

10 |

2. If you use the 'onClick' callback function to control opening URL , then set the URL in the other custom attribute, do not use the 'url' attribute.

11 |

Default: undefined

12 |
13 |
14 |

String Format

15 |
16 |

As same as <a> tag's 'href' attribute.

17 |
18 |

Examples of treeNode

19 |

1. Set the URL is 'g.cn'

20 |
var nodes = [
21 | 	{ "id":1, "name":"Google CN", "url":"http://g.cn"},
22 | 	......
23 | ]
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.iconClose.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.iconClose

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

父节点自定义折叠时图标的 URL 路径。

9 |

1、此属性只针对父节点有效

10 |

2、此属性必须与 iconOpen 同时使用

11 |

3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

12 |

默认值:无

13 |
14 |
15 |

String 格式说明

16 |
17 |

图标图片的 url 可以是相对路径也可以是绝对路径

18 |

设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

19 |
20 |

treeNode 举例

21 |

1. 设置节点的个性化图标

22 |
var nodes = [
23 | 	//父节点展开 折叠时使用相同的图标
24 | 	{ name:"父节点1", icon:"/img/parent.gif"},
25 | 
26 | 	//父节点展开 折叠时分别使用不同的图标
27 | 	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
28 | 
29 | 	//叶子节点个性化图标
30 | 	{ name:"叶子节点", icon:"/img/leaf.gif"}
31 | ]
32 |
33 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.iconOpen.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.iconOpen

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

父节点自定义展开时图标的 URL 路径。

9 |

1、此属性只针对父节点有效

10 |

2、此属性必须与 iconClose 同时使用

11 |

3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

12 |

默认值:无

13 |
14 |
15 |

String 格式说明

16 |
17 |

图标图片的 url 可以是相对路径也可以是绝对路径

18 |

设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

19 |
20 |

treeNode 举例

21 |

1. 设置节点的个性化图标

22 |
var nodes = [
23 | 	//父节点展开 折叠时使用相同的图标
24 | 	{ name:"父节点1", icon:"/img/parent.gif"},
25 | 
26 | 	//父节点展开 折叠时分别使用不同的图标
27 | 	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
28 | 
29 | 	//叶子节点个性化图标
30 | 	{ name:"叶子节点", icon:"/img/leaf.gif"}
31 | ]
32 |
33 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/cn/asyncData/getNodes.php: -------------------------------------------------------------------------------- 1 | 2 | [] 43 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/demo/en/asyncData/getNodes.php: -------------------------------------------------------------------------------- 1 | 2 | [] 43 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.showNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNodes)zTreeObj.showNodes

4 |

概述[ 依赖 jquery.ztree.exhide 扩展 js ]

5 |
6 |

7 |
8 |

显示一批已经被隐藏的节点。

9 |

1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

10 |

2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

11 |

3、请通过 zTree 对象执行此方法。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeNodesArray(JSON)

17 |

指定被显示的节点 JSON 数据集合

18 |

请务必保证这些节点数据对象 是 zTree 内部的数据对象

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 显示全部隐藏的节点

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var nodes = treeObj.getNodesByParam("isHidden", true);
26 | treeObj.showNodes(nodes);
27 | 
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/fn.zTree.destroy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId)$.fn.zTree.destroy

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

从 zTree v3.4 开始提供销毁 zTree 的方法。

9 |

1、用此方法可以销毁指定 treeId 的 zTree,也可以销毁当前页面全部的 zTree。

10 |

2、销毁指定 treeId 的 zTree 也可以使用 zTreeObj.destroy() 方法。

11 |

3、重新使用已经被销毁的树,必须要使用 init 方法进行初始化。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeIdString

17 |

zTree 的 DOM 容器的 id

18 |

省略 treeId,表示销毁当前页面全部的 zTree

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 销毁 id 为 "treeDemo" 的 zTree

24 |
$.fn.zTree.destroy("treeDemo");
25 |

2. 销毁全部 的 zTree

26 |
$.fn.zTree.destroy();
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.showNode.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeNode)zTreeObj.showNode

4 |

概述[ 依赖 jquery.ztree.exhide 扩展 js ]

5 |
6 |

7 |
8 |

显示某个被隐藏的节点。

9 |

1、此功能不支持 exedit 扩展,因此不要在编辑状态时使用隐藏节点的方法。

10 |

2、隐藏/显示节点,会影响节点的 isFirstNode 和 isLastNode 属性。

11 |

3、请通过 zTree 对象执行此方法。

12 |
13 |
14 |

Function 参数说明

15 |
16 |

treeNodeJSON

17 |

指定被显示的节点 JSON 数据

18 |

请务必保证此节点数据对象 是 zTree 内部的数据对象

19 |

返回值

20 |

目前无任何返回值

21 |
22 |

function 举例

23 |

1. 显示某个隐藏的节点

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var node = treeObj.getNodeByParam("isHidden", true);
26 | if (node) {
27 |   treeObj.showNode(node);
28 | }
29 | 
30 |
31 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.check.radioType.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Stringsetting.check.radioType

4 |

Overview[ depends on jquery.ztree.excheck js ]

5 |
6 |

7 |
8 |

The group about radio. It is valid when [setting.check.enable = true & setting.check.chkStyle = "radio"]

9 |

Default: "level"

10 |
11 |
12 |

String Format

13 |
14 |

When radioType = "level", will be grouped with same level nodes which have the same parent node. 15 |
When radioType = "all", will be grouped with all nodes.

16 |

Please note that letter case, do not change.

17 |
18 |

Examples of setting

19 |

1. Set the group about radio is all nodes.

20 |
var setting = {
21 | 	check: {
22 | 		enable: true,
23 | 		chkStyle: "radio",
24 | 		radioType: "all"
25 | 	}
26 | };
27 | ......
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.open.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.open

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

记录 treeNode 节点的 展开 / 折叠 状态。

9 |

1、初始化节点数据时,如果设定 treeNode.open = true,则会直接展开此节点

10 |

2、叶子节点 treeNode.open = false

11 |

3、为了解决部分朋友生成 json 数据出现的兼容问题, 支持 "false","true" 字符串格式的数据

12 |

4、非异步加载模式下,无子节点的父节点设置 open=true 后,可显示为展开状态,但异步加载模式下不会生效。(v3.5.15+)

13 |

默认值:false

14 |
15 |
16 |

Boolean 格式说明

17 |
18 |

true 表示节点为 展开 状态

19 |

false 表示节点为 折叠 状态

20 |
21 |

treeNode 举例

22 |

1. 查看当前被选中的节点的 展开 / 折叠 状态

23 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
24 | var sNodes = treeObj.getSelectedNodes();
25 | if (sNodes.length > 0) {
26 | 	var isOpen = sNodes[0].open;
27 | }
28 | 
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.getCheckedNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(checked)zTreeObj.getCheckedNodes

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

获取输入框被勾选 或 未勾选的节点集合。[setting.check.enable = true 时有效]

9 |

请通过 zTree 对象执行此方法。

10 |
11 |
12 |

Function 参数说明

13 |
14 |

checkedBoolean

15 |

checked = true 表示获取 被勾选 的节点集合

16 |

checked = false 表示获取 未勾选 的节点集合

17 |

省略此参数,等同于 true。

18 |

对于 treeNode.nocheck = true 的节点不进行获取。

19 |

返回值Array(JSON)

20 |

返回全部符合要求的节点集合 Array

21 |
22 |

function 举例

23 |

1. 获取当前被勾选的节点集合

24 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
25 | var nodes = treeObj.getCheckedNodes(true);
26 | 
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.data.keep.parent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.data.keep.parent

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The parent node's lock, the parent node will lock 'isParent' attribute to true.

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true means: lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute still keep to be true..

15 |

false means: don't lock the parent node, and if remove all of the parent node's child nodes, its 'isParent' attribute will change to be false..

16 |
17 |

Examples of setting

18 |

1. lock the parent node

19 |
var setting = {
20 | 	data: {
21 | 		keep: {
22 | 			parent: true
23 | 		}
24 | 	}
25 | };
26 | ......
27 |
28 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/zTreeObj.destroy.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId)zTreeObj.destroy

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

From zTree v3.4, zTree support the method for destruction.

9 |

1. This method can destroy the zTreeObj's zTree.

10 |

2. If you want to destory all of the zTrees, you can use the '$.fn.zTree.destroy()' method.

11 |

3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.

12 |
13 |
14 |

Function Parameter Descriptions

15 |
16 |

Return none

17 |

no return value

18 |
19 |

Examples of function

20 |

1. destroy the zTree which its id is 'treeDemo'

21 |
var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
22 | zTreeObj.destroy();
23 | 
24 |
25 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.async.enable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.async.enable

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

Set zTree asynchronous loading mode on/off.

9 |

Default: false

10 |
11 |
12 |

Boolean Format

13 |
14 |

true - turn on asynchronous loading mode

15 |

false - turn off asynchronous loading mode

16 |

If set it is true, you must set other attributes in setting.async

17 |

If you don't pass the 'treeNodes' parameter when you initialize zTree, the root nodes will be retrieved using ajax.

18 |
19 |

Examples of setting

20 |

1. Turn on asynchronous loading mode

21 |
var setting = {
22 | 	async: {
23 | 		enable: true,
24 | 		url: "http://host/getNode.php",
25 | 		autoParam: ["id", "name"]
26 | 	}
27 | };
28 | ......
29 |
30 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.children.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Array(JSON)treeNode.children

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点的子节点数据集合。

9 |

1、如果不使用 children 属性保存子节点数据,请修改 setting.data.key.children

10 |

2、异步加载时,对于设置了 isParent = true 的节点,在展开时将进行异步加载

11 |

默认值:无

12 |
13 |
14 |

Array(JSON) 格式说明

15 |
16 |

标准的 JSON 数据对象

17 |
18 |

treeNode 举例

19 |

1. 初始化的标准嵌套格式的 JSON 数据对象

20 |
var nodes = [
21 | { "id":1, "name":"test1",
22 | 	children: [
23 | 	{ "id":3, "name":"test3"},
24 | 	{ "id":4, "name":"test4"},
25 | 	{ "id":5, "name":"test5"}
26 | 	]
27 | },
28 | { "id":2, "name":"test2"  }
29 | ]
30 |

2. 获取第一个根节点的子节点

31 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
32 | var nodes = treeObj.getNodes()[0].children;
33 | 
34 |
35 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/setting.view.expandSpeed.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

String / Numbersetting.view.expandSpeed

4 |

Overview[ depends on jquery.ztree.core js ]

5 |
6 |

7 |
8 |

The animation speed of expand or collapse node. As same as 'speed' parameter in jQuery

9 |

In order to ensure zTree operating speed, if use the IE6, zTree will not use animation.

10 |

Default: "fast"

11 |
12 |
13 |

String Format

14 |
15 |

e.g. "slow", "normal", or "fast"

16 |

If set to "", zTree will not use animation.

17 |
18 |

Number Format

19 |
20 |

How long the animation will run. [Unit: ms] (e.g. 1000)

21 |
22 |

Examples of setting

23 |

1. Set the animation speed to slow

24 |
var setting = {
25 | 	view: {
26 | 		expandSpeed: "slow"
27 | 	}
28 | };
29 | ......
30 |
31 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/treeNode.icon.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

StringtreeNode.icon

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

节点自定义图标的 URL 路径。

9 |

1、父节点如果只设置 icon ,会导致展开、折叠时都使用同一个图标

10 |

2、父节点展开、折叠使用不同的个性化图标需要同时设置 treeNode.iconOpen / treeNode.iconClose 两个属性

11 |

3、如果想利用 className 设置个性化图标,需要设置 treeNode.iconSkin 属性

12 |

默认值:无

13 |
14 |
15 |

String 格式说明

16 |
17 |

图标图片的 url 可以是相对路径也可以是绝对路径

18 |

设置相对路径请注意页面与图片之间的关系,确保图片能够正常加载

19 |
20 |

treeNode 举例

21 |

1. 设置节点的个性化图标

22 |
var nodes = [
23 | 	//父节点展开 折叠时使用相同的图标
24 | 	{ name:"父节点1", icon:"/img/parent.gif"},
25 | 
26 | 	//父节点展开 折叠时分别使用不同的图标
27 | 	{ name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"}, 
28 | 
29 | 	//叶子节点个性化图标
30 | 	{ name:"叶子节点", icon:"/img/leaf.gif"}
31 | ]
32 |
33 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/zTreeObj.checkAllNodes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(checked)zTreeObj.checkAllNodes

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

勾选 或 取消勾选 全部节点。[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时有效]

9 |

此方法不会触发 beforeCheck / onCheck 事件回调函数。

10 |

请通过 zTree 对象执行此方法。

11 |
12 |
13 |

Function 参数说明

14 |
15 |

checkedBoolean

16 |

checked = true 表示勾选全部节点

17 |

checked = false 表示全部节点取消勾选

18 |

不会影响 treeNode.nocheck = true 的节点。

19 |

不会影响未加载的节点。

20 |

返回值

21 |

目前无任何返回值

22 |
23 |

function 举例

24 |

1. 勾选全部节点

25 |
var treeObj = $.fn.zTree.getZTreeObj("tree");
26 | treeObj.checkAllNodes(true);
27 | 
28 |
29 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.callback.beforeExpand.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId, treeNode)setting.callback.beforeExpand

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

用于捕获父节点展开之前的事件回调函数,并且根据返回值确定是否允许展开操作

9 |

默认值:null

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeIdString

15 |

对应 zTree 的 treeId,便于用户操控

16 |

treeNodeJSON

17 |

要展开的父节点 JSON 数据对象

18 |

返回值Boolean

19 |

返回值是 true / false

20 |

如果返回 false,zTree 将不会展开节点,也无法触发 onExpand 事件回调函数

21 |
22 |

setting & function 举例

23 |

1. 禁止所有已折叠的父节点展开

24 |
function zTreeBeforeExpand(treeId, treeNode) {
25 |     return false;
26 | };
27 | var setting = {
28 | 	callback: {
29 | 		beforeExpand: zTreeBeforeExpand
30 | 	}
31 | };
32 | ......
33 |
34 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/en/treeNode.nocheck.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

BooleantreeNode.nocheck

4 |

Overview[ depends on jquery.ztree.excheck js ]

5 |
6 |

7 |
8 |

1. Set node to hide the checkbox or radio. It is valid when [setting.check.enable = true]

9 |

2. zTree support identification string 'true' & 'false'.

10 |

Default: false

11 |
12 |
13 |

Boolean Format

14 |
15 |

true means: the node hide the checkbox or radio, and don't affect the checked association, and don't affect its parent node's half-checked status.

16 |

false means: the node show the checkbox or radio.

17 |
18 |

Examples of treeNode

19 |

1. Hide some node's checkbox / radio

20 |
var nodes = [
21 | 	{ "id":1, "name":"test1", "nocheck":true},
22 | 	{ "id":2, "name":"test2"},
23 | 	{ "id":3, "name":"test3"}
24 | ]
25 |
26 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.callback.beforeCollapse.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId, treeNode)setting.callback.beforeCollapse

4 |

概述[ 依赖 jquery.ztree.core 核心 js ]

5 |
6 |

7 |
8 |

用于捕获父节点折叠之前的事件回调函数,并且根据返回值确定是否允许折叠操作

9 |

默认值:null

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeIdString

15 |

对应 zTree 的 treeId,便于用户操控

16 |

treeNodeJSON

17 |

要折叠的父节点 JSON 数据对象

18 |

返回值Boolean

19 |

返回值是 true / false

20 |

如果返回 false,zTree 将不会折叠节点,也无法触发 onCollapse 事件回调函数

21 |
22 |

setting & function 举例

23 |

1. 禁止所有已展开的父节点折叠

24 |
function zTreeBeforeCollapse(treeId, treeNode) {
25 |     return false;
26 | };
27 | var setting = {
28 | 	callback: {
29 | 		beforeCollapse: zTreeBeforeCollapse
30 | 	}
31 | };
32 | ......
33 |
34 |
-------------------------------------------------------------------------------- /2020/突破CRUD_简单优雅的代码生成工具诞生记/source/springboot-gencode/src/main/java/com/yuboon/springboot/gencode/db/DbConnection.java: -------------------------------------------------------------------------------- 1 | package com.yuboon.springboot.gencode.db; 2 | 3 | import com.yuboon.springboot.gencode.exception.GenCodeException; 4 | 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.SQLException; 8 | 9 | /** 10 | * 数据库连接 11 | * 12 | * 13 | * @author yuboon 14 | * @version v1.0 15 | * @date 2020/01/04 16 | */ 17 | public class DbConnection { 18 | 19 | public static Connection getConnection(){ 20 | Connection conn = null; 21 | try { 22 | YamlDbProperties properties = YamlDbProperties.getValue(); 23 | conn = DriverManager.getConnection(properties.getUrl(),properties.getUsername(),properties.getPassword()); 24 | } catch (SQLException e) { 25 | throw new GenCodeException("数据库连接获取异常",e); 26 | } 27 | 28 | return conn; 29 | } 30 | 31 | public static void closeConn(Connection conn){ 32 | try { 33 | if(conn != null){ 34 | conn.close(); 35 | } 36 | } catch (SQLException e) { 37 | throw new GenCodeException("数据库连接关闭异常",e); 38 | } 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.callback.beforeCheck.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId, treeNode)setting.callback.beforeCheck

4 |

概述[ 依赖 jquery.ztree.excheck 扩展 js ]

5 |
6 |

7 |
8 |

用于捕获 勾选 或 取消勾选 之前的事件回调函数,并且根据返回值确定是否允许 勾选 或 取消勾选

9 |

默认值:null

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeIdString

15 |

对应 zTree 的 treeId,便于用户操控

16 |

treeNodeJSON

17 |

进行 勾选 或 取消勾选 的节点 JSON 数据对象

18 |

返回值Boolean

19 |

返回值是 true / false

20 |

如果返回 false,将不会改变勾选状态,并且无法触发 onCheck 事件回调函数

21 |
22 |

setting & function 举例

23 |

1. 禁止所有勾选操作,保持初始化的勾选状态

24 |
function zTreeBeforeCheck(treeId, treeNode) {
25 |     return false;
26 | };
27 | var setting = {
28 | 	callback: {
29 | 		beforeCheck: zTreeBeforeCheck
30 | 	}
31 | };
32 | ......
33 |
34 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.edit.enable.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Booleansetting.edit.enable

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

设置 zTree 是否处于编辑状态

9 |

请在初始化之前设置,初始化后需要改变编辑状态请使用 zTreeObj.setEditable() 方法

10 |

默认值: false

11 |
12 |
13 |

Boolean 格式说明

14 |
15 |

true / false 分别表示 可以 / 不可以 编辑

16 |
17 |

编辑状态规则说明

18 |
19 |

1、点击节点时,不会打开 node.url 指定的 URL。 20 |
2、全面支持 编辑 与 异步加载 状态共存。 21 |
3、可以对节点进行拖拽,且支持多棵树之间进行拖拽。 22 |
4、支持拖拽时 复制/移动 节点。(参考: setting.edit.drag.isCopy / setting.edit.drag.isMove) 23 |
5、可以通过编辑按钮修改 name 属性。 24 |
6、可以通过删除按钮删除节点。 25 |
26 |

27 |

请注意大小写,不要改变

28 |
29 |

setting 举例

30 |

1. 设置 zTree 进入编辑状态

31 |
var setting = {
32 | 	edit: {
33 | 		enable: true
34 | 	}
35 | };
36 | ......
37 |
38 |
-------------------------------------------------------------------------------- /2020/突破CRUD_万能树构造工具类封装/source/springboot-tree/src/main/resources/public/zTree_v3/api/cn/setting.callback.beforeRemove.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Function(treeId, treeNode)setting.callback.beforeRemove

4 |

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

5 |
6 |

7 |
8 |

用于捕获节点被删除之前的事件回调函数,并且根据返回值确定是否允许删除操作

9 |

默认值:null

10 |
11 |
12 |

Function 参数说明

13 |
14 |

treeIdString

15 |

对应 zTree 的 treeId,便于用户操控

16 |

treeNodeJSON

17 |

将要删除的节点 JSON 数据对象

18 |

返回值Boolean

19 |

返回值是 true / false

20 |

如果返回 false,zTree 将不删除节点,也无法触发 onRemove 事件回调函数

21 |
22 |

setting & function 举例

23 |

1. 禁止全部删除操作

24 |
function zTreeBeforeRemove(treeId, treeNode) {
25 | 	return false;
26 | }
27 | var setting = {
28 | 	edit: {
29 | 		enable: true
30 | 	},
31 | 	callback: {
32 | 		beforeRemove: zTreeBeforeRemove
33 | 	}
34 | };
35 | ......
36 |
37 |
--------------------------------------------------------------------------------