clickgo 3.14.1 → 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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/form/control/date/date.js +2 -0
  3. package/dist/app/demo/form/control/date/date.xml +7 -1
  4. package/dist/app/demo/form/control/desc/desc.js +2 -0
  5. package/dist/app/demo/form/control/desc/desc.xml +5 -1
  6. package/dist/app/demo/form/control/list/list.js +1 -0
  7. package/dist/app/demo/form/control/list/list.xml +13 -9
  8. package/dist/app/demo/form/control/menu/menu.xml +2 -2
  9. package/dist/app/demo/form/control/select/select.js +1 -0
  10. package/dist/app/demo/form/control/select/select.xml +3 -2
  11. package/dist/app/demo/form/control/text/text.js +0 -1
  12. package/dist/app/demo/form/control/text/text.xml +1 -2
  13. package/dist/clickgo.js +1 -1
  14. package/dist/clickgo.ts +1 -1
  15. package/dist/control/arteditor.cgc +0 -0
  16. package/dist/control/box.cgc +0 -0
  17. package/dist/control/common.cgc +0 -0
  18. package/dist/control/desc.cgc +0 -0
  19. package/dist/control/drawer.cgc +0 -0
  20. package/dist/control/echarts.cgc +0 -0
  21. package/dist/control/form.cgc +0 -0
  22. package/dist/control/iconview.cgc +0 -0
  23. package/dist/control/jodit.cgc +0 -0
  24. package/dist/control/map.cgc +0 -0
  25. package/dist/control/monaco.cgc +0 -0
  26. package/dist/control/nav.cgc +0 -0
  27. package/dist/control/page.cgc +0 -0
  28. package/dist/control/property.cgc +0 -0
  29. package/dist/control/table.cgc +0 -0
  30. package/dist/control/task.cgc +0 -0
  31. package/dist/control/tuieditor.cgc +0 -0
  32. package/dist/control/tuiviewer.cgc +0 -0
  33. package/dist/control/xterm.cgc +0 -0
  34. package/dist/lib/dom.js +0 -2
  35. package/dist/lib/dom.ts +4 -7
  36. package/dist/lib/form.js +5 -4
  37. package/dist/lib/form.ts +6 -4
  38. package/dist/theme/byterun.cgt +0 -0
  39. package/dist/theme/familiar.cgt +0 -0
  40. package/dist/theme/light.cgt +0 -0
  41. 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.1'}"></script>
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**
@@ -33,6 +33,8 @@ class default_1 extends clickgo.form.AbstractForm {
33
33
  this.ts = undefined;
34
34
  this.tz = undefined;
35
35
  this.disabled = false;
36
+ this.start = false;
37
+ this.bottom = false;
36
38
  }
37
39
  settime() {
38
40
  this.ts = clickgo.tool.rand(1504304812000, 1704304812000);
@@ -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>
@@ -43,6 +43,8 @@ class default_1 extends clickgo.form.AbstractForm {
43
43
  'child': ['val1', 'val2', 'val3', 'val4']
44
44
  }
45
45
  ];
46
+ this.plain = false;
47
+ this.size = ['m'];
46
48
  }
47
49
  get maxLine() {
48
50
  let len = 0;
@@ -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;">
@@ -85,6 +85,7 @@ class default_1 extends clickgo.form.AbstractForm {
85
85
  }
86
86
  ];
87
87
  this.listMap5 = undefined;
88
+ this.disabledList = [];
88
89
  this.selectObject = ['test'];
