clickgo 3.15.29 → 3.15.31

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.15.29'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.15.31'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
package/dist/clickgo.js CHANGED
@@ -29,7 +29,7 @@ exports.isNative = isNative;
29
29
  exports.getPlatform = getPlatform;
30
30
  exports.isImmersion = isImmersion;
31
31
  exports.hasFrame = hasFrame;
32
- const version = '3.15.29';
32
+ const version = '3.15.31';
33
33
  function getVersion() {
34
34
  return version;
35
35
  }
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.15.29';
16
+ const version = '3.15.31';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
package/dist/lib/form.js CHANGED
@@ -2930,7 +2930,20 @@ function prompt(opt) {
2930
2930
  },
2931
2931
  'select': function (e, button) {
2932
2932
  var _a;
2933
- (_a = opt.select) === null || _a === void 0 ? void 0 : _a.call(this, e, button);
2933
+ const event = {
2934
+ 'go': true,
2935
+ preventDefault: function () {
2936
+ this.go = false;
2937
+ },
2938
+ 'detail': {
2939
+ 'button': button,
2940
+ 'value': this.data.text
2941
+ }
2942
+ };
2943
+ (_a = opt.select) === null || _a === void 0 ? void 0 : _a.call(this, event, button);
2944
+ if (!event.go) {
2945
+ e.preventDefault();
2946
+ }
2934
2947
  if (e.detail.button === cancelBtn) {
2935
2948
  this.dialogResult = '';
2936
2949
  return;
package/dist/lib/form.ts CHANGED
@@ -3698,7 +3698,20 @@ export async function prompt(opt: string | types.IFormPromptOptions): Promise<st
3698
3698
  'text': opt.text ?? ''
3699
3699
  },
3700
3700
  'select': function(e: types.IFormDialogSelectEvent, button: string) {
3701
- opt.select?.call(this, e, button);
3701
+ const event: types.IFormPromptSelectEvent = {
3702
+ 'go': true,
3703
+ preventDefault: function() {
3704
+ this.go = false;
3705
+ },
3706
+ 'detail': {
3707
+ 'button': button,
3708
+ 'value': this.data.text
3709
+ }
3710
+ };
3711
+ opt.select?.call(this, event, button);
3712
+ if (!event.go) {
3713
+ e.preventDefault();
3714
+ }
3702
3715
  if (e.detail.button === cancelBtn) {
3703
3716
  this.dialogResult = '';
3704
3717
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.15.29",
3
+ "version": "3.15.31",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",
package/types/index.d.ts CHANGED
@@ -641,7 +641,14 @@ export interface IFormPromptOptions {
641
641
  /** --- 是否显示取消按钮,默认显示 --- */
642
642
  'cancel'?: boolean;
643
643
 
644
- 'select'?: (this: AbstractForm & { 'data': Record<string, any>; }, e: IFormDialogSelectEvent, button: string) => void;
644
+ 'select'?: (this: AbstractForm & { 'data': Record<string, any>; }, e: IFormPromptSelectEvent, button: string) => void;
645
+ }
646
+
647
+ export interface IFormPromptSelectEvent extends ICustomEvent {
648
+ 'detail': {
649
+ 'button': string;
650
+ 'value': string;
651
+ };
645
652
  }
646
653
 
647
654
  export interface IFormSetTopMostOptions {