@cmstops/pro-compo 0.1.8 → 0.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/dist/index.css +857 -0
- package/dist/index.min.css +1 -1
- package/es/appCenter/script/routeMap.d.ts +1 -1
- package/es/config.d.ts +1 -1
- package/es/config.js +2 -2
- package/es/contentModal/component.js +5 -2
- package/es/contentModal/components/CompoList/index.js +12 -1
- package/es/contentModal/components/storeBox/index.js +1 -1
- package/es/index.css +857 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/index.less +2 -0
- package/es/previousVersion/component.d.ts +0 -0
- package/es/previousVersion/component.js +378 -0
- package/es/previousVersion/index.d.ts +2 -0
- package/es/previousVersion/index.js +7 -0
- package/es/previousVersion/script/api.d.ts +15 -0
- package/es/previousVersion/script/api.js +39 -0
- package/es/previousVersion/script/tool.d.ts +6 -0
- package/es/previousVersion/script/tool.js +22 -0
- package/es/previousVersion/style/css.js +1 -0
- package/es/previousVersion/style/index.css +166 -0
- package/es/previousVersion/style/index.d.ts +1 -0
- package/es/previousVersion/style/index.js +1 -0
- package/es/previousVersion/style/index.less +208 -0
- package/es/resourceModal/assets/images/unknown.js +2 -0
- package/es/resourceModal/assets/selection/null.js +2 -0
- package/es/resourceModal/component.js +65 -4
- package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
- package/es/resourceModal/components/MediaPreviewer/index.js +69 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +111 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +85 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +171 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +211 -0
- package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/index.js +272 -0
- package/es/resourceModal/script/api.d.ts +8 -0
- package/es/resourceModal/script/api.js +30 -0
- package/es/resourceModal/script/filter.d.ts +8 -0
- package/es/resourceModal/script/filter.js +22 -0
- package/es/resourceModal/script/mediaSelection.d.ts +10 -0
- package/es/resourceModal/style/DocAiMediaSelected.less +56 -0
- package/es/resourceModal/style/FileTypeThumb.less +183 -0
- package/es/resourceModal/style/MainContent.less +200 -0
- package/es/resourceModal/style/MediaPreviewer.less +71 -0
- package/es/resourceModal/style/MediaSelection.less +59 -0
- package/es/resourceModal/style/ToolbarSearch.less +40 -0
- package/es/resourceModal/style/index.css +514 -3
- package/es/resourceModal/style/index.less +16 -3
- package/es/selectGategory/component.d.ts +0 -0
- package/es/selectGategory/component.js +95 -0
- package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
- package/es/selectGategory/components/ColumnSelection/index.js +273 -0
- package/es/selectGategory/index.d.ts +2 -0
- package/es/selectGategory/index.js +7 -0
- package/es/selectGategory/script/api.d.ts +6 -0
- package/es/selectGategory/script/api.js +15 -0
- package/es/selectGategory/style/ColumnSelection.less +190 -0
- package/es/selectGategory/style/css.js +1 -0
- package/es/selectGategory/style/index.css +180 -0
- package/es/selectGategory/style/index.d.ts +1 -0
- package/es/selectGategory/style/index.js +1 -0
- package/es/selectGategory/style/index.less +40 -0
- package/es/utils/doc.d.ts +69 -0
- package/es/utils/typeMap.js +2 -1
- package/lib/config.js +2 -2
- package/lib/contentModal/component.js +5 -2
- package/lib/contentModal/components/CompoList/index.js +11 -0
- package/lib/contentModal/components/storeBox/index.js +1 -1
- package/lib/index.css +857 -0
- package/lib/index.js +4 -0
- package/lib/index.less +2 -0
- package/lib/previousVersion/component.js +379 -0
- package/lib/previousVersion/index.js +8 -0
- package/lib/previousVersion/script/api.js +43 -0
- package/lib/previousVersion/script/tool.js +24 -0
- package/lib/previousVersion/style/css.js +2 -0
- package/lib/previousVersion/style/index.css +166 -0
- package/lib/previousVersion/style/index.js +2 -0
- package/lib/previousVersion/style/index.less +208 -0
- package/lib/resourceModal/assets/images/unknown.js +3 -0
- package/lib/resourceModal/assets/selection/null.js +3 -0
- package/lib/resourceModal/component.js +64 -3
- package/lib/resourceModal/components/MediaPreviewer/index.js +70 -0
- package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +112 -0
- package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +86 -0
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +172 -0
- package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +212 -0
- package/lib/resourceModal/components/MediaSelection/index.js +273 -0
- package/lib/resourceModal/script/api.js +35 -0
- package/lib/resourceModal/script/filter.js +25 -0
- package/lib/resourceModal/style/DocAiMediaSelected.less +56 -0
- package/lib/resourceModal/style/FileTypeThumb.less +183 -0
- package/lib/resourceModal/style/MainContent.less +200 -0
- package/lib/resourceModal/style/MediaPreviewer.less +71 -0
- package/lib/resourceModal/style/MediaSelection.less +59 -0
- package/lib/resourceModal/style/ToolbarSearch.less +40 -0
- package/lib/resourceModal/style/index.css +514 -3
- package/lib/resourceModal/style/index.less +16 -3
- package/lib/selectGategory/component.js +96 -0
- package/lib/selectGategory/components/ColumnSelection/index.js +274 -0
- package/lib/selectGategory/index.js +8 -0
- package/lib/selectGategory/script/api.js +18 -0
- package/lib/selectGategory/style/ColumnSelection.less +190 -0
- package/lib/selectGategory/style/css.js +2 -0
- package/lib/selectGategory/style/index.css +180 -0
- package/lib/selectGategory/style/index.js +2 -0
- package/lib/selectGategory/style/index.less +40 -0
- package/lib/utils/typeMap.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, Fragment, renderList, createVNode, unref, withCtx, createElementVNode, normalizeClass, toDisplayString, withModifiers, createCommentVNode, normalizeStyle, createTextVNode, createBlock } from "vue";
|
|
2
|
+
import { Tooltip, Popover, Scrollbar, Tree } from "@arco-design/web-vue";
|
|
3
|
+
import { IconCloseCircle, IconCheck, IconPlus } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
import { getCategoryPath, getCategoryCategoriesTree } from "../../script/api.js";
|
|
5
|
+
const _hoisted_1 = { class: "column-selection-container" };
|
|
6
|
+
const _hoisted_2 = { class: "label" };
|
|
7
|
+
const _hoisted_3 = ["onClick"];
|
|
8
|
+
const _hoisted_4 = { class: "column-select add" };
|
|
9
|
+
const _hoisted_5 = { class: "column-select add" };
|
|
10
|
+
const _hoisted_6 = { key: 0 };
|
|
11
|
+
const _hoisted_7 = { class: "label" };
|
|
12
|
+
const _hoisted_8 = { class: "column-v" };
|
|
13
|
+
const _hoisted_9 = ["onClick"];
|
|
14
|
+
const _hoisted_10 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "add-icon"
|
|
17
|
+
};
|
|
18
|
+
const _sfc_main = defineComponent({
|
|
19
|
+
...{ name: "selectGategory" },
|
|
20
|
+
__name: "index",
|
|
21
|
+
props: {
|
|
22
|
+
base_api: {},
|
|
23
|
+
repository_id: {},
|
|
24
|
+
selectColumnData: {},
|
|
25
|
+
selectColumnWithData: {},
|
|
26
|
+
multiple: { type: Boolean },
|
|
27
|
+
limit: {},
|
|
28
|
+
addText: {}
|
|
29
|
+
},
|
|
30
|
+
emits: [
|
|
31
|
+
"update:selectColumnData",
|
|
32
|
+
"update:selectColumnWithData"
|
|
33
|
+
],
|
|
34
|
+
setup(__props, { emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const popoverShow = ref(false);
|
|
37
|
+
const treeData = ref([]);
|
|
38
|
+
const listMinHeight = ref(0);
|
|
39
|
+
const columnSelectedArray = ref([]);
|
|
40
|
+
const multipleShowSelectedArray = ref([]);
|
|
41
|
+
const columnSelectedArrayIds = computed(
|
|
42
|
+
() => columnSelectedArray.value.map((item) => item.id)
|
|
43
|
+
);
|
|
44
|
+
watch(
|
|
45
|
+
() => props.selectColumnData,
|
|
46
|
+
() => {
|
|
47
|
+
if (!(props.selectColumnData && props.selectColumnData.length)) {
|
|
48
|
+
columnSelectedArray.value = [];
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{ deep: true }
|
|
52
|
+
);
|
|
53
|
+
watch(
|
|
54
|
+
() => props.selectColumnWithData,
|
|
55
|
+
() => {
|
|
56
|
+
if (!(props.selectColumnWithData && props.selectColumnWithData.length)) {
|
|
57
|
+
columnSelectedArray.value = [];
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{ deep: true }
|
|
61
|
+
);
|
|
62
|
+
const columnSelectedArraySplice = (index) => {
|
|
63
|
+
columnSelectedArray.value.splice(index, 1);
|
|
64
|
+
};
|
|
65
|
+
const onCheck = (newSelectedKeys, data) => {
|
|
66
|
+
data && data.node && AddColumnSelected(data.node);
|
|
67
|
+
};
|
|
68
|
+
const leavePopover = () => {
|
|
69
|
+
multipleShowSelectedArray.value = JSON.parse(
|
|
70
|
+
JSON.stringify(columnSelectedArray.value)
|
|
71
|
+
);
|
|
72
|
+
props.multiple ? emit(
|
|
73
|
+
"update:selectColumnWithData",
|
|
74
|
+
JSON.parse(JSON.stringify(columnSelectedArray.value))
|
|
75
|
+
) : emit(
|
|
76
|
+
"update:selectColumnData",
|
|
77
|
+
JSON.parse(JSON.stringify(columnSelectedArray.value))
|
|
78
|
+
);
|
|
79
|
+
popoverShow.value = false;
|
|
80
|
+
};
|
|
81
|
+
const multipleArraySplice = (item, index) => {
|
|
82
|
+
multipleShowSelectedArray.value.splice(index, 1);
|
|
83
|
+
const _index = columnSelectedArray.value.findIndex(
|
|
84
|
+
(column) => column.id === item.id
|
|
85
|
+
);
|
|
86
|
+
if (_index >= 0) {
|
|
87
|
+
columnSelectedArray.value.splice(_index, 1);
|
|
88
|
+
emit(
|
|
89
|
+
"update:selectColumnWithData",
|
|
90
|
+
JSON.parse(JSON.stringify(columnSelectedArray.value))
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const AddColumnSelected = (data, node) => {
|
|
95
|
+
for (let index = 0; index < columnSelectedArray.value.length; index++) {
|
|
96
|
+
const element = columnSelectedArray.value[index];
|
|
97
|
+
if (element.id === (data == null ? void 0 : data.id)) {
|
|
98
|
+
columnSelectedArraySplice(index);
|
|
99
|
+
if (!props.multiple) {
|
|
100
|
+
emit(
|
|
101
|
+
"update:selectColumnData",
|
|
102
|
+
JSON.parse(JSON.stringify(columnSelectedArray.value))
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
getCategoryPath(props.base_api, {
|
|
109
|
+
repo: props.repository_id,
|
|
110
|
+
category: data == null ? void 0 : data.id
|
|
111
|
+
}).then((res) => {
|
|
112
|
+
const pathArr = [];
|
|
113
|
+
for (const i of res.message) {
|
|
114
|
+
pathArr.push(i.category_alias);
|
|
115
|
+
}
|
|
116
|
+
data.path = pathArr.join("/");
|
|
117
|
+
if (props.multiple) {
|
|
118
|
+
columnSelectedArray.value.push(data);
|
|
119
|
+
if (props.limit && columnSelectedArray.value.length > props.limit) {
|
|
120
|
+
columnSelectedArray.value.splice(
|
|
121
|
+
0,
|
|
122
|
+
columnSelectedArray.value.length - props.limit
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
columnSelectedArray.value = [data];
|
|
127
|
+
emit(
|
|
128
|
+
"update:selectColumnData",
|
|
129
|
+
JSON.parse(JSON.stringify(columnSelectedArray.value))
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
const loadColumnTreeNode = async () => {
|
|
135
|
+
const nodes = await getCategoryCategoriesData();
|
|
136
|
+
const styleLength = nodes.length > 10 ? 10 : nodes.length;
|
|
137
|
+
listMinHeight.value = (styleLength + 1) * 32;
|
|
138
|
+
treeData.value = nodes;
|
|
139
|
+
if (props.selectColumnData && props.selectColumnData.length) {
|
|
140
|
+
columnSelectedArray.value = JSON.parse(
|
|
141
|
+
JSON.stringify(props.selectColumnData)
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
if (props.selectColumnWithData && props.selectColumnWithData.length) {
|
|
145
|
+
columnSelectedArray.value = JSON.parse(
|
|
146
|
+
JSON.stringify(props.selectColumnWithData)
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const getCategoryCategoriesData = async () => {
|
|
151
|
+
const { code, message } = await getCategoryCategoriesTree(props.base_api, {
|
|
152
|
+
repo_id: props.repository_id
|
|
153
|
+
});
|
|
154
|
+
if (code === 0) {
|
|
155
|
+
return message;
|
|
156
|
+
}
|
|
157
|
+
return [];
|
|
158
|
+
};
|
|
159
|
+
onMounted(() => {
|
|
160
|
+
loadColumnTreeNode();
|
|
161
|
+
});
|
|
162
|
+
return (_ctx, _cache) => {
|
|
163
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
164
|
+
_ctx.multiple ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(multipleShowSelectedArray.value, (item, index) => {
|
|
165
|
+
return openBlock(), createElementBlock("div", {
|
|
166
|
+
key: index,
|
|
167
|
+
class: "column-select"
|
|
168
|
+
}, [
|
|
169
|
+
createVNode(unref(Tooltip), {
|
|
170
|
+
content: item.path,
|
|
171
|
+
placement: "left"
|
|
172
|
+
}, {
|
|
173
|
+
default: withCtx(() => [
|
|
174
|
+
createElementVNode("span", {
|
|
175
|
+
class: normalizeClass(["space", { disabled: popoverShow.value }])
|
|
176
|
+
}, [
|
|
177
|
+
createElementVNode("span", _hoisted_2, toDisplayString(item.path), 1),
|
|
178
|
+
createElementVNode("i", {
|
|
179
|
+
onClick: withModifiers(($event) => multipleArraySplice(item, index), ["stop"])
|
|
180
|
+
}, [
|
|
181
|
+
createVNode(unref(IconCloseCircle))
|
|
182
|
+
], 8, _hoisted_3)
|
|
183
|
+
], 2)
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["content"])
|
|
187
|
+
]);
|
|
188
|
+
}), 128)) : createCommentVNode("v-if", true),
|
|
189
|
+
createVNode(unref(Popover), {
|
|
190
|
+
"content-class": `column-selection-popover`,
|
|
191
|
+
position: "bottom",
|
|
192
|
+
trigger: "click",
|
|
193
|
+
onShow: _cache[0] || (_cache[0] = ($event) => popoverShow.value = true),
|
|
194
|
+
onHide: leavePopover,
|
|
195
|
+
onPopupVisibleChange: leavePopover
|
|
196
|
+
}, {
|
|
197
|
+
content: withCtx(() => [
|
|
198
|
+
createElementVNode("div", {
|
|
199
|
+
class: "column-selection-main",
|
|
200
|
+
style: normalizeStyle({ minHeight: listMinHeight.value + 1 + "px" })
|
|
201
|
+
}, [
|
|
202
|
+
createElementVNode("div", _hoisted_8, [
|
|
203
|
+
createVNode(unref(Scrollbar), {
|
|
204
|
+
class: "column-selection-scroll",
|
|
205
|
+
style: normalizeStyle({ height: listMinHeight.value + "px" })
|
|
206
|
+
}, {
|
|
207
|
+
default: withCtx(() => [
|
|
208
|
+
createVNode(unref(Tree), {
|
|
209
|
+
checkable: _ctx.multiple,
|
|
210
|
+
"check-strictly": true,
|
|
211
|
+
data: treeData.value,
|
|
212
|
+
"default-expand-all": false,
|
|
213
|
+
"field-names": {
|
|
214
|
+
children: "children",
|
|
215
|
+
title: "title",
|
|
216
|
+
key: "id"
|
|
217
|
+
},
|
|
218
|
+
"checked-keys": columnSelectedArrayIds.value,
|
|
219
|
+
onCheck
|
|
220
|
+
}, {
|
|
221
|
+
extra: withCtx((data) => [
|
|
222
|
+
createElementVNode("span", {
|
|
223
|
+
class: "custom-tree-node",
|
|
224
|
+
onClick: withModifiers(($event) => AddColumnSelected(data), ["stop"])
|
|
225
|
+
}, [
|
|
226
|
+
createElementVNode("span", null, toDisplayString(data.alias), 1),
|
|
227
|
+
!_ctx.multiple && columnSelectedArrayIds.value.includes(data.id) ? (openBlock(), createElementBlock("span", _hoisted_10, [
|
|
228
|
+
createElementVNode("i", null, [
|
|
229
|
+
createVNode(unref(IconCheck))
|
|
230
|
+
])
|
|
231
|
+
])) : createCommentVNode("v-if", true)
|
|
232
|
+
], 8, _hoisted_9)
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, ["checkable", "data", "checked-keys"])
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["style"])
|
|
239
|
+
])
|
|
240
|
+
], 4)
|
|
241
|
+
]),
|
|
242
|
+
default: withCtx(() => [
|
|
243
|
+
_ctx.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
244
|
+
createCommentVNode(" \u591A\u9009 "),
|
|
245
|
+
createElementVNode("div", _hoisted_4, [
|
|
246
|
+
createElementVNode("i", null, [
|
|
247
|
+
createVNode(unref(IconPlus))
|
|
248
|
+
]),
|
|
249
|
+
createTextVNode(" " + toDisplayString(_ctx.addText ? _ctx.addText : "\u6DFB\u52A0\u680F\u76EE"), 1)
|
|
250
|
+
])
|
|
251
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
252
|
+
createCommentVNode(" \u5355\u9009 "),
|
|
253
|
+
createElementVNode("div", _hoisted_5, [
|
|
254
|
+
!columnSelectedArray.value.length ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.addText ? _ctx.addText : "\u8BF7\u9009\u62E9"), 1)) : (openBlock(), createBlock(unref(Tooltip), {
|
|
255
|
+
key: 1,
|
|
256
|
+
content: columnSelectedArray.value[0].path,
|
|
257
|
+
placement: "left"
|
|
258
|
+
}, {
|
|
259
|
+
default: withCtx(() => [
|
|
260
|
+
createElementVNode("span", _hoisted_7, "\u5DF2\u9009\uFF1A" + toDisplayString(columnSelectedArray.value[0].path), 1)
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["content"]))
|
|
264
|
+
])
|
|
265
|
+
], 64))
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
})
|
|
269
|
+
]);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare function getCategoryPath(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
|
|
5
|
+
export declare function getCategoryCategoriesTree(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import request from "../../utils/request.js";
|
|
2
|
+
function getCategoryPath(BASE_API, params) {
|
|
3
|
+
return request(BASE_API, {
|
|
4
|
+
url: `/poplar/v2/repo/${params.repo}/category/${params.category}/path`,
|
|
5
|
+
method: "get"
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
function getCategoryCategoriesTree(BASE_API, params) {
|
|
9
|
+
return request(BASE_API, {
|
|
10
|
+
url: `/poplar/v3/categories`,
|
|
11
|
+
method: "get",
|
|
12
|
+
params
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { getCategoryCategoriesTree, getCategoryPath };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
.column-selection-container {
|
|
2
|
+
padding: 0;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
@mixin ellipsis {
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.single {
|
|
11
|
+
.column-select {
|
|
12
|
+
position: relative;
|
|
13
|
+
max-width: 250px;
|
|
14
|
+
padding-right: 35px;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
|
|
17
|
+
.right-icon {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 7px;
|
|
20
|
+
right: 15px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.add {
|
|
24
|
+
color: #86909c;
|
|
25
|
+
text-align: center;
|
|
26
|
+
background: #f3f4f5;
|
|
27
|
+
border: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.value {
|
|
31
|
+
color: #4886ff;
|
|
32
|
+
background: #edf3ff;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.long {
|
|
36
|
+
padding-right: 90px;
|
|
37
|
+
|
|
38
|
+
.longTip {
|
|
39
|
+
position: absolute;
|
|
40
|
+
right: 35px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.column-select {
|
|
47
|
+
height: 28px;
|
|
48
|
+
padding: 0 10px;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
line-height: 28px;
|
|
51
|
+
border: 1px solid #e8e8e8;
|
|
52
|
+
border-bottom: none;
|
|
53
|
+
|
|
54
|
+
.space {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
color: #4e5969;
|
|
59
|
+
|
|
60
|
+
&.disabled {
|
|
61
|
+
opacity: 0.3;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.label {
|
|
67
|
+
@include ellipsis;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.add {
|
|
71
|
+
@include ellipsis;
|
|
72
|
+
|
|
73
|
+
color: #86909c;
|
|
74
|
+
text-align: center;
|
|
75
|
+
background: #f3f4f5;
|
|
76
|
+
border: 1px solid #e8e8e8;
|
|
77
|
+
border-radius: 2px;
|
|
78
|
+
|
|
79
|
+
.label {
|
|
80
|
+
font-weight: 700;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.column-selection-popover {
|
|
87
|
+
width: 300px;
|
|
88
|
+
|
|
89
|
+
&.single {
|
|
90
|
+
width: 180px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
padding: 0;
|
|
94
|
+
|
|
95
|
+
.column-selection-main {
|
|
96
|
+
transition: all 0.3s;
|
|
97
|
+
|
|
98
|
+
.arco-scrollbar {
|
|
99
|
+
.column-selection-scroll {
|
|
100
|
+
overflow: auto;
|
|
101
|
+
|
|
102
|
+
.arco-tree {
|
|
103
|
+
.arco-tree-node {
|
|
104
|
+
position: relative;
|
|
105
|
+
height: 36px;
|
|
106
|
+
line-height: 36px;
|
|
107
|
+
|
|
108
|
+
.custom-tree-node {
|
|
109
|
+
width: 100%;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
span {
|
|
113
|
+
vertical-align: middle;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.add-icon {
|
|
117
|
+
position: absolute;
|
|
118
|
+
right: 10px;
|
|
119
|
+
color: #4886ff;
|
|
120
|
+
|
|
121
|
+
i {
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
background-color: rgba(0, 0, 0, 0.05) !important;
|
|
128
|
+
|
|
129
|
+
.add-icon {
|
|
130
|
+
i {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.selected-list {
|
|
141
|
+
position: relative;
|
|
142
|
+
width: 100%;
|
|
143
|
+
margin: 0;
|
|
144
|
+
padding: 0;
|
|
145
|
+
list-style: none;
|
|
146
|
+
border-top: 1px solid #f3f4f5;
|
|
147
|
+
|
|
148
|
+
.title {
|
|
149
|
+
height: 28px;
|
|
150
|
+
padding: 0 40px 0 24px;
|
|
151
|
+
color: #86909c;
|
|
152
|
+
line-height: 28px;
|
|
153
|
+
background: #f3f4f5;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.truncate {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
li {
|
|
163
|
+
height: 36px;
|
|
164
|
+
padding: 0 40px 0 24px;
|
|
165
|
+
line-height: 36px;
|
|
166
|
+
|
|
167
|
+
.item {
|
|
168
|
+
width: calc(100% - 10px);
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
i {
|
|
175
|
+
position: absolute;
|
|
176
|
+
right: 10px;
|
|
177
|
+
display: inline-block;
|
|
178
|
+
color: rgba(0, 0, 0, 0.56);
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
font-family: PingFangSC-Regular;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&:hover {
|
|
185
|
+
background: rgba(0, 0, 0, 0.05);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.css";
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
.column-selection-container {
|
|
2
|
+
padding: 0;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
@mixin ellipsis {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
}
|
|
10
|
+
.column-selection-container.single .column-select {
|
|
11
|
+
position: relative;
|
|
12
|
+
max-width: 250px;
|
|
13
|
+
padding-right: 35px;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
}
|
|
16
|
+
.column-selection-container.single .column-select .right-icon {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 7px;
|
|
19
|
+
right: 15px;
|
|
20
|
+
}
|
|
21
|
+
.column-selection-container.single .column-select.add {
|
|
22
|
+
color: #86909c;
|
|
23
|
+
text-align: center;
|
|
24
|
+
background: #f3f4f5;
|
|
25
|
+
border: none;
|
|
26
|
+
}
|
|
27
|
+
.column-selection-container.single .column-select.value {
|
|
28
|
+
color: #4886ff;
|
|
29
|
+
background: #edf3ff;
|
|
30
|
+
}
|
|
31
|
+
.column-selection-container.single .column-select.long {
|
|
32
|
+
padding-right: 90px;
|
|
33
|
+
}
|
|
34
|
+
.column-selection-container.single .column-select.long .longTip {
|
|
35
|
+
position: absolute;
|
|
36
|
+
right: 35px;
|
|
37
|
+
}
|
|
38
|
+
.column-selection-container .column-select {
|
|
39
|
+
height: 28px;
|
|
40
|
+
padding: 0 10px;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
line-height: 28px;
|
|
43
|
+
border: 1px solid #e8e8e8;
|
|
44
|
+
border-bottom: none;
|
|
45
|
+
}
|
|
46
|
+
.column-selection-container .column-select .space {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
color: #4e5969;
|
|
51
|
+
}
|
|
52
|
+
.column-selection-container .column-select .space.disabled {
|
|
53
|
+
opacity: 0.3;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
.column-selection-container .column-select .label {
|
|
57
|
+
@include ellipsis;
|
|
58
|
+
}
|
|
59
|
+
.column-selection-container .column-select.add {
|
|
60
|
+
@include ellipsis;
|
|
61
|
+
color: #86909c;
|
|
62
|
+
text-align: center;
|
|
63
|
+
background: #f3f4f5;
|
|
64
|
+
border: 1px solid #e8e8e8;
|
|
65
|
+
border-radius: 2px;
|
|
66
|
+
}
|
|
67
|
+
.column-selection-container .column-select.add .label {
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
}
|
|
70
|
+
.column-selection-popover {
|
|
71
|
+
width: 300px;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
.column-selection-popover.single {
|
|
75
|
+
width: 180px;
|
|
76
|
+
}
|
|
77
|
+
.column-selection-popover .column-selection-main {
|
|
78
|
+
transition: all 0.3s;
|
|
79
|
+
}
|
|
80
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll {
|
|
81
|
+
overflow: auto;
|
|
82
|
+
}
|
|
83
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node {
|
|
84
|
+
position: relative;
|
|
85
|
+
height: 36px;
|
|
86
|
+
line-height: 36px;
|
|
87
|
+
}
|
|
88
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node .custom-tree-node {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node span {
|
|
92
|
+
vertical-align: middle;
|
|
93
|
+
}
|
|
94
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node .add-icon {
|
|
95
|
+
position: absolute;
|
|
96
|
+
right: 10px;
|
|
97
|
+
color: #4886ff;
|
|
98
|
+
}
|
|
99
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node .add-icon i {
|
|
100
|
+
font-size: 16px;
|
|
101
|
+
}
|
|
102
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node:hover {
|
|
103
|
+
background-color: rgba(0, 0, 0, 0.05) !important;
|
|
104
|
+
}
|
|
105
|
+
.column-selection-popover .column-selection-main .arco-scrollbar .column-selection-scroll .arco-tree .arco-tree-node:hover .add-icon i {
|
|
106
|
+
display: inline-block;
|
|
107
|
+
}
|
|
108
|
+
.column-selection-popover .column-selection-main .selected-list {
|
|
109
|
+
position: relative;
|
|
110
|
+
width: 100%;
|
|
111
|
+
margin: 0;
|
|
112
|
+
padding: 0;
|
|
113
|
+
list-style: none;
|
|
114
|
+
border-top: 1px solid #f3f4f5;
|
|
115
|
+
}
|
|
116
|
+
.column-selection-popover .column-selection-main .selected-list .title {
|
|
117
|
+
height: 28px;
|
|
118
|
+
padding: 0 40px 0 24px;
|
|
119
|
+
color: #86909c;
|
|
120
|
+
line-height: 28px;
|
|
121
|
+
background: #f3f4f5;
|
|
122
|
+
}
|
|
123
|
+
.column-selection-popover .column-selection-main .selected-list .truncate {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: space-between;
|
|
127
|
+
}
|
|
128
|
+
.column-selection-popover .column-selection-main .selected-list li {
|
|
129
|
+
height: 36px;
|
|
130
|
+
padding: 0 40px 0 24px;
|
|
131
|
+
line-height: 36px;
|
|
132
|
+
}
|
|
133
|
+
.column-selection-popover .column-selection-main .selected-list li .item {
|
|
134
|
+
width: calc(100% - 10px);
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
white-space: nowrap;
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
}
|
|
139
|
+
.column-selection-popover .column-selection-main .selected-list li i {
|
|
140
|
+
position: absolute;
|
|
141
|
+
right: 10px;
|
|
142
|
+
display: inline-block;
|
|
143
|
+
color: rgba(0, 0, 0, 0.56);
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
font-family: PingFangSC-Regular;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
.column-selection-popover .column-selection-main .selected-list li:hover {
|
|
149
|
+
background: rgba(0, 0, 0, 0.05);
|
|
150
|
+
}
|
|
151
|
+
.add-category-modal-wrapper .arco-modal-header {
|
|
152
|
+
border-bottom: none;
|
|
153
|
+
}
|
|
154
|
+
.add-category-modal-wrapper .arco-modal-body {
|
|
155
|
+
min-height: 200px;
|
|
156
|
+
padding: 20px;
|
|
157
|
+
padding-bottom: 0;
|
|
158
|
+
}
|
|
159
|
+
.add-category-modal-wrapper .arco-modal-body .form-view {
|
|
160
|
+
padding: 0 20px;
|
|
161
|
+
}
|
|
162
|
+
.add-category-modal-wrapper .arco-modal-body .form-view .title {
|
|
163
|
+
padding: 20px 0;
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
}
|
|
167
|
+
.add-category-modal-wrapper .arco-modal-body .form-view .item-title {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
color: #4e5969;
|
|
170
|
+
font-weight: 700;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
line-height: 40px;
|
|
173
|
+
text-align: left;
|
|
174
|
+
}
|
|
175
|
+
.add-category-modal-wrapper .arco-modal-body .form-view .item-title.big {
|
|
176
|
+
line-height: 60px;
|
|
177
|
+
}
|
|
178
|
+
.add-category-modal-wrapper .arco-modal-footer {
|
|
179
|
+
border-top: 0;
|
|
180
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.less";
|