vue-devui 1.6.4-markdown.0 → 1.6.4-markdown.1

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.
@@ -7268,7 +7268,8 @@ function useEditorMd(props, ctx) {
7268
7268
  customHintReplaceFn,
7269
7269
  hintConfig,
7270
7270
  disableChangeEvent,
7271
- modelValue
7271
+ modelValue,
7272
+ beforeShowHint
7272
7273
  } = toRefs(props);
7273
7274
  const toolbars = reactive(cloneDeep_1(DEFAULT_TOOLBARS));
7274
7275
  const editorRef = ref();
@@ -7389,6 +7390,13 @@ function useEditorMd(props, ctx) {
7389
7390
  const cursor = editorIns.getCursor();
7390
7391
  let i = prefixes.value.length;
7391
7392
  const value = editorIns.getLine(cursor.line).replace(/\t/g, " ");
7393
+ let result = false;
7394
+ if (beforeShowHint == null ? void 0 : beforeShowHint.value) {
7395
+ result = beforeShowHint.value(value);
7396
+ }
7397
+ if (result) {
7398
+ return;
7399
+ }
7392
7400
  const selection = editorIns.getSelection();
7393
7401
  const isImgRegx = /^\!\[\S+/;
7394
7402
  if (selection) {
@@ -7687,6 +7695,9 @@ const editorMdProps = __spreadProps(__spreadValues({}, commonProps), {
7687
7695
  },
7688
7696
  customHintReplaceFn: {
7689
7697
  type: Function
7698
+ },
7699
+ beforeShowHint: {
7700
+ type: Function
7690
7701
  }
7691
7702
  });
7692
7703
  const EditorMdInjectionKey = Symbol("d-editor-md");