clickgo 3.14.2 → 3.14.3
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/date/date.js +2 -0
- package/dist/app/demo/form/control/date/date.xml +7 -1
- package/dist/app/demo/form/control/desc/desc.js +2 -0
- package/dist/app/demo/form/control/desc/desc.xml +5 -1
- package/dist/app/demo/form/control/list/list.js +1 -0
- package/dist/app/demo/form/control/list/list.xml +13 -9
- package/dist/app/demo/form/control/select/select.js +1 -0
- package/dist/app/demo/form/control/select/select.xml +3 -2
- package/dist/app/demo/form/control/text/text.js +0 -1
- package/dist/app/demo/form/control/text/text.xml +1 -2
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/lib/dom.js +0 -2
- package/dist/lib/dom.ts +4 -7
- package/package.json +1 -1
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.14.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.14.3'}"></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**index.js**
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<form width="400" height="350" title="Date">
|
|
2
2
|
<layout direction="v" gutter="10" style="padding: 10px; flex: 1;">
|
|
3
3
|
<label>Timestamp: {{ts}}, Time zone: {{tz}}</label>
|
|
4
|
-
<date v-model="ts" v-model:tz="tz" :date="date" :time="time" :zone="zone" :disabled="disabled"
|
|
4
|
+
<date v-model="ts" v-model:tz="tz" :date="date" :time="time" :zone="zone" :disabled="disabled" :start="start ? 1704067200_000 : undefined">
|
|
5
|
+
<template v-if="bottom" v-slot="d">
|
|
6
|
+
<layout style="flex: 1;" align-h="center">{{d.year}}</layout>
|
|
7
|
+
</template>
|
|
8
|
+
</date>
|
|
5
9
|
<layout gutter="10">
|
|
6
10
|
<button @click="date = !date" style="flex: 1;">{{date ? '' : '!'}}date</button>
|
|
7
11
|
<button @click="time = !time" style="flex: 1;">{{time ? '' : '!'}}time</button>
|
|
@@ -10,6 +14,8 @@
|
|
|
10
14
|
<layout gutter="10">
|
|
11
15
|
<button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
|
|
12
16
|
<button @click="settime" style="flex: 1;">Set time</button>
|
|
17
|
+
<button @click="start = !start" style="flex: 1;">{{start ? '' : '!'}}start</button>
|
|
18
|
+
<button @click="bottom = !bottom" style="flex: 1;">{{bottom ? '' : '!'}}bottom</button>
|
|
13
19
|
</layout>
|
|
14
20
|
</layout>
|
|
15
21
|
</form>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<form title="Desc" width="500" height="500" padding="10">
|
|
2
2
|
<layout gutter="10" direction="v" style="flex: 1;">
|
|
3
|
-
<desc :border="border" :collapse="collapse">
|
|
3
|
+
<desc :border="border" :collapse="collapse" :size="size[0]" :plain="plain">
|
|
4
4
|
<desc-row>
|
|
5
5
|
<desc-head>HEAD1</desc-head>
|
|
6
6
|
<desc-head>HEAD2</desc-head>
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
<button @click="border = !border" style="flex: 1">border: {{border ? 'true' : 'false'}}</button>
|
|
23
23
|
<button @click="collapse = !collapse" style="flex: 1;">collapse: {{collapse ? 'true' : 'false'}}</button>
|
|
24
24
|
</layout>
|
|
25
|
+
<layout gutter="10">
|
|
26
|
+
<button @click="plain = !plain" style="flex: 1;">plain: {{plain ? 'true' : 'false'}}</button>
|
|
27
|
+
<select v-model="size" style="flex: 1;" :data="['s', 'm']" />
|
|
28
|
+
</layout>
|
|
25
29
|
<label>Test: {{cols}}</label>
|
|
26
30
|
<flow style="flex: 1;">
|
|
27
31
|
<desc :border="border" :collapse="collapse" style="flex: 1;">
|
|
@@ -57,20 +57,24 @@
|
|
|
57
57
|
<menulist-item alt="I" @click="showIndex2">Show select</menulist-item>
|
|
58
58
|
</menulist>
|
|
59
59
|
</list>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
<layout direction="v" gutter="10" style="flex: 1; width: 0;">
|
|
61
|
+
<list :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :scroll="scroll" :virtual="virtual" :data="listData2" :check="check" :disabledList="disabledList" style="flex: 1;">
|
|
62
|
+
<template v-slot:row="data">
|
|
63
|
+
<layout gutter="10" align-v="center">
|
|
64
|
+
<label style="flex: 1;">{{data.row.label}}</label>
|
|
65
|
+
<button v-if="data.index === 4">abc</button>
|
|
66
|
+
</layout>
|
|
67
|
+
</template>
|
|
68
|
+
</list>
|
|
69
|
+
<button v-if="!disabledList.length" @click="disabledList = ['7']">disabledList</button>
|
|
70
|
+
<label v-else>{{disabledList}}</label>
|
|
71
|
+
</layout>
|
|
68
72
|
<layout direction="v" gutter="10" style="flex: 1; width: 0;">
|
|
69
73
|
<list :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :scroll="scroll" :virtual="virtual":data="listData5" :check="check" :map="listMap5" style="flex: 1;"></list>
|
|
70
74
|
<button v-if="listMap5===undefined" @click="listMap5={'label':'name','value':'id','children':'sub'}">Set map</button>
|
|
71
75
|
</layout>
|
|
72
76
|
</layout>
|
|
73
|
-
<label class="
|
|
77
|
+
<label class="mtip">Right-click (computer) or press and hold (phone) to open the universal menu.</label>
|
|
74
78
|
</layout>
|
|
75
79
|
<!-- object -->
|
|
76
80
|
<layout v-else-if="ntab === 'object'" direction="v" gutter="10" style="flex: 1; width: 0; padding: 10px;">
|
|
@@ -110,6 +110,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
110
110
|
this.s3other = false;
|
|
111
111
|
this.slist3r = ['a', 'b', 'c', 'haha3'];
|
|
112
112
|
this.editableData = true;
|
|
113
|
+
this.disabledList = [];
|
|
113
114
|
this.padding = false;
|
|
114
115
|
this.fontSize = false;
|
|
115
116
|
this.background = false;
|
|
@@ -45,9 +45,10 @@
|
|
|
45
45
|
<layout gutter="10" direction="v" style="padding: 10px;">
|
|
46
46
|
<label>Now select value is {{select2}}</label>
|
|
47
47
|
<label>Label: {{label2}}</label>
|
|
48
|
+
<select v-model="select2" @label="label2 = $event" :data="slist2" :disabled="disabled" :editable="editable" :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" :disabledList="disabledList" @load="onLoad" @remote="onRemote" @add="onAdd" @remove="onRemove" @added="onAdded" @removed="onRemoved" @change="onChange" @changed="onChanged" @tagclick="onTagclick" style="flex: 1;" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
|
|
48
49
|
<layout gutter="10">
|
|
49
|
-
<
|
|
50
|
-
<button @click="
|
|
50
|
+
<button @click="select2[0]='ha6'" style="flex: 1">Select disabled</button>
|
|
51
|
+
<button v-if="!disabledList.length" @click="disabledList = ['haha3']" style="flex: 1">disabledList</button>
|
|
51
52
|
</layout>
|
|
52
53
|
<list :data="addRemoveList" style="height: 100px;"></list>
|
|
53
54
|
<label>Custom height:</label>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
|
|
3
3
|
<label>Text Length: {{value.length}}, Selection Start: {{selectionStart}}, Selection End: {{selectionEnd}}, Focus: {{isFocus}}</label>
|
|
4
4
|
<label>Scroll Left: {{scrollLeft}}, Scroll Top: {{scrollTop}}, Scroll Height: {{scrollHeight}}, Scroll Width: {{scrollWidth}}, Client Height: {{clientHeight}}, Client Width: {{clientWidth}}</label>
|
|
5
|
-
<text v-model="value" placeholder="placeholder" :type="type[0]" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :
|
|
5
|
+
<text v-model="value" placeholder="placeholder" :type="type[0]" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :scroll="scroll" :maxlength="maxlength" :wrap="wrap" :max="max" :min="min" :plain="plain" v-model:scroll-left="scrollLeft" v-model:scroll-top="scrollTop" v-model:selection-start="selectionStart" v-model:selection-end="selectionEnd" @clientheight="clientHeight = $event" @clientwidth="clientWidth = $event" @scrollheight="scrollHeight = $event" @scrollwidth="scrollWidth = $event" @focus="isFocus = true" @blur="isFocus = false" @beforechange="onBeforechange" :style="{'flex': (type[0] === 'multi') && (scroll || !wrap) ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': (type[0] === 'multi') && (scroll || !wrap) ? '0' : undefined, 'border-width': textBorder}" :class="[phcolor && ('ph-' + phcolor)]">
|
|
6
6
|
<menulist v-if="menu">
|
|
7
7
|
<menulist-item>Custom</menulist-item>
|
|
8
8
|
</menulist>
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
<layout gutter="10">
|
|
33
33
|
<button @click="lineHeight = lineHeight === 1 ? 1.5 : 1" style="flex: 1;">line to {{lineHeight === 1 ? 1.5 : 1}}</button>
|
|
34
34
|
<button @click="fontSize = fontSize === 12 ? 16 : 12" style="flex: 1;">size to {{fontSize === 12 ? 16 : 12}}</button>
|
|
35
|
-
<button @click="adaption = !adaption" style="flex: 1;">{{adaption ? '' : '!'}}adaption</button>
|
|
36
35
|
<button @click="longClick" style="flex: 1;">{{long ? '' : '!'}}long</button>
|
|
37
36
|
</layout>
|
|
38
37
|
<layout gutter="10">
|
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.14.
|
|
27
|
+
const version = '3.14.3';
|
|
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/desc.cgc
CHANGED
|
Binary file
|
package/dist/control/table.cgc
CHANGED
|
Binary file
|
package/dist/lib/dom.js
CHANGED
|
@@ -219,7 +219,6 @@ function unwatchPosition(el) {
|
|
|
219
219
|
const formId = formWrap.dataset.formId;
|
|
220
220
|
const panelWrap = findParentByData(el, 'panel-id');
|
|
221
221
|
const panelId = panelWrap ? panelWrap.dataset.panelId : 'default';
|
|
222
|
-
const item = watchPositionObjects[formId][panelId][index];
|
|
223
222
|
el.removeAttribute('data-cg-poindex');
|
|
224
223
|
delete watchPositionObjects[formId][panelId][index];
|
|
225
224
|
if (Object.keys(watchPositionObjects[formId][panelId]).length) {
|
|
@@ -1990,7 +1989,6 @@ function siblings(el) {
|
|
|
1990
1989
|
}
|
|
1991
1990
|
const list = [];
|
|
1992
1991
|
for (let i = 0; i < el.parentNode.children.length; ++i) {
|
|
1993
|
-
el.previousElementSibling;
|
|
1994
1992
|
const e = el.parentNode.children.item(i);
|
|
1995
1993
|
if (e === el) {
|
|
1996
1994
|
continue;
|
package/dist/lib/dom.ts
CHANGED
|
@@ -292,7 +292,6 @@ export function unwatchPosition(el: HTMLElement): void {
|
|
|
292
292
|
// --- 获取监视标签的所属 panel ---
|
|
293
293
|
const panelWrap = findParentByData(el, 'panel-id');
|
|
294
294
|
const panelId = panelWrap ? panelWrap.dataset.panelId! : 'default';
|
|
295
|
-
const item = watchPositionObjects[formId][panelId][index];
|
|
296
295
|
el.removeAttribute('data-cg-poindex');
|
|
297
296
|
delete watchPositionObjects[formId][panelId][index];
|
|
298
297
|
if (Object.keys(watchPositionObjects[formId][panelId]).length) {
|
|
@@ -1181,7 +1180,7 @@ const watchTimerHandler = function(): void {
|
|
|
1181
1180
|
item.handler({
|
|
1182
1181
|
'position': position,
|
|
1183
1182
|
'size': size
|
|
1184
|
-
});
|
|
1183
|
+
}) as any;
|
|
1185
1184
|
}
|
|
1186
1185
|
watchPositionObjects[formId][panelId][index].rect = rect;
|
|
1187
1186
|
};
|
|
@@ -2514,7 +2513,6 @@ export function siblings(el: HTMLElement): HTMLElement[] {
|
|
|
2514
2513
|
}
|
|
2515
2514
|
const list: HTMLElement[] = [];
|
|
2516
2515
|
for (let i = 0; i < el.parentNode.children.length; ++i) {
|
|
2517
|
-
el.previousElementSibling
|
|
2518
2516
|
const e = el.parentNode.children.item(i) as HTMLElement;
|
|
2519
2517
|
if (e === el) {
|
|
2520
2518
|
continue;
|
|
@@ -2579,11 +2577,10 @@ export async function exitFullscreen(): Promise<boolean> {
|
|
|
2579
2577
|
}
|
|
2580
2578
|
|
|
2581
2579
|
/**
|
|
2582
|
-
*
|
|
2583
|
-
* @param tagName
|
|
2584
|
-
* @returns
|
|
2580
|
+
* --- 创建 element ---
|
|
2581
|
+
* @param tagName 标签名
|
|
2585
2582
|
*/
|
|
2586
|
-
export function createElement<
|
|
2583
|
+
export function createElement<T extends keyof HTMLElementTagNameMap>(tagName: T): HTMLElementTagNameMap[T] {
|
|
2587
2584
|
return document.createElement(tagName);
|
|
2588
2585
|
}
|
|
2589
2586
|
|