clickgo 3.11.15 → 3.11.16

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
@@ -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.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.15'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.16'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -46,12 +46,11 @@ class default_1 extends clickgo.form.AbstractForm {
46
46
  this.clientWidth = 0;
47
47
  this.scrollHeight = 0;
48
48
  this.scrollWidth = 0;
49
- this.multi = false;
49
+ this.type = ['text'];
50
50
  this.disabled = false;
51
51
  this.readonly = false;
52
52
  this.adaption = false;
53
53
  this.scroll = true;
54
- this.password = false;
55
54
  this.wrap = true;
56
55
  this.menu = false;
57
56
  this.gesture = false;
@@ -66,6 +65,7 @@ class default_1 extends clickgo.form.AbstractForm {
66
65
  this.border = 'solid';
67
66
  this.background = undefined;
68
67
  this.phcolor = undefined;
68
+ this.maxmin = false;
69
69
  }
70
70
  get textBorder() {
71
71
  switch (this.border) {
@@ -1,8 +1,8 @@
1
- <form width="350" height="550" title="Textbox">
1
+ <form width="450" height="550" title="Textbox">
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" :multi="multi" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :adaption="adaption" :scroll="scroll" :password="password" :maxlength="maxlength" :wrap="wrap" 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" :style="{'flex': multi && (!adaption || scroll || !wrap) ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': 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" :adaption="adaption" :scroll="scroll" :maxlength="maxlength" :wrap="wrap" :max="maxmin ? 200 : undefined" :min="maxmin ? 10 : undefined" 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" :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)]">
6
6
  <menulist v-if="menu">
7
7
  <menulist-item>Custom</menulist-item>
8
8
  </menulist>
@@ -12,13 +12,12 @@
12
12
  <template v-if="after" v-slot:after><select :data="['D','E','F']" plain></select></template>
13
13
  </text>
14
14
  <layout gutter="10">
15
- <button @click="multi = !multi" style="flex: 1;">{{multi ? '' : '!'}}multi</button>
15
+ <button @click="value = '300'" style="flex: 1;">v = '300'</button>
16
16
  <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
17
17
  <button @click="readonly = !readonly" style="flex: 1;">{{readonly ? '' : '!'}}readonly</button>
18
18
  <button @click="scroll = !scroll" style="flex: 1;">{{scroll ? '' : '!'}}scroll</button>
19
19
  </layout>
20
20
  <layout gutter="10">
21
- <button @click="password = !password" style="flex: 1;">{{password ? '' : '!'}}password</button>
22
21
  <button @click="wrap = !wrap" style="flex: 1;">{{wrap ? '' : '!'}}wrap</button>
23
22
  <button @click="menu = !menu" style="flex: 1;">{{menu ? '' : '!'}}menu</button>
24
23
  <button @click="gesture = !gesture" style="flex: 1;">{{gesture ? '' : '!'}}gesture</button>
@@ -26,17 +25,19 @@
26
25
  <layout gutter="10">
27
26
  <button @click="prepend = !prepend" style="flex: 1;">{{prepend ? '' : '!'}}prepend</button>
28
27
  <button @click="append = !append" style="flex: 1;">{{append ? '' : '!'}}append</button>
29
- <button @click="adaption = !adaption" style="flex: 1;">{{adaption ? '' : '!'}}adaption</button>
30
- <button @click="longClick" style="flex: 1;">{{long ? '' : '!'}}long</button>
28
+ <button @click="before = !before" style="flex: 1;">{{before ? '' : '!'}}before</button>
29
+ <button @click="after = !after" style="flex: 1;">{{after ? '' : '!'}}after</button>
31
30
  </layout>
32
31
  <layout gutter="10">
33
32
  <button @click="lineHeight = lineHeight === 1 ? 1.5 : 1" style="flex: 1;">line to {{lineHeight === 1 ? 1.5 : 1}}</button>
34
33
  <button @click="fontSize = fontSize === 12 ? 16 : 12" style="flex: 1;">size to {{fontSize === 12 ? 16 : 12}}</button>
35
- <button @click="before = !before" style="flex: 1;">{{before ? '' : '!'}}before</button>
36
- <button @click="after = !after" style="flex: 1;">{{after ? '' : '!'}}after</button>
34
+ <button @click="adaption = !adaption" style="flex: 1;">{{adaption ? '' : '!'}}adaption</button>
35
+ <button @click="longClick" style="flex: 1;">{{long ? '' : '!'}}long</button>
37
36
  </layout>
38
37
  <layout gutter="10">
38
+ <select v-model="type" :data="['text', 'password', 'multi', 'number']" style="flex: 1;"></select>
39
39
  <button @click="maxlength = maxlength === 0 ? 10 : 0" style="flex: 1;">maxlength to {{maxlength === 0 ? 10 : 0}}</button>
40
+ <button @click="maxmin = !maxmin" style="flex: 1;">{{maxmin ? '' : '!'}}max 200 min 10</button>
40
41
  </layout>
41
42
  <layout gutter="10">
42
43
  <button @click="border = 'solid'" style="flex: 2;">Set border solid</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.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.11.15';
27
+ const version = '3.11.16';
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.11.15';
16
+ const version = '3.11.16';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
package/dist/lib/dom.ts CHANGED
@@ -715,7 +715,7 @@ let watchPropertyIndex: number = 0;
715
715
  export function watchProperty(
716
716
  el: HTMLElement,
717
717
  name: string | string[],
718
- cb: (name: string, value: string) => void | Promise<void>,
718
+ cb: (name: string, value: any) => void | Promise<void>,
719
719
  immediate: boolean = false
720
720
  ): void {
721
721
  if (typeof name === 'string') {
package/dist/lib/task.ts CHANGED
@@ -581,7 +581,7 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
581
581
  watchProperty: function(
582
582
  el: HTMLElement,
583
583
  name: string | string[],
584
- cb: (name: string, value: string) => void | Promise<void>,
584
+ cb: (name: string, value: any) => void | Promise<void>,
585
585
  immediate: boolean = false
586
586
  ): void {
587
587
  dom.watchProperty(el, name, cb, immediate);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.11.15",
3
+ "version": "3.11.16",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",