hzerojs-plugin-yqcloud-jssdk 1.0.23 → 1.0.25
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/browsers/components/test-layout-header-extra.tsx +7 -7
- package/browsers/hzero-layouts/horizontal-layout.tsx +61 -61
- package/browsers/hzero-layouts/styles.less +14 -14
- package/browsers/pages/test-page2.tsx +6 -6
- package/lib/index.css +14 -14
- package/lib/index.js +7 -7
- package/package.json +16 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const TestLayoutHeaderExtra = () => {
|
|
4
|
-
return <div style={{color: '#fff', border: '1px solid red'}}>testLayoutHeaderExtra</div>
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default TestLayoutHeaderExtra;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const TestLayoutHeaderExtra = () => {
|
|
4
|
+
return <div style={{color: '#fff', border: '1px solid red'}}>testLayoutHeaderExtra</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default TestLayoutHeaderExtra;
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { useModel } from 'umi';
|
|
3
|
-
import React, { useMemo } from 'react';
|
|
4
|
-
import { Layout } from 'choerodon-ui';
|
|
5
|
-
// import { useLayoutController } from '@hzerojs/plugin-layout/lib/clients/HzeroLayout/hooks';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import layoutCommonStyles from './styles.less';
|
|
8
|
-
// import { Mode } from '../../../src';
|
|
9
|
-
|
|
10
|
-
export interface HorizontalLayoutProps {
|
|
11
|
-
children: JSX.Element;
|
|
12
|
-
/** 完整路由表 */
|
|
13
|
-
// routes: IRoute[];
|
|
14
|
-
/** 当前层级路由表 */
|
|
15
|
-
// route: IRoute;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default function HorizontalLayout(props: HorizontalLayoutProps) {
|
|
19
|
-
const { children } = props;
|
|
20
|
-
|
|
21
|
-
const layoutController = useModel('hzeroLayout');
|
|
22
|
-
|
|
23
|
-
const routes = useMemo(() => layoutController.getRoutes(), [
|
|
24
|
-
layoutController.routerData,
|
|
25
|
-
]);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<Layout style={{ height: '100vh' }}>
|
|
29
|
-
<Layout.Sider width={220}>
|
|
30
|
-
<Layout>
|
|
31
|
-
<Layout.Header
|
|
32
|
-
className={layoutCommonStyles['layout-header']}
|
|
33
|
-
style={{ padding: '0' }}
|
|
34
|
-
>
|
|
35
|
-
<h2 style={{ height: '100%', color: '#fff' }}>
|
|
36
|
-
🚀 hzerojs3 horizontal 布局
|
|
37
|
-
</h2>
|
|
38
|
-
</Layout.Header>
|
|
39
|
-
<Layout.Content className={layoutCommonStyles['layout-content']}>
|
|
40
|
-
<div style={{ height: '100%', overflowY: 'scroll' }}>
|
|
41
|
-
路由菜单组件
|
|
42
|
-
</div>
|
|
43
|
-
</Layout.Content>
|
|
44
|
-
</Layout>
|
|
45
|
-
</Layout.Sider>
|
|
46
|
-
<Layout.Content style={{ zIndex: 1 }}>
|
|
47
|
-
<Layout>
|
|
48
|
-
<Layout.Header
|
|
49
|
-
className={layoutCommonStyles['layout-header']}
|
|
50
|
-
style={{ color: '#fff', padding: '0' }}
|
|
51
|
-
>
|
|
52
|
-
header
|
|
53
|
-
</Layout.Header>
|
|
54
|
-
<Layout.Content className={layoutCommonStyles['layout-content']}>
|
|
55
|
-
{children}
|
|
56
|
-
</Layout.Content>
|
|
57
|
-
</Layout>
|
|
58
|
-
</Layout.Content>
|
|
59
|
-
</Layout>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import { useModel } from 'umi';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { Layout } from 'choerodon-ui';
|
|
5
|
+
// import { useLayoutController } from '@hzerojs/plugin-layout/lib/clients/HzeroLayout/hooks';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import layoutCommonStyles from './styles.less';
|
|
8
|
+
// import { Mode } from '../../../src';
|
|
9
|
+
|
|
10
|
+
export interface HorizontalLayoutProps {
|
|
11
|
+
children: JSX.Element;
|
|
12
|
+
/** 完整路由表 */
|
|
13
|
+
// routes: IRoute[];
|
|
14
|
+
/** 当前层级路由表 */
|
|
15
|
+
// route: IRoute;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function HorizontalLayout(props: HorizontalLayoutProps) {
|
|
19
|
+
const { children } = props;
|
|
20
|
+
|
|
21
|
+
const layoutController = useModel('hzeroLayout');
|
|
22
|
+
|
|
23
|
+
const routes = useMemo(() => layoutController.getRoutes(), [
|
|
24
|
+
layoutController.routerData,
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Layout style={{ height: '100vh' }}>
|
|
29
|
+
<Layout.Sider width={220}>
|
|
30
|
+
<Layout>
|
|
31
|
+
<Layout.Header
|
|
32
|
+
className={layoutCommonStyles['layout-header']}
|
|
33
|
+
style={{ padding: '0' }}
|
|
34
|
+
>
|
|
35
|
+
<h2 style={{ height: '100%', color: '#fff' }}>
|
|
36
|
+
🚀 hzerojs3 horizontal 布局
|
|
37
|
+
</h2>
|
|
38
|
+
</Layout.Header>
|
|
39
|
+
<Layout.Content className={layoutCommonStyles['layout-content']}>
|
|
40
|
+
<div style={{ height: '100%', overflowY: 'scroll' }}>
|
|
41
|
+
路由菜单组件
|
|
42
|
+
</div>
|
|
43
|
+
</Layout.Content>
|
|
44
|
+
</Layout>
|
|
45
|
+
</Layout.Sider>
|
|
46
|
+
<Layout.Content style={{ zIndex: 1 }}>
|
|
47
|
+
<Layout>
|
|
48
|
+
<Layout.Header
|
|
49
|
+
className={layoutCommonStyles['layout-header']}
|
|
50
|
+
style={{ color: '#fff', padding: '0' }}
|
|
51
|
+
>
|
|
52
|
+
header
|
|
53
|
+
</Layout.Header>
|
|
54
|
+
<Layout.Content className={layoutCommonStyles['layout-content']}>
|
|
55
|
+
{children}
|
|
56
|
+
</Layout.Content>
|
|
57
|
+
</Layout>
|
|
58
|
+
</Layout.Content>
|
|
59
|
+
</Layout>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
.layout-content {
|
|
3
|
-
height: calc(100vh - 48px);
|
|
4
|
-
background-color: #f0f2f5;
|
|
5
|
-
overflow-x: visible;
|
|
6
|
-
// overflow-y: visible;
|
|
7
|
-
// z-index: 0;
|
|
8
|
-
// overflow-x: hidden;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.layout-header {
|
|
12
|
-
height: 48px;
|
|
13
|
-
line-height: 48px;
|
|
14
|
-
}
|
|
1
|
+
|
|
2
|
+
.layout-content {
|
|
3
|
+
height: calc(100vh - 48px);
|
|
4
|
+
background-color: #f0f2f5;
|
|
5
|
+
overflow-x: visible;
|
|
6
|
+
// overflow-y: visible;
|
|
7
|
+
// z-index: 0;
|
|
8
|
+
// overflow-x: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.layout-header {
|
|
12
|
+
height: 48px;
|
|
13
|
+
line-height: 48px;
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const TestPage2 = () => {
|
|
4
|
-
return <div>TestPage2</div>
|
|
5
|
-
}
|
|
6
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const TestPage2 = () => {
|
|
4
|
+
return <div>TestPage2</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
7
|
export default TestPage2;
|
package/lib/index.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.yqcloud-hzero-jssdk-popover .c7n-popover-inner-content{
|
|
2
|
-
padding: 0;
|
|
3
|
-
}
|
|
4
|
-
.yq-hzero-jssdk-btn:hover {
|
|
5
|
-
color: #0840f8;
|
|
6
|
-
}
|
|
7
|
-
.yq-hzero-jssdk-btn {
|
|
8
|
-
font-size: 13px;
|
|
9
|
-
color: #0f1358;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
}
|
|
12
|
-
.yqcloud-hzero-jssdk-popover.c7n-popover.c7n-popover .c7n-popover-content .c7n-popover-inner .c7n-popover-inner-content {
|
|
13
|
-
padding: 0;
|
|
14
|
-
}
|
|
1
|
+
.yqcloud-hzero-jssdk-popover .c7n-popover-inner-content{
|
|
2
|
+
padding: 0;
|
|
3
|
+
}
|
|
4
|
+
.yq-hzero-jssdk-btn:hover {
|
|
5
|
+
color: #0840f8;
|
|
6
|
+
}
|
|
7
|
+
.yq-hzero-jssdk-btn {
|
|
8
|
+
font-size: 13px;
|
|
9
|
+
color: #0f1358;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
.yqcloud-hzero-jssdk-popover.c7n-popover.c7n-popover .c7n-popover-content .c7n-popover-inner .c7n-popover-inner-content {
|
|
13
|
+
padding: 0;
|
|
14
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -33,9 +33,9 @@ __export(src_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(src_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_modal = __toESM(require("choerodon-ui/pro/
|
|
37
|
-
var import_menu = __toESM(require("choerodon-ui/pro/
|
|
38
|
-
var import_popover = __toESM(require("choerodon-ui/
|
|
36
|
+
var import_modal = __toESM(require("choerodon-ui/pro/lib/modal"));
|
|
37
|
+
var import_menu = __toESM(require("choerodon-ui/pro/lib/menu"));
|
|
38
|
+
var import_popover = __toESM(require("choerodon-ui/lib/popover"));
|
|
39
39
|
var import_axios = __toESM(require("axios"));
|
|
40
40
|
var import_index = require("./index.css");
|
|
41
41
|
var YQ_API_HOST = "https://api.test.yqcloud.com";
|
|
@@ -148,7 +148,7 @@ var src_default = (props) => {
|
|
|
148
148
|
margin: "0"
|
|
149
149
|
},
|
|
150
150
|
header: null,
|
|
151
|
-
children: /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "absolute", width: "100%", height: "calc(100% - 40px)", bottom: "0" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "absolute", top: "-30px", right: "10px" } }, /* @__PURE__ */ import_react.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react.default.createElement("path", { d: "M8 8L40 40", stroke: "#333", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react.default.createElement("path", { d: "M8 40L40 8", stroke: "#333", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }))), /* @__PURE__ */ import_react.default.createElement("iframe", { id: "yq-sdk-frame", style: { width: "100%", height: "100%" }, src: `${openFunction.link}${urlParam}`, frameBorder: "0" })),
|
|
151
|
+
children: /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "absolute", width: "100%", height: "calc(100% - 40px)", bottom: "0" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "absolute", top: "-30px", right: "10px" }, onClick: () => modal.close() }, /* @__PURE__ */ import_react.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react.default.createElement("path", { d: "M8 8L40 40", stroke: "#333", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react.default.createElement("path", { d: "M8 40L40 8", stroke: "#333", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }))), /* @__PURE__ */ import_react.default.createElement("iframe", { id: "yq-sdk-frame", style: { width: "100%", height: "100%" }, src: `${openFunction.link}${urlParam}`, frameBorder: "0" })),
|
|
152
152
|
footer: null
|
|
153
153
|
});
|
|
154
154
|
function closeModal(e) {
|
|
@@ -168,13 +168,13 @@ var src_default = (props) => {
|
|
|
168
168
|
"img",
|
|
169
169
|
{
|
|
170
170
|
style: { width: 18, height: 18, marginRight: 10 },
|
|
171
|
-
src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${openFunction.icon}`,
|
|
171
|
+
src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${openFunction.icon}`,
|
|
172
172
|
alt: ""
|
|
173
173
|
}
|
|
174
174
|
) : defaultIcon(), openFunction.displayName);
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}));
|
|
178
|
-
const onlyOneButton = /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 }, onClick: () => openModal(appConfig == null ? void 0 : appConfig.openFunctions[0]) }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name));
|
|
179
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "yqcloud-hzero-jssdk", ref: eleRef }, ((_b = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _b.length) === 1 ? onlyOneButton : /* @__PURE__ */ import_react.default.createElement(import_popover.default, { overlayClassName: "yqcloud-hzero-jssdk-popover", overlayStyle: { padding: 0 }, openClassName: "yqcloud-hzero-jssdk-popover", content: menu, placement: "left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 } }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
|
|
178
|
+
const onlyOneButton = /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 }, onClick: () => openModal(appConfig == null ? void 0 : appConfig.openFunctions[0]) }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name));
|
|
179
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "yqcloud-hzero-jssdk", ref: eleRef }, ((_b = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _b.length) === 1 ? onlyOneButton : /* @__PURE__ */ import_react.default.createElement(import_popover.default, { overlayClassName: "yqcloud-hzero-jssdk-popover", overlayStyle: { padding: 0 }, openClassName: "yqcloud-hzero-jssdk-popover", content: menu, placement: "left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 } }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
|
|
180
180
|
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hzerojs-plugin-yqcloud-jssdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "lib/index.js",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "npx father build"
|
|
8
|
-
},
|
|
9
|
-
"peerDependencies": {
|
|
10
|
-
"axios": "*"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"lib",
|
|
14
|
-
"browsers"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "hzerojs-plugin-yqcloud-jssdk",
|
|
3
|
+
"version": "1.0.25",
|
|
4
|
+
"main": "lib/index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "npx father build"
|
|
8
|
+
},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"axios": "*"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"lib",
|
|
14
|
+
"browsers"
|
|
15
|
+
]
|
|
16
|
+
}
|