clickgo 3.13.20 → 3.14.0

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
@@ -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.13.20'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.14.0'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -126,17 +126,19 @@ class default_1 extends clickgo.form.AbstractForm {
126
126
  return rtn;
127
127
  }
128
128
  get adData() {
129
+ var _a;
129
130
  const data = [];
130
131
  for (let i = 0; i < this.slist.length; ++i) {
131
132
  const item = this.slist[i];
132
133
  data.push({
133
- 'type': item.type === undefined ? 'split' : item.type,
134
+ 'type': (_a = item.type) !== null && _a !== void 0 ? _a : 'split',
134
135
  'menu': i === 20 ? true : false
135
136
  });
136
137
  }
137
138
  return data;
138
139
  }
139
140
  get listData() {
141
+ var _a;
140
142
  const data = ['Item1', {
141
143
  'label': 'Tip',
142
144
  'color': 'tip'
@@ -167,7 +169,7 @@ class default_1 extends clickgo.form.AbstractForm {
167
169
  for (let k = 0; k < this.slist.length; ++k) {
168
170
  if (this.slist[k].name) {
169
171
  data.push({
170
- 'label': `index: ${k}, value: ${this.slist[k].name}${(k === 20 ? ' long test long test long test long test long test' : '')}`,
172
+ 'label': `index: ${k}, value: ${(_a = this.slist[k].name) !== null && _a !== void 0 ? _a : ''}${(k === 20 ? ' long test long test long test long test long test' : '')}`,
171
173
  'value': this.slist[k].name,
172
174
  'disabled': this.slist[k].disabled
173
175
  });
@@ -202,9 +204,13 @@ class default_1 extends clickgo.form.AbstractForm {
202
204
  else {
203
205
  const types = [];
204
206
  for (const item of this.select) {
205
- types.push(this.slist[item].type);
207
+ const sitem = this.slist[item];
208
+ if (sitem.type === undefined) {
209
+ continue;
210
+ }
211
+ types.push(sitem.type);
206
212
  }
207
- clickgo.form.dialog(`Type is ${types}.`).catch((e) => { throw e; });
213
+ clickgo.form.dialog(`Type is ${types.join(', ')}.`).catch((e) => { throw e; });
208
214
  }
209
215
  }
210
216
  selectButton() {
@@ -4,7 +4,7 @@
4
4
  <!-- greatselect -->
5
5
  <layout v-if="ntab === 'greatselect'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
6
6
  <label>Now select value is {{select}}:</label>
7
- <greatselect v-model="select" :data="slist" :area="area" :disabled="disabled" :multi="multi" :plain="plain" :sizes="sizes" :virtual="virtual" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}" style="line-height: 1.3;" @add="onGAdd" @remove="onGRemove" @change="onGChange" @changed="onGChanged">
7
+ <greatselect v-model="select" :data="slist" :area="area" :disabled="disabled" :multi="multi" :plain="plain" :sizes="sizes" :virtual="virtual" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}" style="line-height: 1.3;" @add="onGAdd" @remove="onGRemove" @change="onGChange" @changed="onGChanged">
8
8
  <layout align-v="center" gutter="5" style="flex: 1;">
9
9
  <img :src="slist[select[0]] ? slist[select[0]].src : ''" style="width: 32px; height: 32px;"></img>
10
10
  <block>
@@ -29,7 +29,7 @@
29
29
  </template>
30
30
  </greatselect>
31
31
  <label>Custom pop:</label>
32
- <greatselect pop="custom" :area="area" :plain="plain" :disabled="disabled" :virtual="virtual" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}">
32
+ <greatselect pop="custom" :area="area" :plain="plain" :disabled="disabled" :virtual="virtual" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}">
33
33
  <label>Pop is button.</label>
34
34
  <template v-slot:pop>
35
35
  <button>Nothing</button>
@@ -46,15 +46,15 @@
46
46
  <label>Now select value is {{select2}}</label>
47
47
  <label>Label: {{label2}}</label>
48
48
  <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, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
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
50
  <button @click="select2[0]='ha6'">Select disabled</button>
51
51
  </layout>
52
52
  <list :data="addRemoveList" style="height: 100px;"></list>
53
53
  <label>Custom height:</label>
54
- <select :data="['1','2','3','4','5']" :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" style="height: 60px;" @load="onLoad" @remote="onRemote" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
54
+ <select :data="['1','2','3','4','5']" :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" style="height: 60px;" @load="onLoad" @remote="onRemote" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
55
55
  <label>Always editable: {{aemodel}}</label>
56
56
  <layout gutter="10">
57
- <select v-model="aemodel" :data="editableData ? ['1','2','3',{'label':'is gDa','value':'gDa'},'5'] : ['6','7','8','9','10',{'label':'But gDa','value':'gDa'}]" :disabled="disabled" editable editablelabel :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" placeholder="Please enter" @load="onLoad" @remote="onRemote" style="flex: 1;" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
57
+ <select v-model="aemodel" :data="editableData ? ['1','2','3',{'label':'is gDa','value':'gDa'},'5'] : ['6','7','8','9','10',{'label':'But gDa','value':'gDa'}]" :disabled="disabled" editable editablelabel :multi="multi" :plain="plain" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" placeholder="Please enter" @load="onLoad" @remote="onRemote" style="flex: 1;" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
58
58
  <button @click="aemodel.length=0">clear</button>
59
59
  <button @click="aemodel[0] = '4'">4</button>
60
60
  <button @click="aemodel[0] = '22'">22</button>
@@ -86,7 +86,7 @@
86
86
  <label>Now select value is {{select3}}</label>
87
87
  <label>Label: {{label3}}</label>
88
88
  <label>Level: {{level3}}</label>
89
- <levelselect ref="lese" v-model="select3" @label="label3 = $event" @level="level3 = $event" :data="s3other ? slist3r : slist2" :disabled="disabled" :plain="plain" :async="async" :virtual="virtual" placeholder="Please enter" @load="onLoad" @loaded="onLoaded" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></levelselect>
89
+ <levelselect ref="lese" v-model="select3" @label="label3 = $event" @level="level3 = $event" :data="s3other ? slist3r : slist2" :disabled="disabled" :plain="plain" :async="async" :virtual="virtual" placeholder="Please enter" @load="onLoad" @loaded="onLoaded" :style="{'font-size': fontSize ? '16px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></levelselect>
90
90
  <button @click="async = !async">{{async ? '' : '!'}}async</button>
91
91
  <layout gutter="10">
92
92
  <button @click="select3 = 'title'" style="flex: 1;">Set: 'title'</button>
@@ -112,7 +112,6 @@
112
112
  </layout>
113
113
  <layout gutter="10">
114
114
  <button @click="fontSize = !fontSize" style="flex: 1;">Change font size</button>
115
- <button @click="padding = !padding" style="flex: 1;">Change padding</button>
116
115
  </layout>
117
116
  <layout gutter="10">
118
117
  <button @click="background = !background" style="flex: 1;">Change bg color</button>
@@ -67,6 +67,7 @@ class default_1 extends clickgo.form.AbstractForm {
67
67
  this.phcolor = undefined;
68
68
  this.max = undefined;
69
69
  this.min = undefined;
70
+ this.plain = false;
70
71
  this.beforechange = false;
71
72
  }
72
73
  get textBorder() {
@@ -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" 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" :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)]">
6
6
  <menulist v-if="menu">
7
7
  <menulist-item>Custom</menulist-item>
8
8
  </menulist>
@@ -46,9 +46,10 @@
46
46
  <label style="flex: 1;">{{min}}</label>
47
47
  </layout>
48
48
  <layout gutter="10">
49
- <button @click="max = '200'; min = '10'" style="flex: 1;">max 200 min 10</button>
49
+ <button @click="max = '200'; min = '10'" style="flex: 2;">max 200 min 10</button>
50
50
  <button @click="max = '20'" style="flex: 1;">max 20</button>
51
51
  <button @click="max = undefined;min = undefined" style="flex: 1;">clear</button>
52
+ <button @click="plain = !plain" style="flex: 1;">plain</button>
52
53
  </layout>
53
54
  <layout gutter="10">
54
55
  <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.13.20';
27
+ const version = '3.14.0';
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.13.20';
16
+ const version = '3.14.0';
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/global.css CHANGED
@@ -1 +1 @@
1
- #cg-wrap{position:fixed;left:0;top:0;--g-padding:7px;--g-padding-l:14px;--g-padding-xl:30px;--g-bpadding:18px;--g-margin:2px;--g-radius:0;--g-size:12px;--g-family:"Lucida Sans Unicode","Helvetica Neue","Helvetica","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans CJK","Source Han Sans","WenQuanYi Micro Hei","Microsoft YaHei","sans-serif";--g-line:1;--g-cubic:cubic-bezier(0.39, 0.575, 0.565, 1);--g-transition:none;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--success-bg:hsl(150, 100%, 98%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--success-bg:hsl(210, 100%, 98%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--warning-bg:hsl(20, 100%, 98%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--danger-bg:hsl(350, 100%, 98%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--face-child:hsl(0, 0%, 90%);--face-hover:hsl(0, 0%, 88%);--face-selected:hsl(0, 0%, 85%);--g-pop-background:#FFF;--g-pop-backdrop:none;--g-pop-border:solid .5px var(--g-border-color);--g-shadow:none;--g-outline-shadow:none;--g-color:hsl(0, 0%, 20%);--g-color-hover:hsl(0, 0%, 30%);--g-color-active:hsl(0, 0%, 10%);--g-color-focus:hsl(0, 0%, 15%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-background-selected:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%);--g-block-background:hsl(0, 0%, 85%);--g-block-background-hover:hsl(0, 0%, 75%);--g-block-dark-background:hsl(0, 0%, 15%);--g-block-dark-background-hover:hsl(0, 0%, 25%)}[data-cg-disabled]{cursor:not-allowed}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0px 15px 30px rgba(0,0,0,.07);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .3s var(--g-cubic);transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:rgba(255,255,255,.1);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);box-shadow:0 3px 5px rgba(0,0,0,.1);opacity:0;display:flex;justify-content:center;align-items:center;border:solid 1px #fff;transition:all .3s var(--g-cubic);transition-property:transform,border;transform:initial}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .3s var(--g-cubic);transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .3s var(--g-cubic)}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .3s var(--g-cubic);transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .3s var(--g-cubic);transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .3s var(--g-cubic)}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 15px 30px rgba(0,0,0,.07);transition:.3s var(--g-cubic);transition-property:transform,opacity;transform:translateY(-10px);opacity:0;overflow:hidden}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.3s var(--g-cubic);transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0px 15px 30px rgba(0,0,0,.07);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);pointer-events:none}.cg-notify-wrap.cg-notify-only{align-items:center}.cg-notify-wrap.cg-notify-full .cg-notify-title{padding-bottom:10px}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .3s var(--g-cubic);overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(150px) saturate(1.5);backdrop-filter:blur(150px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0px 15px 30px rgba(0,0,0,.07);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
1
+ #cg-wrap{position:fixed;left:0;top:0;--g-padding:7px;--g-padding-l:14px;--g-padding-xl:30px;--g-bpadding:18px;--g-margin:2px;--g-radius:0;--g-size:12px;--g-family:"Lucida Sans Unicode","Helvetica Neue","Helvetica","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans CJK","Source Han Sans","WenQuanYi Micro Hei","Microsoft YaHei","sans-serif";--g-line:1;--g-cubic:cubic-bezier(0.39, 0.575, 0.565, 1);--g-transition:none;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--success-bg:hsl(150, 100%, 98%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--success-bg:hsl(210, 100%, 98%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--warning-bg:hsl(20, 100%, 98%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--danger-bg:hsl(350, 100%, 98%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--face-child:hsl(0, 0%, 90%);--face-hover:hsl(0, 0%, 88%);--face-selected:hsl(0, 0%, 85%);--g-pop-background:#FFF;--g-pop-backdrop:none;--g-pop-border:solid .5px var(--g-border-color);--g-shadow:none;--g-outline-shadow:none;--g-color:hsl(0, 0%, 20%);--g-color-hover:hsl(0, 0%, 30%);--g-color-active:hsl(0, 0%, 10%);--g-color-focus:hsl(0, 0%, 15%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-background-selected:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%);--g-block-background:hsl(0, 0%, 85%);--g-block-background-hover:hsl(0, 0%, 75%);--g-block-dark-background:hsl(0, 0%, 15%);--g-block-dark-background-hover:hsl(0, 0%, 25%)}[data-cg-disabled]{cursor:not-allowed}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0px 15px 30px rgba(0,0,0,.07);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .3s var(--g-cubic);transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:rgba(255,255,255,.1);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);box-shadow:0 3px 5px rgba(0,0,0,.1);opacity:0;display:flex;justify-content:center;align-items:center;border:solid 1px #fff;transition:all .3s var(--g-cubic);transition-property:transform,border;transform:initial}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .3s var(--g-cubic);transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .3s var(--g-cubic)}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .3s var(--g-cubic);transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .3s var(--g-cubic);transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .3s var(--g-cubic)}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 15px 30px rgba(0,0,0,.07);transition:.3s var(--g-cubic);transition-property:transform,opacity;transform:translateY(-10px);opacity:0;overflow:hidden}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-pop-none]{display:none !important}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.3s var(--g-cubic);transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0px 15px 30px rgba(0,0,0,.07);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);pointer-events:none}.cg-notify-wrap.cg-notify-only{align-items:center}.cg-notify-wrap.cg-notify-full .cg-notify-title{padding-bottom:10px}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .3s var(--g-cubic);overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(150px) saturate(1.5);backdrop-filter:blur(150px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0px 15px 30px rgba(0,0,0,.07);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
package/dist/lib/form.js CHANGED
@@ -1692,14 +1692,21 @@ function showPop(el, pop, direction, opt = {}) {
1692
1692
  return;
1693
1693
  }
1694
1694
  if (pop && !opt.flow) {
1695
- refreshPopPosition(el, pop, direction, opt.size);
1696
- if (opt.autoPosition) {
1697
- clickgo.dom.watchSize(pop, () => {
1698
- refreshPopPosition(el, pop, direction, opt.size);
1699
- });
1700
- }
1701
- pop.dataset.cgOpen = '';
1695
+ pop.removeAttribute('data-cg-pop-none');
1702
1696
  pop.dataset.cgFlow = '';
1697
+ clickgo.tool.sleep(34).then(() => {
1698
+ if (pop.dataset.cgFlow === undefined) {
1699
+ return;
1700
+ }
1701
+ refreshPopPosition(el, pop, direction, opt.size);
1702
+ if (opt.autoPosition) {
1703
+ clickgo.dom.watchSize(pop, () => {
1704
+ refreshPopPosition(el, pop, direction, opt.size);
1705
+ });
1706
+ }
1707
+ pop.dataset.cgOpen = '';
1708
+ }).catch(() => {
1709
+ });
1703
1710
  return;
1704
1711
  }
1705
1712
  const now = Date.now();
@@ -1727,25 +1734,32 @@ function showPop(el, pop, direction, opt = {}) {
1727
1734
  el.dataset.cgLevel = (popInfo.elList.length - 1).toString();
1728
1735
  return;
1729
1736
  }
1730
- refreshPopPosition(el, pop, direction, opt.size);
1731
- if (opt.autoPosition && typeof direction === 'string') {
1732
- clickgo.dom.watchSize(pop, () => {
1733
- refreshPopPosition(el, pop, direction, opt.size);
1734
- });
1735
- }
1736
- if (opt.autoScroll && typeof direction === 'string') {
1737
- clickgo.dom.watchPosition(el, () => {
1738
- refreshPopPosition(el, pop, direction, opt.size);
1739
- });
1740
- }
1737
+ pop.removeAttribute('data-cg-pop-none');
1741
1738
  popInfo.list.push(pop);
1742
1739
  popInfo.elList.push(el);
1743
1740
  popInfo.wayList.push((_a = opt.way) !== null && _a !== void 0 ? _a : 'normal');
1744
1741
  popInfo.time.push(Date.now());
1745
- pop.dataset.cgOpen = '';
1746
1742
  pop.dataset.cgLevel = (popInfo.list.length - 1).toString();
1747
- el.dataset.cgPopOpen = '';
1748
1743
  el.dataset.cgLevel = (popInfo.elList.length - 1).toString();
1744
+ clickgo.tool.sleep(34).then(() => {
1745
+ if (pop.dataset.cgLevel === undefined) {
1746
+ return;
1747
+ }
1748
+ refreshPopPosition(el, pop, direction, opt.size);
1749
+ if (opt.autoPosition && typeof direction === 'string') {
1750
+ clickgo.dom.watchSize(pop, () => {
1751
+ refreshPopPosition(el, pop, direction, opt.size);
1752
+ });
1753
+ }
1754
+ if (opt.autoScroll && typeof direction === 'string') {
1755
+ clickgo.dom.watchPosition(el, () => {
1756
+ refreshPopPosition(el, pop, direction, opt.size);
1757
+ });
1758
+ }
1759
+ pop.dataset.cgOpen = '';
1760
+ el.dataset.cgPopOpen = '';
1761
+ }).catch(() => {
1762
+ });
1749
1763
  }
1750
1764
  exports.showPop = showPop;
1751
1765
  function hidePop(pop) {
@@ -1766,17 +1780,19 @@ function hidePop(pop) {
1766
1780
  pop.removeAttribute('data-cg-flow');
1767
1781
  pop.removeAttribute('data-cg-open');
1768
1782
  clickgo.dom.unwatchSize(pop);
1783
+ clickgo.tool.sleep(334).then(() => {
1784
+ if (pop.dataset.cgFlow !== undefined) {
1785
+ return;
1786
+ }
1787
+ pop.dataset.cgPopNone = '';
1788
+ }).catch(() => {
1789
+ });
1769
1790
  return;
1770
1791
  }
1771
- let isPop = false;
1772
- if (pop.dataset.cgPopOpen !== undefined) {
1773
- }
1774
- else if (pop.dataset.cgOpen !== undefined) {
1775
- isPop = true;
1776
- }
1777
- else {
1792
+ if (pop.dataset.cgLevel === undefined) {
1778
1793
  return;
1779
1794
  }
1795
+ const isPop = pop.dataset.cgPop !== undefined ? true : false;
1780
1796
  const level = pop.dataset.cgLevel ? parseInt(pop.dataset.cgLevel) : -1;
1781
1797
  if (level === -1) {
1782
1798
  return;
@@ -1791,6 +1807,13 @@ function hidePop(pop) {
1791
1807
  clickgo.dom.unwatchPosition(popInfo.elList[level]);
1792
1808
  popInfo.elList[level].removeAttribute('data-cg-pop-open');
1793
1809
  popInfo.elList[level].removeAttribute('data-cg-level');
1810
+ clickgo.tool.sleep(334).then(() => {
1811
+ if (pop.dataset.cgLevel !== undefined) {
1812
+ return;
1813
+ }
1814
+ pop.dataset.cgPopNone = '';
1815
+ }).catch(() => {
1816
+ });
1794
1817
  }
1795
1818
  else {
1796
1819
  if (popInfo.list[level]) {
@@ -1798,6 +1821,13 @@ function hidePop(pop) {
1798
1821
  popInfo.list[level].removeAttribute('data-cg-level');
1799
1822
  clickgo.dom.unwatchSize(popInfo.list[level]);
1800
1823
  clickgo.dom.unwatchPosition(pop);
1824
+ clickgo.tool.sleep(334).then(() => {
1825
+ if (popInfo.list[level].dataset.cgLevel !== undefined) {
1826
+ return;
1827
+ }
1828
+ popInfo.list[level].dataset.cgPopNone = '';
1829
+ }).catch(() => {
1830
+ });
1801
1831
  }
1802
1832
  pop.removeAttribute('data-cg-pop-open');
1803
1833
  pop.removeAttribute('data-cg-level');
package/dist/lib/form.ts CHANGED
@@ -2235,14 +2235,23 @@ export function showPop(el: HTMLElement | types.IVue, pop: HTMLElement | types.I
2235
2235
  }
2236
2236
  // --- 是否不进入 pop 流 ---
2237
2237
  if (pop && !opt.flow) {
2238
- refreshPopPosition(el, pop, direction, opt.size);
2239
- if (opt.autoPosition) {
2240
- clickgo.dom.watchSize(pop, () => {
2241
- refreshPopPosition(el, pop, direction, opt.size);
2242
- });
2243
- }
2244
- pop.dataset.cgOpen = '';
2238
+ pop.removeAttribute('data-cg-pop-none');
2245
2239
  pop.dataset.cgFlow = '';
2240
+ clickgo.tool.sleep(34).then(() => {
2241
+ if (pop.dataset.cgFlow === undefined) {
2242
+ // --- 已经隐藏掉了 ---
2243
+ return;
2244
+ }
2245
+ refreshPopPosition(el, pop, direction, opt.size);
2246
+ if (opt.autoPosition) {
2247
+ clickgo.dom.watchSize(pop, () => {
2248
+ refreshPopPosition(el, pop, direction, opt.size);
2249
+ });
2250
+ }
2251
+ pop.dataset.cgOpen = '';
2252
+ }).catch(() => {
2253
+ //
2254
+ });
2246
2255
  return;
2247
2256
  }
2248
2257
  // --- 如果短时间内已经有了 pop 被展示,则可能是冒泡序列,本次则不展示 ---
@@ -2261,6 +2270,7 @@ export function showPop(el: HTMLElement | types.IVue, pop: HTMLElement | types.I
2261
2270
  if (parentPop?.dataset.cgLevel !== undefined) {
2262
2271
  const nextlevel = parseInt(parentPop.dataset.cgLevel) + 1;
2263
2272
  if (popInfo.elList[nextlevel]) {
2273
+ // --- 要隐藏别的 pop ---
2264
2274
  hidePop(popInfo.elList[nextlevel]);
2265
2275
  }
2266
2276
  }
@@ -2275,28 +2285,38 @@ export function showPop(el: HTMLElement | types.IVue, pop: HTMLElement | types.I
2275
2285
  el.dataset.cgLevel = (popInfo.elList.length - 1).toString();
2276
2286
  return;
2277
2287
  }
2278
- // --- 设定 pop 位置 ---
2279
- refreshPopPosition(el, pop, direction, opt.size);
2280
- if (opt.autoPosition && typeof direction === 'string') {
2281
- // --- 可能要重置 pop 位置 ---
2282
- clickgo.dom.watchSize(pop, () => {
2283
- refreshPopPosition(el, pop, direction, opt.size);
2284
- });
2285
- }
2286
- if (opt.autoScroll && typeof direction === 'string') {
2287
- // --- 可能根据原元素重置 pop 位置 ---
2288
- clickgo.dom.watchPosition(el, () => {
2289
- refreshPopPosition(el, pop, direction, opt.size);
2290
- });
2291
- }
2288
+ // --- 准备显示 pop ---
2289
+ pop.removeAttribute('data-cg-pop-none');
2292
2290
  popInfo.list.push(pop);
2293
2291
  popInfo.elList.push(el);
2294
2292
  popInfo.wayList.push(opt.way ?? 'normal');
2295
2293
  popInfo.time.push(Date.now());
2296
- pop.dataset.cgOpen = '';
2297
2294
  pop.dataset.cgLevel = (popInfo.list.length - 1).toString();
2298
- el.dataset.cgPopOpen = '';
2299
2295
  el.dataset.cgLevel = (popInfo.elList.length - 1).toString();
2296
+ clickgo.tool.sleep(34).then(() => {
2297
+ if (pop.dataset.cgLevel === undefined) {
2298
+ // --- 已经隐藏掉了 ---
2299
+ return;
2300
+ }
2301
+ // --- 设定 pop 位置 ---
2302
+ refreshPopPosition(el, pop, direction, opt.size);
2303
+ if (opt.autoPosition && typeof direction === 'string') {
2304
+ // --- 可能要重置 pop 位置 ---
2305
+ clickgo.dom.watchSize(pop, () => {
2306
+ refreshPopPosition(el, pop, direction, opt.size);
2307
+ });
2308
+ }
2309
+ if (opt.autoScroll && typeof direction === 'string') {
2310
+ // --- 可能根据原元素重置 pop 位置 ---
2311
+ clickgo.dom.watchPosition(el, () => {
2312
+ refreshPopPosition(el, pop, direction, opt.size);
2313
+ });
2314
+ }
2315
+ pop.dataset.cgOpen = '';
2316
+ el.dataset.cgPopOpen = '';
2317
+ }).catch(() => {
2318
+ //
2319
+ });
2300
2320
  }
2301
2321
 
2302
2322
  /**
@@ -2320,19 +2340,22 @@ export function hidePop(pop?: HTMLElement | types.IVue): void {
2320
2340
  pop.removeAttribute('data-cg-flow');
2321
2341
  pop.removeAttribute('data-cg-open');
2322
2342
  clickgo.dom.unwatchSize(pop);
2343
+ clickgo.tool.sleep(334).then(() => {
2344
+ if (pop.dataset.cgFlow !== undefined) {
2345
+ return;
2346
+ }
2347
+ pop.dataset.cgPopNone = '';
2348
+ }).catch(() => {
2349
+ //
2350
+ });
2323
2351
  return;
2324
2352
  }
2325
- let isPop: boolean = false;
2326
- if (pop.dataset.cgPopOpen !== undefined) {
2327
- // --- el ---
2328
- }
2329
- else if (pop.dataset.cgOpen !== undefined) {
2330
- // --- pop ---
2331
- isPop = true;
2332
- }
2333
- else {
2353
+ if (pop.dataset.cgLevel === undefined) {
2334
2354
  return;
2335
2355
  }
2356
+ /** --- 是 pop 还是 el 基 --- */
2357
+ const isPop: boolean = pop.dataset.cgPop !== undefined ? true : false;
2358
+ /** --- 当前层级 --- */
2336
2359
  const level = pop.dataset.cgLevel ? parseInt(pop.dataset.cgLevel) : -1;
2337
2360
  if (level === -1) {
2338
2361
  return;
@@ -2347,6 +2370,14 @@ export function hidePop(pop?: HTMLElement | types.IVue): void {
2347
2370
  clickgo.dom.unwatchPosition(popInfo.elList[level]);
2348
2371
  popInfo.elList[level].removeAttribute('data-cg-pop-open');
2349
2372
  popInfo.elList[level].removeAttribute('data-cg-level');
2373
+ clickgo.tool.sleep(334).then(() => {
2374
+ if (pop.dataset.cgLevel !== undefined) {
2375
+ return;
2376
+ }
2377
+ pop.dataset.cgPopNone = '';
2378
+ }).catch(() => {
2379
+ //
2380
+ });
2350
2381
  }
2351
2382
  else {
2352
2383
  if (popInfo.list[level]) {
@@ -2354,6 +2385,14 @@ export function hidePop(pop?: HTMLElement | types.IVue): void {
2354
2385
  popInfo.list[level].removeAttribute('data-cg-level');
2355
2386
  clickgo.dom.unwatchSize(popInfo.list[level]);
2356
2387
  clickgo.dom.unwatchPosition(pop);
2388
+ clickgo.tool.sleep(334).then(() => {
2389
+ if (popInfo.list[level].dataset.cgLevel !== undefined) {
2390
+ return;
2391
+ }
2392
+ popInfo.list[level].dataset.cgPopNone = '';
2393
+ }).catch(() => {
2394
+ //
2395
+ });
2357
2396
  }
2358
2397
  pop.removeAttribute('data-cg-pop-open');
2359
2398
  pop.removeAttribute('data-cg-level');
package/dist/lib/tool.js CHANGED
@@ -337,7 +337,7 @@ function teleportGlue(layout, formId) {
337
337
  if (v2 !== 'system') {
338
338
  return v;
339
339
  }
340
- return '<teleport' + v1 + 'to="#cg-pop-list > [data-form-id=\'' + fid + '\']"' + v3 + ' data-cg-pop';
340
+ return '<teleport' + v1 + 'to="#cg-pop-list > [data-form-id=\'' + fid + '\']"' + v3 + ' data-cg-pop data-cg-pop-none';
341
341
  });
342
342
  }
343
343
  exports.teleportGlue = teleportGlue;
package/dist/lib/tool.ts CHANGED
@@ -453,7 +453,8 @@ export function teleportGlue(layout: string, formId: number | string): string {
453
453
  if (v2 !== 'system') {
454
454
  return v;
455
455
  }
456
- return '<teleport' + v1 + 'to="#cg-pop-list > [data-form-id=\'' + fid + '\']"' + v3 + ' data-cg-pop';
456
+ // --- teleport 的第一个子元素增加 cg-pop、cg-pop-none data ---
457
+ return '<teleport' + v1 + 'to="#cg-pop-list > [data-form-id=\'' + fid + '\']"' + v3 + ' data-cg-pop data-cg-pop-none';
457
458
  });
458
459
  }
459
460
 
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.13.20",
3
+ "version": "3.14.0",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",