@jx3box/jx3box-editor 1.7.2 → 1.7.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 (2) hide show
  1. package/assets/js/img.js +4 -0
  2. package/package.json +1 -1
package/assets/js/img.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // 图片地址&懒加载
2
2
  import { resolveImagePath } from "@jx3box/jx3box-common/js/utils";
3
+ import { __cdn } from "@jx3box/jx3box-common/data/jx3box.json";
3
4
  function lazyLoad(str) {
4
5
  if (!str) return;
5
6
 
@@ -9,6 +10,9 @@ function lazyLoad(str) {
9
10
  let origin = item[0];
10
11
  let prefix = item[1];
11
12
  let src = resolveImagePath(item[2]);
13
+ if (src.includes('https://console.cnyixun.com/')) {
14
+ src = src.replace('https://console.cnyixun.com/', __cdn)
15
+ }
12
16
  let suffix = item[3];
13
17
  let output = `<img ${prefix} loading="lazy" src="${src}" ${suffix}>`;
14
18
  str = str.replace(origin, output);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {