vue-editify 0.1.4 → 0.1.5
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/examples/App.vue +1 -1
- package/lib/editify.es.js +22 -14
- package/lib/editify.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/Editify.vue +20 -11
- package/src/components/base/Layer.vue +3 -2
- package/src/index.js +1 -1
package/examples/App.vue
CHANGED
@@ -5548,7 +5548,7 @@
|
|
5548
5548
|
<div>
|
5549
5549
|
<button @click="disabled = !disabled">禁用</button>
|
5550
5550
|
</div>
|
5551
|
-
<editify v-model="value" placeholder="请输入正文内容..." allow-paste-html :menu="menuConfig" ref="editify" :paste-keep-marks="{ 'data-zip': ['span'] }" autofocus :show-word-length="true" :border="true" :disabled="disabled" @updateview="updateview" :customParseNode="customParseNode"
|
5551
|
+
<editify v-model="value" placeholder="请输入正文内容..." allow-paste-html :menu="menuConfig" ref="editify" :paste-keep-marks="{ 'data-zip': ['span'] }" autofocus :show-word-length="true" :border="true" :disabled="disabled" @updateview="updateview" :customParseNode="customParseNode"></editify>
|
5552
5552
|
</div>
|
5553
5553
|
</template>
|
5554
5554
|
<script>
|
package/lib/editify.es.js
CHANGED
@@ -16440,7 +16440,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16440
16440
|
], 12, _hoisted_1$c);
|
16441
16441
|
}
|
16442
16442
|
const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-70b6f344"]]);
|
16443
|
-
const
|
16443
|
+
const Layer_vue_vue_type_style_index_0_scoped_b5a839e3_lang = "";
|
16444
16444
|
const _sfc_main$c = {
|
16445
16445
|
name: "Layer",
|
16446
16446
|
emits: ["update:modelValue", "show", "shown", "hidden"],
|
@@ -16694,13 +16694,13 @@ const _sfc_main$c = {
|
|
16694
16694
|
if (this.placement == "top" || this.placement == "top-start" || this.placement == "top-end") {
|
16695
16695
|
if (firstRect.top >= 0 && firstRect.top >= parentRect.top && firstRect.top >= this.$el.offsetHeight) {
|
16696
16696
|
this.realPlacement = this.placement;
|
16697
|
-
} else if (documentHeight -
|
16697
|
+
} else if (documentHeight - lastRect.bottom >= 0 && documentHeight - lastRect.bottom >= parentRect.bottom && documentHeight - lastRect.bottom >= this.$el.offsetHeight) {
|
16698
16698
|
this.realPlacement = this.placement == "top" ? "bottom" : this.placement == "top-start" ? "bottom-start" : "bottom-end";
|
16699
16699
|
}
|
16700
16700
|
} else if (this.placement == "bottom" || this.placement == "bottom-start" || this.placement == "bottom-end") {
|
16701
16701
|
if (documentHeight - lastRect.bottom >= 0 && documentHeight - lastRect.bottom >= parentRect.bottom && documentHeight - lastRect.bottom >= this.$el.offsetHeight) {
|
16702
16702
|
this.realPlacement = this.placement;
|
16703
|
-
} else if (
|
16703
|
+
} else if (firstRect.top >= 0 && firstRect.top >= parentRect.top && firstRect.top >= this.$el.offsetHeight) {
|
16704
16704
|
this.realPlacement = this.placement == "bottom" ? "top" : this.placement == "bottom-start" ? "top-start" : "top-end";
|
16705
16705
|
}
|
16706
16706
|
}
|
@@ -17069,7 +17069,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17069
17069
|
_: 3
|
17070
17070
|
}, 8, ["name", "onEnter", "onAfterEnter", "onAfterLeave"]);
|
17071
17071
|
}
|
17072
|
-
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-
|
17072
|
+
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-b5a839e3"]]);
|
17073
17073
|
const Tooltip_vue_vue_type_style_index_0_scoped_5293a020_lang = "";
|
17074
17074
|
const _sfc_main$b = {
|
17075
17075
|
name: "Tooltip",
|
@@ -21336,7 +21336,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
21336
21336
|
], 14, _hoisted_1$1);
|
21337
21337
|
}
|
21338
21338
|
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-25262a69"]]);
|
21339
|
-
const
|
21339
|
+
const Editify_vue_vue_type_style_index_0_scoped_7535307a_lang = "";
|
21340
21340
|
const _sfc_main = {
|
21341
21341
|
name: "editify",
|
21342
21342
|
props: { ...editorProps },
|
@@ -21353,6 +21353,8 @@ const _sfc_main = {
|
|
21353
21353
|
isModelChange: false,
|
21354
21354
|
//是否正在输入中文
|
21355
21355
|
isInputChinese: false,
|
21356
|
+
//工具条和菜单栏判定延时器
|
21357
|
+
rangeUpdateTimer: null,
|
21356
21358
|
//表格列宽拖拽记录数据
|
21357
21359
|
tableColumnResizeParams: {
|
21358
21360
|
element: null,
|
@@ -21901,14 +21903,20 @@ const _sfc_main = {
|
|
21901
21903
|
return;
|
21902
21904
|
}
|
21903
21905
|
this.dataRangeCaches = this.editor.getElementsByRange();
|
21904
|
-
if (this.
|
21905
|
-
|
21906
|
-
|
21907
|
-
|
21908
|
-
|
21909
|
-
|
21906
|
+
if (this.rangeUpdateTimer) {
|
21907
|
+
clearTimeout(this.rangeUpdateTimer);
|
21908
|
+
this.rangeUpdateTimer = null;
|
21909
|
+
}
|
21910
|
+
this.rangeUpdateTimer = setTimeout(() => {
|
21911
|
+
if (this.toolbarConfig.use || this.menuConfig.use) {
|
21912
|
+
if (this.toolbarConfig.use) {
|
21913
|
+
this.handleToolbar();
|
21914
|
+
}
|
21915
|
+
if (this.menuConfig.use) {
|
21916
|
+
this.$refs.menu.handleRangeUpdate();
|
21917
|
+
}
|
21910
21918
|
}
|
21911
|
-
}
|
21919
|
+
}, 200);
|
21912
21920
|
this.$emit("rangeupdate");
|
21913
21921
|
},
|
21914
21922
|
//编辑器粘贴html
|
@@ -22074,7 +22082,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22074
22082
|
], 2)) : createCommentVNode("", true)
|
22075
22083
|
], 2);
|
22076
22084
|
}
|
22077
|
-
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
22085
|
+
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7535307a"]]);
|
22078
22086
|
const iconfont = "";
|
22079
22087
|
const en_US = {
|
22080
22088
|
textWrapUp: "Up feed",
|
@@ -22257,7 +22265,7 @@ const i18n = (locale) => {
|
|
22257
22265
|
return translations[locale][key];
|
22258
22266
|
};
|
22259
22267
|
};
|
22260
|
-
const version = "0.1.
|
22268
|
+
const version = "0.1.5";
|
22261
22269
|
const install = (app, props) => {
|
22262
22270
|
const locale = (props ? props.locale : "zh_CN") || "zh_CN";
|
22263
22271
|
app.provide("$editTrans", i18n(locale));
|