npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

iwhale-lowcode-components

v0.3.24

Published

iwhale-lowcode-components

Downloads

605

Readme

ali-lowcode-components

基于阿里开源低代码平台构建的组件库

调试

启动调试

安装paython2.x

nvm use 14;
npm install;
npm run lowcode:dev;

构建

npm run lowcode:build;

发布

npm publish

阿里低代码引擎:https://github.com/alibaba/lowcode-engine

阿里低代码demo:https://github.com/alibaba/lowcode-demo

语雀文档:https://www.yuque.com/lce/doc

照葫芦画瓢

经验

组件编写完毕后,运行 npm run lowcode:dev(或者lowcode:build) 会自动在lowcode文件夹下生成和组件同名的一个文件夹,内部有meta.ts,描述了组件的一些配置信息

如果自动生成的meta.ts不满足我们的要求,我们就需要手动进行配置

编写容器

在对应组件的meta.ts中增加如下配置

  {
    configure: {
      component: {
        isContainer: true,
        nestingRule: {
          parentWhitelist: ["SelfContainer"],
          childWhitelist: ["Text"]
        }
      }
    }
  }
 

isContainer: true 表示当前这个组件是个容器

parentWhitelist 表示该组件可以放置在哪些父组件里

childWhitelist 表示该组件内部可以放置哪些组件

设置容器初始子组件

advanced: {
  initialChildren: [
    { componentName: 'Col' },
    { componentName: 'Col' },
  ]
}

这样设置组件在拖拽到页面上后就自动带有了两个Col组件

如何将编写好的组件放在demo中运行

运行npm run lowcode:build获取物料配置json,在packages中添加lodas和moment两个库:

"packages": [
  {
    "package": "moment",
    "version": "2.24.0",
    "urls": [
      "https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"
    ],
    "library": "moment"
  },
  {
    "package": "lodash",
    "library": "_",
    "urls": [
      "https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js"
    ]
  },
  {
    "package": "iwhale-lowcode-components",
    "version": "0.1.0",
    "library": "IwhaleLowcodeComponents",
    "urls": [
      "https://unpkg.com/[email protected]/build/lowcode/view.js",
      "https://unpkg.com/[email protected]/build/lowcode/view.css"
    ],
    "editUrls": [
      "https://unpkg.com/[email protected]/build/lowcode/view.js",
      "https://unpkg.com/[email protected]/build/lowcode/view.css"
    ]
  }
],

然后将整个物料json复制替换demo项目中node-extended-actions场景下的assets.json中。

接着将路径 https://unpkg.com/[email protected]/ 代理到本仓库启动后的路径即可

Tips

  • 如果组件的props type定义如下:
interface containerProps {
  children: React.ReactNode[];
}

那么在编译时将不会生成meta.ts,随便加个其他属性就可以了。

  • AliLowCodeEngine.material.addBuiltinComponentAction({name:'add', content: {icon: 'add'}, important: true}) 添加自定义action