@cgboiler/biz-basic 1.0.7 → 1.0.8
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/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var stdin_default = defineComponent({
|
|
|
18
18
|
props,
|
|
19
19
|
emit
|
|
20
20
|
});
|
|
21
|
+
let isFocusFromPlaceholder = false;
|
|
21
22
|
const initEditor = () => {
|
|
22
23
|
editor.value = new Editor({
|
|
23
24
|
extensions,
|
|
@@ -35,12 +36,16 @@ var stdin_default = defineComponent({
|
|
|
35
36
|
onBlur: ({
|
|
36
37
|
editor: editor2
|
|
37
38
|
}) => {
|
|
38
|
-
|
|
39
|
+
if (!isFocusFromPlaceholder) {
|
|
40
|
+
emit("blur");
|
|
41
|
+
}
|
|
39
42
|
},
|
|
40
43
|
onFocus: ({
|
|
41
44
|
editor: editor2
|
|
42
45
|
}) => {
|
|
43
|
-
|
|
46
|
+
if (!isFocusFromPlaceholder) {
|
|
47
|
+
emit("focus");
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
});
|
|
46
51
|
};
|
|
@@ -65,10 +70,12 @@ var stdin_default = defineComponent({
|
|
|
65
70
|
});
|
|
66
71
|
watch(() => props.placeholder, () => {
|
|
67
72
|
var _a;
|
|
73
|
+
isFocusFromPlaceholder = true;
|
|
68
74
|
(_a = editor.value) == null ? void 0 : _a.commands.blur();
|
|
69
75
|
setTimeout(() => {
|
|
70
76
|
var _a2;
|
|
71
77
|
(_a2 = editor.value) == null ? void 0 : _a2.commands.focus();
|
|
78
|
+
isFocusFromPlaceholder = false;
|
|
72
79
|
}, 100);
|
|
73
80
|
});
|
|
74
81
|
onMounted(() => {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(stdin_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(stdin_exports);
|
|
37
37
|
var import_rich_text_editor = __toESM(require("./rich-text-editor"));
|
|
38
38
|
__reExport(stdin_exports, require("./rich-text-editor"), module.exports);
|
|
39
|
-
const version = "1.0.
|
|
39
|
+
const version = "1.0.7";
|
|
40
40
|
function install(app) {
|
|
41
41
|
const components = [
|
|
42
42
|
import_rich_text_editor.default
|
|
@@ -40,6 +40,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
40
40
|
props,
|
|
41
41
|
emit
|
|
42
42
|
});
|
|
43
|
+
let isFocusFromPlaceholder = false;
|
|
43
44
|
const initEditor = () => {
|
|
44
45
|
editor.value = new import_vue_3.Editor({
|
|
45
46
|
extensions,
|
|
@@ -57,12 +58,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
57
58
|
onBlur: ({
|
|
58
59
|
editor: editor2
|
|
59
60
|
}) => {
|
|
60
|
-
|
|
61
|
+
if (!isFocusFromPlaceholder) {
|
|
62
|
+
emit("blur");
|
|
63
|
+
}
|
|
61
64
|
},
|
|
62
65
|
onFocus: ({
|
|
63
66
|
editor: editor2
|
|
64
67
|
}) => {
|
|
65
|
-
|
|
68
|
+
if (!isFocusFromPlaceholder) {
|
|
69
|
+
emit("focus");
|
|
70
|
+
}
|
|
66
71
|
}
|
|
67
72
|
});
|
|
68
73
|
};
|
|
@@ -87,10 +92,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
87
92
|
});
|
|
88
93
|
(0, import_vue2.watch)(() => props.placeholder, () => {
|
|
89
94
|
var _a;
|
|
95
|
+
isFocusFromPlaceholder = true;
|
|
90
96
|
(_a = editor.value) == null ? void 0 : _a.commands.blur();
|
|
91
97
|
setTimeout(() => {
|
|
92
98
|
var _a2;
|
|
93
99
|
(_a2 = editor.value) == null ? void 0 : _a2.commands.focus();
|
|
100
|
+
isFocusFromPlaceholder = false;
|
|
94
101
|
}, 100);
|
|
95
102
|
});
|
|
96
103
|
(0, import_vue2.onMounted)(() => {
|