hzerojs-plugin-yqcloud-jssdk 1.0.25 → 1.0.26

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.
@@ -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
@@ -127,8 +127,13 @@ var src_default = (props) => {
127
127
  if (fieldData) {
128
128
  urlParam = `&fieldData=${fieldData}${authParam}`;
129
129
  }
130
+ const handleIframeLoad = () => {
131
+ modal.update({ movable: true });
132
+ };
130
133
  const modal = import_modal.default.open({
131
134
  maskClosable: true,
135
+ movable: false,
136
+ // 初始禁用拖拽,等待 iframe 加载完成
132
137
  bodyStyle: {
133
138
  width: "100%",
134
139
  height: "100%",
@@ -148,7 +153,7 @@ var src_default = (props) => {
148
153
  margin: "0"
149
154
  },
150
155
  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" }, 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" })),
156
+ 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", onLoad: handleIframeLoad })),
152
157
  footer: null
153
158
  });
154
159
  function closeModal(e) {
package/package.json CHANGED
@@ -1,16 +1,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
- }
1
+ {
2
+ "name": "hzerojs-plugin-yqcloud-jssdk",
3
+ "version": "1.0.26",
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
+ }