@zgfe/modules-dm 1.0.13 → 1.0.14-alpha.1

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.
@@ -95,8 +95,19 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
95
95
  }, [source, eventAttrsData]);
96
96
  // 复制属性名称
97
97
  var copyAttrName = function copyAttrName(name) {
98
- navigator.clipboard.writeText(name);
99
- message.success('复制成功');
98
+ if (navigator.clipboard) {
99
+ navigator.clipboard.writeText(name);
100
+ message.success('复制成功');
101
+ } else {
102
+ var eventCopyer = function eventCopyer(event) {
103
+ event.preventDefault();
104
+ event.clipboardData.setData('text/plain', name);
105
+ };
106
+ document.addEventListener('copy', eventCopyer);
107
+ document.execCommand('copy');
108
+ document.removeEventListener('copy', eventCopyer);
109
+ message.success('复制成功');
110
+ }
100
111
  };
101
112
  // 别名foucs
102
113
  var _useState5 = useState(''),
@@ -335,10 +346,12 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
335
346
  method: 'post',
336
347
  data: data
337
348
  }).then(function (res) {
338
- if (res) {
349
+ if (res.code == 10001) {
339
350
  message.success('上传成功');
340
351
  setBatchId(res.batch_id);
341
352
  setAttrExcelData(res.values);
353
+ } else {
354
+ message.success(res.msg);
342
355
  }
343
356
  }).catch(function (err) {});
344
357
  return false;
@@ -195,8 +195,19 @@ var TablePlus = function TablePlus(props) {
195
195
  };
196
196
  // 复制事件名称
197
197
  var copyEventName = function copyEventName(event_name) {
198
- navigator.clipboard.writeText(event_name);
199
- message.success('复制成功');
198
+ if (navigator.clipboard) {
199
+ navigator.clipboard.writeText(event_name);
200
+ message.success('复制成功');
201
+ } else {
202
+ var eventCopyer = function eventCopyer(event) {
203
+ event.preventDefault();
204
+ event.clipboardData.setData('text/plain', event_name);
205
+ };
206
+ document.addEventListener('copy', eventCopyer);
207
+ document.execCommand('copy');
208
+ document.removeEventListener('copy', eventCopyer);
209
+ message.success('复制成功');
210
+ }
200
211
  };
201
212
  // 手否筛选收藏
202
213
  var _useState9 = useState(false),
@@ -14,7 +14,9 @@ import PlanList from '../dataPlan';
14
14
  import DataCollection from '../dataCollection';
15
15
  var DataManage = function DataManage(props) {
16
16
  var _useContext = useContext(BizGlobalDataContext),
17
- isDemo = _useContext.isDemo;
17
+ isDemo = _useContext.isDemo,
18
+ envs = _useContext.envs;
19
+ var dataCollecPageShow = envs === null || envs === void 0 ? void 0 : envs.dataCollecPageShow;
18
20
  var classPrefix = 'data-manage';
19
21
  var updateEventMetas = props.updateEventMetas;
20
22
  var _upDatedDmFun = upDatedDmFun(),
@@ -64,7 +66,7 @@ var DataManage = function DataManage(props) {
64
66
  type: "maidianguanli"
65
67
  }), "\u57CB\u70B9\u7BA1\u7406")),
66
68
  key: "0"
67
- }), /*#__PURE__*/React.createElement(Tabs.TabPane, {
69
+ }), dataCollecPageShow && /*#__PURE__*/React.createElement(Tabs.TabPane, {
68
70
  tab: /*#__PURE__*/React.createElement("div", {
69
71
  className: "tab"
70
72
  }, collapsed && /*#__PURE__*/React.createElement(Popover, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.13",
3
+ "version": "1.0.14-alpha.1",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "umi-request": "^1.4.0",
50
50
  "yorkie": "^2.0.0"
51
51
  },
52
- "gitHead": "d1b85f5406116bc38292cf2c83231305a76aabe1",
52
+ "gitHead": "081ab0ef1693fa486d2640826a23d5489b29a7ba",
53
53
  "gitHooks": {
54
54
  "pre-commit": "lint-staged"
55
55
  }