@cmstops/pro-compo 0.1.2 → 0.1.4
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 +141 -5
- package/dist/index.min.css +1 -1
- package/es/appCenter/component.js +3 -2
- package/es/appCenter/script/routeMap.d.ts +1 -1
- package/es/appCenter/style/index.css +1 -1
- package/es/appCenter/style/index.less +1 -1
- package/es/config.d.ts +2 -0
- package/es/config.js +3 -0
- package/es/contentModal/component.d.ts +0 -0
- package/es/contentModal/component.js +175 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.js +103 -0
- package/es/contentModal/components/CompoList/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/index.js +234 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +44 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.js +101 -0
- package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/index.js +277 -0
- package/es/contentModal/components/storeBox/index.d.ts +0 -0
- package/es/contentModal/components/storeBox/index.js +107 -0
- package/es/contentModal/index.d.ts +2 -0
- package/es/contentModal/index.js +7 -0
- package/es/contentModal/script/api.d.ts +10 -0
- package/es/contentModal/script/api.js +45 -0
- package/es/contentModal/style/MediaFilter.less +8 -0
- package/es/contentModal/style/ViewAllColumn.less +33 -0
- package/es/contentModal/style/columnTree.less +9 -0
- package/es/contentModal/style/css.js +5 -0
- package/es/contentModal/style/index.css +13 -0
- package/es/contentModal/style/index.d.ts +5 -0
- package/es/contentModal/style/index.js +5 -0
- package/es/contentModal/style/index.less +16 -0
- package/es/contentModal/style/storeBox.less +45 -0
- package/es/hooks/batch.d.ts +8 -0
- package/es/hooks/batch.js +26 -0
- package/es/hooks/user.d.ts +11 -0
- package/es/hooks/user.js +46 -0
- package/es/index.css +141 -5
- package/es/index.d.ts +6 -1
- package/es/index.js +6 -1
- package/es/index.less +6 -1
- package/es/messageBox/component.d.ts +0 -0
- package/es/messageBox/component.js +146 -0
- package/es/messageBox/index.d.ts +2 -0
- package/es/messageBox/index.js +7 -0
- package/es/messageBox/list.d.ts +0 -0
- package/es/messageBox/list.js +116 -0
- package/es/messageBox/script/api.d.ts +6 -0
- package/es/messageBox/script/api.js +16 -0
- package/es/messageBox/style/index.css +64 -0
- package/es/messageBox/style/index.less +71 -0
- package/es/resourceModal/component.d.ts +0 -0
- package/es/resourceModal/component.js +14 -0
- package/es/resourceModal/index.d.ts +2 -0
- package/es/resourceModal/index.js +7 -0
- package/es/resourceModal/style/css.js +1 -0
- package/es/resourceModal/style/index.d.ts +1 -0
- package/es/resourceModal/style/index.js +1 -0
- package/es/style.css +5 -0
- package/es/typeIcons/component.d.ts +0 -0
- package/es/typeIcons/component.js +62 -0
- package/es/typeIcons/index.d.ts +2 -0
- package/es/typeIcons/index.js +7 -0
- package/es/typeIcons/style/css.js +1 -0
- package/es/typeIcons/style/index.css +5 -0
- package/es/typeIcons/style/index.d.ts +1 -0
- package/es/typeIcons/style/index.js +1 -0
- package/es/typeIcons/style/index.less +5 -0
- package/es/uploadStep/component.d.ts +0 -0
- package/es/uploadStep/component.js +14 -0
- package/es/uploadStep/index.d.ts +2 -0
- package/es/uploadStep/index.js +7 -0
- package/es/uploadStep/style/css.js +1 -0
- package/es/uploadStep/style/index.d.ts +1 -0
- package/es/uploadStep/style/index.js +1 -0
- package/es/userAvater/component.d.ts +0 -0
- package/es/userAvater/component.js +167 -0
- package/es/userAvater/index.d.ts +2 -0
- package/es/userAvater/index.js +7 -0
- package/es/userAvater/script/api.d.ts +8 -0
- package/es/userAvater/script/api.js +32 -0
- package/es/userAvater/style/css.js +1 -0
- package/es/userAvater/style/index.css +50 -0
- package/es/userAvater/style/index.d.ts +1 -0
- package/es/userAvater/style/index.js +1 -0
- package/es/userAvater/style/index.less +54 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +7 -0
- package/es/utils/request.js +1 -1
- package/es/utils/typeMap.d.ts +116 -0
- package/es/utils/typeMap.js +22 -0
- package/lib/appCenter/component.js +3 -2
- package/lib/appCenter/style/index.css +1 -1
- package/lib/appCenter/style/index.less +1 -1
- package/lib/config.js +6 -0
- package/lib/contentModal/component.js +176 -0
- package/lib/contentModal/components/CompoList/CompoFilter/index.js +104 -0
- package/lib/contentModal/components/CompoList/index.js +235 -0
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +45 -0
- package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +102 -0
- package/lib/contentModal/components/ViewAllColumn/index.js +278 -0
- package/lib/contentModal/components/storeBox/index.js +108 -0
- package/lib/contentModal/index.js +8 -0
- package/lib/contentModal/script/api.js +52 -0
- package/lib/contentModal/style/MediaFilter.less +8 -0
- package/lib/contentModal/style/ViewAllColumn.less +33 -0
- package/lib/contentModal/style/columnTree.less +9 -0
- package/lib/contentModal/style/css.js +6 -0
- package/lib/contentModal/style/index.css +13 -0
- package/lib/contentModal/style/index.js +6 -0
- package/lib/contentModal/style/index.less +16 -0
- package/lib/contentModal/style/storeBox.less +45 -0
- package/lib/hooks/batch.js +27 -0
- package/lib/hooks/user.js +49 -0
- package/lib/index.css +141 -5
- package/lib/index.js +14 -4
- package/lib/index.less +6 -1
- package/lib/messageBox/component.js +147 -0
- package/lib/messageBox/index.js +8 -0
- package/lib/messageBox/list.js +117 -0
- package/lib/messageBox/script/api.js +19 -0
- package/lib/messageBox/style/index.css +64 -0
- package/lib/messageBox/style/index.less +71 -0
- package/lib/resourceModal/component.js +15 -0
- package/lib/resourceModal/index.js +8 -0
- package/lib/resourceModal/style/css.js +2 -0
- package/lib/resourceModal/style/index.css +4 -0
- package/lib/resourceModal/style/index.js +2 -0
- package/lib/resourceModal/style/index.less +4 -0
- package/lib/typeIcons/component.js +63 -0
- package/lib/{button → typeIcons}/index.js +2 -2
- package/lib/typeIcons/style/css.js +2 -0
- package/lib/typeIcons/style/index.css +5 -0
- package/lib/typeIcons/style/index.js +2 -0
- package/lib/typeIcons/style/index.less +5 -0
- package/lib/uploadStep/component.js +15 -0
- package/lib/uploadStep/index.js +8 -0
- package/lib/uploadStep/style/css.js +2 -0
- package/lib/uploadStep/style/index.css +4 -0
- package/lib/uploadStep/style/index.js +2 -0
- package/lib/uploadStep/style/index.less +4 -0
- package/lib/userAvater/component.js +168 -0
- package/lib/userAvater/index.js +8 -0
- package/lib/userAvater/script/api.js +37 -0
- package/lib/userAvater/style/css.js +2 -0
- package/lib/userAvater/style/index.css +50 -0
- package/lib/userAvater/style/index.js +2 -0
- package/lib/userAvater/style/index.less +54 -0
- package/lib/utils/index.js +13 -0
- package/lib/utils/request.js +1 -1
- package/lib/utils/typeMap.js +25 -0
- package/package.json +4 -2
- package/es/_virtual/plugin-vue_export-helper.js +0 -7
- package/es/button/component.d.ts +0 -24
- package/es/button/component.js +0 -43
- package/es/button/index.d.ts +0 -103
- package/es/button/index.js +0 -7
- package/lib/_virtual/plugin-vue_export-helper.js +0 -8
- package/lib/button/component.js +0 -44
- /package/es/{button → messageBox}/style/css.js +0 -0
- /package/es/{button → messageBox}/style/index.d.ts +0 -0
- /package/es/{button → messageBox}/style/index.js +0 -0
- /package/es/{button → resourceModal}/style/index.css +0 -0
- /package/es/{button → resourceModal}/style/index.less +0 -0
- /package/{lib/button → es/uploadStep}/style/index.css +0 -0
- /package/{lib/button → es/uploadStep}/style/index.less +0 -0
- /package/lib/{button → messageBox}/style/css.js +0 -0
- /package/lib/{button → messageBox}/style/index.js +0 -0
package/dist/index.css
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
.tooltip-button {
|
|
2
|
-
height: auto;
|
|
3
|
-
padding: 20px;
|
|
4
|
-
}
|
|
5
1
|
.reference-btn {
|
|
6
2
|
border: none;
|
|
7
3
|
padding: 12px 16px;
|
|
8
4
|
border-radius: 4px;
|
|
9
5
|
color: #5f5f5f;
|
|
10
6
|
}
|
|
11
|
-
.
|
|
7
|
+
.apps-box-popover {
|
|
12
8
|
position: relative;
|
|
13
9
|
padding: 10px;
|
|
14
10
|
}
|
|
@@ -92,3 +88,143 @@
|
|
|
92
88
|
top: 2px;
|
|
93
89
|
right: 4px;
|
|
94
90
|
}
|
|
91
|
+
.reference-btn {
|
|
92
|
+
border: none;
|
|
93
|
+
padding: 12px 16px;
|
|
94
|
+
border-radius: 4px;
|
|
95
|
+
color: #5f5f5f;
|
|
96
|
+
}
|
|
97
|
+
.message-boxs-popover {
|
|
98
|
+
width: 435px;
|
|
99
|
+
position: relative;
|
|
100
|
+
}
|
|
101
|
+
.message-boxs-popover .arco-tabs-content {
|
|
102
|
+
padding-top: 0;
|
|
103
|
+
}
|
|
104
|
+
.message-boxs-popover .msg-scroll-bar {
|
|
105
|
+
height: 80vh;
|
|
106
|
+
overflow-y: auto;
|
|
107
|
+
display: block;
|
|
108
|
+
}
|
|
109
|
+
.message-boxs-popover .message-list {
|
|
110
|
+
margin: 0;
|
|
111
|
+
padding: 0;
|
|
112
|
+
list-style: none;
|
|
113
|
+
}
|
|
114
|
+
.message-boxs-popover .message-item {
|
|
115
|
+
padding: 16px;
|
|
116
|
+
padding-bottom: 0px;
|
|
117
|
+
}
|
|
118
|
+
.message-boxs-popover .message-item:last-child .message-body {
|
|
119
|
+
border-bottom: none;
|
|
120
|
+
}
|
|
121
|
+
.message-boxs-popover .message-item .message-body {
|
|
122
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
123
|
+
padding-bottom: 16px;
|
|
124
|
+
}
|
|
125
|
+
.message-boxs-popover .message-item .message-body .media-message-content {
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-content {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
font-size: 12px;
|
|
133
|
+
color: #4e5969;
|
|
134
|
+
margin-bottom: 18px;
|
|
135
|
+
}
|
|
136
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
color: #1d2129;
|
|
141
|
+
font-size: 14px;
|
|
142
|
+
line-height: 14px;
|
|
143
|
+
}
|
|
144
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title {
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
text-overflow: ellipsis;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
}
|
|
149
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon {
|
|
150
|
+
margin-right: 4px;
|
|
151
|
+
}
|
|
152
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover {
|
|
153
|
+
text-decoration: underline;
|
|
154
|
+
}
|
|
155
|
+
.user-avater-content-info {
|
|
156
|
+
width: 328px;
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
padding: 24px;
|
|
162
|
+
padding-bottom: 0px;
|
|
163
|
+
line-height: 1;
|
|
164
|
+
}
|
|
165
|
+
.user-avater-content-info .avatar {
|
|
166
|
+
width: 74px;
|
|
167
|
+
height: 74px;
|
|
168
|
+
position: relative;
|
|
169
|
+
border-radius: 50%;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
margin-bottom: 10px;
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
}
|
|
176
|
+
.user-avater-content-info .avatar .arco-avatar {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 100%;
|
|
179
|
+
}
|
|
180
|
+
.user-avater-content-info .nick-name {
|
|
181
|
+
font-size: 16px;
|
|
182
|
+
color: #1D2129;
|
|
183
|
+
font-weight: 500;
|
|
184
|
+
margin-bottom: 10px;
|
|
185
|
+
}
|
|
186
|
+
.user-avater-content-info .user-name,
|
|
187
|
+
.user-avater-content-info .user-email {
|
|
188
|
+
font-size: 14px;
|
|
189
|
+
color: #86909C;
|
|
190
|
+
margin-bottom: 10px;
|
|
191
|
+
}
|
|
192
|
+
.user-avater-content-info .org-alias {
|
|
193
|
+
border: 1px solid #EBEEF5;
|
|
194
|
+
padding: 10px 20px;
|
|
195
|
+
border-radius: 40px;
|
|
196
|
+
}
|
|
197
|
+
.user-avater-content-info .b_info_bottom {
|
|
198
|
+
height: 52px;
|
|
199
|
+
padding: 10px 16px;
|
|
200
|
+
width: 100%;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
}
|
|
205
|
+
.type-icons-container {
|
|
206
|
+
display: inline-block;
|
|
207
|
+
vertical-align: middle;
|
|
208
|
+
font-size: 18px;
|
|
209
|
+
}
|
|
210
|
+
.tooltip-button {
|
|
211
|
+
height: auto;
|
|
212
|
+
padding: 20px;
|
|
213
|
+
}
|
|
214
|
+
.add-content-modal-wrapper .arco-modal-header {
|
|
215
|
+
border-bottom: none;
|
|
216
|
+
}
|
|
217
|
+
.add-content-modal-body {
|
|
218
|
+
padding: 0;
|
|
219
|
+
height: 70vh;
|
|
220
|
+
}
|
|
221
|
+
.add-content-modal-body .content-tabs {
|
|
222
|
+
height: 100%;
|
|
223
|
+
}
|
|
224
|
+
.add-content-modal-body .arco-tabs-content {
|
|
225
|
+
padding-top: 0;
|
|
226
|
+
}
|
|
227
|
+
.tooltip-button {
|
|
228
|
+
height: auto;
|
|
229
|
+
padding: 20px;
|
|
230
|
+
}
|
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.apps-box-popover{position:relative;padding:10px}.app-title{font-size:16px;font-weight:700;padding:0 15px}.ul-list{list-style:none;overflow:hidden;width:435px!important;text-align:center;padding:0;margin:0}.ul-list .li_item{float:left;width:85px;height:90px;text-align:center;margin:13px 0;position:relative}.ul-list .li_item .icon-logo .svg-icon{width:4em;height:3.5em}.ul-list .li_item:hover{background:rgba(0,0,0,.05);border-radius:4px;cursor:pointer}.ul-list .li_item:hover .icon-gengduo{display:block}.ul-list .li_item .wrap_icon{width:70px;display:inline-block;margin-top:6px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo{width:70px;height:50px;margin-bottom:4px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo img{max-width:100%;max-height:100%}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo{line-height:77px}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img{width:35px;height:35px}.ul-list .li_item .wrap_icon .wrap_ .icon_title{width:73px;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ul-list .li_item .wrap_icon .quick-add .icon-logo{width:40px;height:40px;margin:5px auto 9px;text-align:center;background-color:rgba(0,0,0,.12);border-radius:50%}.ul-list .li_item .wrap_icon .quick-add .icon-logo i{line-height:40px;color:rgba(0,0,0,.85);font-size:14px}.ul-list .li_item .icon-gengduo{display:none;position:absolute;top:2px;right:4px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.message-boxs-popover{width:435px;position:relative}.message-boxs-popover .arco-tabs-content{padding-top:0}.message-boxs-popover .msg-scroll-bar{height:80vh;overflow-y:auto;display:block}.message-boxs-popover .message-list{margin:0;padding:0;list-style:none}.message-boxs-popover .message-item{padding:16px;padding-bottom:0}.message-boxs-popover .message-item:last-child .message-body{border-bottom:none}.message-boxs-popover .message-item .message-body{border-bottom:1px solid rgba(0,0,0,.05);padding-bottom:16px}.message-boxs-popover .message-item .message-body .media-message-content{width:100%}.message-boxs-popover .message-item .message-body .media-message-content .message-content{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#4e5969;margin-bottom:18px}.message-boxs-popover .message-item .message-body .media-message-content .message-info{display:flex;align-items:center;justify-content:space-between;color:#1d2129;font-size:14px;line-height:14px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon{margin-right:4px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover{text-decoration:underline}.user-avater-content-info{width:328px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;padding-bottom:0;line-height:1}.user-avater-content-info .avatar{width:74px;height:74px;position:relative;border-radius:50%;overflow:hidden;margin-bottom:10px;display:flex;align-items:center;justify-content:center}.user-avater-content-info .avatar .arco-avatar{width:100%;height:100%}.user-avater-content-info .nick-name{font-size:16px;color:#1d2129;font-weight:500;margin-bottom:10px}.user-avater-content-info .user-email,.user-avater-content-info .user-name{font-size:14px;color:#86909c;margin-bottom:10px}.user-avater-content-info .org-alias{border:1px solid #ebeef5;padding:10px 20px;border-radius:40px}.user-avater-content-info .b_info_bottom{height:52px;padding:10px 16px;width:100%;display:flex;align-items:center;justify-content:center}.type-icons-container{display:inline-block;vertical-align:middle;font-size:18px}.tooltip-button{height:auto;padding:20px}.add-content-modal-wrapper .arco-modal-header{border-bottom:none}.add-content-modal-body{padding:0;height:70vh}.add-content-modal-body .content-tabs{height:100%}.add-content-modal-body .arco-tabs-content{padding-top:0}.tooltip-button{height:auto;padding:20px}
|
|
@@ -5,11 +5,12 @@ import permissionMap from "./script/permissionMap.js";
|
|
|
5
5
|
import appList from "./script/apps.js";
|
|
6
6
|
import { setResentApp, getPubApps, getUserRepoActs, getResentApp } from "./script/api.js";
|
|
7
7
|
import { getRID } from "../utils/auth.js";
|
|
8
|
+
import { DEFAULT_BASE_API } from "../config.js";
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "reference-btn"
|
|
11
12
|
};
|
|
12
|
-
const _hoisted_2 = { class: "
|
|
13
|
+
const _hoisted_2 = { class: "apps-box-popover" };
|
|
13
14
|
const _hoisted_3 = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "app-title"
|
|
@@ -45,7 +46,7 @@ const _sfc_main = defineComponent({
|
|
|
45
46
|
const permissions = ref([]);
|
|
46
47
|
const slotTest = !!useSlots().reference;
|
|
47
48
|
const rid = getRID() || "4";
|
|
48
|
-
const BASE_API = props.BASE_API ||
|
|
49
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
49
50
|
const navList = computed(() => {
|
|
50
51
|
const appList2 = [];
|
|
51
52
|
StorePubApplication.value.map((item) => {
|
package/es/config.d.ts
ADDED
package/es/config.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createVNode, createCommentVNode } from "vue";
|
|
2
|
+
import { Modal, Tabs, TabPane, Button } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$1 from "./components/ViewAllColumn/index.js";
|
|
4
|
+
import _sfc_main$3 from "./components/CompoList/index.js";
|
|
5
|
+
import _sfc_main$2 from "./components/storeBox/index.js";
|
|
6
|
+
import "../typeIcons/style/index.js";
|
|
7
|
+
import { DEFAULT_BASE_API } from "../config.js";
|
|
8
|
+
import useLoadUserInfo from "../hooks/user.js";
|
|
9
|
+
const _sfc_main = defineComponent({
|
|
10
|
+
...{ name: "contentModal" },
|
|
11
|
+
__name: "component",
|
|
12
|
+
props: {
|
|
13
|
+
BASE_API: {},
|
|
14
|
+
visible: { type: Boolean },
|
|
15
|
+
title: {},
|
|
16
|
+
defaultSelectedData: {},
|
|
17
|
+
maxSelect: {},
|
|
18
|
+
typeData: {},
|
|
19
|
+
userStore: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:visible", "comfirm"],
|
|
22
|
+
setup(__props, { emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
25
|
+
const visible = computed({
|
|
26
|
+
get() {
|
|
27
|
+
return props.visible;
|
|
28
|
+
},
|
|
29
|
+
set(value) {
|
|
30
|
+
setVisible(value);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const selectedData = ref([]);
|
|
34
|
+
const hasSelected = computed(() => {
|
|
35
|
+
return selectedData.value.length > 0;
|
|
36
|
+
});
|
|
37
|
+
const typeDataController = ref(props.typeData);
|
|
38
|
+
const setVisible = (bool) => {
|
|
39
|
+
emit("update:visible", bool);
|
|
40
|
+
};
|
|
41
|
+
const selectedDataChangeHandle = (data) => {
|
|
42
|
+
selectedData.value = data;
|
|
43
|
+
};
|
|
44
|
+
const handleOk = () => {
|
|
45
|
+
setVisible(false);
|
|
46
|
+
};
|
|
47
|
+
const handleCancel = () => {
|
|
48
|
+
setVisible(false);
|
|
49
|
+
};
|
|
50
|
+
const comfirm = () => {
|
|
51
|
+
emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
|
|
52
|
+
};
|
|
53
|
+
const { userInfo, getUserInfoHandle } = useLoadUserInfo(BASE_API);
|
|
54
|
+
const HandleOpen = () => {
|
|
55
|
+
selectedData.value = props.defaultSelectedData || [];
|
|
56
|
+
};
|
|
57
|
+
const HandleClose = () => {
|
|
58
|
+
selectedData.value = [];
|
|
59
|
+
};
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
if (props.userStore) {
|
|
62
|
+
userInfo.value = { BASE_API, ...props.userStore };
|
|
63
|
+
} else {
|
|
64
|
+
getUserInfoHandle();
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return openBlock(), createBlock(unref(Modal), {
|
|
69
|
+
visible: visible.value,
|
|
70
|
+
width: "986px",
|
|
71
|
+
"mask-closable": false,
|
|
72
|
+
footer: false,
|
|
73
|
+
"title-align": "start",
|
|
74
|
+
"unmount-on-close": "",
|
|
75
|
+
"modal-class": "add-content-modal-wrapper",
|
|
76
|
+
"body-class": "add-content-modal-body",
|
|
77
|
+
onOk: handleOk,
|
|
78
|
+
onOpen: HandleOpen,
|
|
79
|
+
onClose: HandleClose,
|
|
80
|
+
onCancel: handleCancel
|
|
81
|
+
}, {
|
|
82
|
+
title: withCtx(() => [
|
|
83
|
+
createTextVNode(toDisplayString(props.title ? props.title : "\u6DFB\u52A0\u5185\u5BB9"), 1)
|
|
84
|
+
]),
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
createVNode(unref(Tabs), {
|
|
87
|
+
class: "content-tabs",
|
|
88
|
+
justify: ""
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [
|
|
91
|
+
typeDataController.value.addDoc ? (openBlock(), createBlock(unref(TabPane), {
|
|
92
|
+
key: "1",
|
|
93
|
+
title: "\u680F\u76EE"
|
|
94
|
+
}, {
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
unref(userInfo) && unref(userInfo).repository_id ? (openBlock(), createBlock(_sfc_main$1, {
|
|
97
|
+
key: 0,
|
|
98
|
+
"max-select": _ctx.maxSelect,
|
|
99
|
+
"default-selected-data": selectedData.value,
|
|
100
|
+
"type-data": typeDataController.value,
|
|
101
|
+
series: typeDataController.value.docSeries,
|
|
102
|
+
banner: typeDataController.value.docBanner,
|
|
103
|
+
"user-info": unref(userInfo),
|
|
104
|
+
onChange: selectedDataChangeHandle
|
|
105
|
+
}, {
|
|
106
|
+
store: withCtx(() => [
|
|
107
|
+
createVNode(_sfc_main$2, {
|
|
108
|
+
selectData: selectedData.value,
|
|
109
|
+
"onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => selectedData.value = $event)
|
|
110
|
+
}, null, 8, ["selectData"])
|
|
111
|
+
]),
|
|
112
|
+
options: withCtx(() => [
|
|
113
|
+
createVNode(unref(Button), {
|
|
114
|
+
type: "primary",
|
|
115
|
+
disabled: !hasSelected.value,
|
|
116
|
+
onClick: comfirm
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [
|
|
119
|
+
createTextVNode("\u6DFB\u52A0")
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["disabled"])
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["max-select", "default-selected-data", "type-data", "series", "banner", "user-info"])) : createCommentVNode("v-if", true)
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
})) : createCommentVNode("v-if", true),
|
|
129
|
+
typeDataController.value.addCompo ? (openBlock(), createBlock(unref(TabPane), {
|
|
130
|
+
key: "2",
|
|
131
|
+
title: "\u7EC4\u4EF6"
|
|
132
|
+
}, {
|
|
133
|
+
default: withCtx(() => [
|
|
134
|
+
unref(userInfo) && unref(userInfo).repository_id ? (openBlock(), createBlock(_sfc_main$3, {
|
|
135
|
+
key: 0,
|
|
136
|
+
"max-select": _ctx.maxSelect,
|
|
137
|
+
"default-selected-data": selectedData.value,
|
|
138
|
+
"type-data": typeDataController.value,
|
|
139
|
+
columns: typeDataController.value.compoType,
|
|
140
|
+
"user-info": unref(userInfo),
|
|
141
|
+
onChange: selectedDataChangeHandle
|
|
142
|
+
}, {
|
|
143
|
+
store: withCtx(() => [
|
|
144
|
+
createVNode(_sfc_main$2, {
|
|
145
|
+
selectData: selectedData.value,
|
|
146
|
+
"onUpdate:selectData": _cache[1] || (_cache[1] = ($event) => selectedData.value = $event)
|
|
147
|
+
}, null, 8, ["selectData"])
|
|
148
|
+
]),
|
|
149
|
+
options: withCtx(() => [
|
|
150
|
+
createVNode(unref(Button), {
|
|
151
|
+
type: "primary",
|
|
152
|
+
disabled: !hasSelected.value,
|
|
153
|
+
onClick: comfirm
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [
|
|
156
|
+
createTextVNode("\u6DFB\u52A0")
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
}, 8, ["disabled"])
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["max-select", "default-selected-data", "type-data", "columns", "user-info"])) : createCommentVNode("v-if", true)
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
})) : createCommentVNode("v-if", true)
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
})
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["visible"]);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
|
+
import { Space, Select, Option, Input } from "@arco-design/web-vue";
|
|
3
|
+
import { compoColumnsMap } from "../../../../utils/typeMap.js";
|
|
4
|
+
const _hoisted_1 = { class: "media-filter-container" };
|
|
5
|
+
const _sfc_main = defineComponent({
|
|
6
|
+
...{ name: "CompoFilter" },
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
group_id: {},
|
|
10
|
+
groups: {},
|
|
11
|
+
userInfo: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:group_id", "search"],
|
|
14
|
+
setup(__props, { emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const columnIdMap = compoColumnsMap();
|
|
17
|
+
const filter = ref({ keyword: "", columns: "" });
|
|
18
|
+
const groupId = computed({
|
|
19
|
+
get() {
|
|
20
|
+
return props.group_id;
|
|
21
|
+
},
|
|
22
|
+
set(val) {
|
|
23
|
+
emit("update:group_id", val);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const typeOptions = computed(() => {
|
|
27
|
+
const arr = Object.keys(columnIdMap).map((key) => {
|
|
28
|
+
return {
|
|
29
|
+
label: columnIdMap[key],
|
|
30
|
+
value: key
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return [{ value: "", label: "\u5168\u90E8\u7C7B\u578B" }, ...arr];
|
|
34
|
+
});
|
|
35
|
+
const groupOptions = computed(() => {
|
|
36
|
+
const arr = props.groups.map((item) => {
|
|
37
|
+
return {
|
|
38
|
+
label: item.alias || item.title,
|
|
39
|
+
value: item.id
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
return [{ value: "all", label: "\u5168\u90E8\u7EC4\u4EF6" }, ...arr];
|
|
43
|
+
});
|
|
44
|
+
const handleSearch = () => {
|
|
45
|
+
emit("search", filter.value);
|
|
46
|
+
};
|
|
47
|
+
watch(filter.value, () => {
|
|
48
|
+
handleSearch();
|
|
49
|
+
});
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
52
|
+
createVNode(unref(Space), { size: "large" }, {
|
|
53
|
+
default: withCtx(() => [
|
|
54
|
+
createVNode(unref(Select), {
|
|
55
|
+
modelValue: groupId.value,
|
|
56
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => groupId.value = $event),
|
|
57
|
+
class: "filter-item",
|
|
58
|
+
placeholder: "\u7EC4\u4EF6\u5206\u7C7B"
|
|
59
|
+
}, {
|
|
60
|
+
default: withCtx(() => [
|
|
61
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(groupOptions.value, (item) => {
|
|
62
|
+
return openBlock(), createBlock(unref(Option), {
|
|
63
|
+
key: item.value,
|
|
64
|
+
label: item.label,
|
|
65
|
+
value: item.value
|
|
66
|
+
}, null, 8, ["label", "value"]);
|
|
67
|
+
}), 128))
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["modelValue"]),
|
|
71
|
+
createVNode(unref(Select), {
|
|
72
|
+
modelValue: filter.value.columns,
|
|
73
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.columns = $event),
|
|
74
|
+
class: "filter-item",
|
|
75
|
+
placeholder: "\u7C7B\u578B"
|
|
76
|
+
}, {
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(typeOptions.value, (item) => {
|
|
79
|
+
return openBlock(), createBlock(unref(Option), {
|
|
80
|
+
key: item.value,
|
|
81
|
+
label: item.label,
|
|
82
|
+
value: item.value
|
|
83
|
+
}, null, 8, ["label", "value"]);
|
|
84
|
+
}), 128))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["modelValue"]),
|
|
88
|
+
createVNode(unref(Input), {
|
|
89
|
+
modelValue: filter.value.keyword,
|
|
90
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.keyword = $event),
|
|
91
|
+
class: "filter-item",
|
|
92
|
+
"allow-clear": "",
|
|
93
|
+
placeholder: "\u8F93\u5165\u7EC4\u4EF6\u6807\u9898\u67E5\u627E",
|
|
94
|
+
onPressEnter: handleSearch
|
|
95
|
+
}, null, 8, ["modelValue"])
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
})
|
|
99
|
+
]);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export { _sfc_main as default };
|
|
File without changes
|