匿名用户2021年12月09日
32阅读
开发技术JavaScript
所属分类Web应用开发、Web框架
授权协议View license

作品详情

FancyGrid

Buildv1.7.150

FancyGrid-JavaScriptgridlibrarywithchartsintegrationandservercommunication.

InstallbowerbowerinstallfancygridnpmnpminstallfancygridCDNhttps://cdn.fancygrid.com/fancy.min.jshttps://cdn.fancygrid.com/fancy.min.cssQuickStart

IncludeareferencetotheFancyGridlibrary

<linkhref="https://cdn.fancygrid.com/fancy.min.css"rel="stylesheet"><scriptsrc="https://cdn.fancygrid.com/fancy.min.js"></script>

TheFancyGridobjectisnowaccessible.Happygriding!

<divid="grid"></div><script>document.addEventListener("DOMContentLoaded",function(){newFancyGrid({renderTo:'grid',width:300,height:200,data:[{name:'Nick',age:30},{name:'Fred',age:25},{name:'Mike',age:35}],columns:[{index:'name',title:'Name',type:'string'},{type:'number',index:'age',title:'Age'}]});});</script>LoadFancyGridasaCommonJSmodule

FancyGridisusinganUMDmodulepattern,asaresultithassupportforCommonJS.ThefollowingexamplepresumesyouareusingnpmtoinstallFancyGridovernpm/bower.

//LoadFancyGridvarFancy=require('fancygrid');//GeneratethegridnewFancy.Grid({//config});//GeneratetheformnewFancy.Form({//config});//GeneratethetabsnewFancy.Tab({//config});LoadFancyGridasanES6module

SinceFancyGridsupportsCommonJS,itcanbeloadedasanES6modulewiththeuseoftranspilers.TwocommontranspilersareBabelandTypeScript.ThesehavedifferentinterpretationsofaCommonJSmodule,whichaffectsyoursyntax.ThefollowingexamplespresumesyouareusingnpmtoinstallFancyGrid.

BabelimportFancyfrom'fancygrid';//GeneratethegridFancy.Grid({//config});//GeneratetheformnewFancy.Form({//config});//GeneratethetabsnewFancy.Tab({//config});TypeScriptimport*asFancyfrom'fancygrid';//GeneratethegridFancy.Grid({//config});//GeneratetheformnewFancy.Form({//config});//GeneratethetabsnewFancy.Tab({//config});PackageDirectory

Thepackageincludesthefollowing:

|README.md├──client│├──fancy.full.min.js│├──fancy.min.js│├──fancy.min.css│├──modules├──src│├──js│├──less│...Debug

IncaseyouwanttodebugFancyGridthereareseveralapproaches.

Debugfiles

Includecssfile/client/fancy.cssIncludejsfile/src/js/load-all.jsAfterthatset

Fancy.MODULESLOAD=false;Debugfullbuild

Includecssfile/client/fancy.cssIncludejsfile/src/js/fancy.full.js

Debugwithauto-loadingmodules

Includecssfile/client/fancy.cssIncludejsfile/src/js/fancy.jsSetmodulespath

Fancy.MODULESDIR='/client/modules/';Fancy.DEBUG=true;CustombuildDebugbuildgruntdebugReleasebuildgruntreleaseSupport

IfyouneedanyassistanceorwouldliketoreportanybugsfoundinFancyGrid,pleasecontactusatsupport@fancygrid.com

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论