clickgo 3.11.33 → 3.12.0

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 (57) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/config.json +6 -4
  3. package/dist/app/demo/form/control/select/select.xml +1 -1
  4. package/dist/app/demo/form/control/tuieditor/tuieditor.js +1 -0
  5. package/dist/app/demo/form/control/tuieditor/tuieditor.xml +8 -2
  6. package/dist/app/demo/form/control/{markdownit/markdownit.js → tuiviewer/tuiviewer.js} +3 -4
  7. package/dist/app/demo/form/control/tuiviewer/tuiviewer.xml +14 -0
  8. package/dist/app/demo/form/control/weditor/weditor.js +69 -0
  9. package/dist/app/demo/form/control/weditor/weditor.xml +22 -0
  10. package/dist/app/demo/form/main.js +10 -5
  11. package/dist/app/demo/form/main.xml +2 -1
  12. package/dist/app/demo/form/method/aform/aform.xml +1 -1
  13. package/dist/app/demo/form/method/dom/dom.js +12 -0
  14. package/dist/app/demo/form/method/dom/dom.xml +4 -0
  15. package/dist/app/demo/form/method/form/form.xml +7 -1
  16. package/dist/clickgo.js +1 -1
  17. package/dist/clickgo.ts +1 -1
  18. package/dist/control/arteditor.cgc +0 -0
  19. package/dist/control/box.cgc +0 -0
  20. package/dist/control/common.cgc +0 -0
  21. package/dist/control/desc.cgc +0 -0
  22. package/dist/control/drawer.cgc +0 -0
  23. package/dist/control/echarts.cgc +0 -0
  24. package/dist/control/form.cgc +0 -0
  25. package/dist/control/iconview.cgc +0 -0
  26. package/dist/control/map.cgc +0 -0
  27. package/dist/control/monaco.cgc +0 -0
  28. package/dist/control/nav.cgc +0 -0
  29. package/dist/control/page.cgc +0 -0
  30. package/dist/control/property.cgc +0 -0
  31. package/dist/control/table.cgc +0 -0
  32. package/dist/control/task.cgc +0 -0
  33. package/dist/control/tuieditor.cgc +0 -0
  34. package/dist/control/tuiviewer.cgc +0 -0
  35. package/dist/control/weditor.cgc +0 -0
  36. package/dist/control/xterm.cgc +0 -0
  37. package/dist/lib/control.js +5 -0
  38. package/dist/lib/control.ts +5 -0
  39. package/dist/lib/core.js +7 -6
  40. package/dist/lib/core.ts +7 -6
  41. package/dist/lib/dom.js +163 -6
  42. package/dist/lib/dom.ts +222 -6
  43. package/dist/lib/form.js +78 -15
  44. package/dist/lib/form.ts +93 -17
  45. package/dist/lib/fs.js +1 -1
  46. package/dist/lib/fs.ts +1 -1
  47. package/dist/lib/task.js +13 -0
  48. package/dist/lib/task.ts +19 -0
  49. package/dist/lib/tool.js +6 -11
  50. package/dist/lib/tool.ts +8 -10
  51. package/dist/theme/byterun.cgt +0 -0
  52. package/dist/theme/familiar.cgt +0 -0
  53. package/dist/theme/light.cgt +0 -0
  54. package/package.json +2 -2
  55. package/types/index.d.ts +17 -1
  56. package/dist/app/demo/form/control/markdownit/markdownit.xml +0 -22
  57. package/dist/control/markdownit.cgc +0 -0
package/README.md CHANGED
@@ -25,7 +25,7 @@ Load the module loader first, and then load it using the module loader.
25
25
  **index.html**
26
26
 
