@cmstops/pro-compo 0.1.12 → 0.1.14

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.
@@ -1,40 +1,40 @@
1
- .tooltip-button {
1
+ .filter-wrp .tooltip-button {
2
2
  height: auto;
3
3
  padding: 20px;
4
4
  }
5
- .dop.active {
5
+ .filter-wrp .dop.active {
6
6
  color: #165dff;
7
7
  }
8
- .dop .label {
8
+ .filter-wrp .dop .label {
9
9
  display: flex;
10
10
  gap: 10px;
11
11
  align-items: center;
12
12
  }
13
- .filter-view-container {
13
+ .filter-wrp .filter-view-container {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  margin-bottom: 10px;
17
17
  font-size: 14px;
18
18
  }
19
- .filter-search {
19
+ .filter-wrp .filter-search {
20
20
  display: flex;
21
21
  gap: 10px;
22
22
  width: 180px;
23
23
  margin-right: 10px;
24
24
  }
25
- .filter-content {
25
+ .filter-wrp .filter-content {
26
26
  position: relative;
27
27
  display: flex;
28
28
  flex: 1;
29
29
  align-items: center;
30
30
  justify-content: space-between;
31
31
  }
32
- .left {
32
+ .filter-wrp .left {
33
33
  display: flex;
34
34
  gap: 10px;
35
35
  align-items: center;
36
36
  }
37
- .right {
37
+ .filter-wrp .right {
38
38
  position: absolute;
39
39
  right: 0;
40
40
  z-index: 1;
@@ -45,15 +45,15 @@
45
45
  padding-left: 20px;
46
46
  background: white;
47
47
  }
48
- .more-btn {
48
+ .filter-wrp .more-btn {
49
49
  margin-right: 10px;
50
50
  }
51
- .right-prefix {
51
+ .filter-wrp .right-prefix {
52
52
  display: flex;
53
53
  gap: 10px;
54
54
  align-items: center;
55
55
  }
56
- .filter-pannel {
56
+ .filter-wrp .filter-pannel {
57
57
  display: flex;
58
58
  gap: 10px;
59
59
  padding: 10px;
@@ -61,29 +61,29 @@
61
61
  border-radius: 6px;
62
62
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
63
63
  }
64
- .filter-item-view {
64
+ .filter-wrp .filter-item-view {
65
65
  position: relative;
66
66
  display: flex;
67
67
  overflow: hidden;
68
68
  }
69
- .filter-item-view .show-view {
69
+ .filter-wrp .filter-item-view .show-view {
70
70
  z-index: 1;
71
71
  width: 100%;
72
72
  height: 100%;
73
73
  background: #fff;
74
74
  pointer-events: none;
75
75
  }
76
- .filter-item-view .select-view {
76
+ .filter-wrp .filter-item-view .select-view {
77
77
  position: absolute;
78
78
  z-index: 0;
79
79
  width: 100%;
80
80
  }
81
- .hasvalue-btn {
81
+ .filter-wrp .hasvalue-btn {
82
82
  color: #165dff;
83
83
  background-color: #e8f3ff;
84
84
  border-right: none !important;
85
85
  }
86
- .right-prefix {
86
+ .filter-wrp .right-prefix {
87
87
  display: flex;
88
88
  gap: 10px;
89
89
  align-items: center;
@@ -1,108 +1,110 @@
1
- .tooltip-button {
2
- height: auto;
3
- padding: 20px;
4
- }
1
+ .filter-wrp {
2
+ .tooltip-button {
3
+ height: auto;
4
+ padding: 20px;
5
+ }
5
6
 
6
- // DocFilter 组件内部样式
7
- .dop.active {
8
- color: #165dff;
9
- }
7
+ // DocFilter 组件内部样式
8
+ .dop.active {
9
+ color: #165dff;
10
+ }
10
11
 
11
- .dop .label {
12
- display: flex;
13
- gap: 10px;
14
- align-items: center;
15
- }
12
+ .dop .label {
13
+ display: flex;
14
+ gap: 10px;
15
+ align-items: center;
16
+ }
16
17
 
17
- // FilterGroup 内部样式
18
- .filter-view-container {
19
- display: flex;
20
- align-items: center;
21
- margin-bottom: 10px;
22
- font-size: 14px;
23
- }
18
+ // FilterGroup 内部样式
19
+ .filter-view-container {
20
+ display: flex;
21
+ align-items: center;
22
+ margin-bottom: 10px;
23
+ font-size: 14px;
24
+ }
24
25
 
25
- .filter-search {
26
- display: flex;
27
- gap: 10px;
28
- width: 180px;
29
- margin-right: 10px;
30
- }
26
+ .filter-search {
27
+ display: flex;
28
+ gap: 10px;
29
+ width: 180px;
30
+ margin-right: 10px;
31
+ }
31
32
 
32
- .filter-content {
33
- position: relative;
34
- display: flex;
35
- flex: 1;
36
- align-items: center;
37
- justify-content: space-between;
38
- }
33
+ .filter-content {
34
+ position: relative;
35
+ display: flex;
36
+ flex: 1;
37
+ align-items: center;
38
+ justify-content: space-between;
39
+ }
39
40
 
40
- .left {
41
- display: flex;
42
- gap: 10px;
43
- align-items: center;
44
- }
41
+ .left {
42
+ display: flex;
43
+ gap: 10px;
44
+ align-items: center;
45
+ }
45
46
 
46
- .right {
47
- position: absolute;
48
- right: 0;
49
- z-index: 1;
50
- display: flex;
51
- flex-wrap: nowrap;
52
- align-items: center;
53
- height: 100%;
54
- padding-left: 20px;
55
- background: white;
56
- }
47
+ .right {
48
+ position: absolute;
49
+ right: 0;
50
+ z-index: 1;
51
+ display: flex;
52
+ flex-wrap: nowrap;
53
+ align-items: center;
54
+ height: 100%;
55
+ padding-left: 20px;
56
+ background: white;
57
+ }
57
58
 
58
- .more-btn {
59
- margin-right: 10px;
60
- }
59
+ .more-btn {
60
+ margin-right: 10px;
61
+ }
61
62
 
62
- .right-prefix {
63
- display: flex;
64
- gap: 10px;
65
- align-items: center;
66
- }
63
+ .right-prefix {
64
+ display: flex;
65
+ gap: 10px;
66
+ align-items: center;
67
+ }
67
68
 
68
- .filter-pannel {
69
- display: flex;
70
- gap: 10px;
71
- padding: 10px;
72
- background-color: white;
73
- border-radius: 6px;
74
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
75
- }
69
+ .filter-pannel {
70
+ display: flex;
71
+ gap: 10px;
72
+ padding: 10px;
73
+ background-color: white;
74
+ border-radius: 6px;
75
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
76
+ }
76
77
 
77
- // Filter Item 内部样式
78
- .filter-item-view {
79
- position: relative;
80
- display: flex;
81
- overflow: hidden;
82
- }
78
+ // Filter Item 内部样式
79
+ .filter-item-view {
80
+ position: relative;
81
+ display: flex;
82
+ overflow: hidden;
83
+ }
83
84
 
84
- .filter-item-view .show-view {
85
- z-index: 1;
86
- width: 100%;
87
- height: 100%;
88
- background: #fff;
89
- pointer-events: none;
90
- }
85
+ .filter-item-view .show-view {
86
+ z-index: 1;
87
+ width: 100%;
88
+ height: 100%;
89
+ background: #fff;
90
+ pointer-events: none;
91
+ }
91
92
 
92
- .filter-item-view .select-view {
93
- position: absolute;
94
- z-index: 0;
95
- width: 100%;
96
- }
93
+ .filter-item-view .select-view {
94
+ position: absolute;
95
+ z-index: 0;
96
+ width: 100%;
97
+ }
97
98
 
98
- .hasvalue-btn {
99
- color: #165dff;
100
- background-color: #e8f3ff;
101
- border-right: none !important;
102
- }
99
+ .hasvalue-btn {
100
+ color: #165dff;
101
+ background-color: #e8f3ff;
102
+ border-right: none !important;
103
+ }
103
104
 
104
- .right-prefix {
105
- display: flex;
106
- gap: 10px;
107
- align-items: center;
105
+ .right-prefix {
106
+ display: flex;
107
+ gap: 10px;
108
+ align-items: center;
109
+ }
108
110
  }
@@ -1,23 +1,29 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
2
- import { Space, Avatar, Button } from "@arco-design/web-vue";
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, withCtx, renderList, createBlock } from "vue";
2
+ import { Space, Tooltip, Avatar, Button } from "@arco-design/web-vue";
3
3
  import { IconDelete, IconPlus } from "@arco-design/web-vue/es/icon";
4
+ import userDirector from "../userDirector/index.js";
5
+ import { DEFAULT_BASE_API } from "../config.js";
4
6
  const _hoisted_1 = { class: "select-avatar-list" };
5
7
  const _sfc_main = defineComponent({
6
8
  ...{ name: "selectAvatarList" },
7
9
  __name: "component",
8
10
  props: {
9
- value: {}
11
+ list: {},
12
+ BASE_API: {},
13
+ repositoryId: {}
10
14
  },
11
- emits: ["update:value"],
15
+ emits: ["update:list"],
12
16
  setup(__props, { emit: __emit }) {
13
17
  const props = __props;
18
+ const BASE_API = props.BASE_API || DEFAULT_BASE_API;
14
19
  const emit = __emit;
20
+ const visible = ref(false);
15
21
  const list = computed({
16
22
  get() {
17
- return props.value;
23
+ return props.list;
18
24
  },
19
- set() {
20
- emit("update:value", props.value);
25
+ set(value) {
26
+ emit("update:list", value);
21
27
  }
22
28
  });
23
29
  const dell = (index) => {
@@ -27,50 +33,64 @@ const _sfc_main = defineComponent({
27
33
  return item.uid ? item.alias : `\u89D2\u8272\uFF1A${item.alias}`;
28
34
  };
29
35
  const addUser = () => {
36
+ visible.value = true;
37
+ };
38
+ const submit = (data) => {
39
+ list.value = data;
40
+ visible.value = false;
30
41
  };
31
42
  return (_ctx, _cache) => {
32
- const _component_a_tooltip = resolveComponent("a-tooltip");
33
- return openBlock(), createElementBlock("div", _hoisted_1, [
34
- createVNode(unref(Space), null, {
35
- default: withCtx(() => [
36
- (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item, index) => {
37
- return openBlock(), createBlock(_component_a_tooltip, {
38
- key: index,
39
- content: content(item),
40
- position: "top",
41
- mini: ""
43
+ return openBlock(), createElementBlock(Fragment, null, [
44
+ createElementVNode("div", _hoisted_1, [
45
+ createVNode(unref(Space), null, {
46
+ default: withCtx(() => [
47
+ (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item, index) => {
48
+ return openBlock(), createBlock(unref(Tooltip), {
49
+ key: index,
50
+ content: content(item),
51
+ position: "top",
52
+ mini: ""
53
+ }, {
54
+ default: withCtx(() => [
55
+ createVNode(unref(Avatar), {
56
+ "trigger-type": "mask",
57
+ "image-url": item.avatar
58
+ }, {
59
+ "trigger-icon": withCtx(() => [
60
+ createVNode(unref(IconDelete), {
61
+ onClick: ($event) => dell(index)
62
+ }, null, 8, ["onClick"])
63
+ ]),
64
+ _: 2
65
+ }, 1032, ["image-url"])
66
+ ]),
67
+ _: 2
68
+ }, 1032, ["content"]);
69
+ }), 128)),
70
+ createVNode(unref(Button), {
71
+ class: "large",
72
+ shape: "circle",
73
+ size: "large",
74
+ onClick: addUser
42
75
  }, {
43
76
  default: withCtx(() => [
44
- createVNode(unref(Avatar), {
45
- "trigger-type": "mask",
46
- "image-url": item.avatar
47
- }, {
48
- "trigger-icon": withCtx(() => [
49
- createVNode(unref(IconDelete), {
50
- onClick: ($event) => dell(index)
51
- }, null, 8, ["onClick"])
52
- ]),
53
- _: 2
54
- }, 1032, ["image-url"])
77
+ createVNode(unref(IconPlus))
55
78
  ]),
56
- _: 2
57
- }, 1032, ["content"]);
58
- }), 128)),
59
- createVNode(unref(Button), {
60
- class: "large",
61
- shape: "circle",
62
- size: "large",
63
- onClick: addUser
64
- }, {
65
- default: withCtx(() => [
66
- createVNode(unref(IconPlus))
67
- ]),
68
- _: 1
69
- })
70
- ]),
71
- _: 1
72
- })
73
- ]);
79
+ _: 1
80
+ })
81
+ ]),
82
+ _: 1
83
+ })
84
+ ]),
85
+ createVNode(unref(userDirector), {
86
+ visible: visible.value,
87
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
88
+ BASE_API: unref(BASE_API),
89
+ "default-data": list.value,
90
+ "repository-id": props.repositoryId,
91
+ onSubmit: submit
92
+ }, null, 8, ["visible", "BASE_API", "default-data", "repository-id"])
93
+ ], 64);
74
94
  };
75
95
  }
76
96
  });