@cmstops/pro-compo 0.2.10 → 0.3.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/es/baseFilter/component.js +1 -1
- package/es/baseFilter/components/FilterGroup.js +6 -3
- package/es/hooks/usePopper.d.ts +1 -0
- package/es/hooks/usePopper.js +6 -0
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/index.js +2 -1
- package/lib/baseFilter/component.js +1 -1
- package/lib/baseFilter/components/FilterGroup.js +6 -3
- package/lib/hooks/usePopper.js +6 -0
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/index.js +2 -1
- package/package.json +1 -1
|
@@ -141,7 +141,7 @@ const _sfc_main = defineComponent({
|
|
|
141
141
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
142
142
|
createElementVNode("div", {
|
|
143
143
|
id: "base-filter-popup-container",
|
|
144
|
-
style: { "position": "relative", "z-index": "
|
|
144
|
+
style: { "position": "relative", "z-index": "10000" },
|
|
145
145
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
146
146
|
}, ["stop"]))
|
|
147
147
|
}),
|
|
@@ -13,7 +13,7 @@ const _hoisted_6 = {
|
|
|
13
13
|
};
|
|
14
14
|
const _sfc_main = defineComponent({
|
|
15
15
|
__name: "FilterGroup",
|
|
16
|
-
setup(__props) {
|
|
16
|
+
setup(__props, { expose: __expose }) {
|
|
17
17
|
const getRect = (el) => {
|
|
18
18
|
if (!el || !el.getClientRects())
|
|
19
19
|
return { right: 0, width: 0 };
|
|
@@ -25,7 +25,7 @@ const _sfc_main = defineComponent({
|
|
|
25
25
|
};
|
|
26
26
|
const moreBtnRef = ref();
|
|
27
27
|
const dpPannelRef = ref();
|
|
28
|
-
const { initPopper, show, visible } = usePopper(dpPannelRef, moreBtnRef);
|
|
28
|
+
const { initPopper, show, visible, hide } = usePopper(dpPannelRef, moreBtnRef);
|
|
29
29
|
const filterItemsRef = ref();
|
|
30
30
|
const windowWidth = ref(0);
|
|
31
31
|
const filterWidth = ref(0);
|
|
@@ -99,6 +99,9 @@ const _sfc_main = defineComponent({
|
|
|
99
99
|
refreshPanel();
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
|
+
__expose({
|
|
103
|
+
refreshPanel
|
|
104
|
+
});
|
|
102
105
|
return (_ctx, _cache) => {
|
|
103
106
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
104
107
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -107,7 +110,7 @@ const _sfc_main = defineComponent({
|
|
|
107
110
|
ref: moreBtnRef
|
|
108
111
|
}, [
|
|
109
112
|
withDirectives(createVNode(unref(Button), {
|
|
110
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => unref(show)(), ["stop"]))
|
|
113
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => unref(visible) ? unref(hide)() : unref(show)(), ["stop"]))
|
|
111
114
|
}, {
|
|
112
115
|
default: withCtx(() => [
|
|
113
116
|
createElementVNode("span", _hoisted_3, [
|
package/es/hooks/usePopper.d.ts
CHANGED
package/es/hooks/usePopper.js
CHANGED
|
@@ -2,9 +2,14 @@ import { createPopper } from "@popperjs/core";
|
|
|
2
2
|
import { ref } from "vue";
|
|
3
3
|
function usePopper(pannel, triggerEl) {
|
|
4
4
|
const visible = ref(false);
|
|
5
|
+
const hide = () => {
|
|
6
|
+
visible.value = false;
|
|
7
|
+
window.onclick = null;
|
|
8
|
+
};
|
|
5
9
|
const show = () => {
|
|
6
10
|
visible.value = true;
|
|
7
11
|
window.onclick = (e) => {
|
|
12
|
+
hide();
|
|
8
13
|
visible.value = false;
|
|
9
14
|
window.onclick = null;
|
|
10
15
|
};
|
|
@@ -19,6 +24,7 @@ function usePopper(pannel, triggerEl) {
|
|
|
19
24
|
return {
|
|
20
25
|
initPopper,
|
|
21
26
|
show,
|
|
27
|
+
hide,
|
|
22
28
|
visible
|
|
23
29
|
};
|
|
24
30
|
}
|
|
@@ -48,6 +48,7 @@ const _sfc_main = defineComponent({
|
|
|
48
48
|
fileList: {},
|
|
49
49
|
fileListCount: {},
|
|
50
50
|
isOver: { type: Boolean },
|
|
51
|
+
activeMediaType: {},
|
|
51
52
|
preview: { type: Boolean },
|
|
52
53
|
changeDirectory: { type: Function },
|
|
53
54
|
loadFileMore: { type: Function }
|
|
@@ -137,7 +138,7 @@ const _sfc_main = defineComponent({
|
|
|
137
138
|
])
|
|
138
139
|
])) : createCommentVNode("v-if", true)
|
|
139
140
|
], 512), [
|
|
140
|
-
[vShow, _ctx.folderList.length !== 0]
|
|
141
|
+
[vShow, _ctx.folderList.length !== 0 && _ctx.activeMediaType === "all"]
|
|
141
142
|
]),
|
|
142
143
|
createCommentVNode(" \u6587\u4EF6 "),
|
|
143
144
|
createElementVNode("div", _hoisted_10, [
|
|
@@ -300,10 +300,11 @@ const _sfc_main = defineComponent({
|
|
|
300
300
|
"file-list-count": fileListCount.value,
|
|
301
301
|
"is-over": isOver.value,
|
|
302
302
|
preview: _ctx.preview,
|
|
303
|
+
activeMediaType: activeMediaType.value,
|
|
303
304
|
"change-directory": changeDirectory,
|
|
304
305
|
"load-file-more": loadFileMore,
|
|
305
306
|
onConfirm: confirm
|
|
306
|
-
}, null, 8, ["folder-list", "file-list", "file-list-count", "is-over", "preview"])
|
|
307
|
+
}, null, 8, ["folder-list", "file-list", "file-list-count", "is-over", "preview", "activeMediaType"])
|
|
307
308
|
], 512), [
|
|
308
309
|
[vShow, ["all", "my"].includes(activeMediaType.value)]
|
|
309
310
|
]),
|
|
@@ -142,7 +142,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
142
142
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
143
143
|
vue.createElementVNode("div", {
|
|
144
144
|
id: "base-filter-popup-container",
|
|
145
|
-
style: { "position": "relative", "z-index": "
|
|
145
|
+
style: { "position": "relative", "z-index": "10000" },
|
|
146
146
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
147
147
|
}, ["stop"]))
|
|
148
148
|
}),
|
|
@@ -14,7 +14,7 @@ const _hoisted_6 = {
|
|
|
14
14
|
};
|
|
15
15
|
const _sfc_main = vue.defineComponent({
|
|
16
16
|
__name: "FilterGroup",
|
|
17
|
-
setup(__props) {
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
18
18
|
const getRect = (el) => {
|
|
19
19
|
if (!el || !el.getClientRects())
|
|
20
20
|
return { right: 0, width: 0 };
|
|
@@ -26,7 +26,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
26
26
|
};
|
|
27
27
|
const moreBtnRef = vue.ref();
|
|
28
28
|
const dpPannelRef = vue.ref();
|
|
29
|
-
const { initPopper, show, visible } = usePopper(dpPannelRef, moreBtnRef);
|
|
29
|
+
const { initPopper, show, visible, hide } = usePopper(dpPannelRef, moreBtnRef);
|
|
30
30
|
const filterItemsRef = vue.ref();
|
|
31
31
|
const windowWidth = vue.ref(0);
|
|
32
32
|
const filterWidth = vue.ref(0);
|
|
@@ -100,6 +100,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
100
100
|
refreshPanel();
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
+
__expose({
|
|
104
|
+
refreshPanel
|
|
105
|
+
});
|
|
103
106
|
return (_ctx, _cache) => {
|
|
104
107
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
105
108
|
vue.createElementVNode("div", _hoisted_2, [
|
|
@@ -108,7 +111,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
108
111
|
ref: moreBtnRef
|
|
109
112
|
}, [
|
|
110
113
|
vue.withDirectives(vue.createVNode(vue.unref(webVue.Button), {
|
|
111
|
-
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => vue.unref(show)(), ["stop"]))
|
|
114
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => vue.unref(visible) ? vue.unref(hide)() : vue.unref(show)(), ["stop"]))
|
|
112
115
|
}, {
|
|
113
116
|
default: vue.withCtx(() => [
|
|
114
117
|
vue.createElementVNode("span", _hoisted_3, [
|
package/lib/hooks/usePopper.js
CHANGED
|
@@ -3,9 +3,14 @@ var core = require("@popperjs/core");
|
|
|
3
3
|
var vue = require("vue");
|
|
4
4
|
function usePopper(pannel, triggerEl) {
|
|
5
5
|
const visible = vue.ref(false);
|
|
6
|
+
const hide = () => {
|
|
7
|
+
visible.value = false;
|
|
8
|
+
window.onclick = null;
|
|
9
|
+
};
|
|
6
10
|
const show = () => {
|
|
7
11
|
visible.value = true;
|
|
8
12
|
window.onclick = (e) => {
|
|
13
|
+
hide();
|
|
9
14
|
visible.value = false;
|
|
10
15
|
window.onclick = null;
|
|
11
16
|
};
|
|
@@ -20,6 +25,7 @@ function usePopper(pannel, triggerEl) {
|
|
|
20
25
|
return {
|
|
21
26
|
initPopper,
|
|
22
27
|
show,
|
|
28
|
+
hide,
|
|
23
29
|
visible
|
|
24
30
|
};
|
|
25
31
|
}
|
|
@@ -49,6 +49,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
49
49
|
fileList: {},
|
|
50
50
|
fileListCount: {},
|
|
51
51
|
isOver: { type: Boolean },
|
|
52
|
+
activeMediaType: {},
|
|
52
53
|
preview: { type: Boolean },
|
|
53
54
|
changeDirectory: { type: Function },
|
|
54
55
|
loadFileMore: { type: Function }
|
|
@@ -138,7 +139,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
138
139
|
])
|
|
139
140
|
])) : vue.createCommentVNode("v-if", true)
|
|
140
141
|
], 512), [
|
|
141
|
-
[vue.vShow, _ctx.folderList.length !== 0]
|
|
142
|
+
[vue.vShow, _ctx.folderList.length !== 0 && _ctx.activeMediaType === "all"]
|
|
142
143
|
]),
|
|
143
144
|
vue.createCommentVNode(" \u6587\u4EF6 "),
|
|
144
145
|
vue.createElementVNode("div", _hoisted_10, [
|
|
@@ -301,10 +301,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
301
301
|
"file-list-count": fileListCount.value,
|
|
302
302
|
"is-over": isOver.value,
|
|
303
303
|
preview: _ctx.preview,
|
|
304
|
+
activeMediaType: activeMediaType.value,
|
|
304
305
|
"change-directory": changeDirectory,
|
|
305
306
|
"load-file-more": loadFileMore,
|
|
306
307
|
onConfirm: confirm
|
|
307
|
-
}, null, 8, ["folder-list", "file-list", "file-list-count", "is-over", "preview"])
|
|
308
|
+
}, null, 8, ["folder-list", "file-list", "file-list-count", "is-over", "preview", "activeMediaType"])
|
|
308
309
|
], 512), [
|
|
309
310
|
[vue.vShow, ["all", "my"].includes(activeMediaType.value)]
|
|
310
311
|
]),
|