27
27
  ```html
28
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.33'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.2/dist/loader.min.js?path=index&npm={'clickgo':'3.12.0'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -20,10 +20,10 @@
20
20
  "/clickgo/control/xterm",
21
21
  "/clickgo/control/echarts",
22
22
  "/clickgo/control/map",
23
- "/clickgo/control/markdownit",
24
23
  "/clickgo/control/tuieditor",
24
+ "/clickgo/control/tuiviewer",
25
25
  "/clickgo/control/arteditor",
26
- "/clickgo/control/markdownit"
26
+ "/clickgo/control/weditor"
27
27
  ],
28
28
  "style": "/package/global",
29
29
 
@@ -81,8 +81,6 @@
81
81
  "/form/control/loading/loading.xml",
82
82
  "/form/control/map/map.js",
83
83
  "/form/control/map/map.xml",
84
- "/form/control/markdownit/markdownit.js",
85
- "/form/control/markdownit/markdownit.xml",
86
84
  "/form/control/marquee/marquee.js",
87
85
  "/form/control/marquee/marquee.xml",
88
86
  "/form/control/menu/menu.js",
@@ -123,11 +121,15 @@
123
121
  "/form/control/tip/tip.xml",
124
122
  "/form/control/tuieditor/tuieditor.js",
125
123
  "/form/control/tuieditor/tuieditor.xml",
124
+ "/form/control/tuiviewer/tuiviewer.js",
125
+ "/form/control/tuiviewer/tuiviewer.xml",
126
126
  "/form/control/vflow/vflow.css",
127
127
  "/form/control/vflow/vflow.js",
128
128
  "/form/control/vflow/vflow.xml",
129
129
  "/form/control/video/video.js",
130
130
  "/form/control/video/video.xml",
131
+ "/form/control/weditor/weditor.js",
132
+ "/form/control/weditor/weditor.xml",
131
133
  "/form/control/xterm/xterm.js",
132
134
  "/form/control/xterm/xterm.xml",
133
135
  "/form/event/form/form.css",
@@ -51,7 +51,7 @@
51
51
  <select :data="['1','2','3','4','5']" :disabled="disabled" :editable="editable" :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" style="height: 60px;" @load="onLoad" @remote="onRemote" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
52
52
  <label>Always editable: {{aemodel}}</label>
53
53
  <layout gutter="10">
54
- <select v-model="aemodel" :data="editableData ? ['1','2','3',{'label':'is 4','value':'4'},'5'] : ['6','7','8','9','10']" :disabled="disabled" editable editablelabel :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" placeholder="Please enter" @load="onLoad" @remote="onRemote" style="flex: 1;" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
54
+ <select v-model="aemodel" :data="editableData ? ['1','2','3',{'label':'is gDa','value':'gDa'},'5'] : ['6','7','8','9','10']" :disabled="disabled" editable editablelabel :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" placeholder="Please enter" @load="onLoad" @remote="onRemote" style="flex: 1;" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
55
55
  <button @click="aemodel.length=0">clear</button>
56
56
  <button @click="aemodel[0] = '4'">4</button>
57
57
  <button @click="aemodel[0] = '22'">22</button>
@@ -47,6 +47,7 @@ class default_1 extends clickgo.form.AbstractForm {
47
47
  this.family = false;
48
48
  this.visual = false;
49
49
  this.text = 'a**b**c';
50
+ this.html = '';
50
51
  }
51
52
  imgselect(cb) {
52
53
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,7 +1,13 @@
1
- <form title="Tuieditor" width="500" height="450" padding="10">
1
+ <form title="Tuieditor" width="600" height="450" padding="10">
2
2
  <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
3
  <label>Length: {{text.length}}</label>
4
- <tuieditor v-model="text" :disabled="disabled" :theme="theme[0]" :visual="visual" @imgselect="imgselect" style="flex: 1; height: 0;" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></tuieditor>
4
+ <layout gutter="10" style="flex: 1;">
5
+ <tuieditor v-model="text" @html="html = $event" :disabled="disabled" :theme="theme[0]" :visual="visual" @imgselect="imgselect" style="flex: 1;" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></tuieditor>
6
+ <layout gutter="10" direction="v" style="flex: 1;">
7
+ <text style="flex: 1;" v-model="text" readonly type="multi"></text>
8
+ <text style="flex: 1;" v-model="html" readonly type="multi"></text>
9
+ </layout>
10
+ </layout>
5
11
  <layout gutter="10">
6
12
  <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
7
13
  <button @click="family = !family" style="flex: 1;">{{family ? '' : '!'}}Family CCM</button>
@@ -27,10 +27,9 @@ const clickgo = __importStar(require("clickgo"));
27
27
  class default_1 extends clickgo.form.AbstractForm {
28
28
  constructor() {
29
29
  super(...arguments);
30
- this.md = '';
31
- this.html = '';
32
- this.text1 = `# abc\n[ ] OK`;
33
- this.text2 = `> 123 \n> 456`;
30
+ this.text = 'a**b**c';
31
+ this.size = ['12px'];
32
+ this.family = false;
34
33
  }
35
34
  }
36
35
  exports.default = default_1;