89
90
  this.listDataObject = {
90
91
  'test': 'This is test',
@@ -57,20 +57,24 @@
57
57
  <menulist-item alt="I" @click="showIndex2">Show select</menulist-item>
58
58
  </menulist>
59
59
  </list>
60
- <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" style="flex: 1; width: 0;">
61
- <template v-slot:row="data">
62
- <layout gutter="10" align-v="center">
63
- <label style="flex: 1;">{{data.row.label}}</label>
64
- <button v-if="data.index === 4">abc</button>
65
- </layout>
66
- </template>
67
- </list>
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="tip">Right-click (computer) or press and hold (phone) to open the universal menu.</label>
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;">
@@ -61,8 +61,8 @@
61
61
  <template v-slot:pop>
62
62
  <menulist>
63
63
  <layout>
64
- <menulist-item alt="A" style="padding: 20px;">Box 1</menulist-item>
65
- <menulist-item alt="B" style="padding: 20px;">
64
+ <menulist-item alt="A">Box 1</menulist-item>
65
+ <menulist-item alt="B">
66
66
  <template v-slot>Box 2</template>
67
67
  <template v-slot:pop>
68
68
  <menulist>
@@ -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
- <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" @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>
50
- <button @click="select2[0]='ha6'">Select disabled</button>
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>
@@ -49,7 +49,6 @@ class default_1 extends clickgo.form.AbstractForm {
49
49
  this.type = ['text'];
50
50
  this.disabled = false;
51
51
  this.readonly = false;
52
- this.adaption = false;
53
52
  this.scroll = true;
54
53
  this.wrap = true;
55
54
  this.menu = false;
@@ -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" :adaption="adaption" :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') && (!adaption || scroll || !wrap) ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': (type[0] === 'multi') && (!adaption || scroll || !wrap) ? '0' : undefined, 'border-width': textBorder}" :class="[phcolor && ('ph-' + phcolor)]">
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.1';
27
+ const version = '3.14.3';
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.14.1';
16
+ const version = '3.14.3';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K] {
2583
+ export function createElement<T extends keyof HTMLElementTagNameMap>(tagName: T): HTMLElementTagNameMap[T] {
2587
2584
  return document.createElement(tagName);
2588
2585
  }
2589
2586
 
package/dist/lib/form.js CHANGED
@@ -1817,15 +1817,16 @@ function hidePop(pop) {
1817
1817
  }
1818
1818
  else {
1819
1819
  if (popInfo.list[level]) {
1820
- popInfo.list[level].removeAttribute('data-cg-open');
1821
- popInfo.list[level].removeAttribute('data-cg-level');
1820
+ const opop = popInfo.list[level];
1821
+ opop.removeAttribute('data-cg-open');
1822
+ opop.removeAttribute('data-cg-level');
1822
1823
  clickgo.dom.unwatchSize(popInfo.list[level]);
1823
1824
  clickgo.dom.unwatchPosition(pop);
1824
1825
  clickgo.tool.sleep(334).then(() => {
1825
- if (popInfo.list[level].dataset.cgLevel !== undefined) {
1826
+ if (opop.dataset.cgLevel !== undefined) {
1826
1827
  return;
1827
1828
  }
1828
- popInfo.list[level].dataset.cgPopNone = '';
1829
+ opop.dataset.cgPopNone = '';
1829
1830
  }).catch(() => {
1830
1831
  });
1831
1832
  }
package/dist/lib/form.ts CHANGED
@@ -2381,15 +2381,17 @@ export function hidePop(pop?: HTMLElement | types.IVue): void {
2381
2381
  }
2382
2382
  else {
2383
2383
  if (popInfo.list[level]) {
2384
- popInfo.list[level].removeAttribute('data-cg-open');
2385
- popInfo.list[level].removeAttribute('data-cg-level');
2384
+ /** --- el 对应的 pop --- */
2385
+ const opop = popInfo.list[level];
2386
+ opop.removeAttribute('data-cg-open');
2387
+ opop.removeAttribute('data-cg-level');
2386
2388
  clickgo.dom.unwatchSize(popInfo.list[level]);
2387
2389
  clickgo.dom.unwatchPosition(pop);
2388
2390
  clickgo.tool.sleep(334).then(() => {
2389
- if (popInfo.list[level].dataset.cgLevel !== undefined) {
2391
+ if (opop.dataset.cgLevel !== undefined) {
2390
2392
  return;
2391
2393
  }
2392
- popInfo.list[level].dataset.cgPopNone = '';
2394
+ opop.dataset.cgPopNone = '';
2393
2395
  }).catch(() => {
2394
2396
  //
2395
2397
  });
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.14.1",
3
+ "version": "3.14.3",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",