clickgo 3.15.45 → 3.15.47
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 +1 -1
- package/dist/app/demo/form/control/link/link.xml +9 -2
- package/dist/app/demo/form/control/list/list.js +6 -3
- package/dist/app/demo/form/control/table/table.js +4 -2
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/lib/dom.js +7 -1
- package/dist/lib/dom.ts +8 -0
- package/dist/lib/task.js +1 -0
- package/dist/lib/task.ts +1 -0
- package/dist/theme/blue.cgt +0 -0
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +1 -1
- package/types/index.d.ts +12 -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.8/dist/loader.min.js?path=index&npm={'clickgo':'3.15.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.15.47'}"></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**index.js**
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
<form width="300" height="
|
|
1
|
+
<form width="300" height="400" title="Link">
|
|
2
2
|
<layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
|
|
3
3
|
<label>You can use CSS to customize the link:</label>
|
|
4
4
|
<link>Normal</link>
|
|
5
5
|
<link line>Line</link>
|
|
6
|
-
<
|
|
6
|
+
<layout gutter="10">
|
|
7
|
+
<link type="plain">Plain</link>
|
|
8
|
+
<link type="primary">Primary</link>
|
|
9
|
+
<link type="info">Info</link>
|
|
10
|
+
<link type="warning">Warning</link>
|
|
11
|
+
<link type="danger">Danger</link>
|
|
12
|
+
</layout>
|
|
13
|
+
<link @click="alert" disabled>Disabled</link>
|
|
7
14
|
<link style="text-align: center;">Center</link>
|
|
8
15
|
<link style="color: red;">Color</link>
|
|
9
16
|
<link style="background: rgba(0, 0, 0, .1);">Background</link>
|
|
@@ -49,14 +49,16 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
49
49
|
'name': 'Card',
|
|
50
50
|
'path': 'Bob >> folder >> Card',
|
|
51
51
|
'src': '/package/res/r-2.svg',
|
|
52
|
-
'menu': true
|
|
52
|
+
'menu': true,
|
|
53
|
+
'leftline': 'warning'
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
'type': 0,
|
|
56
57
|
'name': 'Appraise2',
|
|
57
58
|
'path': 'Bob >> folder >> Appraise2',
|
|
58
59
|
'src': '/package/res/r-1.svg',
|
|
59
|
-
'disabled': true
|
|
60
|
+
'disabled': true,
|
|
61
|
+
'leftline': 'warning'
|
|
60
62
|
},
|
|
61
63
|
{
|
|
62
64
|
'type': 0,
|
|
@@ -162,9 +164,10 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
162
164
|
var _a;
|
|
163
165
|
const data = ['Item1', {
|
|
164
166
|
'label': 'Tip',
|
|
165
|
-
'color': 'tip'
|
|
167
|
+
'color': 'tip',
|
|
166
168
|
}, {
|
|
167
169
|
'label': 'Title1',
|
|
170
|
+
'leftline': 'danger',
|
|
168
171
|
'children': [
|
|
169
172
|
'Sub1',
|
|
170
173
|
{
|
|
@@ -191,13 +191,15 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
191
191
|
'check': false,
|
|
192
192
|
'type': 0,
|
|
193
193
|
'name': 'Appraise',
|
|
194
|
-
'bottom': false
|
|
194
|
+
'bottom': false,
|
|
195
|
+
'leftline': 'info'
|
|
195
196
|
},
|
|
196
197
|
{
|
|
197
198
|
'check': false,
|
|
198
199
|
'type': 0,
|
|
199
200
|
'name': 'Card',
|
|
200
|
-
'bottom': false
|
|
201
|
+
'bottom': false,
|
|
202
|
+
'leftline': 'info'
|
|
201
203
|
},
|
|
202
204
|
{
|
|
203
205
|
'check': false,
|
package/dist/clickgo.js
CHANGED
package/dist/clickgo.ts
CHANGED
|
Binary file
|
package/dist/control/box.cgc
CHANGED
|
Binary file
|
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/desc.cgc
CHANGED
|
Binary file
|
package/dist/control/drawer.cgc
CHANGED
|
Binary file
|
package/dist/control/echarts.cgc
CHANGED
|
Binary file
|
package/dist/control/form.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/jodit.cgc
CHANGED
|
Binary file
|
package/dist/control/map.cgc
CHANGED
|
Binary file
|
package/dist/control/monaco.cgc
CHANGED
|
Binary file
|
package/dist/control/nav.cgc
CHANGED
|
Binary file
|
package/dist/control/page.cgc
CHANGED
|
Binary file
|
package/dist/control/pdf.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/table.cgc
CHANGED
|
Binary file
|
package/dist/control/task.cgc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/control/xterm.cgc
CHANGED
|
Binary file
|
package/dist/lib/dom.js
CHANGED
|
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.is = void 0;
|
|
35
|
+
exports.is = exports.dpi = void 0;
|
|
36
36
|
exports.inPage = inPage;
|
|
37
37
|
exports.setGlobalCursor = setGlobalCursor;
|
|
38
38
|
exports.hasTouchButMouse = hasTouchButMouse;
|
|
@@ -112,6 +112,12 @@ ${classUnfold(' > div')} {font-family: var(--g-family); font-size: var(--g-size)
|
|
|
112
112
|
function inPage(el) {
|
|
113
113
|
return document.body.contains(el);
|
|
114
114
|
}
|
|
115
|
+
const dpiDiv = document.createElement('div');
|
|
116
|
+
dpiDiv.style.visibility = 'hidden';
|
|
117
|
+
dpiDiv.style.width = '1in';
|
|
118
|
+
document.getElementsByTagName('body')[0].appendChild(dpiDiv);
|
|
119
|
+
exports.dpi = dpiDiv.getBoundingClientRect().width;
|
|
120
|
+
dpiDiv.remove();
|
|
115
121
|
let globalCursorStyle;
|
|
116
122
|
function setGlobalCursor(type) {
|
|
117
123
|
if (!globalCursorStyle) {
|
package/dist/lib/dom.ts
CHANGED
|
@@ -53,6 +53,14 @@ export function inPage(el: HTMLElement): boolean {
|
|
|
53
53
|
return document.body.contains(el);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// --- 计算 dpi ---
|
|
57
|
+
const dpiDiv = document.createElement('div');
|
|
58
|
+
dpiDiv.style.visibility = 'hidden';
|
|
59
|
+
dpiDiv.style.width = '1in';
|
|
60
|
+
document.getElementsByTagName('body')[0].appendChild(dpiDiv);
|
|
61
|
+
export const dpi: number = dpiDiv.getBoundingClientRect().width;
|
|
62
|
+
dpiDiv.remove();
|
|
63
|
+
|
|
56
64
|
/** --- 全局 cursor 设置的 style 标签 --- */
|
|
57
65
|
let globalCursorStyle: HTMLStyleElement;
|
|
58
66
|
/**
|
package/dist/lib/task.js
CHANGED
package/dist/lib/task.ts
CHANGED
|
@@ -526,6 +526,7 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
|
|
|
526
526
|
inPage: function(el: HTMLElement): boolean {
|
|
527
527
|
return dom.inPage(el);
|
|
528
528
|
},
|
|
529
|
+
'dpi': dom.dpi,
|
|
529
530
|
setGlobalCursor: function(type?: string): void {
|
|
530
531
|
dom.setGlobalCursor(type);
|
|
531
532
|
},
|
package/dist/theme/blue.cgt
CHANGED
|
Binary file
|
package/dist/theme/byterun.cgt
CHANGED
|
Binary file
|
package/dist/theme/light.cgt
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -786,6 +786,7 @@ export interface IMenulistItemCheckEvent extends ICustomEvent {
|
|
|
786
786
|
|
|
787
787
|
export interface IDateChangedEvent {
|
|
788
788
|
'detail': {
|
|
789
|
+
'before'?: number;
|
|
789
790
|
'value'?: number;
|
|
790
791
|
};
|
|
791
792
|
}
|
|
@@ -801,6 +802,7 @@ export interface IDatepanelRangeEvent extends ICustomEvent {
|
|
|
801
802
|
|
|
802
803
|
export interface IDatepanelChangedEvent {
|
|
803
804
|
'detail': {
|
|
805
|
+
'before'?: number;
|
|
804
806
|
'value'?: number;
|
|
805
807
|
};
|
|
806
808
|
}
|
|
@@ -930,8 +932,18 @@ export interface IGreatselectAddEvent extends ICustomEvent {
|
|
|
930
932
|
|
|
931
933
|
export interface IPdfViewEvent {
|
|
932
934
|
'detail': {
|
|
935
|
+
/** --- 宽度 point --- */
|
|
933
936
|
'width': number;
|
|
937
|
+
/** --- 高度 point --- */
|
|
934
938
|
'height': number;
|
|
939
|
+
/** --- 宽度英寸 --- */
|
|
940
|
+
'inwidth': number;
|
|
941
|
+
/** --- 高度英寸 --- */
|
|
942
|
+
'inheight': number;
|
|
943
|
+
/** --- 宽度像素 --- */
|
|
944
|
+
'pxwidth': number;
|
|
945
|
+
/** --- 高度像素 --- */
|
|
946
|
+
'pxheight': number;
|
|
935
947
|
};
|
|
936
948
|
}
|
|
937
949
|
|