@@ -0,0 +1,14 @@
1
+ <form title="Tuiviewer" width="600" height="450" padding="10">
2
+ <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
+ <label>Length: {{text.length}}</label>
4
+ <layout gutter="10" style="flex: 1;">
5
+ <tuiviewer v-model="text" style="flex: 1;" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></tuiviewer>
6
+ <text style="flex: 1;" v-model="text" type="multi"></text>
7
+ </layout>
8
+ <layout gutter="10">
9
+ <button @click="family = !family" style="flex: 1;">{{family ? '' : '!'}}Family CCM</button>
10
+ <button @click="text = '1**2**3'" style="flex: 1;">v = '1**2**3'</button>
11
+ <select v-model="size" :data="['12px', '13px', '14px', '15px', '16px']" style="flex: 1;"></select>
12
+ </layout>
13
+ </layout>
14
+ </form>
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ const clickgo = __importStar(require("clickgo"));
39
+ const img_1 = __importDefault(require("../arteditor/img"));
40
+ class default_1 extends clickgo.form.AbstractForm {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.theme = ['light'];
44
+ this.themes = ['light', 'dark'];
45
+ this.disabled = false;
46
+ this.readonly = false;
47
+ this.size = ['12px'];
48
+ this.family = false;
49
+ this.visual = false;
50
+ this.text = '';
51
+ this.html = '<p align="center">123</p>';
52
+ }
53
+ videoselect() {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ yield clickgo.form.dialog('Sorry, video can not be upload.');
56
+ });
57
+ }
58
+ imgselect(cb) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const frm = yield clickgo.form.create(img_1.default);
61
+ const path = yield frm.showDialog();
62
+ if (!path) {
63
+ return;
64
+ }
65
+ cb('https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/' + path);
66
+ });
67
+ }
68
+ }
69
+ exports.default = default_1;
@@ -0,0 +1,22 @@
1
+ <form title="Weditor" width="700" height="450" padding="10">
2
+ <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
+ <label>Length: {{html.length}}</label>
4
+ <layout gutter="10" style="flex: 1; height: 0;">
5
+ <weditor v-model="html" @text="text = $event" :disabled="disabled" :readonly="readonly" :theme="theme[0]" :visual="visual" @imgselect="imgselect" @videoselect="videoselect" style="flex: 2;" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></weditor>
6
+ <layout gutter="10" direction="v" style="flex: 1;">
7
+ <text style="flex: 1;" v-model="text" readonly type="multi"></text>
8
+ <text style="flex: 1;" v-model="html" type="multi"></text>
9
+ </layout>
10
+ </layout>
11
+ <layout gutter="10">
12
+ <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
13
+ <button @click="readonly = !readonly" style="flex: 1;">{{readonly ? '' : '!'}}readonly</button>
14
+ <button @click="html = '1<b>2</b>3'" style="flex: 1;">v = '1&lt;b&gt;2&lt;/b&gt;3'</button>
15
+ </layout>
16
+ <layout gutter="10">
17
+ <button @click="family = !family" style="flex: 1;">{{family ? '' : '!'}}Family CCM</button>
18
+ <select v-model="size" :data="['12px', '13px', '14px', '15px', '16px']" style="flex: 1;"></select>
19
+ <!--<select v-model="theme" :data="themes" style="flex: 1;"></select>-->
20
+ </layout>
21
+ </layout>
22
+ </form>
@@ -52,7 +52,6 @@ const link_1 = __importDefault(require("./control/link/link"));
52
52
  const label_1 = __importDefault(require("./control/label/label"));
53
53
  const layout_1 = __importDefault(require("./control/layout/layout"));
54
54
  const list_1 = __importDefault(require("./control/list/list"));
55
- const markdownit_1 = __importDefault(require("./control/markdownit/markdownit"));
56
55
  const map_1 = __importDefault(require("./control/map/map"));
57
56
  const marquee_1 = __importDefault(require("./control/marquee/marquee"));
58
57
  const menu_1 = __importDefault(require("./control/menu/menu"));
@@ -76,7 +75,9 @@ const video_1 = __importDefault(require("./control/video/video"));
76
75
  const step_1 = __importDefault(require("./control/step/step"));
77
76
  const xterm_1 = __importDefault(require("./control/xterm/xterm"));
78
77
  const echarts_1 = __importDefault(require("./control/echarts/echarts"));
78
+ const weditor_1 = __importDefault(require("./control/weditor/weditor"));
79
79
  const tuieditor_1 = __importDefault(require("./control/tuieditor/tuieditor"));
80
+ const tuiviewer_1 = __importDefault(require("./control/tuiviewer/tuiviewer"));
80
81
  const arteditor_1 = __importDefault(require("./control/arteditor/arteditor"));
81
82
  const form_2 = __importDefault(require("./event/form/form"));
