0.1.30 • Published 5 years ago

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

Weekly downloads
27
License
-
Repository
-
Last release
5 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

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

6 years ago

0.1.25

6 years ago

0.1.24

6 years ago

0.1.23

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.0

6 years ago