🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@cdlab996/antd-lowcode-materials

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cdlab996/antd-lowcode-materials

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
14
75%
Maintainers
1
Weekly downloads
 
Created
Source

element

Ant Design Vue(4.1.0) Materials


npm version npm downloads

Component material complete list

  • Button

Usage Example

pnpm

pnpm add @cdlab996/antd-lowcode-materials

Import the package and initialize the editor:

import { injectAssets } from '@alilc/lowcode-plugin-inject'
import { IPublicModelPluginContext } from '@alilc/lowcode-types'
import assets from '@cdlab996/antd-lowcode-materials/dist/assets.json'

const editorInit = (ctx: IPublicModelPluginContext) => {
  return {
    name: 'editor-init',
    async init() {
      const { material, project } = ctx

      const loadedAssets = await injectAssets(assets)
      material.setAssets(loadedAssets)
      // ...
    },
  }
}

editorInit.pluginName = 'editorInit'

export default editorInit

CDN

import { injectAssets } from '@alilc/lowcode-plugin-inject'
import { IPublicModelPluginContext } from '@alilc/lowcode-types'

const editorInit = (ctx: IPublicModelPluginContext) => {
  return {
    name: 'editor-init',
    async init() {
      const { material, project } = ctx

      const loadedAssets = await injectAssets('https://unpkg.com/@cdlab996/antd-lowcode-materials/dist/assets.json')
      material.setAssets(loadedAssets)
      // ...
    },
  }
}

editorInit.pluginName = 'editorInit'

export default editorInit

assets.json

Here is an example of the assets.json file:

{
  "version": "0.0.1",
  "packages": [
    {
      "package": "@cdlab996/lowcode-materials-antd",
      "version": "0.0.1",
      "library": "Cdlab996AntdLowcodeMaterials",
      "urls": [
        "https://unpkg.com/@cdlab996/antd-lowcode-materials/dist/index.css",
        "https://unpkg.com/@cdlab996/antd-lowcode-materials/dist/index.js"
      ]
    }
  ],
  "components": [
    {
      "exportName": "Cdlab996AntdLowcodeMaterialsMeta",
      "url": "https://unpkg.com/@cdlab996/antd-lowcode-materials/dist/meta.js",
      "package": {
        "npm": "@cdlab996/antdlowcode-materials"
      }
    }
  ],
  "sort": {
    "groupList": [],
    "categoryList": []
  }
}

📜 License

MIT License © 2023-PRESENT cdLab996

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts