clickgo 3.2.6 → 3.2.8
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/app/demo/form/method/form/form.js +12 -0
- package/dist/app/demo/form/method/form/form.xml +1 -0
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/lib/form.js +3 -1
- package/dist/lib/form.ts +3 -1
- package/dist/lib/zip.js +2 -2
- package/dist/lib/zip.ts +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +5 -0
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2023 MAIYUN.NET
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
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.4.9/dist/loader.min.js?path=index&npm={'clickgo':'3.2.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.9/dist/loader.min.js?path=index&npm={'clickgo':'3.2.8'}"></script>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**index.js**
|
|
@@ -199,6 +199,18 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
199
199
|
});
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
+
dialogData() {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
this.dr = yield clickgo.form.dialog({
|
|
205
|
+
'direction': 'v',
|
|
206
|
+
'gutter': 10,
|
|
207
|
+
'content': '<block>Hello text!</block><text :modelValue="data.txt">',
|
|
208
|
+
'data': {
|
|
209
|
+
'txt': 'Text\nLine 2.'
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
202
214
|
confirm(cancel) {
|
|
203
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
216
|
this.dr = yield clickgo.form.confirm({
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
<button @click="dialogTitle" style="height: 30px;">dialog({'title':'Title','content':'Hello world!'})</button>
|
|
43
43
|
<button @click="dialogButtons" style="height: 30px;">dialog({'content':'Hello world!','buttons':['A','B','C']})</button>
|
|
44
44
|
<button @click="dialogCannot" style="height: 30px;">Dialog can not be close</button>
|
|
45
|
+
<button @click="dialogData" style="height: 30px;">Dialog data</button>
|
|
45
46
|
<button @click="confirm(false)" style="height: 30px;">confirm('confirm')</button>
|
|
46
47
|
<button @click="confirm(true)" style="height: 30px;">confirm({'content':'confirm','cancel':true})</button>
|
|
47
48
|
<button @click="flash" style="height: 30px;">flash({{formId}})</button>
|
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.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.2.
|
|
27
|
+
const version = '3.2.8';
|
|
28
28
|
function getVersion() {
|
|
29
29
|
return version;
|
|
30
30
|
}
|
package/dist/clickgo.ts
CHANGED
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/page.cgc
CHANGED
|
Binary file
|
package/dist/lib/form.js
CHANGED
|
@@ -2177,8 +2177,10 @@ function dialog(opt) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
const cls = class extends AbstractForm {
|
|
2179
2179
|
constructor() {
|
|
2180
|
+
var _a;
|
|
2180
2181
|
super(...arguments);
|
|
2181
2182
|
this.buttons = nopt.buttons;
|
|
2183
|
+
this.data = (_a = nopt.data) !== null && _a !== void 0 ? _a : {};
|
|
2182
2184
|
}
|
|
2183
2185
|
get filename() {
|
|
2184
2186
|
return filename;
|
|
@@ -2202,7 +2204,7 @@ function dialog(opt) {
|
|
|
2202
2204
|
}
|
|
2203
2205
|
};
|
|
2204
2206
|
create(cls, undefined, {
|
|
2205
|
-
'layout': `<form title="${(_d = nopt.title) !== null && _d !== void 0 ? _d : 'dialog'}" min="false" max="false" resize="false" height="0" width="0" border="${nopt.title ? 'normal' : 'plain'}" direction="v"><dialog :buttons="buttons" @select="select"${nopt.direction ? ` direction="${nopt.direction}"` : ''}>${nopt.content}</dialog></form>`,
|
|
2207
|
+
'layout': `<form title="${(_d = nopt.title) !== null && _d !== void 0 ? _d : 'dialog'}" min="false" max="false" resize="false" height="0" width="0" border="${nopt.title ? 'normal' : 'plain'}" direction="v"><dialog :buttons="buttons" @select="select"${nopt.direction ? ` direction="${nopt.direction}"` : ''}${nopt.gutter ? ` gutter="${nopt.gutter}"` : ''}>${nopt.content}</dialog></form>`,
|
|
2206
2208
|
'style': nopt.style
|
|
2207
2209
|
}, t.id).then((frm) => {
|
|
2208
2210
|
if (typeof frm === 'number') {
|
package/dist/lib/form.ts
CHANGED
|
@@ -2759,6 +2759,8 @@ export function dialog(opt: string | types.IFormDialogOptions): Promise<string>
|
|
|
2759
2759
|
const cls = class extends AbstractForm {
|
|
2760
2760
|
public buttons = nopt.buttons;
|
|
2761
2761
|
|
|
2762
|
+
public data = nopt.data ?? {};
|
|
2763
|
+
|
|
2762
2764
|
public get filename(): string {
|
|
2763
2765
|
return filename;
|
|
2764
2766
|
}
|
|
@@ -2782,7 +2784,7 @@ export function dialog(opt: string | types.IFormDialogOptions): Promise<string>
|
|
|
2782
2784
|
}
|
|
2783
2785
|
};
|
|
2784
2786
|
create(cls, undefined, {
|
|
2785
|
-
'layout': `<form title="${nopt.title ?? 'dialog'}" min="false" max="false" resize="false" height="0" width="0" border="${nopt.title ? 'normal' : 'plain'}" direction="v"><dialog :buttons="buttons" @select="select"${nopt.direction ? ` direction="${nopt.direction}"` : ''}>${nopt.content}</dialog></form>`,
|
|
2787
|
+
'layout': `<form title="${nopt.title ?? 'dialog'}" min="false" max="false" resize="false" height="0" width="0" border="${nopt.title ? 'normal' : 'plain'}" direction="v"><dialog :buttons="buttons" @select="select"${nopt.direction ? ` direction="${nopt.direction}"` : ''}${nopt.gutter ? ` gutter="${nopt.gutter}"` : ''}>${nopt.content}</dialog></form>`,
|
|
2786
2788
|
'style': nopt.style
|
|
2787
2789
|
}, t.id).then((frm) => {
|
|
2788
2790
|
if (typeof frm === 'number') {
|
package/dist/lib/zip.js
CHANGED
|
@@ -120,14 +120,14 @@ class Zip {
|
|
|
120
120
|
}
|
|
121
121
|
isDir(path) {
|
|
122
122
|
const pstats = this.stats(path);
|
|
123
|
-
if (!pstats ||
|
|
123
|
+
if (!(pstats === null || pstats === void 0 ? void 0 : pstats.isDirectory)) {
|
|
124
124
|
return false;
|
|
125
125
|
}
|
|
126
126
|
return pstats;
|
|
127
127
|
}
|
|
128
128
|
isFile(path) {
|
|
129
129
|
const pstats = this.stats(path);
|
|
130
|
-
if (!pstats ||
|
|
130
|
+
if (!(pstats === null || pstats === void 0 ? void 0 : pstats.isFile)) {
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
133
|
return pstats;
|
package/dist/lib/zip.ts
CHANGED
|
@@ -124,7 +124,7 @@ export class Zip {
|
|
|
124
124
|
*/
|
|
125
125
|
public isDir(path: string): types.IZipStats | false {
|
|
126
126
|
const pstats = this.stats(path);
|
|
127
|
-
if (!pstats
|
|
127
|
+
if (!pstats?.isDirectory) {
|
|
128
128
|
return false;
|
|
129
129
|
}
|
|
130
130
|
return pstats;
|
|
@@ -136,7 +136,7 @@ export class Zip {
|
|
|
136
136
|
*/
|
|
137
137
|
public isFile(path: string): types.IZipStats | false {
|
|
138
138
|
const pstats = this.stats(path);
|
|
139
|
-
if (!pstats
|
|
139
|
+
if (!pstats?.isFile) {
|
|
140
140
|
return false;
|
|
141
141
|
}
|
|
142
142
|
return pstats;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -558,8 +558,13 @@ export interface IFormDialogOptions {
|
|
|
558
558
|
'title'?: string;
|
|
559
559
|
'content': string;
|
|
560
560
|
'buttons'?: string[];
|
|
561
|
+
|
|
561
562
|
'direction'?: 'h' | 'v';
|
|
563
|
+
'gutter'?: number | string;
|
|
562
564
|
|
|
565
|
+
/** --- 传值,需要用 data.x 读取 --- */
|
|
566
|
+
'data'?: Record<string, any>;
|
|
567
|
+
/** --- 样式表 --- */
|
|
563
568
|
'style'?: string;
|
|
564
569
|
/** --- 路径基,以 / 结束或文件路径则以文件的基路径为准,可留空 --- */
|
|
565
570
|
'path'?: string;
|