@opentiny/vue-renderless 3.18.2 → 3.18.4

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 CHANGED
@@ -90,8 +90,11 @@ const handleScroll = (state) => () => {
90
90
  }, 200);
91
91
  };
92
92
  const setChildOffsetTop = ({ state, props }) => {
93
- var _a;
94
- state.offsetTop = ((_a = document.querySelector(props.links[0].link)) == null ? void 0 : _a.offsetTop) || 0;
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
@@ -237,7 +237,7 @@ const CASCADER = {
237
237
  PropsHover: "hoverThreshold",
238
238
  MenuConnector: "cascader-menu-"
239
239
  };
240
- const version = "3.18.2";
240
+ const version = "3.18.4";
241
241
  const log = (data, type = "log") => {
242
242
  uLog.logger[type](data);
243
243
  };
package/common/runtime.js CHANGED
@@ -22,7 +22,7 @@ import vuePopup from "./deps/vue-popup";
22
22
  import validate from "./validate";
23
23
  import memorize from "./deps/memorize";
24
24
  import * as common from ".";
25
- const version = "3.18.2";
25
+ const version = "3.18.4";
26
26
  const Renderless = {
27
27
  browser,
28
28
  array,
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"],
@@ -3,6 +3,40 @@ import {
3
3
  __spreadValues
4
4
  } from "../chunk-G2ADBYYC.js";
5
5
  import { isNull } from "../common/type";
6
+ const fontFamilyConfig = [
7
+ "songti",
8
+ "yahei",
9
+ "kaiti",
10
+ "heiti",
11
+ "lishu",
12
+ "mono",
13
+ "arial",
14
+ "arialblack",
15
+ "comic",
16
+ "impact",
17
+ "times"
18
+ ];
19
+ const fontSizeConfig = [
20
+ "12px",
21
+ "13px",
22
+ "14px",
23
+ "15px",
24
+ "16px",
25
+ "17px",
26
+ "18px",
27
+ "19px",
28
+ "20px",
29
+ "22px",
30
+ "24px",
31
+ "26px",
32
+ "29px",
33
+ "32px",
34
+ "36px",
35
+ "40px",
36
+ "48px",
37
+ "72px"
38
+ ];
39
+ const lineHeightConfig = ["1", "1.2", "1.5", "2", "2.5", "3", "4", "5"];
6
40
  const betterTable = {
7
41
  operationMenu: {
8
42
  items: {
@@ -22,7 +56,7 @@ const betterTable = {
22
56
  color: true
23
57
  }
24
58
  };
25
- const toolbar = (FluentEditor) => {
59
+ const toolbar = () => {
26
60
  const underline = ["bold", "italic", "underline", "strike"];
27
61
  const list = [{ list: "ordered" }, { list: "bullet" }];
28
62
  const script = [{ script: "sub" }, { script: "super" }];
@@ -30,9 +64,9 @@ const toolbar = (FluentEditor) => {
30
64
  container: [
31
65
  ["undo", "redo", "clean"],
32
66
  [
33
- { font: FluentEditor.imports["formats/font"].whitelist },
34
- { size: FluentEditor.imports["formats/size"].whitelist },
35
- { lineheight: FluentEditor.imports["formats/lineheight"].whitelist },
67
+ { font: fontFamilyConfig },
68
+ { size: fontSizeConfig },
69
+ { lineheight: lineHeightConfig },
36
70
  { header: [1, 2, 3, 4, 5, 6, false] }
37
71
  ],
38
72
  underline,
@@ -155,7 +189,7 @@ const defaultOption = ({ FluentEditor, state, mentionObj }) => {
155
189
  // 上传文件需开启
156
190
  image: FluentEditor.imports["modules/image-spec"],
157
191
  counter: false,
158
- toolbar: toolbar(FluentEditor),
192
+ toolbar: toolbar(),
159
193
  "better-table": betterTable,
160
194
  mention: mention(mentionObj),
161
195
  keyboard: keyboard({ FluentEditor, state })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.18.2",
3
+ "version": "3.18.4",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "author": "OpenTiny Team",
6
6
  "license": "MIT",