@opentiny/vue-renderless 3.18.2 → 3.18.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/anchor/index.js +5 -2
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/xss.js +2 -2
- package/package.json +1 -1
package/anchor/index.js
CHANGED
|
@@ -90,8 +90,11 @@ const handleScroll = (state) => () => {
|
|
|
90
90
|
}, 200);
|
|
91
91
|
};
|
|
92
92
|
const setChildOffsetTop = ({ state, props }) => {
|
|
93
|
-
var _a;
|
|
94
|
-
|
|
93
|
+
var _a, _b;
|
|
94
|
+
if (!((_a = props.links) == null ? void 0 : _a.length)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
state.offsetTop = ((_b = document.querySelector(props.links[0].link)) == null ? void 0 : _b.offsetTop) || 0;
|
|
95
98
|
};
|
|
96
99
|
const getContainer = ({ props }) => () => props.containerId && document.querySelector(props.containerId) || document.body;
|
|
97
100
|
const mounted = ({ state, api, props, nextTick }) => () => {
|
package/common/index.js
CHANGED
package/common/runtime.js
CHANGED
package/common/xss.js
CHANGED
|
@@ -9,7 +9,7 @@ let xssOptions = {
|
|
|
9
9
|
enableUrl: true,
|
|
10
10
|
html: {
|
|
11
11
|
whiteList: {
|
|
12
|
-
a: ["class", "style", "contenteditable", "data-id", "data-title", "data-size", "data-last-modified"],
|
|
12
|
+
a: ["class", "style", "contenteditable", "data-id", "data-title", "data-size", "data-last-modified", "href"],
|
|
13
13
|
address: ["class", "style"],
|
|
14
14
|
area: ["class", "style"],
|
|
15
15
|
article: ["class", "style"],
|
|
@@ -61,7 +61,7 @@ let xssOptions = {
|
|
|
61
61
|
header: ["class", "style"],
|
|
62
62
|
hr: ["class", "style"],
|
|
63
63
|
i: ["class", "style", "data-image-id", "data-image"],
|
|
64
|
-
img: ["class", "style", "devui-editorx-image", "style", "data-image-id"],
|
|
64
|
+
img: ["class", "style", "devui-editorx-image", "style", "data-image-id", "src"],
|
|
65
65
|
input: ["class", "style", "data-formula", "data-link", "data-video"],
|
|
66
66
|
ins: ["class", "style"],
|
|
67
67
|
li: ["class", "style"],
|
package/package.json
CHANGED