nek-helper是一款基于nek-ui的code snippet插件,专为1.15.0及以上版本设计,旨在简化开发过程,提升效率。无论您是前端开发者还是对nek-ui感兴趣的用户,都可以通过nek-helper快速生成所需的代码片段。
核心功能:
HTML文件支持:在html文件中,使用k开头的前缀生成nek-ui组件的代码片段,如k-card对应KLCard组件。请注意,KLModal、KLNotify及KLImagePreview的code snippet应放置在js文件中。当前版本不支持国际化KLLocaleProvider组件。
JS文件支持:在js文件中,使用n开头的前缀生成各种nek-ui组件的代码片段。当前支持的code snippet包括:
n-component:快速创建NEKUI组件。
var component = new NEKUI.Component({ template:template, data: { } });n-modal:生成KLModal组件的代码片段。
var modal = new NEKUI.KLModal({ data: { title: '', contentTemplate: '' } });n-notify:快速生成KLNotify的警告通知。
NEKUI.KLNotify.warning('');n-imgPreview:生成KLImagePreview组件的代码片段。
new NEKUI.KLImagePreview({ data: { imageList: [{ name: '', src: '' }], curIndex: 0 } })n-menu-data:生成导航菜单数据结构。
menus: [ { title: '首页', key: 'home' }, { title: '', open: true, key: '', children: [ { open: true, title: '', url: '/' } ] } ];n-pager-data:生成分页数据结构。
current: 1, pageSize: 10, sumTotal: 100,n-step-data:生成步骤数据结构。
current: 0, steps: [{ status: 0, title: '', description: '' }]
nek-helper通过提供这些功能,帮助开发者在使用nek-ui时更加高效、便捷。无论您是新手还是经验丰富的开发者,都可以从nek-helper中受益,快速构建您的项目。
