@opentiny/tiny-engine-toolbar-collaboration 1.0.3 → 2.0.0-alpha.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.
- package/dist/index.js +51 -44
- package/dist/style.css +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,95 +1,98 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { Popover as
|
|
4
|
-
import { useLayout as
|
|
5
|
-
const
|
|
6
|
-
const l =
|
|
7
|
-
for (const [
|
|
8
|
-
l[
|
|
2
|
+
import { reactive as V, watchEffect as h, resolveComponent as _, openBlock as a, createElementBlock as n, createVNode as m, withCtx as c, createElementVNode as o, createBlock as k, createCommentVNode as N, Fragment as g, renderList as v, toDisplayString as d } from "vue";
|
|
3
|
+
import { Popover as x } from "@opentiny/vue";
|
|
4
|
+
import { useLayout as L } from "@opentiny/tiny-engine-meta-register";
|
|
5
|
+
const S = (r, e) => {
|
|
6
|
+
const l = r.__vccOpts || r;
|
|
7
|
+
for (const [t, p] of e)
|
|
8
|
+
l[t] = p;
|
|
9
9
|
return l;
|
|
10
|
-
},
|
|
10
|
+
}, w = {
|
|
11
11
|
components: {
|
|
12
|
-
TinyPopover:
|
|
12
|
+
TinyPopover: x
|
|
13
13
|
},
|
|
14
14
|
setup() {
|
|
15
|
-
const { layoutState:
|
|
15
|
+
const { layoutState: r } = L(), e = V({
|
|
16
16
|
outsideVisible: !1,
|
|
17
17
|
insideVisible: !1,
|
|
18
18
|
url: "",
|
|
19
19
|
userLists: []
|
|
20
20
|
});
|
|
21
21
|
return h(() => {
|
|
22
|
-
var
|
|
23
|
-
|
|
22
|
+
var t;
|
|
23
|
+
e.url = "img/defaultAvator.png", e.userLists = [
|
|
24
24
|
{
|
|
25
25
|
pageName: "当前页",
|
|
26
26
|
users: [
|
|
27
27
|
{
|
|
28
28
|
userHead: "img/defaultAvator.png",
|
|
29
|
-
userName: (
|
|
29
|
+
userName: (t = r.pageStatus.data) == null ? void 0 : t.username,
|
|
30
30
|
status: "编辑"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
];
|
|
35
35
|
}), {
|
|
36
|
-
state:
|
|
36
|
+
state: e,
|
|
37
37
|
isSingle: () => !0
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
},
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue":
|
|
40
|
+
}, B = { class: "collaboration-container" }, C = { class: "collaborators-list" }, E = { class: "page-name" }, A = ["src"], D = { class: "user-item-name" }, H = { class: "user-item-status" }, P = { class: "icon collaboration-wrap" }, U = { class: "icon-hides" };
|
|
41
|
+
function F(r, e, l, t, p, T) {
|
|
42
|
+
const b = _("svg-icon"), u = _("tiny-popover");
|
|
43
|
+
return a(), n("div", B, [
|
|
44
|
+
m(u, {
|
|
45
|
+
modelValue: t.state.outsideVisible,
|
|
46
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t.state.outsideVisible = s),
|
|
47
47
|
trigger: "click",
|
|
48
48
|
width: "260",
|
|
49
49
|
"append-to-body": "",
|
|
50
50
|
"popper-class": "toolbar-right-popover collaborator"
|
|
51
51
|
}, {
|
|
52
52
|
reference: c(() => [
|
|
53
|
-
|
|
54
|
-
modelValue:
|
|
55
|
-
"onUpdate:modelValue":
|
|
53
|
+
m(u, {
|
|
54
|
+
modelValue: t.state.insideVisible,
|
|
55
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t.state.insideVisible = s),
|
|
56
|
+
class: "toolbar-right-user",
|
|
56
57
|
trigger: "hover",
|
|
57
58
|
"open-delay": 1e3,
|
|
58
59
|
"popper-class": "collaboration-popover toolbar-right-popover",
|
|
59
60
|
"append-to-body": "",
|
|
60
|
-
content: `该项目共有 ${
|
|
61
|
+
content: `该项目共有 ${t.state.userLists.length} 位用户在编辑`
|
|
61
62
|
}, {
|
|
62
63
|
reference: c(() => [
|
|
63
|
-
o("div",
|
|
64
|
-
o("
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
o("div", P, [
|
|
65
|
+
o("span", U, [
|
|
66
|
+
t.state.url ? (a(), k(b, {
|
|
67
|
+
key: 0,
|
|
68
|
+
name: "user"
|
|
69
|
+
})) : N("", !0)
|
|
70
|
+
]),
|
|
71
|
+
e[2] || (e[2] = o("span", { class: "operate-title" }, "多人协作", -1))
|
|
69
72
|
])
|
|
70
73
|
]),
|
|
71
74
|
_: 1
|
|
72
75
|
}, 8, ["modelValue", "content"])
|
|
73
76
|
]),
|
|
74
77
|
default: c(() => [
|
|
75
|
-
o("div",
|
|
76
|
-
(
|
|
77
|
-
key:
|
|
78
|
+
o("div", C, [
|
|
79
|
+
(a(!0), n(g, null, v(t.state.userLists, (s, f) => (a(), n("div", {
|
|
80
|
+
key: f,
|
|
78
81
|
class: "collaborators-list-group"
|
|
79
82
|
}, [
|
|
80
|
-
o("span",
|
|
83
|
+
o("span", E, d(s.pageName), 1),
|
|
81
84
|
o("ul", null, [
|
|
82
|
-
(
|
|
83
|
-
key:
|
|
85
|
+
(a(!0), n(g, null, v(s.users, (i, y) => (a(), n("li", {
|
|
86
|
+
key: y,
|
|
84
87
|
class: "user-item"
|
|
85
88
|
}, [
|
|
86
89
|
o("img", {
|
|
87
90
|
class: "user-item-head",
|
|
88
91
|
src: i.userHead,
|
|
89
92
|
alt: ""
|
|
90
|
-
}, null, 8,
|
|
91
|
-
o("span",
|
|
92
|
-
o("span",
|
|
93
|
+
}, null, 8, A),
|
|
94
|
+
o("span", D, d(i.userName), 1),
|
|
95
|
+
o("span", H, "正在" + d(i.status), 1)
|
|
93
96
|
]))), 128))
|
|
94
97
|
])
|
|
95
98
|
]))), 128))
|
|
@@ -99,13 +102,17 @@ function P(a, t, l, e, u, D) {
|
|
|
99
102
|
}, 8, ["modelValue"])
|
|
100
103
|
]);
|
|
101
104
|
}
|
|
102
|
-
const
|
|
103
|
-
id: "collaboration",
|
|
105
|
+
const M = /* @__PURE__ */ S(w, [["render", F], ["__scopeId", "data-v-20a96d06"]]), O = {
|
|
106
|
+
id: "engine.toolbars.collaboration",
|
|
107
|
+
type: "toolbars",
|
|
104
108
|
title: "collaboration",
|
|
105
109
|
icon: "",
|
|
106
110
|
align: "right",
|
|
107
|
-
|
|
111
|
+
collapsed: !0
|
|
112
|
+
}, J = {
|
|
113
|
+
...O,
|
|
114
|
+
entry: M
|
|
108
115
|
};
|
|
109
116
|
export {
|
|
110
|
-
|
|
117
|
+
J as default
|
|
111
118
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.collaboration-container[data-v-
|
|
1
|
+
.collaboration-container[data-v-20a96d06] .reference-wrapper{display:flex}.toolbar-right-user[data-v-20a96d06] .reference-wrapper{padding:0!important}.collaborators-list .page-name[data-v-20a96d06]{display:inline-block;width:100%;font-size:14px;padding:12px 20px;color:var(--ti-lowcode-toolbar-breadcrumb-color);line-height:18px;font-weight:600}.collaborators-list .user-item[data-v-20a96d06]{padding:10px 16px;display:flex;align-items:center}.collaborators-list .user-item[data-v-20a96d06]:hover{background:var(--ti-lowcode-toolbar-hover-color)}.collaborators-list .user-item .user-item-head[data-v-20a96d06]{width:26px;height:26px;border-radius:50%}.collaborators-list .user-item .user-item-name[data-v-20a96d06]{font-size:14px;color:var(--ti-lowcode-dialog-font-color);line-height:16px;font-weight:400;margin:0 4px 0 8px}.collaborators-list .user-item .user-item-status[data-v-20a96d06]{font-size:14px}.collaboration-wrap[data-v-20a96d06]{display:flex;align-items:center;cursor:pointer;font-size:12px}.collaboration-wrap .user-head[data-v-20a96d06]{width:16px;height:16px;border-radius:50%;margin-right:8px;z-index:9;border:1px solid var(--ti-lowcode-toolbar-user-img-border-color)}.collaboration-wrap .user-count[data-v-20a96d06]{height:20px;width:20px;color:var(--ti-lowcode-toolbar-icon-color);background-color:var(--ti-lowcode-user-header-bg);border-radius:50%;display:flex;align-items:center;justify-content:center}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-collaboration",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,16 +24,17 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@opentiny/tiny-engine-
|
|
28
|
-
"@opentiny/vue": "~3.10.0"
|
|
27
|
+
"@opentiny/tiny-engine-meta-register": "2.0.0-alpha.1"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
30
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.1",
|
|
31
31
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
32
|
-
"@vitejs/plugin-vue-jsx": "^1.
|
|
32
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
33
33
|
"vite": "^4.3.7"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
+
"@opentiny/vue": "^3.14.0",
|
|
36
37
|
"vue": "^3.4.15"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "f15ccc5dde391288bf4297e3ffc35aab52651f3d"
|
|
39
40
|
}
|