@cmstops/pro-compo 0.3.79 → 0.3.81
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/contentModal/component.js +15 -1
- package/es/selectResourceModal/component.js +6 -3
- package/es/selectResourceModal/scripts/useTabFilter.js +11 -1
- package/lib/contentModal/component.js +15 -1
- package/lib/selectResourceModal/component.js +6 -3
- package/lib/selectResourceModal/scripts/useTabFilter.js +13 -1
- package/package.json +7 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, onMounted, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { Modal, Tabs, TabPane, Button } from "@arco-design/web-vue";
|
|
3
|
+
import { Enum, License } from "@cmstops/utils";
|
|
3
4
|
import _sfc_main$1 from "./components/ViewAllColumn/index.js";
|
|
4
5
|
import _sfc_main$4 from "./components/CompoList/index.js";
|
|
5
6
|
import _sfc_main$6 from "./components/MpAccountList/index.js";
|
|
@@ -44,7 +45,20 @@ const _sfc_main = defineComponent({
|
|
|
44
45
|
const hasSelected = computed(() => {
|
|
45
46
|
return selectedData.value.length > 0;
|
|
46
47
|
});
|
|
47
|
-
const typeDataController =
|
|
48
|
+
const typeDataController = computed(() => {
|
|
49
|
+
const ret = props.typeData;
|
|
50
|
+
const appList = [
|
|
51
|
+
{ license: "courselearning", key: "addCourse", type: Enum.CheckTypeEnum.MARKET },
|
|
52
|
+
{ license: "maavd", key: "addMpAccount", type: Enum.CheckTypeEnum.MARKET },
|
|
53
|
+
{ license: "maavd", key: "addMpContent", type: Enum.CheckTypeEnum.MARKET }
|
|
54
|
+
];
|
|
55
|
+
appList.forEach((item) => {
|
|
56
|
+
if (!License.check(item.type, item.license)) {
|
|
57
|
+
ret[item.key] = false;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return ret;
|
|
61
|
+
});
|
|
48
62
|
const setVisible = (bool) => {
|
|
49
63
|
emit("update:visible", bool);
|
|
50
64
|
};
|
|
@@ -5,7 +5,7 @@ import _sfc_main$1 from "./components/ListTabs/index.js";
|
|
|
5
5
|
import _sfc_main$3 from "./components/ListSelected/index.js";
|
|
6
6
|
import _sfc_main$2 from "./components/List/ListCardWrapper.js";
|
|
7
7
|
import { useResourceSelect } from "./scripts/useResourceSelect.js";
|
|
8
|
-
import useTabFilter from "./scripts/useTabFilter.js";
|
|
8
|
+
import useTabFilter, { TabEnum } from "./scripts/useTabFilter.js";
|
|
9
9
|
import useCompoentLifycycle from "./scripts/useCompoLf.js";
|
|
10
10
|
const _hoisted_1 = { class: "resource-select-wrap" };
|
|
11
11
|
const _hoisted_2 = { class: "resource-select-main" };
|
|
@@ -55,7 +55,7 @@ const _sfc_main = defineComponent({
|
|
|
55
55
|
() => props.visible,
|
|
56
56
|
(val) => {
|
|
57
57
|
if (val)
|
|
58
|
-
activeKey.value =
|
|
58
|
+
activeKey.value = TabEnum.ALL;
|
|
59
59
|
},
|
|
60
60
|
{ immediate: true }
|
|
61
61
|
);
|
|
@@ -111,6 +111,7 @@ const _sfc_main = defineComponent({
|
|
|
111
111
|
}, null, 8, ["item", "select-keys", "disable", "onSelect", "onOptions"])
|
|
112
112
|
]),
|
|
113
113
|
"footer-extra": withCtx(({ type, onConfirm }) => [
|
|
114
|
+
createCommentVNode(" \u5982\u679C\u662F\u975E\u89C6\u9891\u5C01\u9762\u7C7B\u578B "),
|
|
114
115
|
type !== "video" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
115
116
|
unref(selected).length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
116
117
|
createVNode(_sfc_main$3, {
|
|
@@ -136,6 +137,8 @@ const _sfc_main = defineComponent({
|
|
|
136
137
|
})
|
|
137
138
|
], 64)) : createCommentVNode("v-if", true)
|
|
138
139
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
140
|
+
createCommentVNode(" \u5982\u679C\u662F\u89C6\u9891\u5C01\u9762\u7C7B\u578B "),
|
|
141
|
+
createCommentVNode(" \u89C6\u9891\u5C01\u9762\u7C7B\u578B\u4E0D\u5B58\u5728\u591A\u9009\u7684\u903B\u8F91\uFF0C\u65E0\u8BBA\u662F\u70B9\u51FB\u88C1\u526A\u8FD8\u662F\u4F7F\u7528\uFF0C\u90FD\u662F\u5355\u9009 "),
|
|
139
142
|
createVNode(unref(Button), { onClick: unref(close) }, {
|
|
140
143
|
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
141
144
|
createTextVNode("\u53D6\u6D88")
|
|
@@ -147,7 +150,7 @@ const _sfc_main = defineComponent({
|
|
|
147
150
|
onClick: ($event) => confirm("crop", onConfirm)
|
|
148
151
|
}, {
|
|
149
152
|
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
150
|
-
createTextVNode(" \
|
|
153
|
+
createTextVNode(" \u7F16\u8F91 ")
|
|
151
154
|
])),
|
|
152
155
|
_: 2
|
|
153
156
|
}, 1032, ["onClick"]),
|
|
@@ -4,6 +4,16 @@ import _sfc_main from "../components/List/ListNormal/index.js";
|
|
|
4
4
|
import _sfc_main$2 from "../components/List/ListSystem/index.js";
|
|
5
5
|
import _sfc_main$1 from "../components/List/ListLocal/index.js";
|
|
6
6
|
import _sfc_main$3 from "../components/List/ListAi/index.js";
|
|
7
|
+
var TabEnum = /* @__PURE__ */ ((TabEnum2) => {
|
|
8
|
+
TabEnum2["ALL"] = "all";
|
|
9
|
+
TabEnum2["MY"] = "my";
|
|
10
|
+
TabEnum2["REMIND"] = "remind";
|
|
11
|
+
TabEnum2["LOCAL"] = "local";
|
|
12
|
+
TabEnum2["SYSTEM"] = "system";
|
|
13
|
+
TabEnum2["AI"] = "ai";
|
|
14
|
+
TabEnum2["VIDEO"] = "video";
|
|
15
|
+
return TabEnum2;
|
|
16
|
+
})(TabEnum || {});
|
|
7
17
|
const DEFAULT_TABS = ["all", "my", "remind", "local"];
|
|
8
18
|
const TAB_DICT = {
|
|
9
19
|
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: _sfc_main },
|
|
@@ -42,4 +52,4 @@ function useTabFilter(props) {
|
|
|
42
52
|
handelChangeTab
|
|
43
53
|
};
|
|
44
54
|
}
|
|
45
|
-
export { useTabFilter as default };
|
|
55
|
+
export { TabEnum, useTabFilter as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var vue = require("vue");
|
|
3
3
|
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var utils = require("@cmstops/utils");
|
|
4
5
|
var index = require("./components/ViewAllColumn/index.js");
|
|
5
6
|
var index$3 = require("./components/CompoList/index.js");
|
|
6
7
|
var index$5 = require("./components/MpAccountList/index.js");
|
|
@@ -45,7 +46,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
45
46
|
const hasSelected = vue.computed(() => {
|
|
46
47
|
return selectedData.value.length > 0;
|
|
47
48
|
});
|
|
48
|
-
const typeDataController = vue.
|
|
49
|
+
const typeDataController = vue.computed(() => {
|
|
50
|
+
const ret = props.typeData;
|
|
51
|
+
const appList = [
|
|
52
|
+
{ license: "courselearning", key: "addCourse", type: utils.Enum.CheckTypeEnum.MARKET },
|
|
53
|
+
{ license: "maavd", key: "addMpAccount", type: utils.Enum.CheckTypeEnum.MARKET },
|
|
54
|
+
{ license: "maavd", key: "addMpContent", type: utils.Enum.CheckTypeEnum.MARKET }
|
|
55
|
+
];
|
|
56
|
+
appList.forEach((item) => {
|
|
57
|
+
if (!utils.License.check(item.type, item.license)) {
|
|
58
|
+
ret[item.key] = false;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return ret;
|
|
62
|
+
});
|
|
49
63
|
const setVisible = (bool) => {
|
|
50
64
|
emit("update:visible", bool);
|
|
51
65
|
};
|
|
@@ -45,7 +45,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
45
45
|
const props = __props;
|
|
46
46
|
const emits = __emit;
|
|
47
47
|
const { selected, selectedKeys, disableSelect, handleSelect, handleClear } = useResourceSelect.useResourceSelect(props);
|
|
48
|
-
const { activeKey, activeComponent, tabKeyList, handelChangeTab } = useTabFilter(props);
|
|
48
|
+
const { activeKey, activeComponent, tabKeyList, handelChangeTab } = useTabFilter["default"](props);
|
|
49
49
|
const { wrapProps, close, submit } = useCompoLf(props, emits, {
|
|
50
50
|
onClose: () => {
|
|
51
51
|
handleClear();
|
|
@@ -56,7 +56,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
56
56
|
() => props.visible,
|
|
57
57
|
(val) => {
|
|
58
58
|
if (val)
|
|
59
|
-
activeKey.value =
|
|
59
|
+
activeKey.value = useTabFilter.TabEnum.ALL;
|
|
60
60
|
},
|
|
61
61
|
{ immediate: true }
|
|
62
62
|
);
|
|
@@ -112,6 +112,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
112
112
|
}, null, 8, ["item", "select-keys", "disable", "onSelect", "onOptions"])
|
|
113
113
|
]),
|
|
114
114
|
"footer-extra": vue.withCtx(({ type, onConfirm }) => [
|
|
115
|
+
vue.createCommentVNode(" \u5982\u679C\u662F\u975E\u89C6\u9891\u5C01\u9762\u7C7B\u578B "),
|
|
115
116
|
type !== "video" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
116
117
|
vue.unref(selected).length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
117
118
|
vue.createVNode(index$1, {
|
|
@@ -137,6 +138,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
137
138
|
})
|
|
138
139
|
], 64)) : vue.createCommentVNode("v-if", true)
|
|
139
140
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
141
|
+
vue.createCommentVNode(" \u5982\u679C\u662F\u89C6\u9891\u5C01\u9762\u7C7B\u578B "),
|
|
142
|
+
vue.createCommentVNode(" \u89C6\u9891\u5C01\u9762\u7C7B\u578B\u4E0D\u5B58\u5728\u591A\u9009\u7684\u903B\u8F91\uFF0C\u65E0\u8BBA\u662F\u70B9\u51FB\u88C1\u526A\u8FD8\u662F\u4F7F\u7528\uFF0C\u90FD\u662F\u5355\u9009 "),
|
|
140
143
|
vue.createVNode(vue.unref(webVue.Button), { onClick: vue.unref(close) }, {
|
|
141
144
|
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
142
145
|
vue.createTextVNode("\u53D6\u6D88")
|
|
@@ -148,7 +151,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
148
151
|
onClick: ($event) => confirm("crop", onConfirm)
|
|
149
152
|
}, {
|
|
150
153
|
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
151
|
-
vue.createTextVNode(" \
|
|
154
|
+
vue.createTextVNode(" \u7F16\u8F91 ")
|
|
152
155
|
])),
|
|
153
156
|
_: 2
|
|
154
157
|
}, 1032, ["onClick"]),
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
2
3
|
var vue = require("vue");
|
|
3
4
|
var index$4 = require("../components/List/ListVideo/index.js");
|
|
4
5
|
var index = require("../components/List/ListNormal/index.js");
|
|
5
6
|
var index$2 = require("../components/List/ListSystem/index.js");
|
|
6
7
|
var index$1 = require("../components/List/ListLocal/index.js");
|
|
7
8
|
var index$3 = require("../components/List/ListAi/index.js");
|
|
9
|
+
var TabEnum = /* @__PURE__ */ ((TabEnum2) => {
|
|
10
|
+
TabEnum2["ALL"] = "all";
|
|
11
|
+
TabEnum2["MY"] = "my";
|
|
12
|
+
TabEnum2["REMIND"] = "remind";
|
|
13
|
+
TabEnum2["LOCAL"] = "local";
|
|
14
|
+
TabEnum2["SYSTEM"] = "system";
|
|
15
|
+
TabEnum2["AI"] = "ai";
|
|
16
|
+
TabEnum2["VIDEO"] = "video";
|
|
17
|
+
return TabEnum2;
|
|
18
|
+
})(TabEnum || {});
|
|
8
19
|
const DEFAULT_TABS = ["all", "my", "remind", "local"];
|
|
9
20
|
const TAB_DICT = {
|
|
10
21
|
["all"]: { title: "\u5168\u90E8\u7D20\u6750", component: index },
|
|
@@ -43,4 +54,5 @@ function useTabFilter(props) {
|
|
|
43
54
|
handelChangeTab
|
|
44
55
|
};
|
|
45
56
|
}
|
|
46
|
-
|
|
57
|
+
exports.TabEnum = TabEnum;
|
|
58
|
+
exports["default"] = useTabFilter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmstops/pro-compo",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.81",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@arco-design/web-vue": "~2",
|
|
49
49
|
"@arco-iconbox/vue-cmstop-icons": "^0.0.34",
|
|
50
|
+
"@cmstops/utils": "^1.0.4",
|
|
50
51
|
"@popperjs/core": "^2.11.8",
|
|
51
52
|
"colorthief": "^2.4.0",
|
|
52
53
|
"cropperjs": "^1.6.1",
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
"@typescript-eslint/parser": "^4.12.0",
|
|
87
88
|
"@vue/babel-plugin-jsx": "^1.0.6",
|
|
88
89
|
"@vue/test-utils": "^2.0.0-beta.14",
|
|
90
|
+
"axios": "^1.7.7",
|
|
89
91
|
"babel-loader": "^8.2.2",
|
|
90
92
|
"colorthief": "^2.4.0",
|
|
91
93
|
"cropperjs": "^1.6.1",
|
|
@@ -133,5 +135,8 @@
|
|
|
133
135
|
"es",
|
|
134
136
|
"lib",
|
|
135
137
|
"dist"
|
|
136
|
-
]
|
|
138
|
+
],
|
|
139
|
+
"dependencies": {
|
|
140
|
+
"@cmstops/utils": "^1.0.6"
|
|
141
|
+
}
|
|
137
142
|
}
|