82
83
  const other_1 = __importDefault(require("./event/other/other"));
@@ -225,10 +226,6 @@ class default_1 extends clickgo.form.AbstractForm {
225
226
  });
226
227
  break;
227
228
  }
228
- case 'cmarkdownit': {
229
- frm = yield clickgo.form.create(markdownit_1.default);
230
- break;
231
- }
232
229
  case 'cmap': {
233
230
  frm = yield clickgo.form.create(map_1.default);
234
231
  break;
@@ -297,10 +294,18 @@ class default_1 extends clickgo.form.AbstractForm {
297
294
  frm = yield clickgo.form.create(text_1.default);
298
295
  break;
299
296
  }
297
+ case 'cweditor': {
298
+ frm = yield clickgo.form.create(weditor_1.default);
299
+ break;
300
+ }
300
301
  case 'ctuieditor': {
301
302
  frm = yield clickgo.form.create(tuieditor_1.default);
302
303
  break;
303
304
  }
305
+ case 'ctuiviewer': {
306
+ frm = yield clickgo.form.create(tuiviewer_1.default);
307
+ break;
308
+ }
304
309
  case 'carteditor': {
305
310
  frm = yield clickgo.form.create(arteditor_1.default);
306
311
  break;
@@ -89,11 +89,12 @@
89
89
  <layout gutter="10">
90
90
  <button @click="openForm('cecharts')">Echarts</button>
91
91
  <button @click="openForm('cmap')">Map</button>
92
+ <button @click="openForm('cweditor')">Weditor</button>
92
93
  </layout>
93
94
  <layout gutter="10">
94
95
  <button @click="openForm('carteditor')">Arteditor</button>
95
96
  <button @click="openForm('ctuieditor')">Tuieditor</button>
96
- <button @click="openForm('cmarkdownit')">Markdownit</button>
97
+ <button @click="openForm('ctuiviewer')">Tuiviewer</button>
97
98
  </layout>
98
99
  </layout>
99
100
  </flow>
@@ -1,4 +1,4 @@
1
- <form width="550" height="400" title="Abstract Form">
1
+ <form width="550" height="600" title="Abstract Form">
2
2
  <flow direction="v" style="flex: 1; padding: 10px;">
3
3
  <layout gutter="10" direction="v" style="flex: 1;">
4
4
  <label>filename: {{filename}}</label>
@@ -48,6 +48,7 @@ class default_1 extends clickgo.form.AbstractForm {
48
48
  this.moveTop = 0;
49
49
  this.moveWidth = 25;
50
50
  this.moveHeight = 25;
51
+ this.watchPositionText = false;
51
52
  this.getWatchInfoDisabled = false;
52
53
  this.getWatchInfoText = '{}';
53
54
  }
@@ -94,6 +95,17 @@ class default_1 extends clickgo.form.AbstractForm {
94
95
  clickgo.dom.unwatchSize(this.refs.watchSize.$el);
95
96
  }
96
97
  }
98
+ watchPosition() {
99
+ this.watchPositionText = !this.watchPositionText;
100
+ if (this.watchPositionText) {
101
+ clickgo.dom.watchPosition(this.refs.watchPosition.$el, (state) => {
102
+ console.log('watchPosition', state);
103
+ });
104
+ }
105
+ else {
106
+ clickgo.dom.unwatchPosition(this.refs.watchPosition.$el);
107
+ }
108
+ }
97
109
  wwatch() {
98
110
  this.watchText = !this.watchText;
99
111
  if (this.watchText) {
@@ -9,6 +9,10 @@
9
9
  <button @click="watchSize" ref="watchSize" :style="{'height': (watchSizeHeight ? 30 : 50) + 'px'}" style="padding: 0 5px; flex: 1;">{{watchSizeText ? '' : '!'}}watchSize</button>
10
10
  <button @click="watchSizeHeight = !watchSizeHeight" style="padding: 0 5px; flex: 1;">Change</button>
11
11
  </layout>
12
+ <layout gutter="10" align-v="center">
13
+ <button @click="watchPosition" ref="watchPosition" style="flex: 1;">{{watchPositionText ? '' : '!'}}watchPosition</button>
14
+ <label>watch and scroll</label>
15
+ </layout>
12
16
  <layout gutter="10">
13
17
  <button style="flex: 1;" @click="getWatchSizeCount()">getWatchSizeCount()</button>
14
18
  <button style="flex: 1;" @click="getWatchSizeCount(taskId)">getWatchSizeCount({{taskId}})</button>
@@ -44,7 +44,13 @@
44
44
  </layout>
45
45
  <button @click="showPop">showPop(e.currentTarget, this.refs.pop)</button>
46
46
  <teleport to="system">
47
- <block ref="pop" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px; display: flex; justify-content: center; align-items: center;">refs.pop</block>
47
+ <layout ref="pop" gutter="10" direction="v" align-v="center" align-h="center" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px;">
48
+ <label>refs.pop</label>
49
+ <layout gutter="10">
50
+ <select :data="[1,2,3]"></select>
51
+ <select :data="[4,5,6]"></select>
52
+ </layout>
53
+ </layout>
48
54
  </teleport>
49
55
  <button @click="create">create('test', undefined, { 'path': this.filename })</button>
50
56
  <label>Dialog result: {{dr}}.</label>
package/dist/clickgo.js CHANGED
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
27
- const version = '3.11.33';
27
+ const version = '3.12.0';
28
28
  function getVersion() {
29
29
  return version;
30
30
  }
package/dist/clickgo.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- const version = '3.11.33';
16
+ const version = '3.12.0';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -255,6 +255,11 @@ function read(blob) {
255
255
  }
256
256
  const configContent = yield z.getContent('/' + sub.name + '/config.json');
257
257
  if (!configContent) {
258
+ form.notify({
259
+ 'title': 'Error',
260
+ 'content': `Control file not found.\nFile: "${'/' + sub.name + '/config.json'}".`,
261
+ 'type': 'danger'
262
+ });
258
263
  continue;
259
264
  }
260
265
  const config = JSON.parse(configContent);
@@ -364,6 +364,11 @@ export async function read(blob: Blob): Promise<false | types.TControlPackage> {
364
364
  }
365
365
  const configContent = await z.getContent('/' + sub.name + '/config.json');
366
366
  if (!configContent) {
367
+ form.notify({
368
+ 'title': 'Error',
369
+ 'content': `Control file not found.\nFile: "${'/' + sub.name + '/config.json'}".`,
370
+ 'type': 'danger'
371
+ });
367
372
  continue;
368
373
  }
369
374
  // --- 读取本条控件内容 ---
package/dist/lib/core.js CHANGED
@@ -278,16 +278,17 @@ const modules = {
278
278
  'loading': false,
279
279
  'resolve': []
280
280
  },
281
- 'markdownit': {
281
+ 'weditor': {
282
282
  func: function () {
283
283
  return __awaiter(this, void 0, void 0, function* () {
284
284
  yield loader.loadScripts([
285
- loader.cdn + '/npm/markdown-it@14.1.0/dist/markdown-it.min.js'
285
+ loader.cdn + '/npm/@wangeditor/editor@5.1.23/dist/index.min.js'
286
286
  ]);
287
- if (!window.markdownit) {
288
- throw Error('Markdownit load failed.');
289
- }
290
- return window.markdownit;
287
+ yield loader.loadLinks([
288
+ loader.cdn + '/npm/@wangeditor/editor@5.1.23/dist/css/style.min.css'
289
+ ]);
290
+ loader.loadStyle('.w-e-modal,.w-e-hover-bar,.w-e-drop-panel,.w-e-select-list,.w-e-bar-item-menus-container{z-index:2 !important;}');
291
+ return window.wangEditor;
291
292
  });
292
293
  },
293
294
  'obj': null,
package/dist/lib/core.ts CHANGED
@@ -345,15 +345,16 @@ const modules: Record<string, {
345
345
  'loading': false,
346
346
  'resolve': []
347
347
  },
348
- 'markdownit': {
348
+ 'weditor': {
349
349
  func: async function() {
350
350
  await loader.loadScripts([
351
- loader.cdn + '/npm/markdown-it@14.1.0/dist/markdown-it.min.js'
351
+ loader.cdn + '/npm/@wangeditor/editor@5.1.23/dist/index.min.js'
352
352
  ]);
353
- if (!(window as any).markdownit) {
354
- throw Error('Markdownit load failed.');
355
- }
356
- return (window as any).markdownit;
353
+ await loader.loadLinks([
354
+ loader.cdn + '/npm/@wangeditor/editor@5.1.23/dist/css/style.min.css'
355
+ ]);
356
+ loader.loadStyle('.w-e-modal,.w-e-hover-bar,.w-e-drop-panel,.w-e-select-list,.w-e-bar-item-menus-container{z-index:2 !important;}');
357
+ return (window as any).wangEditor;
357
358
  },
358
359
  'obj': null,
359
360
  'loading': false,