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

@cdlab996/antd-lowcode-materials2.7

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cdlab996/antd-lowcode-materials2.7

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

antdv

Ant Design Vue(1.7.8) Materials


npm version npm downloads GitHub license

Usage Example

pnpm

pnpm add @cdlab996/antd-lowcode-materials2.7

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-materials2.7/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-materials2.7@1.0.0/dist/assets.json');
      material.setAssets(loadedAssets);
      // ...
    },
  };
};

editorInit.pluginName = 'editorInit';

export default editorInit;

assets.json

Here is an example of the assets.json file:

{
  "version": "1.0.0",
  "packages": [
    {
      "package": "@cdlab996/vant-lowcode-materials2.7",
      "version": "1.0.0",
      "library": "Cdlab996VantLowcodeMaterials2.7",
      "urls": [
        "https://unpkg.com/@cdlab996/vant-lowcode-materials2.7@1.0.0/dist/index.css",
        "https://unpkg.com/@cdlab996/vant-lowcode-materials2.7@1.0.0/dist/index.js"
      ]
    }
  ],
  "components": [
    {
      "exportName": "Cdlab996VantLowcodeMaterials2.7Meta",
      "url": "https://unpkg.com/@cdlab996/vant-lowcode-materials2.7@1.0.0/dist/meta.js",
      "package": {
        "npm": "@cdlab996/vant-lowcode-materials2.7"
      }
    }
  ],
  "sort": {
    "groupList": [],
    "categoryList": []
  }
}

FAQs

Package last updated on 11 Jul 2023

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