@luck-design-biz/luckda 1.0.0-2-alpha → 1.0.0-3-alpha

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.
@@ -173,7 +173,7 @@ export default (function (_ref) {
173
173
  _context.next = 9;
174
174
  break;
175
175
  }
176
- history.replace('/404');
176
+ window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN ? history.replace('/404') : history.replace('/base/base/404');
177
177
  _context.next = 20;
178
178
  break;
179
179
  case 9:
@@ -120,6 +120,8 @@ var DesignOperator = function DesignOperator(_ref) {
120
120
  id: operatorId.selector
121
121
  });
122
122
  }
123
+ }, {
124
+ target: canvas
123
125
  });
124
126
  useEventListener('mousemove', function (event) {
125
127
  var elem = event.target;
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useMemoizedFn } from 'ahooks';
3
- import { Icon, message } from 'luck-design/antd';
3
+ import { Typography } from 'luck-design/antd';
4
4
  import styled from 'styled-components';
5
- var BlockIdSpan = styled.span.withConfig({
5
+ var Paragraph = Typography.Paragraph;
6
+ var BlockIdSpan = styled(Paragraph).withConfig({
6
7
  displayName: "BlockIdSpan",
7
8
  componentId: "luckda-6530__sc-gbohir-0"
8
- })(["color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
9
+ })(["display:inline-block;margin:0;color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
9
10
  var BlockEditor = function BlockEditor(_ref) {
10
11
  var blockName = _ref.blockName,
11
12
  blockId = _ref.blockId,
@@ -18,8 +19,6 @@ var BlockEditor = function BlockEditor(_ref) {
18
19
  });
19
20
  var handleCopyBlockId = useMemoizedFn(function (e) {
20
21
  e.stopPropagation();
21
- navigator.clipboard.writeText(blockId);
22
- message.success('区块ID已复制到剪切板');
23
22
  });
24
23
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
25
24
  onClick: handleClick,
@@ -27,10 +26,16 @@ var BlockEditor = function BlockEditor(_ref) {
27
26
  color: 'var(--ant-primary-color)',
28
27
  cursor: 'pointer'
29
28
  } : {}
30
- }, blockName, /*#__PURE__*/React.createElement(BlockIdSpan, {
29
+ }, blockName, /*#__PURE__*/React.createElement("span", {
31
30
  onClick: handleCopyBlockId
32
- }, blockId, /*#__PURE__*/React.createElement(Icon, {
33
- type: "copy"
34
- }))));
31
+ }, /*#__PURE__*/React.createElement(BlockIdSpan, {
32
+ style: {
33
+ display: 'inline-block',
34
+ margin: 0
35
+ },
36
+ copyable: {
37
+ text: blockId
38
+ }
39
+ }, blockId))));
35
40
  };
36
41
  export default BlockEditor;
@@ -86,13 +86,9 @@ var LCDialog = function LCDialog(_ref) {
86
86
  }, _callee);
87
87
  })));
88
88
  var _footer = useCreation(function () {
89
- var _btnGroup$todoList;
90
89
  if (!footer) return {
91
90
  footer: null
92
91
  };
93
- if (!(btnGroup !== null && btnGroup !== void 0 && (_btnGroup$todoList = btnGroup.todoList) !== null && _btnGroup$todoList !== void 0 && _btnGroup$todoList.length)) return {
94
- confirmLoading: loading
95
- };
96
92
  return {
97
93
  footer: /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.createElement(LDActions, _extends({}, btnGroup, {
98
94
  doAction: function doAction(action) {
@@ -181,7 +181,7 @@ var _default = exports.default = function _default(_ref) {
181
181
  _context.next = 9;
182
182
  break;
183
183
  }
184
- _umi.history.replace('/404');
184
+ window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN ? _umi.history.replace('/404') : _umi.history.replace('/base/base/404');
185
185
  _context.next = 20;
186
186
  break;
187
187
  case 9:
@@ -127,6 +127,8 @@ var DesignOperator = function DesignOperator(_ref) {
127
127
  id: operatorId.selector
128
128
  });
129
129
  }
130
+ }, {
131
+ target: canvas
130
132
  });
131
133
  (0, _ahooks.useEventListener)('mousemove', function (event) {
132
134
  var elem = event.target;
@@ -9,10 +9,11 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _ahooks = require("ahooks");
10
10
  var _antd = require("luck-design/antd");
11
11
  var _styledComponents = _interopRequireDefault(require("styled-components"));
12
- var BlockIdSpan = _styledComponents.default.span.withConfig({
12
+ var Paragraph = _antd.Typography.Paragraph;
13
+ var BlockIdSpan = (0, _styledComponents.default)(Paragraph).withConfig({
13
14
  displayName: "BlockIdSpan",
14
15
  componentId: "luckda-6530__sc-gbohir-0"
15
- })(["color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
16
+ })(["display:inline-block;margin:0;color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
16
17
  var BlockEditor = function BlockEditor(_ref) {
17
18
  var blockName = _ref.blockName,
18
19
  blockId = _ref.blockId,
@@ -25,8 +26,6 @@ var BlockEditor = function BlockEditor(_ref) {
25
26
  });
26
27
  var handleCopyBlockId = (0, _ahooks.useMemoizedFn)(function (e) {
27
28
  e.stopPropagation();
28
- navigator.clipboard.writeText(blockId);
29
- _antd.message.success('区块ID已复制到剪切板');
30
29
  });
31
30
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
32
31
  onClick: handleClick,
@@ -34,10 +33,16 @@ var BlockEditor = function BlockEditor(_ref) {
34
33
  color: 'var(--ant-primary-color)',
35
34
  cursor: 'pointer'
36
35
  } : {}
37
- }, blockName, /*#__PURE__*/_react.default.createElement(BlockIdSpan, {
36
+ }, blockName, /*#__PURE__*/_react.default.createElement("span", {
38
37
  onClick: handleCopyBlockId
39
- }, blockId, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
40
- type: "copy"
41
- }))));
38
+ }, /*#__PURE__*/_react.default.createElement(BlockIdSpan, {
39
+ style: {
40
+ display: 'inline-block',
41
+ margin: 0
42
+ },
43
+ copyable: {
44
+ text: blockId
45
+ }
46
+ }, blockId))));
42
47
  };
43
48
  var _default = exports.default = BlockEditor;
@@ -94,13 +94,9 @@ var LCDialog = function LCDialog(_ref) {
94
94
  }, _callee);
95
95
  })));
96
96
  var _footer = (0, _ahooks.useCreation)(function () {
97
- var _btnGroup$todoList;
98
97
  if (!footer) return {
99
98
  footer: null
100
99
  };
101
- if (!(btnGroup !== null && btnGroup !== void 0 && (_btnGroup$todoList = btnGroup.todoList) !== null && _btnGroup$todoList !== void 0 && _btnGroup$todoList.length)) return {
102
- confirmLoading: loading
103
- };
104
100
  return {
105
101
  footer: /*#__PURE__*/_react.default.createElement(Footer, null, /*#__PURE__*/_react.default.createElement(_index.LDActions, (0, _extends2.default)({}, btnGroup, {
106
102
  doAction: function doAction(action) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "1.0.0-2-alpha",
3
+ "version": "1.0.0-3-alpha",
4
4
  "description": "前端配置管理中心业务组件库",
5
5
  "scripts": {
6
6
  "start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",