@nocobase/plugin-action-import 1.3.47-beta → 1.3.48-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,222 +1,30 @@
1
- # import
1
+ # NocoBase
2
2
 
3
- English | [中文](./README.zh-CN.md)
3
+ <video width="100%" controls>
4
+ <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
5
+ </video>
4
6
 
5
- Excel 数据导入插件。
6
7
 
7
- ## 安装激活
8
+ ## What is NocoBase
8
9
 
9
- 内置插件无需手动安装激活。
10
+ NocoBase is a scalability-first, open-source no-code development platform.
11
+ Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
10
12
 
11
- ## 导入说明
13
+ Homepage:
14
+ https://www.nocobase.com/
12
15
 
13
- ### 数字类型字段
16
+ Online Demo:
17
+ https://demo.nocobase.com/new
14
18
 
15
- 支持数字和百分比,`N/A` 或 `-` 的文案会被过滤掉
19
+ Documents:
20
+ https://docs.nocobase.com/
16
21
 
17
- | 数字1 | 百分比 | 数字2 | 数字3 |
18
- | -- | -- | -- | -- |
19
- | 123 | 25% | N/A | - |
22
+ Commericial license & plugins:
23
+ https://www.nocobase.com/en/commercial
20
24
 
21
- JSON 之后为
25
+ License agreement:
26
+ https://www.nocobase.com/en/agreement
22
27
 
23
- ```ts
24
- {
25
- "数字1": 123,
26
- "百分比": 0.25,
27
- "数字2": null,
28
- "数字3": null,
29
- }
30
- ```
31
28
 
