vue-devui 1.6.3-markdown.1 → 1.6.3-markdown.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-devui",
3
- "version": "1.6.3-markdown.1",
3
+ "version": "1.6.3-markdown.3",
4
4
  "license": "MIT",
5
5
  "description": "DevUI components based on Vite and Vue3",
6
6
  "keywords": [
@@ -14,7 +14,7 @@ export interface MdPlugin {
14
14
  }
15
15
  export interface ICustomXssRule {
16
16
  key: string;
17
- value: string[];
17
+ value: string[] | null;
18
18
  }
19
19
  export interface ICustomRenderRule {
20
20
  key: string;
package/vue-devui.es.js CHANGED
@@ -23221,8 +23221,14 @@ function useSelect$3(dropdownRef, props, states, setSoftFocus, ctx2) {
23221
23221
  const app = getCurrentInstance();
23222
23222
  const t = createI18nTranslate("DEditableSelect", app);
23223
23223
  const cachedOptions = ref(props.options);
23224
+ const hasCustomFilter = () => {
23225
+ return props.remote && lodash.exports.isFunction(props.remoteMethod) || lodash.exports.isFunction(props.filterMethod);
23226
+ };
23224
23227
  const filteredOptions = computed(() => {
23225
23228
  return cachedOptions.value.filter((option2) => {
23229
+ if (hasCustomFilter()) {
23230
+ return true;
23231
+ }
23226
23232
  return option2.label.toLocaleLowerCase().includes(states.query.toLocaleLowerCase().trim());
23227
23233
  });
23228
23234
  });
@@ -24921,8 +24927,7 @@ __publicField(ToolBarHandler, "h1", (editor) => {
24921
24927
  editor.focus();
24922
24928
  if (cursor.ch !== 0) {
24923
24929
  editor.setCursor(cursor.line, 0);
24924
- editor.replaceSelection("# " + selection);
24925
- editor.setCursor(cursor.line, cursor.ch + 2);
24930
+ editor.replaceSelection("# ");
24926
24931
  } else {
24927
24932
  editor.replaceSelection("# " + selection);
24928
24933
  }
@@ -24933,8 +24938,7 @@ __publicField(ToolBarHandler, "h2", (editor) => {
24933
24938
  editor.focus();
24934
24939
  if (cursor.ch !== 0) {
24935
24940
  editor.setCursor(cursor.line, 0);
24936
- editor.replaceSelection("## " + selection);
24937
- editor.setCursor(cursor.line, cursor.ch + 3);
24941
+ editor.replaceSelection("## ");
24938
24942
  } else {
24939
24943
  editor.replaceSelection("## " + selection);
24940
24944
  }
@@ -25559,7 +25563,7 @@ function useEditorMd(props, ctx2) {
25559
25563
  const startPos = value.lastIndexOf(nowPrefix, cursor.ch);
25560
25564
  const endPos = value.indexOf(" ", cursor.ch) > -1 ? value.indexOf(" ", cursor.ch) : value.length;
25561
25565
  hint = value.slice(startPos, cursor.ch);
25562
- if (startPos > 0 && value[startPos - 1] !== " " || startPos < 0 || !hint.includes(nowPrefix) || hint.endsWith(" ") || isImgRegx.test(hint)) {
25566
+ if (startPos < 0 || !hint.includes(nowPrefix) || hint.endsWith(" ") || isImgRegx.test(hint)) {
25563
25567
  cursorHint = "";
25564
25568
  cursorHintStart = -1;
25565
25569
  cursorHintEnd = -1;
@@ -26460,7 +26464,11 @@ class MDRenderService {
26460
26464
  setCustomXssRules(rules2) {
26461
26465
  if (rules2) {
26462
26466
  rules2.forEach((rule) => {
26463
- this.xssWhiteList[rule["key"]] = rule["value"];
26467
+ if (rule["value"] === null) {
26468
+ delete this.xssWhiteList[rule["key"]];
26469
+ } else {
26470
+ this.xssWhiteList[rule["key"]] = rule["value"];
26471
+ }
26464
26472
  });
26465
26473
  }
26466
26474
  }
@@ -44087,7 +44095,7 @@ const installs = [
44087
44095
  VirtualListInstall
44088
44096
  ];
44089
44097
  var vueDevui = {
44090
- version: "1.6.3-markdown.1",
44098
+ version: "1.6.3-markdown.3",
44091
44099
  install(app) {
44092
44100
  installs.forEach((p) => app.use(p));
44093
44101
  }