@fonixtree/magic-design 2.0.95 → 2.0.97
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/es/common/LinkModal/MiniAppApi/const.js +637 -0
- package/es/common/LinkModal/MiniAppApi/index.js +61 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/constants/index.js +2 -1
- package/es/utils/businessUtil.js +12 -0
- package/lib/common/LinkModal/MiniAppApi/const.js +637 -0
- package/lib/common/LinkModal/MiniAppApi/index.js +61 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/constants/index.js +2 -1
- package/lib/utils/businessUtil.js +12 -0
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = MiniAppApi;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _const = require("./const");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var Search = _antd.Input.Search;
|
|
17
|
+
|
|
18
|
+
function MiniAppApi(_a) {
|
|
19
|
+
var _onChange = _a.onChange;
|
|
20
|
+
var columns = [{
|
|
21
|
+
title: 'Name',
|
|
22
|
+
dataIndex: 'title'
|
|
23
|
+
}, {
|
|
24
|
+
title: 'Features',
|
|
25
|
+
dataIndex: 'description'
|
|
26
|
+
}];
|
|
27
|
+
var rowSelection = {
|
|
28
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
29
|
+
return {
|
|
30
|
+
disabled: record.children
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
onChange: function onChange(selectedRowKeys, selectedRow) {
|
|
34
|
+
_onChange({
|
|
35
|
+
value: selectedRowKeys[0],
|
|
36
|
+
name: selectedRow[0].title
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
type: 'radio'
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
style: {
|
|
43
|
+
padding: '10px 0'
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement(Search, {
|
|
46
|
+
enterButton: true,
|
|
47
|
+
onSearch: function onSearch() {},
|
|
48
|
+
placeholder: "Api Name"
|
|
49
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
50
|
+
bordered: false,
|
|
51
|
+
columns: columns,
|
|
52
|
+
dataSource: _const.source,
|
|
53
|
+
defaultExpandAllRows: true,
|
|
54
|
+
pagination: false,
|
|
55
|
+
rowKey: "title",
|
|
56
|
+
rowSelection: rowSelection,
|
|
57
|
+
scroll: {
|
|
58
|
+
y: 480
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
@@ -39,6 +39,8 @@ var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductT
|
|
|
39
39
|
|
|
40
40
|
var _AffiliateStore = _interopRequireDefault(require("./AffiliateStore"));
|
|
41
41
|
|
|
42
|
+
var _MiniAppApi = _interopRequireDefault(require("./MiniAppApi"));
|
|
43
|
+
|
|
42
44
|
var _locale = require("../../locale");
|
|
43
45
|
|
|
44
46
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -368,6 +370,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
368
370
|
onChange: function onChange(value) {
|
|
369
371
|
return setLinkUrl(value);
|
|
370
372
|
}
|
|
373
|
+
}), item.linkTypeCode === 'MiniApi' && /*#__PURE__*/_react["default"].createElement(_MiniAppApi["default"], {
|
|
374
|
+
onChange: function onChange(value) {
|
|
375
|
+
return setLinkUrl(value);
|
|
376
|
+
}
|
|
371
377
|
}));
|
|
372
378
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
373
379
|
className: "footer"
|
package/lib/constants/index.js
CHANGED
|
@@ -194,6 +194,18 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
194
194
|
};
|
|
195
195
|
break;
|
|
196
196
|
|
|
197
|
+
case _constants.urlTypeMap.MINI_API:
|
|
198
|
+
// 小程序API,演示使用
|
|
199
|
+
link = "mpaas://miniapp?api=" + value.replace('my.', '');
|
|
200
|
+
params = {
|
|
201
|
+
action: 'jump',
|
|
202
|
+
params: {
|
|
203
|
+
type: 'MINI_API',
|
|
204
|
+
url: value
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
break;
|
|
208
|
+
|
|
197
209
|
default:
|
|
198
210
|
var map = {
|
|
199
211
|
'/main/cart': 'CART',
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|