@jx3box/jx3box-editor 1.7.1 → 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.
- package/assets/js/img.js +4 -0
- package/package.json +4 -4
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.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "JX3BOX Article & Editor",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"last 2 versions"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jx3box/jx3box-common": "^7.6.
|
|
35
|
-
"@jx3box/jx3box-data": "^3.0.
|
|
34
|
+
"@jx3box/jx3box-common": "^7.6.8",
|
|
35
|
+
"@jx3box/jx3box-data": "^3.0.4",
|
|
36
36
|
"@jx3box/jx3box-emotion": "^1.1.5",
|
|
37
37
|
"@jx3box/jx3box-macro": "^1.0.1",
|
|
38
|
-
"@jx3box/jx3box-talent": "^1.1.
|
|
38
|
+
"@jx3box/jx3box-talent": "^1.1.9",
|
|
39
39
|
"@jx3box/markdown": "^0.1.5",
|
|
40
40
|
"@tinymce/tinymce-vue": "^3.2.2",
|
|
41
41
|
"axios": "^0.19.2",
|