@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var vueCmstopIcons = require("@arco-iconbox/vue-cmstop-icons");
|
|
4
|
+
const _hoisted_1 = { class: "type-icons-container" };
|
|
5
|
+
const _sfc_main = vue.defineComponent({
|
|
6
|
+
...{ name: "typeIcons" },
|
|
7
|
+
__name: "component",
|
|
8
|
+
props: {
|
|
9
|
+
type: {},
|
|
10
|
+
doc: { type: Boolean },
|
|
11
|
+
resource: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
17
|
+
vue.createCommentVNode("------------------------------- \u7A3F\u4EF6\u7C7B\u578B --------------------------------------"),
|
|
18
|
+
vue.createCommentVNode(" \u65B0\u95FB "),
|
|
19
|
+
props.doc && props.type === "imagetext" ? (vue.openBlock(), vue.createBlock(vue.unref(vueCmstopIcons.IconXinwen), { key: 0 })) : props.doc && props.type === "video" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
20
|
+
vue.createCommentVNode(" \u89C6\u9891 "),
|
|
21
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconShipin))
|
|
22
|
+
], 2112)) : props.doc && props.type === "audio" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
23
|
+
vue.createCommentVNode(" \u97F3\u9891 "),
|
|
24
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconYinyue))
|
|
25
|
+
], 2112)) : props.doc && props.type === "atlas" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
26
|
+
vue.createCommentVNode(" \u56FE\u96C6 "),
|
|
27
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconTuji))
|
|
28
|
+
], 2112)) : props.doc && props.type === "svideo" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 4 }, [
|
|
29
|
+
vue.createCommentVNode(" \u5C0F\u89C6\u9891 "),
|
|
30
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconXiaoshipin))
|
|
31
|
+
], 2112)) : props.doc && props.type === "special_v3" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 5 }, [
|
|
32
|
+
vue.createCommentVNode(" \u4E13\u9898 "),
|
|
33
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconZhuanti))
|
|
34
|
+
], 2112)) : props.doc && props.type === "audio_album" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 6 }, [
|
|
35
|
+
vue.createCommentVNode(" \u97F3\u9891\u96C6 "),
|
|
36
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconYinpinji))
|
|
37
|
+
], 2112)) : props.doc && props.type === "video_album" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 7 }, [
|
|
38
|
+
vue.createCommentVNode(" \u89C6\u9891\u96C6 "),
|
|
39
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconShipinji))
|
|
40
|
+
], 2112)) : props.doc && props.type === "h5" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 8 }, [
|
|
41
|
+
vue.createCommentVNode(" h5 "),
|
|
42
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconH5))
|
|
43
|
+
], 2112)) : props.doc && props.type === "live" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 9 }, [
|
|
44
|
+
vue.createCommentVNode(" \u76F4\u64AD "),
|
|
45
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconZhibo))
|
|
46
|
+
], 2112)) : props.resource && props.type === "image" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 10 }, [
|
|
47
|
+
vue.createCommentVNode("------------------------------- \u7D20\u6750\u7C7B\u578B --------------------------------------"),
|
|
48
|
+
vue.createCommentVNode(" \u56FE\u7247 "),
|
|
49
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconTupian))
|
|
50
|
+
], 2112)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 11 }, [
|
|
51
|
+
vue.createCommentVNode("------------------------------- \u5176\u4ED6\u7C7B\u578B --------------------------------------"),
|
|
52
|
+
vue.createCommentVNode(" \u5FAE\u4FE1\u7A3F\u4EF6 "),
|
|
53
|
+
vue.createCommentVNode(" <icon-weixingaojian /> "),
|
|
54
|
+
vue.createCommentVNode(" \u8F6E\u535A\u56FE\u96C6 "),
|
|
55
|
+
vue.createCommentVNode(" <icon-lunbotuji /> "),
|
|
56
|
+
vue.createCommentVNode(" \u7A3F\u4EF6 "),
|
|
57
|
+
vue.createVNode(vue.unref(vueCmstopIcons.IconGaojian))
|
|
58
|
+
], 2112))
|
|
59
|
+
]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
module.exports = _sfc_main;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var component = require("./component.js");
|
|
3
|
-
const
|
|
3
|
+
const typeIcons = Object.assign(component, {
|
|
4
4
|
install: (app) => {
|
|
5
5
|
app.component(component.name, component);
|
|
6
6
|
}
|
|
7
7
|
});
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports = typeIcons;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
const _sfc_main = vue.defineComponent({
|
|
4
|
+
...{ name: "uploadStep" },
|
|
5
|
+
__name: "component",
|
|
6
|
+
props: {
|
|
7
|
+
BASE_API: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _cache) => {
|
|
11
|
+
return vue.openBlock(), vue.createElementBlock("div", null, "uploadStep");
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var icon = require("@arco-design/web-vue/es/icon");
|
|
5
|
+
var config = require("../config.js");
|
|
6
|
+
var api = require("./script/api.js");
|
|
7
|
+
const _hoisted_1 = { class: "user-avater-container" };
|
|
8
|
+
const _hoisted_2 = ["src"];
|
|
9
|
+
const _hoisted_3 = { key: 1 };
|
|
10
|
+
const _hoisted_4 = { class: "user-avater-content-info" };
|
|
11
|
+
const _hoisted_5 = { class: "avatar" };
|
|
12
|
+
const _hoisted_6 = ["src"];
|
|
13
|
+
const _hoisted_7 = { class: "nick-name" };
|
|
14
|
+
const _hoisted_8 = { class: "user-name" };
|
|
15
|
+
const _hoisted_9 = { class: "user-email" };
|
|
16
|
+
const _hoisted_10 = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "org-alias"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_11 = { class: "b_info_bottom" };
|
|
21
|
+
const _sfc_main = vue.defineComponent({
|
|
22
|
+
...{ name: "userAvater" },
|
|
23
|
+
__name: "component",
|
|
24
|
+
props: {
|
|
25
|
+
BASE_API: {},
|
|
26
|
+
BASE_ACCOUNT_HOST: {},
|
|
27
|
+
userStore: {}
|
|
28
|
+
},
|
|
29
|
+
setup(__props) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
32
|
+
const BASE_ACCOUNT_HOST = props.BASE_ACCOUNT_HOST || config.DEFAULT_BASE_ACCOUNT_HOST;
|
|
33
|
+
const slotTest = !!vue.useSlots().reference;
|
|
34
|
+
const userInfo = vue.ref(null);
|
|
35
|
+
const loadUserInfo = async () => {
|
|
36
|
+
const res = await api.getUserInfo(BASE_API);
|
|
37
|
+
if (res.code === 0 && res.message) {
|
|
38
|
+
const userInfo2 = res.message;
|
|
39
|
+
getUserDomainsByDetail(userInfo2);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const getUserDomainsByDetail = async (_userInfo) => {
|
|
43
|
+
const res = await api.getUserDetails(BASE_API, {
|
|
44
|
+
id: _userInfo.id,
|
|
45
|
+
domainid: _userInfo.domain_id
|
|
46
|
+
});
|
|
47
|
+
if (res.code === 0 && res.message) {
|
|
48
|
+
_userInfo.domains = res.message.domains;
|
|
49
|
+
for (const k in _userInfo.domains) {
|
|
50
|
+
if (_userInfo.domains[k].id === _userInfo.domain_id) {
|
|
51
|
+
_userInfo.currentDomain = _userInfo.domains[k].alias;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
userInfo.value = _userInfo;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const loginOut = async () => {
|
|
58
|
+
await api.accountLogout(BASE_ACCOUNT_HOST);
|
|
59
|
+
window.location.href = BASE_ACCOUNT_HOST;
|
|
60
|
+
};
|
|
61
|
+
const profile = () => {
|
|
62
|
+
window.open(`${BASE_API}/foowz/#/account`, "_blank");
|
|
63
|
+
};
|
|
64
|
+
const domainClick = async (item) => {
|
|
65
|
+
const res = await api.domainSelect(BASE_API, item.id);
|
|
66
|
+
if (res.code === 0 && res.message) {
|
|
67
|
+
window.location.href = res.message;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
vue.onMounted(() => {
|
|
71
|
+
if (props.userStore) {
|
|
72
|
+
userInfo.value = props.userStore;
|
|
73
|
+
getUserDomainsByDetail(userInfo.value);
|
|
74
|
+
} else {
|
|
75
|
+
loadUserInfo();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
80
|
+
userInfo.value ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Popover), {
|
|
81
|
+
key: 0,
|
|
82
|
+
trigger: "hover",
|
|
83
|
+
position: "bottom",
|
|
84
|
+
"arrow-style": { display: "none" },
|
|
85
|
+
"content-style": { padding: 0 }
|
|
86
|
+
}, {
|
|
87
|
+
content: vue.withCtx(() => {
|
|
88
|
+
var _a;
|
|
89
|
+
return [
|
|
90
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
91
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
92
|
+
vue.createVNode(vue.unref(webVue.Avatar), {
|
|
93
|
+
"trigger-type": "mask",
|
|
94
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => profile(), ["stop"]))
|
|
95
|
+
}, {
|
|
96
|
+
"trigger-icon": vue.withCtx(() => [
|
|
97
|
+
vue.createVNode(vue.unref(icon.IconEdit))
|
|
98
|
+
]),
|
|
99
|
+
default: vue.withCtx(() => [
|
|
100
|
+
vue.createElementVNode("img", {
|
|
101
|
+
alt: "avatar",
|
|
102
|
+
src: userInfo.value.avatar
|
|
103
|
+
}, null, 8, _hoisted_6)
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
vue.createElementVNode("div", _hoisted_7, vue.toDisplayString(userInfo.value.alias || "\u6682\u65E0"), 1),
|
|
109
|
+
vue.createElementVNode("div", _hoisted_8, vue.toDisplayString(userInfo.value.name), 1),
|
|
110
|
+
vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(userInfo.value.mail || "\u6682\u65E0\u90AE\u7BB1"), 1),
|
|
111
|
+
((_a = userInfo.value.domains) == null ? void 0 : _a.length) === 1 && userInfo.value.currentDomain ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, vue.toDisplayString(userInfo.value.currentDomain), 1)) : vue.createCommentVNode("v-if", true),
|
|
112
|
+
vue.createVNode(vue.unref(webVue.Dropdown), null, {
|
|
113
|
+
content: vue.withCtx(() => [
|
|
114
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(userInfo.value.domains, (item, index) => {
|
|
115
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Doption), {
|
|
116
|
+
key: index,
|
|
117
|
+
onClick: vue.withModifiers(($event) => domainClick(item), ["stop"])
|
|
118
|
+
}, {
|
|
119
|
+
default: vue.withCtx(() => [
|
|
120
|
+
vue.createTextVNode(vue.toDisplayString(item.alias), 1)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1032, ["onClick"]);
|
|
124
|
+
}), 128))
|
|
125
|
+
]),
|
|
126
|
+
default: vue.withCtx(() => [
|
|
127
|
+
vue.createVNode(vue.unref(webVue.Button), { long: "" }, {
|
|
128
|
+
default: vue.withCtx(() => [
|
|
129
|
+
vue.createTextVNode(vue.toDisplayString(userInfo.value.currentDomain), 1)
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
})
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}),
|
|
136
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
137
|
+
vue.createVNode(vue.unref(webVue.Button), {
|
|
138
|
+
type: "text",
|
|
139
|
+
onClick: _cache[1] || (_cache[1] = ($event) => loginOut())
|
|
140
|
+
}, {
|
|
141
|
+
default: vue.withCtx(() => [
|
|
142
|
+
vue.createTextVNode("\u9000\u51FA")
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})
|
|
146
|
+
])
|
|
147
|
+
])
|
|
148
|
+
];
|
|
149
|
+
}),
|
|
150
|
+
default: vue.withCtx(() => [
|
|
151
|
+
slotTest ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(webVue.Avatar), { key: 1 }, {
|
|
152
|
+
default: vue.withCtx(() => [
|
|
153
|
+
userInfo.value.avatar ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
154
|
+
key: 0,
|
|
155
|
+
alt: "avatar",
|
|
156
|
+
src: userInfo.value.avatar
|
|
157
|
+
}, null, 8, _hoisted_2)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(userInfo.value.name), 1))
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}))
|
|
161
|
+
]),
|
|
162
|
+
_: 3
|
|
163
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
164
|
+
]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var request = require("../../utils/request.js");
|
|
4
|
+
function getUserInfo(BASE_API, params) {
|
|
5
|
+
return request(BASE_API, {
|
|
6
|
+
url: "/poplar/v2/account/info",
|
|
7
|
+
method: "get",
|
|
8
|
+
params
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function getUserDetails(BASE_API, params) {
|
|
12
|
+
return request(BASE_API, {
|
|
13
|
+
url: `/poplar/v2/account/detail`,
|
|
14
|
+
method: "get",
|
|
15
|
+
params
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function domainSelect(BASE_API, did) {
|
|
19
|
+
return request(BASE_API, {
|
|
20
|
+
url: "/sandy/v1/account/domain/select",
|
|
21
|
+
method: "post",
|
|
22
|
+
data: {
|
|
23
|
+
domain_id: did
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function accountLogout(BASE_API, params) {
|
|
28
|
+
return request(BASE_API, {
|
|
29
|
+
url: "/sandy/v1/account/logout",
|
|
30
|
+
method: "post",
|
|
31
|
+
params
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
exports.accountLogout = accountLogout;
|
|
35
|
+
exports.domainSelect = domainSelect;
|
|
36
|
+
exports.getUserDetails = getUserDetails;
|
|
37
|
+
exports.getUserInfo = getUserInfo;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.user-avater-content-info {
|
|
2
|
+
width: 328px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
padding-bottom: 0px;
|
|
9
|
+
line-height: 1;
|
|
10
|
+
}
|
|
11
|
+
.user-avater-content-info .avatar {
|
|
12
|
+
width: 74px;
|
|
13
|
+
height: 74px;
|
|
14
|
+
position: relative;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
margin-bottom: 10px;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
}
|
|
22
|
+
.user-avater-content-info .avatar .arco-avatar {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
.user-avater-content-info .nick-name {
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
color: #1D2129;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
}
|
|
32
|
+
.user-avater-content-info .user-name,
|
|
33
|
+
.user-avater-content-info .user-email {
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
color: #86909C;
|
|
36
|
+
margin-bottom: 10px;
|
|
37
|
+
}
|
|
38
|
+
.user-avater-content-info .org-alias {
|
|
39
|
+
border: 1px solid #EBEEF5;
|
|
40
|
+
padding: 10px 20px;
|
|
41
|
+
border-radius: 40px;
|
|
42
|
+
}
|
|
43
|
+
.user-avater-content-info .b_info_bottom {
|
|
44
|
+
height: 52px;
|
|
45
|
+
padding: 10px 16px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.user-avater-container {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.user-avater-content-info {
|
|
6
|
+
width: 328px;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
padding: 24px;
|
|
12
|
+
padding-bottom: 0px;
|
|
13
|
+
line-height: 1;
|
|
14
|
+
.avatar {
|
|
15
|
+
width: 74px;
|
|
16
|
+
height: 74px;
|
|
17
|
+
position: relative;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
margin-bottom: 10px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
.arco-avatar {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.nick-name {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
color: #1D2129;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
margin-bottom: 10px;
|
|
34
|
+
}
|
|
35
|
+
.user-name,
|
|
36
|
+
.user-email {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
color: #86909C;
|
|
39
|
+
margin-bottom: 10px;
|
|
40
|
+
}
|
|
41
|
+
.org-alias {
|
|
42
|
+
border: 1px solid #EBEEF5;
|
|
43
|
+
padding: 10px 20px;
|
|
44
|
+
border-radius: 40px;
|
|
45
|
+
}
|
|
46
|
+
.b_info_bottom {
|
|
47
|
+
height: 52px;
|
|
48
|
+
padding: 10px 16px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var dayjs = require("dayjs");
|
|
4
|
+
function _interopDefaultLegacy(e) {
|
|
5
|
+
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
6
|
+
}
|
|
7
|
+
var dayjs__default = /* @__PURE__ */ _interopDefaultLegacy(dayjs);
|
|
8
|
+
const dateYYYYDDMMHHmm = (date) => {
|
|
9
|
+
if (!date)
|
|
10
|
+
return "--";
|
|
11
|
+
return dayjs__default["default"](date).format("YYYY-DD-MM HH:mm");
|
|
12
|
+
};
|
|
13
|
+
exports.dateYYYYDDMMHHmm = dateYYYYDDMMHHmm;
|
package/lib/utils/request.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const componentsColumns = {
|
|
4
|
+
banner: { value: "banner", label: "\u8F6E\u64AD\u7EC4\u4EF6" },
|
|
5
|
+
top: { value: "top", label: "\u7F6E\u9876\u7EC4\u4EF6" },
|
|
6
|
+
horizon_slide: { value: "horizon_slide", label: "\u6A2A\u6ED1\u7EC4\u4EF6" },
|
|
7
|
+
svideo: { value: "svideo", label: "\u5C0F\u89C6\u9891\u7EC4\u4EF6" },
|
|
8
|
+
special: { value: "special", label: "\u4E13\u9898/\u5408\u96C6\u7EC4\u4EF6" },
|
|
9
|
+
news_letter: { value: "news_letter", label: "\u5FEB\u8BAF\u7EC4\u4EF6" },
|
|
10
|
+
focus: { value: "focus", label: "\u70ED\u70B9\u7EC4\u4EF6" },
|
|
11
|
+
radio: { value: "radio", label: "\u5E7F\u64AD\u7EC4\u4EF6", simple: true },
|
|
12
|
+
tv: { value: "tv", label: "\u7535\u89C6\u7EC4\u4EF6", simple: true },
|
|
13
|
+
mp_account: { value: "mp_account", label: "\u516C\u4F17\u53F7\u7EC4\u4EF6" },
|
|
14
|
+
column: { value: "column", label: "\u5206\u680F\u7EC4\u4EF6" }
|
|
15
|
+
};
|
|
16
|
+
const compoColumnsMap = () => {
|
|
17
|
+
const obj = {};
|
|
18
|
+
Object.keys(componentsColumns).map((key) => {
|
|
19
|
+
obj[key] = componentsColumns[key].label.replace("\u7EC4\u4EF6", "");
|
|
20
|
+
return key;
|
|
21
|
+
});
|
|
22
|
+
return obj;
|
|
23
|
+
};
|
|
24
|
+
exports.compoColumnsMap = compoColumnsMap;
|
|
25
|
+
exports.componentsColumns = componentsColumns;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmstops/pro-compo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -47,13 +47,14 @@
|
|
|
47
47
|
"vue": "^3.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@cmstops/arco-vue-scripts": "^0.2.9",
|
|
51
50
|
"@arco-design/web-vue": "~2",
|
|
51
|
+
"@arco-iconbox/vue-cmstop-icons": "^0.0.4",
|
|
52
52
|
"@babel/core": "^7.14.6",
|
|
53
53
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
54
54
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
55
55
|
"@babel/preset-env": "^7.14.7",
|
|
56
56
|
"@babel/preset-typescript": "^7.14.5",
|
|
57
|
+
"@cmstops/arco-vue-scripts": "^0.2.9",
|
|
57
58
|
"@commitlint/cli": "^11.0.0",
|
|
58
59
|
"@commitlint/config-conventional": "^12.0.1",
|
|
59
60
|
"@storybook/addon-actions": "^6.3.0",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"@vue/babel-plugin-jsx": "^1.0.6",
|
|
69
70
|
"@vue/test-utils": "^2.0.0-beta.14",
|
|
70
71
|
"babel-loader": "^8.2.2",
|
|
72
|
+
"dayjs": "^1.11.9",
|
|
71
73
|
"eslint": "^7.21.0",
|
|
72
74
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
73
75
|
"eslint-config-prettier": "^8.3.0",
|
package/es/button/component.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
/**
|
|
3
|
-
* @zh 提示文字
|
|
4
|
-
* @en Prompt text
|
|
5
|
-
*/
|
|
6
|
-
tip: StringConstructor;
|
|
7
|
-
/**
|
|
8
|
-
* @zh 按钮组件的Props
|
|
9
|
-
* @en The props of button component
|
|
10
|
-
*/
|
|
11
|
-
buttonProps: ObjectConstructor;
|
|
12
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
-
/**
|
|
14
|
-
* @zh 提示文字
|
|
15
|
-
* @en Prompt text
|
|
16
|
-
*/
|
|
17
|
-
tip: StringConstructor;
|
|
18
|
-
/**
|
|
19
|
-
* @zh 按钮组件的Props
|
|
20
|
-
* @en The props of button component
|
|
21
|
-
*/
|
|
22
|
-
buttonProps: ObjectConstructor;
|
|
23
|
-
}>>, {}, {}>;
|
|
24
|
-
export default _default;
|
package/es/button/component.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, renderSlot } from "vue";
|
|
2
|
-
import { Button, Tooltip } from "@arco-design/web-vue";
|
|
3
|
-
import _export_sfc from "../_virtual/plugin-vue_export-helper.js";
|
|
4
|
-
const _sfc_main = defineComponent({
|
|
5
|
-
name: "button",
|
|
6
|
-
components: {
|
|
7
|
-
Button,
|
|
8
|
-
Tooltip
|
|
9
|
-
},
|
|
10
|
-
props: {
|
|
11
|
-
tip: String,
|
|
12
|
-
buttonProps: Object
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16
|
-
const _component_Button = resolveComponent("Button");
|
|
17
|
-
const _component_Tooltip = resolveComponent("Tooltip");
|
|
18
|
-
return _ctx.tip ? (openBlock(), createBlock(_component_Tooltip, {
|
|
19
|
-
key: 0,
|
|
20
|
-
content: _ctx.tip,
|
|
21
|
-
position: "bottom"
|
|
22
|
-
}, {
|
|
23
|
-
default: withCtx(() => [
|
|
24
|
-
createVNode(_component_Button, mergeProps({ class: "tooltip-button" }, _ctx.buttonProps), {
|
|
25
|
-
default: withCtx(() => [
|
|
26
|
-
renderSlot(_ctx.$slots, "default")
|
|
27
|
-
]),
|
|
28
|
-
_: 3
|
|
29
|
-
}, 16)
|
|
30
|
-
]),
|
|
31
|
-
_: 3
|
|
32
|
-
}, 8, ["content"])) : (openBlock(), createBlock(_component_Button, mergeProps({
|
|
33
|
-
key: 1,
|
|
34
|
-
class: "tooltip-button"
|
|
35
|
-
}, _ctx.buttonProps), {
|
|
36
|
-
default: withCtx(() => [
|
|
37
|
-
renderSlot(_ctx.$slots, "default")
|
|
38
|
-
]),
|
|
39
|
-
_: 3
|
|
40
|
-
}, 16));
|
|
41
|
-
}
|
|
42
|
-
var _button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
43
|
-
export { _button as default };
|