32
- ### 布尔类型字段
33
-
34
- 输入文案支持(英文不区分大小写):
35
-
36
- - `Yes` `Y` `True` `1` `是`
37
- - `No` `N` `False` `0` `否`
38
-
39
- | 字段1 | 字段2 | 字段3 | 字段4 | 字段4 |
40
- | -- | -- | -- | -- | -- |
41
- | 否 | 是 | Y | true | 0 |
42
-
43
- 转 JSON 之后为
44
-
45
- ```ts
46
- {
47
- "字段1": false,
48
- "字段2": true,
49
- "字段3": true,
50
- "字段4": true,
51
- "字段5": false,
52
- }
53
- ```
54
-
55
- ### 日期类型字段
56
-
57
- | DateOnly | Local(+08:00) | GMT |
58
- | -- | -- | -- |
59
- | 2023-01-18 22:22:22 | 2023-01-18 22:22:22 | 2023-01-18 22:22:22 |
60
-
61
- 转 JSON 之后为
62
-
63
- ```ts
64
- {
65
- "DateOnly": "2023-01-18T00:00:00.000Z",
66
- "Local(+08:00)": "2023-01-18T14:22:22.000Z",
67
- "GMT": "2023-01-18T22:22:22.000Z",
68
- }
69
- ```
70
-
71
- ### 选择类型字段
72
-
73
- 选项值和选项标签都可作为导入文案,多个选项之间以以逗号(`,` `,`)或顿号(`、`)区分
74
-
75
- 如字段 `优先级` 的可选项包括:
76
-
77
- | 选项值 | 选项标签 |
78
- | -- | -- |
79
- | low | 低 |
80
- | medium | 中 |
81
- | high | 低 |
82
-
83
- 选项值和选项标签都可作为导入文案
84
-
85
- | 优先级 |
86
- | -- |
87
- | 高 |
88
- | low |
89
-
90
- 转 JSON 之后为
91
-
92
- ```ts
93
- [
94
- { "优先级": "high" },
95
- { "优先级": "low" },
96
- ]
97
- ```
98
-
99
- ### 中国行政区字段
100
-
101
- | 地区1 | 地区2 |
102
- | -- | -- |
103
- | 北京市/市辖区 | 天津市/市辖区 |
104
-
105
- 转 JSON 之后为
106
-
107
- ```ts
108
- {
109
- "地区1": ["11","1101"],
110
- "地区2": ["12","1201"]
111
- }
112
- ```
113
-
114
- ### 附件字段
115
-
116
- | 附件 |
117
- | --|
118
- | https://www.nocobase.com/images/logo.png |
119
-
120
- 转 JSON 之后为
121
-
122
- ```ts
123
- {
124
- "附件": [
125
- {
126
- "filename": "logo.png",
127
- "title": "logo.png",
128
- "extname": ".png",
129
- "url": "https://www.nocobase.com/images/logo.png"
130
- }
131
- ]
132
- }
133
- ```
134
-
135
- ### 关系类型字段
136
-
137
- 多条数据以逗号(`,` `,`)或顿号(`、`)区分
138
-
139
- | 部门/名称 | 分类/标题 |
140
- | -- | -- |
141
- | 开发组 | 分类1、分类2 |
142
-
143
- 转 JSON 之后为
144
-
145
- ```ts
146
- {
147
- "部门": [1], // 1 为部门名称为「开发组」的记录 ID
148
- "分类": [1,2], // 1,2 为分类标题为「分类1」和「分类2」的记录 ID
149
- }
150
- ```
151
-
152
- ### JSON 类型字段
153
-
154
- | JSON1 |
155
- | -- |
156
- | {"key":"value"} |
157
-
158
- 转 JSON 之后为
159
-
160
- ```ts
161
- {
162
- "JSON": {"key":"value"}
163
- }
164
- ```
165
-
166
- ### 地图几何图形类型
167
-
168
- | Point | Line | Polygon | Circle |
169
- | -- | -- | -- | -- |
170
- | 1,2 | (1,2),(3,4) | (1,2),(3,4),(1,2) | 1,2,3 |
171
-
172
- 转 JSON 之后为
173
-
174
- ```ts
175
- {
176
- "Point": [1,2],
177
- "Line": [[1,2], [3,4]],
178
- "Polygon": [[1,2], [3,4], [1,2]],
179
- "Circle": [1,2,3]
180
- }
181
- ```
182
-
183
- ## 自定义导入格式
184
-
185
- 通过 `db.registerFieldValueParsers()` 方法注册自定义的 `ValueParser`,如:
186
-
187
- ```ts
188
- import { BaseValueParser } from '@nocobase/database';
189
-
190
- class PointValueParser extends BaseValueParser {
191
- async setValue(value) {
192
- if (Array.isArray(value)) {
193
- this.value = value;
194
- } else if (typeof value === 'string') {
195
- this.value = value.split(',');
196
- } else {
197
- this.errors.push('Value invalid');
198
- }
199
- }
200
- }
201
-
202
- const db = new Database();
203
-
204
- // type=point 的字段导入时,将通过 PointValueParser 解析数据
205
- db.registerFieldValueParsers({
206
- point: PointValueParser,
207
- });
208
- ```
209
-
210
- 导入示例
211
-
212
- | Point |
213
- | --|
214
- | 1,2 |
215
-
216
- 转 JSON 之后为
217
-
218
- ```ts
219
- {
220
- "Point": [1,2]
221
- }
222
- ```
29
+ ## Contact Us:
30
+ hello@nocobase.com
@@ -10,7 +10,7 @@
10
10
  module.exports = {
11
11
  "@formily/react": "2.3.0",
12
12
  "@formily/shared": "2.3.2",
13
- "@nocobase/client": "1.3.47-beta",
13
+ "@nocobase/client": "1.3.48-beta",
14
14
  "antd": "5.12.8",
15
15
  "react": "18.2.0",
16
16
  "@formily/antd-v5": "1.1.9",
@@ -19,12 +19,12 @@ module.exports = {
19
19
  "react-dom": "18.2.0",
20
20
  "lodash": "4.17.21",
21
21
  "@formily/core": "2.3.0",
22
- "@nocobase/server": "1.3.47-beta",
23
- "@nocobase/actions": "1.3.47-beta",
24
- "@nocobase/database": "1.3.47-beta",
22
+ "@nocobase/server": "1.3.48-beta",
23
+ "@nocobase/actions": "1.3.48-beta",
24
+ "@nocobase/database": "1.3.48-beta",
25
25
  "async-mutex": "0.3.2",
26
- "@nocobase/data-source-manager": "1.3.47-beta",
27
- "@nocobase/utils": "1.3.47-beta",
26
+ "@nocobase/data-source-manager": "1.3.48-beta",
27
+ "@nocobase/utils": "1.3.48-beta",
28
28
  "sequelize": "6.35.2",
29
29
  "mathjs": "10.6.4"
30
30
  };
@@ -1 +1 @@
1
- {"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2024-11-08T02:33:37.077Z"}
1
+ {"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2024-11-11T02:28:45.397Z"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "操作:导入记录",
5
5
  "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
6
6
  "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
7
- "version": "1.3.47-beta",
7
+ "version": "1.3.48-beta",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/action-import",
@@ -34,7 +34,7 @@
34
34
  "@nocobase/test": "1.x",
35
35
  "@nocobase/utils": "1.x"
36
36
  },
37
- "gitHead": "dcc260ecf21d9fcb04ef56f2ec8c4de23a8484f3",
37
+ "gitHead": "25f9e965a1ffe48a24e5d6ef18a6142abcf38ec3",
38
38
  "keywords": [
39
39
  "Actions"
40
40
  ]
package/README.zh-CN.md DELETED
@@ -1,222 +0,0 @@
1
- # import
2
-
3
- [English](./README.md) | 中文
4
-
5
- Excel 数据导入插件。
6
-
7
- ## 安装激活
8
-
9
- 内置插件无需手动安装激活。
10
-
11
- ## 导入说明
12
-
13
- ### 数字类型字段
14
-
15
- 支持数字和百分比,`N/A` 或 `-` 的文案会被过滤掉
16
-
17
- | 数字1 | 百分比 | 数字2 | 数字3 |
18
- | -- | -- | -- | -- |
19
- | 123 | 25% | N/A | - |
20
-
21
- 转 JSON 之后为
22
-
23
- ```ts
24
- {
25
- "数字1": 123,
26
- "百分比": 0.25,
27
- "数字2": null,
28
- "数字3": null,
29
- }
30
- ```
31
-
32
- ### 布尔类型字段
33
-
34
- 输入文案支持(英文不区分大小写):
35
-
36
- - `Yes` `Y` `True` `1` `是`
37
- - `No` `N` `False` `0` `否`
38
-
39
- | 字段1 | 字段2 | 字段3 | 字段4 | 字段4 |
40
- | -- | -- | -- | -- | -- |
41
- | 否 | 是 | Y | true | 0 |
42
-
43
- 转 JSON 之后为
44
-
45
- ```ts
46
- {
47
- "字段1": false,
48
- "字段2": true,
49
- "字段3": true,
50
- "字段4": true,
51
- "字段5": false,
52
- }
53
- ```
54
-
55
- ### 日期类型字段
56
-
57
- | DateOnly | Local(+08:00) | GMT |
58
- | -- | -- | -- |
59
- | 2023-01-18 22:22:22 | 2023-01-18 22:22:22 | 2023-01-18 22:22:22 |
60
-
61
- 转 JSON 之后为
62
-
63
- ```ts
64
- {
65
- "DateOnly": "2023-01-18T00:00:00.000Z",
66
- "Local(+08:00)": "2023-01-18T14:22:22.000Z",
67
- "GMT": "2023-01-18T22:22:22.000Z",
68
- }
69
- ```
70
-
71
- ### 选择类型字段
72
-
73
- 选项值和选项标签都可作为导入文案,多个选项之间以以逗号(`,` `,`)或顿号(`、`)区分
74
-
75
- 如字段 `优先级` 的可选项包括:
76
-
77
- | 选项值 | 选项标签 |
78
- | -- | -- |
79
- | low | 低 |
80
- | medium | 中 |
81
- | high | 低 |
82
-
83
- 选项值和选项标签都可作为导入文案
84
-
85
- | 优先级 |
86
- | -- |
87
- | 高 |
88
- | low |
89
-
90
- 转 JSON 之后为
91
-
92
- ```ts
93
- [
94
- { "优先级": "high" },
95
- { "优先级": "low" },
96
- ]
97
- ```
98
-
99
- ### 中国行政区字段
100
-
101
- | 地区1 | 地区2 |
102
- | -- | -- |
103
- | 北京市/市辖区 | 天津市/市辖区 |
104
-
105
- 转 JSON 之后为
106
-
107
- ```ts
108
- {
109
- "地区1": ["11","1101"],
110
- "地区2": ["12","1201"]
111
- }
112
- ```
113
-
114
- ### 附件字段
115
-
116
- | 附件 |
117
- | --|
118
- | https://www.nocobase.com/images/logo.png |
119
-
120
- 转 JSON 之后为
121
-
122
- ```ts
123
- {
124
- "附件": [
125
- {
126
- "filename": "logo.png",
127
- "title": "logo.png",
128
- "extname": ".png",
129
- "url": "https://www.nocobase.com/images/logo.png"
130
- }
131
- ]
132
- }
133
- ```
134
-
135
- ### 关系类型字段
136
-
137
- 多条数据以逗号(`,` `,`)或顿号(`、`)区分
138
-
139
- | 部门/名称 | 分类/标题 |
140
- | -- | -- |
141
- | 开发组 | 分类1、分类2 |
142
-
143
- 转 JSON 之后为
144
-
145
- ```ts
146
- {
147
- "部门": [1], // 1 为部门名称为「开发组」的记录 ID
148
- "分类": [1,2], // 1,2 为分类标题为「分类1」和「分类2」的记录 ID
149
- }
150
- ```
151
-
152
- ### JSON 类型字段
153
-
154
- | JSON1 |
155
- | -- |
156
- | {"key":"value"} |
157
-
158
- 转 JSON 之后为
159
-
160
- ```ts
161
- {
162
- "JSON": {"key":"value"}
163
- }
164
- ```
165
-
166
- ### 地图几何图形类型
167
-
168
- | Point | Line | Polygon | Circle |
169
- | -- | -- | -- | -- |
170
- | 1,2 | (1,2),(3,4) | (1,2),(3,4),(1,2) | 1,2,3 |
171
-
172
- 转 JSON 之后为
173
-
174
- ```ts
175
- {
176
- "Point": [1,2],
177
- "Line": [[1,2], [3,4]],
178
- "Polygon": [[1,2], [3,4], [1,2]],
179
- "Circle": [1,2,3]
180
- }
181
- ```
182
-
183
- ## 自定义导入格式
184
-
185
- 通过 `db.registerFieldValueParsers()` 方法注册自定义的 `ValueParser`,如:
186
-
187
- ```ts
188
- import { BaseValueParser } from '@nocobase/database';
189
-
190
- class PointValueParser extends BaseValueParser {
191
- async setValue(value) {
192
- if (Array.isArray(value)) {
193
- this.value = value;
194
- } else if (typeof value === 'string') {
195
- this.value = value.split(',');
196
- } else {
197
- this.errors.push('Value invalid');
198
- }
199
- }
200
- }
201
-
202
- const db = new Database();
203
-
204
- // type=point 的字段导入时,将通过 PointValueParser 解析数据
205
- db.registerFieldValueParsers({
206
- point: PointValueParser,
207
- });
208
- ```
209
-
210
- 导入示例
211
-
212
- | Point |
213
- | --|
214
- | 1,2 |
215
-
216
- 转 JSON 之后为
217
-
218
- ```ts
219
- {
220
- "Point": [1,2]
221
- }
222
- ```