clickgo 3.13.0 → 3.13.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
@@ -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.7/dist/loader.min.js?path=index&npm={'clickgo':'3.13.0'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.13.2'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -219,7 +219,7 @@ class default_1 extends clickgo.form.AbstractForm {
219
219
  this.dr = yield clickgo.form.dialog({
220
220
  'direction': 'v',
221
221
  'gutter': 10,
222
- 'content': '<block>Hello text!</block><text :modelValue="data.txt">',
222
+ 'content': '<block>Hello text!</block><text :modelValue="data.txt" />',
223
223
  'data': {
224
224
  'txt': 'Text\nLine 2.'
225
225
  }
@@ -24,7 +24,7 @@
24
24
  <label style="flex: 1; text-align: right; padding-right: var(--g-padding);">Panel</label>
25
25
  </template>
26
26
  <template v-slot:content>
27
- <panel :map="map" style="flex: 1;" @go="loading = true" @went="loading = false"></panel>
27
+ <panel :map="map" style="flex: 1;" @go="loading = true; lockLoading = true" @went="lockLoading = false; loading = false"></panel>
28
28
  </template>
29
29
  </nav>
30
30
  </layout>
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.13.0';
27
+ const version = '3.13.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.13.0';
16
+ const version = '3.13.2';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
Binary file
package/dist/index.js CHANGED
@@ -110,7 +110,7 @@ function launcher(boot) {
110
110
  return __awaiter(this, void 0, void 0, function* () {
111
111
  var _a;
112
112
  const paths = [
113
- `${loader.cdn}/npm/vue@3.4.21/dist/vue.global${boot.isDebug() ? '' : '.prod.min'}.js`
113
+ `${loader.cdn}/npm/vue@3.4.30/dist/vue.global${boot.isDebug() ? '' : '.prod.min'}.js`
114
114
  ];
115
115
  if (!(window.TouchEvent)) {
116
116
  window.TouchEvent = CustomEvent;
package/dist/index.ts CHANGED
@@ -192,7 +192,7 @@ export function launcher(boot: AbstractBoot): void {
192
192
  (async function() {
193
193
  // --- 通过标签加载库 ---
194
194
  const paths: string[] = [
195
- `${loader.cdn}/npm/vue@3.4.21/dist/vue.global${boot.isDebug() ? '' : '.prod.min'}.js`
195
+ `${loader.cdn}/npm/vue@3.4.30/dist/vue.global${boot.isDebug() ? '' : '.prod.min'}.js`
196
196
  ];
197
197
  // --- 判断 TouchEvent 是否存在(例如某些浏览器可能不存在这个对象) ---
198
198
  if (!((window as any).TouchEvent)) {
package/dist/lib/core.js CHANGED
@@ -194,7 +194,7 @@ const modules = {
194
194
  func: function () {
195
195
  return __awaiter(this, void 0, void 0, function* () {
196
196
  return new Promise(function (resolve, reject) {
197
- fetch(loader.cdn + '/npm/monaco-editor@0.46.0/min/vs/loader.js').then(function (r) {
197
+ fetch(loader.cdn + '/npm/monaco-editor@0.50.0/min/vs/loader.js').then(function (r) {
198
198
  return r.blob();
199
199
  }).then(function (b) {
200
200
  return tool.blob2DataUrl(b);
package/dist/lib/core.ts CHANGED
@@ -268,7 +268,7 @@ const modules: Record<string, {
268
268
  'monaco': {
269
269
  func: async function() {
270
270
  return new Promise(function(resolve, reject) {
271
- fetch(loader.cdn + '/npm/monaco-editor@0.46.0/min/vs/loader.js').then(function(r) {
271
+ fetch(loader.cdn + '/npm/monaco-editor@0.50.0/min/vs/loader.js').then(function(r) {
272
272
  return r.blob();
273
273
  }).then(function(b) {
274
274
  return tool.blob2DataUrl(b);
package/dist/lib/form.js CHANGED
@@ -331,7 +331,8 @@ class AbstractForm extends AbstractCommon {
331
331
  super(...arguments);
332
332
  this.isNativeSync = false;
333
333
  this.isReady = false;
334
- this.loading = false;
334
+ this._loading = false;
335
+ this.lockLoading = false;
335
336
  this._inStep = false;
336
337
  this._stepValues = [];
337
338
  this._firstShow = true;
@@ -421,6 +422,15 @@ class AbstractForm extends AbstractCommon {
421
422
  sendToPanel(panel, data) {
422
423
  panel.send(data);
423
424
  }
425
+ get loading() {
426
+ return this._loading;
427
+ }
428
+ set loading(val) {
429
+ if (this.lockLoading) {
430
+ return;
431
+ }
432
+ this._loading = val;
433
+ }
424
434
  get inStep() {
425
435
  return this._inStep;
426
436
  }
@@ -2769,9 +2779,9 @@ function confirm(opt) {
2769
2779
  return false;
2770
2780
  }
2771
2781
  const locale = t.locale.lang || core.config.locale;
2772
- const buttons = [(_b = (_a = info.locale[locale]) === null || _a === void 0 ? void 0 : _a.yes) !== null && _b !== void 0 ? _b : info.locale['en'].yes, (_d = (_c = info.locale[locale]) === null || _c === void 0 ? void 0 : _c.no) !== null && _d !== void 0 ? _d : info.locale['en'].no];
2782
+ const buttons = [(_b = (_a = info.locale[locale]) === null || _a === void 0 ? void 0 : _a.no) !== null && _b !== void 0 ? _b : info.locale['en'].no, (_d = (_c = info.locale[locale]) === null || _c === void 0 ? void 0 : _c.yes) !== null && _d !== void 0 ? _d : info.locale['en'].yes];
2773
2783
  if (opt.cancel) {
2774
- buttons.push((_f = (_e = info.locale[locale]) === null || _e === void 0 ? void 0 : _e.cancel) !== null && _f !== void 0 ? _f : info.locale['en'].cancel);
2784
+ buttons.unshift((_f = (_e = info.locale[locale]) === null || _e === void 0 ? void 0 : _e.cancel) !== null && _f !== void 0 ? _f : info.locale['en'].cancel);
2775
2785
  }
2776
2786
  const res = yield dialog({
2777
2787
  'taskId': taskId,
@@ -2811,7 +2821,7 @@ function prompt(opt) {
2811
2821
  'title': opt.title,
2812
2822
  'direction': 'v',
2813
2823
  'gutter': 10,
2814
- 'content': '<block>' + opt.content + '</block><text v-model="data.text">',
2824
+ 'content': '<block>' + opt.content + '</block><text v-model="data.text" />',
2815
2825
  'data': {
2816
2826
  'text': (_a = opt.text) !== null && _a !== void 0 ? _a : ''
2817
2827
  },
package/dist/lib/form.ts CHANGED
@@ -581,8 +581,23 @@ export abstract class AbstractForm extends AbstractCommon {
581
581
  panel.send(data);
582
582
  }
583
583
 
584
+ /** --- 覆盖整个窗体的 loading(实际值) --- */
585
+ private _loading: boolean = false;
586
+
584
587
  /** --- 覆盖整个窗体的 loading --- */
585
- public loading: boolean = false;
588
+ public get loading(): boolean {
589
+ return this._loading;
590
+ }
591
+
592
+ public set loading(val: boolean) {
593
+ if (this.lockLoading) {
594
+ return;
595
+ }
596
+ this._loading = val;
597
+ }
598
+
599
+ /** --- 是否阻止任何人修改 loading --- */
600
+ public lockLoading: boolean = false;
586
601
 
587
602
  // --- step 相关 ---
588
603
 
@@ -3497,9 +3512,9 @@ export async function confirm(opt: string | types.IFormConfirmOptions): Promise<
3497
3512
  return false;
3498
3513
  }
3499
3514
  const locale = t.locale.lang || core.config.locale;
3500
- const buttons = [info.locale[locale]?.yes ?? info.locale['en'].yes, info.locale[locale]?.no ?? info.locale['en'].no];
3515
+ const buttons = [info.locale[locale]?.no ?? info.locale['en'].no, info.locale[locale]?.yes ?? info.locale['en'].yes];
3501
3516
  if (opt.cancel) {
3502
- buttons.push(info.locale[locale]?.cancel ?? info.locale['en'].cancel);
3517
+ buttons.unshift(info.locale[locale]?.cancel ?? info.locale['en'].cancel);
3503
3518
  }
3504
3519
  const res = await dialog({
3505
3520
  'taskId': taskId,
@@ -3542,7 +3557,7 @@ export async function prompt(opt: string | types.IFormPromptOptions): Promise<st
3542
3557
  'title': opt.title,
3543
3558
  'direction': 'v',
3544
3559
  'gutter': 10,
3545
- 'content': '<block>' + opt.content + '</block><text v-model="data.text">',
3560
+ 'content': '<block>' + opt.content + '</block><text v-model="data.text" />',
3546
3561
  'data': {
3547
3562
  'text': opt.text ?? ''
3548
3563
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.13.0",
3
+ "version": "3.13.2",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",