dascom-le-editor 0.0.32 → 0.0.33

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.
Files changed (2) hide show
  1. package/README.md +5 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -21,7 +21,7 @@ const editorInstance = new editor(dom, {
21
21
  dpi: 203, // 画布渲染默认 DPI
22
22
  showVarnish: true, // 是否显示光油配置面板,默认 false
23
23
  showLaser: 15, // 是否显示激光配置,默认不开启
24
-
24
+ locale: 'zh-CN', // 设置语言
25
25
  layerMaxCount: 1, // 最大图层数(大于1 才展示多图层编辑),默认 1;文件 JSON 内配置优先
26
26
  separateLayerMode: false, // 是否启用分联图层模式,默认 false
27
27
  separateLayerCount: 2, // 分联图层数,默认 2
@@ -65,7 +65,10 @@ const editorInstance = new editor(dom, {
65
65
  // 注意:工具(T) 菜单下的二级菜单项由 enabledTools / disabledTools 控制
66
66
  ],
67
67
  })
68
-
68
+ // 设置编辑器语言
69
+ editorInstance.setLocale('en-US')
70
+ // 获取当前编辑器语言
71
+ editorInstance.getLocale()
69
72
  // 导出当前画布 JSON
70
73
  const toExportJson = async () => {
71
74
  const json = await editorInstance?.exportJson()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dascom-le-editor",
3
3
  "private": false,
4
- "version": "0.0.32",
4
+ "version": "0.0.33",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test:i18n-data-boundary": "node scripts/i18n-data-boundary.test.mjs",