0.1.30 • Published 4 years ago

@shuyun-ep-team/datadsl-editor v0.1.30

Weekly downloads
27
License
-
Repository
-
Last release
4 years ago

datadsl-editor

数据流dsl编辑器 react版

准备

安装包与依赖

    npm install --save @shuyun-ep-team/datadsl-editor react react-dom antd 

webpack配置

{
    module: ...,
    plugins: ...,
    // 使用antlr4需配置
    node: { module: "empty", net: "empty", fs: "empty" }
}

使用

import DslEditor from '@shuyun-ep-team/datadsl-editor';

const edit: any;

// 用户可选的所有数据对象字段路径
const dataFieldPaths = {
   pathRoot: '$',
   paths: [
        {"path": "main.test", "parents": ["main"], "type": "string"},
        {"path": "main", "parents": [], "type": "object"}
    ]
}
// 函数提示数据
const functionData = {
  date: [
      {
          functionExpress: "date.is_after(value: date):boolean",
          description: "判断date对象日期是否在参数之后",
          returnType: "boolean",
          args: [
              {
                  name: "arg0",
                  description: "",
                  argumentType: "date"
              },
              {
                  name: "value",
                  description: "用于比较的参数",
                  argumentType: "date"
              }
          ]
      }
  ]
}

<DslEditor ref={node => edit = node} defaultValue="123" dataFieldPaths={dataFieldPaths} functionData={functionData} />

API

getValue()
//获取内容
edit.getValue()
0.1.30

4 years ago

0.1.29

4 years ago

0.1.28

4 years ago

0.1.27

4 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.0

5 years ago