clickgo 3.11.5 → 3.11.6

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.5'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.6'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -7,6 +7,10 @@
7
7
  <img src="../../../res/img.jpg" mode="auto" style="width: 200px; height: 200px;" />
8
8
  <label>Mode cover:</label>
9
9
  <img src="../../../res/img.jpg" mode="cover" style="width: 200px; height: 250px;" />
10
+ <label>Slot:</label>
11
+ <img src="../../../res/img.jpg" mode="cover" align-h="center" align-v="end" style="width: 200px; height: 200px; padding-bottom: 10px; color: #FFF; font-weight: bold; font-size: 18px;">
12
+ <label>Test</label>
13
+ </img>
10
14
  <label>Mode contain:</label>
11
15
  <img src="../../../res/img.jpg" mode="contain" style="border: dotted 1px rgba(0, 0, 0, .5); width: 200px; height: 250px;" />
12
16
  <label>You can also use http://, https:// and data: url, load "https://nodejs.org/static/images/logo.svg":</label>
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.5';
27
+ const version = '3.11.6';
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.5';
16
+ const version = '3.11.6';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
package/dist/lib/tool.js CHANGED
@@ -264,20 +264,20 @@ function layoutInsertAttr(layout, insert, opt = {}) {
264
264
  exports.layoutInsertAttr = layoutInsertAttr;
265
265
  function layoutClassPrependObject(object) {
266
266
  object = object.slice(1, -1).trim();
267
- return '{' + object.replace(/(.+?):(.+?)(,|$)/g, function (t, t1, t2, t3) {
267
+ return '{' + object.replace(/([ a-zA-Z0-9'"`\[\]\-_]+)(\s*:)/g, function (t, t1, t2) {
268
268
  t1 = t1.trim();
269
269
  if (t1.startsWith('[')) {
270
270
  t1 = '[classPrepend(' + t1.slice(1, -1) + ')]';
271
271
  }
272
272
  else {
273
273
  let sp = '';
274
- if (t1.startsWith('\'') || t1.startsWith('"')) {
274
+ if (t1.startsWith('\'') || t1.startsWith('"') || t1.startsWith('`')) {
275
275
  sp = t1[0];
276
276
  t1 = t1.slice(1, -1);
277
277
  }
278
278
  t1 = `[classPrepend(${sp}${t1}${sp})]`;
279
279
  }
280
- return t1 + ':' + t2 + t3;
280
+ return t1 + t2;
281
281
  }) + '}';
282
282
  }
283
283
  function layoutClassPrepend(layout, preps) {
@@ -291,8 +291,8 @@ function layoutClassPrepend(layout, preps) {
291
291
  }
292
292
  }
293
293
  return ` class="${resultList.join(' ')}"`;
294
- }).replace(/ :class=(["']).+?["'](\s+[a-zA-Z0-9-_:@]+=|\s*>)/gi, function (t, sp) {
295
- return t.replace(new RegExp(` :class=${sp}(.+?)${sp}(\\s+[a-zA-Z0-9-_:@]+=|\\s*>)`, 'gi'), function (t, t1, t2) {
294
+ }).replace(/ :class=(["']).+?["']((\s+[a-zA-Z0-9-_:@]+(=|\s*>))|(\s*)>)/gi, function (t, sp) {
295
+ return t.replace(new RegExp(` :class=${sp}(.+?)${sp}((\\s+[a-zA-Z0-9-_:@]+(=|\\s*>))|(\\s*)>)`, 'gi'), function (t, t1, t2) {
296
296
  t1 = t1.trim();
297
297
  if (t1.startsWith('[')) {
298
298
  t1 = t1.slice(1, -1);
package/dist/lib/tool.ts CHANGED
@@ -343,6 +343,7 @@ export function layoutInsertAttr(layout: string, insert: string, opt: { 'ignore'
343
343
  */
344
344
  function layoutClassPrependObject(object: string): string {
345
345
  object = object.slice(1, -1).trim();
346
+ /*
346
347
  return '{' + object.replace(/(.+?):(.+?)(,|$)/g, function(t, t1: string, t2: string, t3: string) {
347
348
  // --- t1 是 'xxx', t2 是 xxx,t3 是结尾或者 , 分隔符 ---
348
349
  t1 = t1.trim();
@@ -359,6 +360,23 @@ function layoutClassPrependObject(object: string): string {
359
360
  }
360
361
  return t1 + ':' + t2 + t3;
361
362
  }) + '}';
363
+ //*/
364
+ return '{' + object.replace(/([ a-zA-Z0-9'"`\[\]\-_]+)(\s*:)/g, function(t, t1: string, t2:string) {
365
+ // --- t1 是 'xxx', t2 是 xxx,t3 是结尾或者 , 分隔符 ---
366
+ t1 = t1.trim();
367
+ if (t1.startsWith('[')) {
368
+ t1 = '[classPrepend(' + t1.slice(1, -1) + ')]';
369
+ }
370
+ else {
371
+ let sp = '';
372
+ if (t1.startsWith('\'') || t1.startsWith('"') || t1.startsWith('`')) {
373
+ sp = t1[0];
374
+ t1 = t1.slice(1, -1);
375
+ }
376
+ t1 = `[classPrepend(${sp}${t1}${sp})]`;
377
+ }
378
+ return t1 + t2;
379
+ }) + '}';
362
380
  }
363
381
  /**
364
382
  * --- 给 class 增加 scope 的随机前缀,给 id 新增前缀 ---
@@ -378,8 +396,8 @@ export function layoutClassPrepend(layout: string, preps: string[]): string {
378
396
  }
379
397
  return ` class="${resultList.join(' ')}"`;
380
398
  //}).replace(/ :class=(["']).+?>/gi, function(t, sp) {
381
- }).replace(/ :class=(["']).+?["'](\s+[a-zA-Z0-9-_:@]+=|\s*>)/gi, function(t, sp) {
382
- return t.replace(new RegExp(` :class=${sp}(.+?)${sp}(\\s+[a-zA-Z0-9-_:@]+=|\\s*>)`, 'gi'), function(t, t1: string, t2: string) {
399
+ }).replace(/ :class=(["']).+?["']((\s+[a-zA-Z0-9-_:@]+(=|\s*>))|(\s*)>)/gi, function(t, sp) {
400
+ return t.replace(new RegExp(` :class=${sp}(.+?)${sp}((\\s+[a-zA-Z0-9-_:@]+(=|\\s*>))|(\\s*)>)`, 'gi'), function(t, t1: string, t2: string) {
383
401
  // --- t1 为 [] 或 {} ---
384
402
  t1 = t1.trim();
385
403
  if (t1.startsWith('[')) {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.11.5",
3
+ "version": "3.11.6",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",