@jx3box/jx3box-editor 2.1.8 → 2.1.9
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/assets/js/jx3_element.js +6 -7
- package/package.json +1 -1
- package/src/Article.vue +1 -1
package/assets/js/jx3_element.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import $ from "jquery";
|
|
2
2
|
|
|
3
3
|
function renderItem(vm, selector = ".w-jx3-element") {
|
|
4
|
-
|
|
5
4
|
let outer, inner;
|
|
6
|
-
const pop_class =
|
|
5
|
+
const pop_class = ".w-jx3-element-pop";
|
|
7
6
|
|
|
8
7
|
// 触发时
|
|
9
8
|
$(selector).on("mouseenter", function (e) {
|
|
@@ -11,12 +10,12 @@ function renderItem(vm, selector = ".w-jx3-element") {
|
|
|
11
10
|
|
|
12
11
|
// 获取元素数据
|
|
13
12
|
let type = $(e.target).attr("data-type");
|
|
14
|
-
if (type ==
|
|
13
|
+
if (type == "item") {
|
|
15
14
|
vm.item.id = $(e.target).attr("data-id");
|
|
16
|
-
vm.item.client = $(e.target).attr("data-client") ==
|
|
17
|
-
} else if (type ===
|
|
15
|
+
vm.item.client = $(e.target).attr("data-client") == "origin" ? 2 : 1;
|
|
16
|
+
} else if (type === "author") {
|
|
18
17
|
vm.author.id = $(e.target).attr("data-id");
|
|
19
|
-
} else if (type ===
|
|
18
|
+
} else if (type === "emotion") {
|
|
20
19
|
vm.emotion.id = $(e.target).attr("data-id");
|
|
21
20
|
} else {
|
|
22
21
|
vm[type].client = $(e.target).attr("data-client");
|
|
@@ -26,7 +25,7 @@ function renderItem(vm, selector = ".w-jx3-element") {
|
|
|
26
25
|
|
|
27
26
|
// 显示浮层
|
|
28
27
|
$(pop_class).fadeIn();
|
|
29
|
-
vm.jx3_element.type = type
|
|
28
|
+
vm.jx3_element.type = type;
|
|
30
29
|
|
|
31
30
|
// 计算浮层位置
|
|
32
31
|
let self_height = $(pop_class).height();
|
package/package.json
CHANGED