clickgo 3.11.0 → 3.11.2

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
@@ -28,7 +28,7 @@ Load the module loader first, and then load it using the module loader.
28
28
  **index.html**
29
29
 
30
30
  ```html
31
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.0'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.2'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -38,6 +38,7 @@ class default_1 extends clickgo.form.AbstractPanel {
38
38
  super(...arguments);
39
39
  this.scount = 0;
40
40
  this.data = {};
41
+ this.rootMountData = 'none';
41
42
  }
42
43
  onShow(d) {
43
44
  return __awaiter(this, void 0, void 0, function* () {
@@ -68,5 +69,8 @@ class default_1 extends clickgo.form.AbstractPanel {
68
69
  yield clickgo.form.dialog('Hello panel!');
69
70
  });
70
71
  }
72
+ onMounted() {
73
+ this.rootMountData = this.rootForm.mountData;
74
+ }
71
75
  }
72
76
  exports.default = default_1;
@@ -4,6 +4,7 @@
4
4
  <label>Data: {{data}}</label>
5
5
  <label>Parent data: {{rootForm.parentData}}</label>
6
6
  <label>Qs: {{qs}}</label>
7
+ <label>rootMountData: {{rootMountData}}</label>
7
8
  <button @click="click" style="height: 30px;">Hi</button>
8
9
  <layout>
9
10
  <button style="padding: 15px 30px;" area="split">
@@ -99,6 +99,7 @@ class default_1 extends clickgo.form.AbstractForm {
99
99
  }
100
100
  openForm(name, data) {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
+ this.loading = true;
102
103
  let frm;
103
104
  switch (name) {
104
105
  case 'cblock': {
@@ -343,6 +344,7 @@ class default_1 extends clickgo.form.AbstractForm {
343
344
  frm = yield clickgo.form.create(backpanel_1.default, data);
344
345
  }
345
346
  }
347
+ this.loading = false;
346
348
  frm.show();
347
349
  });
348
350
  }
@@ -116,7 +116,7 @@
116
116
  <flow v-else class="inner" direction="v">
117
117
  <layout gutter="10" direction="v">
118
118
  <button @click="openForm('sbackpanel')">Backend panel</button>
119
- <button @click="openForm('sbackpanel', {'hash': 'test2?p=6'})">Backend panel with hash</button>
119
+ <button @click="openForm('sbackpanel', {'hash': 'test1?a=1&b=2'})">Backend panel with hash</button>
120
120
  </layout>
121
121
  </flow>
122
122
  </tab>
@@ -71,6 +71,29 @@ class default_1 extends clickgo.form.AbstractForm {
71
71
  this.loading = false;
72
72
  });
73
73
  }
74
+ toEnterStep() {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const rtn = yield this.enterStep([
77
+ {
78
+ 'value': 'step1',
79
+ 'label': 'step1'
80
+ },
81
+ {
82
+ 'value': 'step2'
83
+ },
84
+ {
85
+ 'icon': '/package/res/marker.svg',
86
+ 'value': 'icon'
87
+ },
88
+ {
89
+ 'label': 'successful',
90
+ 'value': 'step3',
91
+ 'desc': 'qq'
92
+ }
93
+ ]);
94
+ yield clickgo.form.dialog('Result: ' + (rtn ? 'true' : 'false'));
95
+ });
96
+ }
74
97
  onMounted() {
75
98
  this.watch('test', () => __awaiter(this, void 0, void 0, function* () {
76
99
  yield clickgo.form.dialog('test changed.');
@@ -1,4 +1,4 @@
1
- <form width="350" height="400" title="Abstract Form">
1
+ <form width="550" height="400" 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>
@@ -42,6 +42,15 @@
42
42
  <label>result: {{dr}}</label>
43
43
  </layout>
44
44
  <button @click="close">close()</button>
45
+ <label>enterStep: [ {{formHash}} ]</label>
46
+ <button @click="toEnterStep">enterStep</button>
47
+ <layout gutter="10">
48
+ <button @click="formHash = 'step1'" style="flex: 1;">fh = 'step1'</button>
49
+ <button @click="formHash = 'step2'" style="flex: 1;">step2</button>
50
+ <button @click="formHash = 'step3'" style="flex: 1;">step3</button>
51
+ <button @click="formHash = 'step4'" style="flex: 1;">step4</button>
52
+ <button @click="doneStep()" style="flex: 1;">done</button>
53
+ </layout>
45
54
  </layout>
46
55
  </flow>
47
56
  </form>
@@ -15,8 +15,8 @@
15
15
  </layout>
16
16
  <layout gutter="10">
17
17
  <layout ref="watch" align-v="center" align-h="center" style="flex: 1; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{watchInner ? 'inner' : 'Inner'}}</layout>
18
- <button @click="wwatch" style="padding: 0 5px;">{{watchText ? '' : '!'}}watch</button>
19
- <button @click="watchInner = !watchInner" style="padding: 0 5px;">Change</button>
18
+ <button @click="wwatch">{{watchText ? '' : '!'}}watch</button>
19
+ <button @click="watchInner = !watchInner">Change</button>
20
20
  </layout>
21
21
  <layout gutter="10">
22
22
  <button style="flex: 1;" @click="getWatchCount()">getWatchCount()</button>
@@ -26,7 +26,7 @@
26
26
  <button @click="isWatchStyle" >isWatchStyle(this.refs.watchStyle.$el)</button>
27
27
  <!-- getWatchInfo -->
28
28
  <text :model-value="getWatchInfoText" readonly multi style="height: 300px;"></text>
29
- <button @click="getWatchInfo" :disabled="getWatchInfoDisabled" style="padding: 0 10px;">getWatchInfo 20s</button>
29
+ <button @click="getWatchInfo" :disabled="getWatchInfoDisabled">getWatchInfo 20s</button>
30
30
  <block @mousedown="bindGesture" @touchstart="bindGesture" style="height: 50px; display: flex; justify-content: center; align-items: center; font-size: 14px; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{bindGestureText ? bindGestureText : 'bindGesture(e: Touch | Mouse, { ... })'}}</block>
31
31
  <block @wheel="bindGestureWheel" style="height: 50px; display: flex; justify-content: center; align-items: center; font-size: 14px; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{bindGestureWheelText ? bindGestureWheelText : 'bindGesture(e: Wheel, { ... })'}}</block>
32
32
  <button @click="bindLong" ref="bindLong" @mousedown="bindLongDown" @touchstart="bindLongDown" >{{bindLongText ? 'Yeah!' : 'bindLong(e, () => { ... })'}}</button>
@@ -71,7 +71,7 @@ class default_1 extends clickgo.form.AbstractForm {
71
71
  }
72
72
  hashBack() {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
- yield clickgo.form.dialog(JSON.stringify(clickgo.form.hashBack(parseInt(this.fid))));
74
+ yield clickgo.form.dialog(JSON.stringify(yield clickgo.form.hashBack(parseInt(this.fid))));
75
75
  });
76
76
  }
77
77
  tohash() {
@@ -42,6 +42,7 @@ class default_1 extends clickgo.form.AbstractForm {
42
42
  super(...arguments);
43
43
  this.fh = '';
44
44
  this.name = '';
45
+ this.mountData = 'none';
45
46
  this.map = {
46
47
  'test1': test1_1.default,
47
48
  'test2': '../../control/panel/test2'
@@ -60,10 +61,14 @@ class default_1 extends clickgo.form.AbstractForm {
60
61
  });
61
62
  }
62
63
  onMounted(data) {
63
- if (!data.hash) {
64
- return;
65
- }
66
- this.formHash = data.hash;
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ if (!data.hash) {
66
+ return;
67
+ }
68
+ this.formHash = data.hash;
69
+ yield clickgo.tool.sleep(500);
70
+ this.mountData = 'ok';
71
+ });
67
72
  }
68
73
  }
69
74
  exports.default = default_1;
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" stroke="none">
3
- <path opacity="0.4" d="M2 12.8799V11.1199C2 10.0799 2.85 9.21994 3.9 9.21994C5.71 9.21994 6.45 7.93994 5.54 6.36994C5.02 5.46994 5.33 4.29994 6.24 3.77994L7.97 2.78994C8.76 2.31994 9.78 2.59994 10.25 3.38994L10.36 3.57994C11.26 5.14994 12.74 5.14994 13.65 3.57994L13.76 3.38994C14.23 2.59994 15.25 2.31994 16.04 2.78994L17.77 3.77994C18.68 4.29994 18.99 5.46994 18.47 6.36994C17.56 7.93994 18.3 9.21994 20.11 9.21994C21.15 9.21994 22.01 10.0699 22.01 11.1199V12.8799C22.01 13.9199 21.16 14.7799 20.11 14.7799C18.3 14.7799 17.56 16.0599 18.47 17.6299C18.99 18.5399 18.68 19.6999 17.77 20.2199L16.04 21.2099C15.25 21.6799 14.23 21.3999 13.76 20.6099L13.65 20.4199C12.75 18.8499 11.27 18.8499 10.36 20.4199L10.25 20.6099C9.78 21.3999 8.76 21.6799 7.97 21.2099L6.24 20.2199C5.33 19.6999 5.02 18.5299 5.54 17.6299C6.45 16.0599 5.71 14.7799 3.9 14.7799C2.85 14.7799 2 13.9199 2 12.8799Z" fill="#292D32"/>
4
- <path d="M12 15.25C13.7949 15.25 15.25 13.7949 15.25 12C15.25 10.2051 13.7949 8.75 12 8.75C10.2051 8.75 8.75 10.2051 8.75 12C8.75 13.7949 10.2051 15.25 12 15.25Z" fill="#292D32"/>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" stroke="none">
3
+ <path opacity="0.4" d="M2 12.8799V11.1199C2 10.0799 2.85 9.21994 3.9 9.21994C5.71 9.21994 6.45 7.93994 5.54 6.36994C5.02 5.46994 5.33 4.29994 6.24 3.77994L7.97 2.78994C8.76 2.31994 9.78 2.59994 10.25 3.38994L10.36 3.57994C11.26 5.14994 12.74 5.14994 13.65 3.57994L13.76 3.38994C14.23 2.59994 15.25 2.31994 16.04 2.78994L17.77 3.77994C18.68 4.29994 18.99 5.46994 18.47 6.36994C17.56 7.93994 18.3 9.21994 20.11 9.21994C21.15 9.21994 22.01 10.0699 22.01 11.1199V12.8799C22.01 13.9199 21.16 14.7799 20.11 14.7799C18.3 14.7799 17.56 16.0599 18.47 17.6299C18.99 18.5399 18.68 19.6999 17.77 20.2199L16.04 21.2099C15.25 21.6799 14.23 21.3999 13.76 20.6099L13.65 20.4199C12.75 18.8499 11.27 18.8499 10.36 20.4199L10.25 20.6099C9.78 21.3999 8.76 21.6799 7.97 21.2099L6.24 20.2199C5.33 19.6999 5.02 18.5299 5.54 17.6299C6.45 16.0599 5.71 14.7799 3.9 14.7799C2.85 14.7799 2 13.9199 2 12.8799Z" fill="#292D32"/>
4
+ <path d="M12 15.25C13.7949 15.25 15.25 13.7949 15.25 12C15.25 10.2051 13.7949 8.75 12 8.75C10.2051 8.75 8.75 10.2051 8.75 12C8.75 13.7949 10.2051 15.25 12 15.25Z" fill="#292D32"/>
5
5
  </svg>
@@ -1,32 +1,32 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
- <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
- viewBox="0 0 297 297" xml:space="preserve" stroke="none">
5
- <g>
6
- <g>
7
- <g>
8
- <circle style="fill:#345065;" cx="148.5" cy="148.5" r="148.5"/>
9
- </g>
10
- </g>
11
- <path style="fill:#2C3E50;" d="M216.895,109.734l-174.216,84.12l103.112,103.112c0.902,0.016,1.804,0.034,2.709,0.034
12
- c69.329,0,127.557-47.51,143.913-111.748L216.895,109.734z"/>
13
- <g>
14
- <path style="fill:#CDD1D3;" d="M49,182c0-54.952,44.548-99.5,99.5-99.5S248,127.048,248,182H49z"/>
15
- </g>
16
- <g>
17
- <path style="fill:#A3A7A8;" d="M148.5,82.5V182H248C248,127.048,203.452,82.5,148.5,82.5z"/>
18
- </g>
19
- <g>
20
- <path style="fill:#99ABD5;" d="M54.5,198.5h188c9.941,0,18-8.059,18-18l0,0h-224l0,0C36.5,190.441,44.559,198.5,54.5,198.5z"/>
21
- </g>
22
- <g>
23
- <circle style="fill:#99ABD5;" cx="148.5" cy="74.5" r="8.5"/>
24
- </g>
25
- <g>
26
- <path style="fill:#8092B7;" d="M148.5,180.5v18h94c9.941,0,18-8.059,18-18H148.5z"/>
27
- </g>
28
- <g>
29
- <path style="fill:#8092B7;" d="M157,74.5c0-4.694-3.806-8.5-8.5-8.5v17C153.194,83,157,79.194,157,74.5z"/>
30
- </g>
31
- </g>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
+ <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ viewBox="0 0 297 297" xml:space="preserve" stroke="none">
5
+ <g>
6
+ <g>
7
+ <g>
8
+ <circle style="fill:#345065;" cx="148.5" cy="148.5" r="148.5"/>
9
+ </g>
10
+ </g>
11
+ <path style="fill:#2C3E50;" d="M216.895,109.734l-174.216,84.12l103.112,103.112c0.902,0.016,1.804,0.034,2.709,0.034
12
+ c69.329,0,127.557-47.51,143.913-111.748L216.895,109.734z"/>
13
+ <g>
14
+ <path style="fill:#CDD1D3;" d="M49,182c0-54.952,44.548-99.5,99.5-99.5S248,127.048,248,182H49z"/>
15
+ </g>
16
+ <g>
17
+ <path style="fill:#A3A7A8;" d="M148.5,82.5V182H248C248,127.048,203.452,82.5,148.5,82.5z"/>
18
+ </g>
19
+ <g>
20
+ <path style="fill:#99ABD5;" d="M54.5,198.5h188c9.941,0,18-8.059,18-18l0,0h-224l0,0C36.5,190.441,44.559,198.5,54.5,198.5z"/>
21
+ </g>
22
+ <g>
23
+ <circle style="fill:#99ABD5;" cx="148.5" cy="74.5" r="8.5"/>
24
+ </g>
25
+ <g>
26
+ <path style="fill:#8092B7;" d="M148.5,180.5v18h94c9.941,0,18-8.059,18-18H148.5z"/>
27
+ </g>
28
+ <g>
29
+ <path style="fill:#8092B7;" d="M157,74.5c0-4.694-3.806-8.5-8.5-8.5v17C153.194,83,157,79.194,157,74.5z"/>
30
+ </g>
31
+ </g>
32
32
  </svg>
@@ -1,38 +1,38 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
- <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
- viewBox="0 0 297 297" xml:space="preserve" stroke="none">
5
- <g>
6
- <g>
7
- <g>
8
- <circle style="fill:#0EA6CB;" cx="148.5" cy="148.5" r="148.5"/>
9
- </g>
10
- </g>
11
- <path style="fill:#3A6F81;" d="M296.89,143.057L231,77.167L93.736,251.474l45.212,45.212c3.159,0.201,6.342,0.314,9.552,0.314
12
- c82.014,0,148.5-66.486,148.5-148.5C297,146.677,296.956,144.864,296.89,143.057z"/>
13
- <g>
14
- <path style="fill:#ECF0F1;" d="M105.916,256.5h86.39c8.693,0,16.039-6.446,17.168-15.065L231,77.167H66L88.765,241.56
15
- C89.951,250.123,97.271,256.5,105.916,256.5z"/>
16
- </g>
17
- <g>
18
- <path style="fill:#D2D7D8;" d="M149.667,77.167V256.5h42.639c8.693,0,16.039-6.446,17.168-15.065L231,77.167H149.667z"/>
19
- </g>
20
- <g>
21
- <path style="fill:#CBE3E3;" d="M86.575,146l11.602,83.785c0.999,7.214,7.166,12.586,14.449,12.586h72.777
22
- c7.323,0,13.511-5.43,14.463-12.691L210.832,146H86.575z"/>
23
- </g>
24
- <g>
25
- <path style="fill:#B4CCCB;" d="M149.667,146v96.371h35.736c7.323,0,13.511-5.43,14.463-12.691L210.832,146H149.667z"/>
26
- </g>
27
- <g>
28
- <path style="fill:#99ABD5;" d="M183.952,162.27l-19.299,4.571c-3.538,0.838-7.086-1.351-7.924-4.889l-4.571-19.299
29
- c-0.838-3.538,1.351-7.086,4.889-7.924l19.299-4.571c3.538-0.838,7.086,1.351,7.924,4.889l4.571,19.299
30
- C189.679,157.885,187.49,161.432,183.952,162.27z"/>
31
- </g>
32
- <g>
33
- <path style="fill:#99ABD5;" d="M116.556,171.636l-14.412-13.626c-2.642-2.498-2.759-6.665-0.261-9.307l13.626-14.412
34
- c2.498-2.642,6.665-2.759,9.307-0.261l14.412,13.626c2.642,2.498,2.759,6.665,0.261,9.307l-13.626,14.412
35
- C123.365,174.017,119.198,174.134,116.556,171.636z"/>
36
- </g>
37
- </g>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
+ <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ viewBox="0 0 297 297" xml:space="preserve" stroke="none">
5
+ <g>
6
+ <g>
7
+ <g>
8
+ <circle style="fill:#0EA6CB;" cx="148.5" cy="148.5" r="148.5"/>
9
+ </g>
10
+ </g>
11
+ <path style="fill:#3A6F81;" d="M296.89,143.057L231,77.167L93.736,251.474l45.212,45.212c3.159,0.201,6.342,0.314,9.552,0.314
12
+ c82.014,0,148.5-66.486,148.5-148.5C297,146.677,296.956,144.864,296.89,143.057z"/>
13
+ <g>
14
+ <path style="fill:#ECF0F1;" d="M105.916,256.5h86.39c8.693,0,16.039-6.446,17.168-15.065L231,77.167H66L88.765,241.56
15
+ C89.951,250.123,97.271,256.5,105.916,256.5z"/>
16
+ </g>
17
+ <g>
18
+ <path style="fill:#D2D7D8;" d="M149.667,77.167V256.5h42.639c8.693,0,16.039-6.446,17.168-15.065L231,77.167H149.667z"/>
19
+ </g>
20
+ <g>
21
+ <path style="fill:#CBE3E3;" d="M86.575,146l11.602,83.785c0.999,7.214,7.166,12.586,14.449,12.586h72.777
22
+ c7.323,0,13.511-5.43,14.463-12.691L210.832,146H86.575z"/>
23
+ </g>
24
+ <g>
25
+ <path style="fill:#B4CCCB;" d="M149.667,146v96.371h35.736c7.323,0,13.511-5.43,14.463-12.691L210.832,146H149.667z"/>
26
+ </g>
27
+ <g>
28
+ <path style="fill:#99ABD5;" d="M183.952,162.27l-19.299,4.571c-3.538,0.838-7.086-1.351-7.924-4.889l-4.571-19.299
29
+ c-0.838-3.538,1.351-7.086,4.889-7.924l19.299-4.571c3.538-0.838,7.086,1.351,7.924,4.889l4.571,19.299
30
+ C189.679,157.885,187.49,161.432,183.952,162.27z"/>
31
+ </g>
32
+ <g>
33
+ <path style="fill:#99ABD5;" d="M116.556,171.636l-14.412-13.626c-2.642-2.498-2.759-6.665-0.261-9.307l13.626-14.412
34
+ c2.498-2.642,6.665-2.759,9.307-0.261l14.412,13.626c2.642,2.498,2.759,6.665,0.261,9.307l-13.626,14.412
35
+ C123.365,174.017,119.198,174.134,116.556,171.636z"/>
36
+ </g>
37
+ </g>
38
38
  </svg>
@@ -1,25 +1,25 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
- <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
- viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
- <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
- <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
- <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
- <path style="fill:#F15642;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
- V416z"/>
10
- <g>
11
- <path style="fill:#FFFFFF;" d="M98.128,314.672c2.944-24.832,40.416-29.296,58.064-15.728c8.704,7.024-0.496,18.16-8.192,12.528
12
- c-9.456-6-30.96-8.816-33.648,4.464c-3.456,20.992,52.208,8.976,51.296,43.008c-0.896,32.496-47.968,33.248-65.632,18.672
13
- c-4.224-3.456-4.096-9.072-1.776-12.544c3.312-3.312,7.024-4.464,11.376-0.88c10.496,7.152,37.488,12.528,39.408-5.648
14
- C147.376,339.632,94.16,351.008,98.128,314.672z"/>
15
- <path style="fill:#FFFFFF;" d="M265.488,369.424l2.048,2.416c8.432,7.68-2.56,20.224-11.136,12.16l-4.336-3.44
16
- c-6.656,4.592-14.448,6.784-24.816,6.784c-22.512,0-48.24-15.504-48.24-46.976s25.584-47.456,48.24-47.456
17
- c23.776,0,47.072,15.984,47.072,47.456C274.32,352.528,271.232,361.504,265.488,369.424z M257.792,340.368
18
- c0-20.336-15.984-30.688-30.56-30.688c-15.728,0-31.216,10.336-31.216,30.688c0,15.504,13.168,30.208,31.216,30.208
19
- c4.592,0,9.072-1.152,13.552-2.304l-14.576-13.44c-6.784-8.192,3.968-19.84,12.528-12.288l14.464,14.448
20
- C256.384,352.528,257.792,347.024,257.792,340.368z"/>
21
- <path style="fill:#FFFFFF;" d="M293.168,303.152c0-4.224,3.584-7.808,8.064-7.808c4.096,0,7.552,3.6,7.552,7.808v64.096h34.8
22
- c12.528,0,12.8,16.752,0,16.752h-42.336c-4.48,0-8.064-3.184-8.064-7.792v-73.056H293.168z"/>
23
- </g>
24
- <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
+ <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
+ <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
+ <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
+ <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
+ <path style="fill:#F15642;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
+ V416z"/>
10
+ <g>
11
+ <path style="fill:#FFFFFF;" d="M98.128,314.672c2.944-24.832,40.416-29.296,58.064-15.728c8.704,7.024-0.496,18.16-8.192,12.528
12
+ c-9.456-6-30.96-8.816-33.648,4.464c-3.456,20.992,52.208,8.976,51.296,43.008c-0.896,32.496-47.968,33.248-65.632,18.672
13
+ c-4.224-3.456-4.096-9.072-1.776-12.544c3.312-3.312,7.024-4.464,11.376-0.88c10.496,7.152,37.488,12.528,39.408-5.648
14
+ C147.376,339.632,94.16,351.008,98.128,314.672z"/>
15
+ <path style="fill:#FFFFFF;" d="M265.488,369.424l2.048,2.416c8.432,7.68-2.56,20.224-11.136,12.16l-4.336-3.44
16
+ c-6.656,4.592-14.448,6.784-24.816,6.784c-22.512,0-48.24-15.504-48.24-46.976s25.584-47.456,48.24-47.456
17
+ c23.776,0,47.072,15.984,47.072,47.456C274.32,352.528,271.232,361.504,265.488,369.424z M257.792,340.368
18
+ c0-20.336-15.984-30.688-30.56-30.688c-15.728,0-31.216,10.336-31.216,30.688c0,15.504,13.168,30.208,31.216,30.208
19
+ c4.592,0,9.072-1.152,13.552-2.304l-14.576-13.44c-6.784-8.192,3.968-19.84,12.528-12.288l14.464,14.448
20
+ C256.384,352.528,257.792,347.024,257.792,340.368z"/>
21
+ <path style="fill:#FFFFFF;" d="M293.168,303.152c0-4.224,3.584-7.808,8.064-7.808c4.096,0,7.552,3.6,7.552,7.808v64.096h34.8
22
+ c12.528,0,12.8,16.752,0,16.752h-42.336c-4.48,0-8.064-3.184-8.064-7.792v-73.056H293.168z"/>
23
+ </g>
24
+ <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
25
25
  </svg>
@@ -1,21 +1,21 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
- <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
- viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
- <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
- <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
- <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
- <path style="fill:#576D7E;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
- V416z"/>
10
- <g>
11
- <path style="fill:#FFFFFF;" d="M132.784,311.472H110.4c-11.136,0-11.136-16.368,0-16.368h60.512c11.392,0,11.392,16.368,0,16.368
12
- h-21.248v64.592c0,11.12-16.896,11.392-16.896,0v-64.592H132.784z"/>
13
- <path style="fill:#FFFFFF;" d="M224.416,326.176l22.272-27.888c6.656-8.688,19.568,2.432,12.288,10.752
14
- c-7.68,9.088-15.728,18.944-23.424,29.024l26.112,32.496c7.024,9.6-7.04,18.816-13.952,9.344l-23.536-30.192l-23.152,30.832
15
- c-6.528,9.328-20.992-1.152-13.68-9.856l25.696-32.624c-8.048-10.096-15.856-19.936-23.664-29.024
16
- c-8.064-9.6,6.912-19.44,12.784-10.48L224.416,326.176z"/>
17
- <path style="fill:#FFFFFF;" d="M298.288,311.472H275.92c-11.136,0-11.136-16.368,0-16.368h60.496c11.392,0,11.392,16.368,0,16.368
18
- h-21.232v64.592c0,11.12-16.896,11.392-16.896,0V311.472z"/>
19
- </g>
20
- <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
+ <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
+ <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
+ <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
+ <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
+ <path style="fill:#576D7E;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
+ V416z"/>
10
+ <g>
11
+ <path style="fill:#FFFFFF;" d="M132.784,311.472H110.4c-11.136,0-11.136-16.368,0-16.368h60.512c11.392,0,11.392,16.368,0,16.368
12
+ h-21.248v64.592c0,11.12-16.896,11.392-16.896,0v-64.592H132.784z"/>
13
+ <path style="fill:#FFFFFF;" d="M224.416,326.176l22.272-27.888c6.656-8.688,19.568,2.432,12.288,10.752
14
+ c-7.68,9.088-15.728,18.944-23.424,29.024l26.112,32.496c7.024,9.6-7.04,18.816-13.952,9.344l-23.536-30.192l-23.152,30.832
15
+ c-6.528,9.328-20.992-1.152-13.68-9.856l25.696-32.624c-8.048-10.096-15.856-19.936-23.664-29.024
16
+ c-8.064-9.6,6.912-19.44,12.784-10.48L224.416,326.176z"/>
17
+ <path style="fill:#FFFFFF;" d="M298.288,311.472H275.92c-11.136,0-11.136-16.368,0-16.368h60.496c11.392,0,11.392,16.368,0,16.368
18
+ h-21.232v64.592c0,11.12-16.896,11.392-16.896,0V311.472z"/>
19
+ </g>
20
+ <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
21
21
  </svg>
@@ -1,21 +1,21 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
- <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
- viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
- <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
- <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
- <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
- <path style="fill:#84BD5A;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
- V416z"/>
10
- <g>
11
- <path style="fill:#FFFFFF;" d="M132.64,384c-8.064,0-11.264-7.792-6.656-13.296l45.552-60.512h-37.76
12
- c-11.12,0-10.224-15.712,0-15.712h51.568c9.712,0,12.528,9.184,5.632,16.624l-43.632,56.656h41.584
13
- c10.24,0,11.52,16.256-1.008,16.256h-55.28V384z"/>
14
- <path style="fill:#FFFFFF;" d="M212.048,303.152c0-10.496,16.896-10.88,16.896,0v73.04c0,10.608-16.896,10.88-16.896,0V303.152z"/>
15
- <path style="fill:#FFFFFF;" d="M251.616,303.152c0-4.224,3.328-8.832,8.704-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
16
- c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.584,8.816-8.192,8.816c-4.224,0-8.704-3.184-8.704-8.816
17
- L251.616,303.152L251.616,303.152z M268.496,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504
18
- c0-8.944-6.784-16.368-15.36-16.368H268.496z"/>
19
- </g>
20
- <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3
+ <svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ viewBox="0 0 512 512" xml:space="preserve" stroke="none">
5
+ <path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
6
+ <path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
7
+ <polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
8
+ <path style="fill:#84BD5A;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
9
+ V416z"/>
10
+ <g>
11
+ <path style="fill:#FFFFFF;" d="M132.64,384c-8.064,0-11.264-7.792-6.656-13.296l45.552-60.512h-37.76
12
+ c-11.12,0-10.224-15.712,0-15.712h51.568c9.712,0,12.528,9.184,5.632,16.624l-43.632,56.656h41.584
13
+ c10.24,0,11.52,16.256-1.008,16.256h-55.28V384z"/>
14
+ <path style="fill:#FFFFFF;" d="M212.048,303.152c0-10.496,16.896-10.88,16.896,0v73.04c0,10.608-16.896,10.88-16.896,0V303.152z"/>
15
+ <path style="fill:#FFFFFF;" d="M251.616,303.152c0-4.224,3.328-8.832,8.704-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
16
+ c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.584,8.816-8.192,8.816c-4.224,0-8.704-3.184-8.704-8.816
17
+ L251.616,303.152L251.616,303.152z M268.496,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504
18
+ c0-8.944-6.784-16.368-15.36-16.368H268.496z"/>
19
+ </g>
20
+ <path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
21
21
  </svg>
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.0';
27
+ const version = '3.11.2';
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.0';
16
+ const version = '3.11.2';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
package/dist/lib/form.js CHANGED
@@ -55,84 +55,96 @@ const info = {
55
55
  'yes': 'Yes',
56
56
  'no': 'No',
57
57
  'cancel': 'Cancel',
58
- 'search': 'Search'
58
+ 'search': 'Search',
59
+ 'confirmExitStep': 'This operation will exit the current process. Are you sure you want to exit?'
59
60
  },
60
61
  'sc': {
61
62
  'ok': '好',
62
63
  'yes': '是',
63
64
  'no': '否',
64
65
  'cancel': '取消',
65
- 'search': '搜索'
66
+ 'search': '搜索',
67
+ 'confirmExitStep': '此操作将退出当前流程,确定退出吗?'
66
68
  },
67
69
  'tc': {
68
70
  'ok': '好',
69
71
  'yes': '是',
70
72
  'no': '否',
71
73
  'cancel': '取消',
72
- 'search': '檢索'
74
+ 'search': '檢索',
75
+ 'confirmExitStep': '此操作將結束目前的流程,確定退出嗎?'
73
76
  },
74
77
  'ja': {
75
78
  'ok': '好',
76
79
  'yes': 'はい',
77
80
  'no': 'いいえ',
78
81
  'cancel': 'キャンセル',
79
- 'search': '検索'
82
+ 'search': '検索',
83
+ 'confirmExitStep': 'この操作は現在のプロセスを終了します。本当に終了しますか?'
80
84
  },
81
85
  'ko': {
82
86
  'ok': '확인',
83
87
  'yes': '예',
84
88
  'no': '아니오',
85
89
  'cancel': '취소',
86
- 'search': '검색'
90
+ 'search': '검색',
91
+ 'confirmExitStep': '이 작업은 현재 프로세스를 종료합니다. 종료하시겠습니까?'
87
92
  },
88
93
  'th': {
89
94
  'ok': 'ตกลง',
90
95
  'yes': 'ใช่',
91
96
  'no': 'ไม่',
92
97
  'cancel': 'ยกเลิก',
93
- 'search': 'ค้นหา'
98
+ 'search': 'ค้นหา',
99
+ 'confirmExitStep': 'การดำเนินการนี้จะออกจากกระบวนการปัจจุบัน ยืนยันที่จะออกไหม?'
94
100
  },
95
101
  'es': {
96
102
  'ok': 'Aceptar',
97
103
  'yes': 'Sí',
98
104
  'no': 'No',
99
105
  'cancel': 'Cancelar',
100
- 'search': 'Buscar'
106
+ 'search': 'Buscar',
107
+ 'confirmExitStep': 'Esta operación cerrará el proceso actual. ¿Estás seguro de que quieres salir?'
101
108
  },
102
109
  'de': {
103
110
  'ok': 'OK',
104
111
  'yes': 'Ja',
105
112
  'no': 'Nein',
106
113
  'cancel': 'Abbrechen',
107
- 'search': 'Suchen'
114
+ 'search': 'Suchen',
115
+ 'confirmExitStep': 'Diese Aktion beendet den aktuellen Prozess. Möchten Sie wirklich beenden?'
108
116
  },
109
117
  'fr': {
110
118
  'ok': 'OK',
111
119
  'yes': 'Oui',
112
120
  'no': 'Non',
113
121
  'cancel': 'Annuler',
114
- 'search': 'Rechercher'
122
+ 'search': 'Rechercher',
123
+ 'confirmExitStep': 'Cette opération va quitter le processus en cours. Êtes-vous sûr de vouloir quitter ?'
115
124
  },
116
125
  'pt': {
117
126
  'ok': 'OK',
118
127
  'yes': 'Sim',
119
128
  'no': 'Não',
120
129
  'cancel': 'Cancelar',
121
- 'search': 'Buscar'
130
+ 'search': 'Buscar',
131
+ 'confirmExitStep': 'Esta operação encerrará o processo atual. Você tem certeza de que deseja sair?'
122
132
  },
123
133
  'ru': {
124
134
  'ok': 'OK',
125
135
  'yes': 'Да',
126
136
  'no': 'Нет',
127
137
  'cancel': 'Отмена',
128
- 'search': 'Поиск'
138
+ 'search': 'Поиск',
139
+ 'confirmExitStep': 'Эта операция завершит текущий процесс. Вы уверены, что хотите выйти?'
129
140
  },
130
141
  'vi': {
131
142
  'ok': 'OK',
132
143
  'yes': 'Có',
133
144
  'no': 'Không',
134
145
  'cancel': 'Hủy bỏ',
135
- 'search': 'Tìm kiếm'
146
+ 'search': 'Tìm kiếm',
147
+ 'confirmExitStep': 'Thao tác này sẽ thoát khỏi quy trình hiện tại. Bạn có chắc chắn muốn thoát không?'
136
148
  }
137
149
  }
138
150
  };
@@ -257,6 +269,16 @@ class AbstractPanel extends AbstractCommon {
257
269
  get rootPanel() {
258
270
  return {};
259
271
  }
272
+ enterStep(list) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ return this.rootForm.enterStep(list);
275
+ });
276
+ }
277
+ doneStep() {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ yield this.rootForm.doneStep();
280
+ });
281
+ }
260
282
  get formFocus() {
261
283
  var _a;
262
284
  return (_a = this.rootForm.formFocus) !== null && _a !== void 0 ? _a : false;
@@ -282,8 +304,10 @@ class AbstractForm extends AbstractCommon {
282
304
  constructor() {
283
305
  super(...arguments);
284
306
  this.isNativeSync = false;
307
+ this.isReady = false;
285
308
  this.loading = false;
286
309
  this._inStep = false;
310
+ this._stepValues = [];
287
311
  this._firstShow = true;
288
312
  this.dialogResult = '';
289
313
  }
@@ -315,33 +339,82 @@ class AbstractForm extends AbstractCommon {
315
339
  }
316
340
  set showInSystemTask(v) {
317
341
  }
342
+ ready(cb) {
343
+ cb();
344
+ }
318
345
  formHashBack() {
319
- const v = this;
320
- if (!v.$data._historyHash.length) {
321
- if (v.$data._formHash) {
322
- v.$data._formHash = '';
323
- core.trigger('formHashChange', this.taskId, this.formId, '');
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ const v = this;
348
+ if (!v.$data._historyHash.length) {
349
+ if (v.$data._formHash) {
350
+ if (this.inStep) {
351
+ if (!(yield clickgo.form.confirm({
352
+ 'taskId': this.taskId,
353
+ 'content': info.locale[this.locale].confirmExitStep
354
+ }))) {
355
+ return;
356
+ }
357
+ this._inStep = false;
358
+ this.refs.form.stepHide();
359
+ }
360
+ v.$data._formHash = '';
361
+ core.trigger('formHashChange', this.taskId, this.formId, '');
362
+ return;
363
+ }
324
364
  return;
325
365
  }
326
- return;
327
- }
328
- const parent = v.$data._historyHash[v.$data._historyHash.length - 1];
329
- v.$data._formHash = parent;
330
- v.$data._historyHash.splice(-1);
331
- core.trigger('formHashChange', this.taskId, this.formId, parent);
366
+ const parent = v.$data._historyHash[v.$data._historyHash.length - 1];
367
+ if (this.inStep) {
368
+ if (this._stepValues.includes(parent)) {
369
+ this.refs.form.stepValue = parent;
370
+ }
371
+ else {
372
+ if (!(yield clickgo.form.confirm({
373
+ 'taskId': this.taskId,
374
+ 'content': info.locale[this.locale].confirmExitStep
375
+ }))) {
376
+ return;
377
+ }
378
+ this._inStep = false;
379
+ this.refs.form.stepHide();
380
+ }
381
+ }
382
+ v.$data._formHash = parent;
383
+ v.$data._historyHash.splice(-1);
384
+ core.trigger('formHashChange', this.taskId, this.formId, parent);
385
+ });
332
386
  }
333
387
  get inStep() {
334
388
  return this._inStep;
335
389
  }
336
- enterStep(opt) {
337
- if (this._inStep) {
338
- return false;
339
- }
340
- if (opt.list[0].hash !== this.formHash) {
341
- return false;
342
- }
343
- this._inStep = true;
344
- return false;
390
+ enterStep(list) {
391
+ return __awaiter(this, void 0, void 0, function* () {
392
+ if (this._inStep) {
393
+ return false;
394
+ }
395
+ if (list[0].value !== this.formHash) {
396
+ return false;
397
+ }
398
+ this._inStep = true;
399
+ this._stepValues.length = 0;
400
+ for (const item of list) {
401
+ this._stepValues.push(item.value);
402
+ }
403
+ this.refs.form.stepData = list;
404
+ this.refs.form.stepValue = this.formHash;
405
+ yield this.nextTick();
406
+ this.refs.form.stepShow();
407
+ return true;
408
+ });
409
+ }
410
+ doneStep() {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ if (!this._inStep) {
413
+ return;
414
+ }
415
+ this._inStep = false;
416
+ yield this.refs.form.stepDone();
417
+ });
345
418
  }
346
419
  show() {
347
420
  const v = this;
@@ -1008,20 +1081,22 @@ function getHash(formId) {
1008
1081
  }
1009
1082
  exports.getHash = getHash;
1010
1083
  function hashBack(formId) {
1011
- const taskId = getTaskId(formId);
1012
- if (taskId === 0) {
1013
- return false;
1014
- }
1015
- const t = task.list[taskId];
1016
- if (!t) {
1017
- return false;
1018
- }
1019
- const item = task.list[taskId].forms[formId];
1020
- if (!item) {
1021
- return false;
1022
- }
1023
- item.vroot.formHashBack();
1024
- return true;
1084
+ return __awaiter(this, void 0, void 0, function* () {
1085
+ const taskId = getTaskId(formId);
1086
+ if (taskId === 0) {
1087
+ return false;
1088
+ }
1089
+ const t = task.list[taskId];
1090
+ if (!t) {
1091
+ return false;
1092
+ }
1093
+ const item = task.list[taskId].forms[formId];
1094
+ if (!item) {
1095
+ return false;
1096
+ }
1097
+ yield item.vroot.formHashBack();
1098
+ return true;
1099
+ });
1025
1100
  }
1026
1101
  exports.hashBack = hashBack;
1027
1102
  function changeFocus(formId = 0) {
@@ -2241,6 +2316,29 @@ function create(cls, data, opt = {}, taskId) {
2241
2316
  if (v === this._formHash) {
2242
2317
  return;
2243
2318
  }
2319
+ if (this.inStep) {
2320
+ (() => __awaiter(this, void 0, void 0, function* () {
2321
+ if (this._stepValues.includes(v)) {
2322
+ this.$refs.form.stepValue = v;
2323
+ }
2324
+ else {
2325
+ if (!(yield clickgo.form.confirm({
2326
+ 'taskId': this.taskId,
2327
+ 'content': info.locale[this.locale].confirmExitStep
2328
+ }))) {
2329
+ return;
2330
+ }
2331
+ this._inStep = false;
2332
+ this.$refs.form.stepHide();
2333
+ }
2334
+ if (this._formHash) {
2335
+ this._historyHash.push(this._formHash);
2336
+ }
2337
+ this._formHash = v;
2338
+ core.trigger('formHashChange', t.id, formId, v);
2339
+ }))();
2340
+ return;
2341
+ }
2244
2342
  if (this._formHash) {
2245
2343
  this._historyHash.push(this._formHash);
2246
2344
  }
@@ -2258,6 +2356,14 @@ function create(cls, data, opt = {}, taskId) {
2258
2356
  core.trigger('formShowInSystemTaskChange', t.id, formId, v);
2259
2357
  }
2260
2358
  };
2359
+ const cbs = [];
2360
+ methods.ready = function (cb) {
2361
+ if (this.isReady) {
2362
+ cb();
2363
+ return;
2364
+ }
2365
+ cbs.push(cb);
2366
+ };
2261
2367
  exports.elements.list.insertAdjacentHTML('beforeend', `<div class="cg-form-wrap" data-form-id="${formId.toString()}" data-task-id="${t.id.toString()}"></div>`);
2262
2368
  exports.elements.popList.insertAdjacentHTML('beforeend', `<div data-form-id="${formId.toString()}" data-task-id="${t.id.toString()}"></div>`);
2263
2369
  if (style) {
@@ -2378,6 +2484,10 @@ function create(cls, data, opt = {}, taskId) {
2378
2484
  rtn.vroot.$refs.form.setPropData('height', window.innerHeight);
2379
2485
  });
2380
2486
  }
2487
+ rtn.vroot.isReady = true;
2488
+ for (const cb of cbs) {
2489
+ cb.call(rtn.vroot);
2490
+ }
2381
2491
  return rtn.vroot;
2382
2492
  });
2383
2493
  }
package/dist/lib/form.ts CHANGED
@@ -45,6 +45,7 @@ const info: {
45
45
  'no': string;
46
46
  'cancel': string;
47
47
  'search': string;
48
+ 'confirmExitStep': string;
48
49
  }>;
49
50
  } = {
50
51
  'lastId': 0,
@@ -58,84 +59,96 @@ const info: {
58
59
  'yes': 'Yes',
59
60
  'no': 'No',
60
61
  'cancel': 'Cancel',
61
- 'search': 'Search'
62
+ 'search': 'Search',
63
+ 'confirmExitStep': 'This operation will exit the current process. Are you sure you want to exit?'
62
64
  },
63
65
  'sc': {
64
66
  'ok': '好',
65
67
  'yes': '是',
66
68
  'no': '否',
67
69
  'cancel': '取消',
68
- 'search': '搜索'
70
+ 'search': '搜索',
71
+ 'confirmExitStep': '此操作将退出当前流程,确定退出吗?'
69
72
  },
70
73
  'tc': {
71
74
  'ok': '好',
72
75
  'yes': '是',
73
76
  'no': '否',
74
77
  'cancel': '取消',
75
- 'search': '檢索'
78
+ 'search': '檢索',
79
+ 'confirmExitStep': '此操作將結束目前的流程,確定退出嗎?'
76
80
  },
77
81
  'ja': {
78
82
  'ok': '好',
79
83
  'yes': 'はい',
80
84
  'no': 'いいえ',
81
85
  'cancel': 'キャンセル',
82
- 'search': '検索'
86
+ 'search': '検索',
87
+ 'confirmExitStep': 'この操作は現在のプロセスを終了します。本当に終了しますか?'
83
88
  },
84
89
  'ko': {
85
90
  'ok': '확인',
86
91
  'yes': '예',
87
92
  'no': '아니오',
88
93
  'cancel': '취소',
89
- 'search': '검색'
94
+ 'search': '검색',
95
+ 'confirmExitStep': '이 작업은 현재 프로세스를 종료합니다. 종료하시겠습니까?'
90
96
  },
91
97
  'th': {
92
98
  'ok': 'ตกลง',
93
99
  'yes': 'ใช่',
94
100
  'no': 'ไม่',
95
101
  'cancel': 'ยกเลิก',
96
- 'search': 'ค้นหา'
102
+ 'search': 'ค้นหา',
103
+ 'confirmExitStep': 'การดำเนินการนี้จะออกจากกระบวนการปัจจุบัน ยืนยันที่จะออกไหม?'
97
104
  },
98
105
  'es': {
99
106
  'ok': 'Aceptar',
100
107
  'yes': 'Sí',
101
108
  'no': 'No',
102
109
  'cancel': 'Cancelar',
103
- 'search': 'Buscar'
110
+ 'search': 'Buscar',
111
+ 'confirmExitStep': 'Esta operación cerrará el proceso actual. ¿Estás seguro de que quieres salir?'
104
112
  },
105
113
  'de': {
106
114
  'ok': 'OK',
107
115
  'yes': 'Ja',
108
116
  'no': 'Nein',
109
117
  'cancel': 'Abbrechen',
110
- 'search': 'Suchen'
118
+ 'search': 'Suchen',
119
+ 'confirmExitStep': 'Diese Aktion beendet den aktuellen Prozess. Möchten Sie wirklich beenden?'
111
120
  },
112
121
  'fr': {
113
122
  'ok': 'OK',
114
123
  'yes': 'Oui',
115
124
  'no': 'Non',
116
125
  'cancel': 'Annuler',
117
- 'search': 'Rechercher'
126
+ 'search': 'Rechercher',
127
+ 'confirmExitStep': 'Cette opération va quitter le processus en cours. Êtes-vous sûr de vouloir quitter ?'
118
128
  },
119
129
  'pt': {
120
130
  'ok': 'OK',
121
131
  'yes': 'Sim',
122
132
  'no': 'Não',
123
133
  'cancel': 'Cancelar',
124
- 'search': 'Buscar'
134
+ 'search': 'Buscar',
135
+ 'confirmExitStep': 'Esta operação encerrará o processo atual. Você tem certeza de que deseja sair?'
125
136
  },
126
137
  'ru': {
127
138
  'ok': 'OK',
128
139
  'yes': 'Да',
129
140
  'no': 'Нет',
130
141
  'cancel': 'Отмена',
131
- 'search': 'Поиск'
142
+ 'search': 'Поиск',
143
+ 'confirmExitStep': 'Эта операция завершит текущий процесс. Вы уверены, что хотите выйти?'
132
144
  },
133
145
  'vi': {
134
146
  'ok': 'OK',
135
147
  'yes': 'Có',
136
148
  'no': 'Không',
137
149
  'cancel': 'Hủy bỏ',
138
- 'search': 'Tìm kiếm'
150
+ 'search': 'Tìm kiếm',
151
+ 'confirmExitStep': 'Thao tác này sẽ thoát khỏi quy trình hiện tại. Bạn có chắc chắn muốn thoát không?'
139
152
  }
140
153
  }
141
154
  };
@@ -345,6 +358,22 @@ export abstract class AbstractPanel extends AbstractCommon {
345
358
  return {} as any;
346
359
  }
347
360
 
361
+ /** --- 母窗体进入 form hash 为源的步进条 --- */
362
+ public async enterStep(list: Array<{
363
+ /** --- 步骤 hash,第一个必须为当前 hash --- */
364
+ 'value': string;
365
+ 'label'?: string;
366
+ 'icon'?: string;
367
+ 'desc'?: string;
368
+ }>): Promise<boolean> {
369
+ return this.rootForm.enterStep(list);
370
+ }
371
+
372
+ /** --- 目窗体完成当前步骤 --- */
373
+ public async doneStep(): Promise<void> {
374
+ await this.rootForm.doneStep();
375
+ }
376
+
348
377
  /** --- 当前的 nav(若有)传递过来的 qs --- */
349
378
  public qs: Record<string, string> = {};
350
379
 
@@ -389,6 +418,9 @@ export abstract class AbstractForm extends AbstractCommon {
389
418
 
390
419
  // --- 以下为窗体有,但 control 没有 ---
391
420
 
421
+ /** --- 当前是否完全创建完毕 --- */
422
+ public isReady: boolean = false;
423
+
392
424
  /** --- 获取 form 的 hash 值,不是浏览器的 hash --- */
393
425
  public get formHash(): string {
394
426
  return '';
@@ -443,11 +475,27 @@ export abstract class AbstractForm extends AbstractCommon {
443
475
  // --- 会进行重写 ---
444
476
  }
445
477
 
478
+ /** --- 将在 form 完全装载完后执行,如果已经装载完则立即执行 --- */
479
+ public ready(cb: () => void | Promise<void>): void {
480
+ // --- 会进行重写 ---
481
+ cb() as any;
482
+ }
483
+
446
484
  /** --- form hash 回退 --- */
447
- public formHashBack(): void {
485
+ public async formHashBack(): Promise<void> {
448
486
  const v = this as any;
449
487
  if (!v.$data._historyHash.length) {
450
488
  if (v.$data._formHash) {
489
+ if (this.inStep) {
490
+ if (!await clickgo.form.confirm({
491
+ 'taskId': this.taskId,
492
+ 'content': info.locale[this.locale].confirmExitStep
493
+ })) {
494
+ return;
495
+ }
496
+ this._inStep = false;
497
+ this.refs.form.stepHide();
498
+ }
451
499
  v.$data._formHash = '';
452
500
  core.trigger('formHashChange', this.taskId, this.formId, '');
453
501
  return;
@@ -455,6 +503,21 @@ export abstract class AbstractForm extends AbstractCommon {
455
503
  return;
456
504
  }
457
505
  const parent = v.$data._historyHash[v.$data._historyHash.length - 1];
506
+ if (this.inStep) {
507
+ if (this._stepValues.includes(parent)) {
508
+ this.refs.form.stepValue = parent;
509
+ }
510
+ else {
511
+ if (!await clickgo.form.confirm({
512
+ 'taskId': this.taskId,
513
+ 'content': info.locale[this.locale].confirmExitStep
514
+ })) {
515
+ return;
516
+ }
517
+ this._inStep = false;
518
+ this.refs.form.stepHide();
519
+ }
520
+ }
458
521
  v.$data._formHash = parent;
459
522
  v.$data._historyHash.splice(-1);
460
523
  core.trigger('formHashChange', this.taskId, this.formId, parent);
@@ -472,27 +535,43 @@ export abstract class AbstractForm extends AbstractCommon {
472
535
  return this._inStep;
473
536
  }
474
537
 
475
- /** --- 进入 form hash 为源的步进条(Dev 版) --- */
476
- public enterStep(opt: {
477
- /** --- 当前的步骤名 --- */
478
- 'name'?: string;
479
- /** --- hash list,第一个必须为当前的 formHash --- */
480
- 'list': Array<{
481
- /** --- 子步骤名 --- */
482
- 'name': string;
483
- /** --- 步骤 hash --- */
484
- 'hash': string;
485
- }>;
486
- }): boolean {
538
+ /** --- 序列化后的 step value --- */
539
+ private readonly _stepValues: string[] = [];
540
+
541
+ /** --- 进入 form hash 为源的步进条 --- */
542
+ public async enterStep(list: Array<{
543
+ /** --- 步骤 hash,第一个必须为当前 hash --- */
544
+ 'value': string;
545
+ 'label'?: string;
546
+ 'icon'?: string;
547
+ 'desc'?: string;
548
+ }>): Promise<boolean> {
487
549
  if (this._inStep) {
488
550
  return false;
489
551
  }
490
- if (opt.list[0].hash !== this.formHash) {
552
+ if (list[0].value !== this.formHash) {
491
553
  return false;
492
554
  }
493
555
  // --- 进入当前页面步骤 ---
494
556
  this._inStep = true;
495
- return false;
557
+ this._stepValues.length = 0;
558
+ for (const item of list) {
559
+ this._stepValues.push(item.value);
560
+ }
561
+ this.refs.form.stepData = list;
562
+ this.refs.form.stepValue = this.formHash;
563
+ await this.nextTick();
564
+ this.refs.form.stepShow();
565
+ return true;
566
+ }
567
+
568
+ /** --- 完成当前步骤条 --- */
569
+ public async doneStep(): Promise<void> {
570
+ if (!this._inStep) {
571
+ return;
572
+ }
573
+ this._inStep = false;
574
+ await this.refs.form.stepDone();
496
575
  }
497
576
 
498
577
  /** --- 当前是不是初次显示 --- */
@@ -1390,7 +1469,7 @@ export function getHash(formId: number): string {
1390
1469
  /**
1391
1470
  * --- 将窗体的 hash 退回上一个 ---
1392
1471
  */
1393
- export function hashBack(formId: number): boolean {
1472
+ export async function hashBack(formId: number): Promise<boolean> {
1394
1473
  const taskId = getTaskId(formId);
1395
1474
  if (taskId === 0) {
1396
1475
  return false;
@@ -1403,7 +1482,7 @@ export function hashBack(formId: number): boolean {
1403
1482
  if (!item) {
1404
1483
  return false;
1405
1484
  }
1406
- item.vroot.formHashBack();
1485
+ await item.vroot.formHashBack();
1407
1486
  return true;
1408
1487
  }
1409
1488
 
@@ -2889,6 +2968,32 @@ export async function create<T extends AbstractForm>(
2889
2968
  if (v === this._formHash) {
2890
2969
  return;
2891
2970
  }
2971
+ if (this.inStep) {
2972
+ // --- 在 step 中,要判断 step 是否正确 ---
2973
+ (async (): Promise<void> => {
2974
+ if (this._stepValues.includes(v)) {
2975
+ this.$refs.form.stepValue = v;
2976
+ }
2977
+ else {
2978
+ // --- 不应该 ---
2979
+ if (!await clickgo.form.confirm({
2980
+ 'taskId': this.taskId,
2981
+ 'content': info.locale[this.locale].confirmExitStep
2982
+ })) {
2983
+ return;
2984
+ }
2985
+ // --- 退出了 ---
2986
+ this._inStep = false;
2987
+ this.$refs.form.stepHide();
2988
+ }
2989
+ if (this._formHash) {
2990
+ this._historyHash.push(this._formHash);
2991
+ }
2992
+ this._formHash = v;
2993
+ core.trigger('formHashChange', t.id, formId, v);
2994
+ })() as any;
2995
+ return;
2996
+ }
2892
2997
  if (this._formHash) {
2893
2998
  this._historyHash.push(this._formHash);
2894
2999
  }
@@ -2907,6 +3012,15 @@ export async function create<T extends AbstractForm>(
2907
3012
  core.trigger('formShowInSystemTaskChange', t.id, formId, v);
2908
3013
  }
2909
3014
  };
3015
+ // --- ready 方法 ---
3016
+ const cbs: Array<() => void | Promise<void>> = [];
3017
+ methods.ready = function(cb: () => void | Promise<void>): void {
3018
+ if (this.isReady) {
3019
+ cb() as any;
3020
+ return;
3021
+ }
3022
+ cbs.push(cb);
3023
+ };
2910
3024
 
2911
3025
  // --- 插入 dom ---
2912
3026
  elements.list.insertAdjacentHTML('beforeend', `<div class="cg-form-wrap" data-form-id="${formId.toString()}" data-task-id="${t.id.toString()}"></div>`);
@@ -3042,6 +3156,11 @@ export async function create<T extends AbstractForm>(
3042
3156
  rtn.vroot.$refs.form.setPropData('height', window.innerHeight);
3043
3157
  });
3044
3158
  }
3159
+ // --- 完全创建完毕 ---
3160
+ rtn.vroot.isReady = true;
3161
+ for (const cb of cbs) {
3162
+ cb.call(rtn.vroot) as any;
3163
+ }
3045
3164
  return rtn.vroot as any;
3046
3165
  }
3047
3166
 
package/dist/lib/task.ts CHANGED
@@ -710,7 +710,7 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
710
710
  getHash: function(formId: number): string {
711
711
  return form.getHash(formId);
712
712
  },
713
- hashBack: function(formId: number): boolean {
713
+ hashBack: function(formId: number): Promise<boolean> {
714
714
  return form.hashBack(formId);
715
715
  },
716
716
  changeFocus: function(fid: number = 0): void {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.11.0",
3
+ "version": "3.11.2",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",
@@ -20,8 +20,8 @@
20
20
  "devDependencies": {
21
21
  "@litert/eslint-plugin-rules": "^0.1.6",
22
22
  "@litert/loader": "^3.5.1",
23
- "@types/node": "^20.11.6",
24
- "electron": "^28.1.4",
23
+ "@types/node": "^20.11.16",
24
+ "npm": "^28.2.1",
25
25
  "jszip": "^3.10.1",
26
26
  "terser": "^5.27.0",
27
27
  "typescript": "^5.3.3"