@king-design/intact 2.1.0 → 2.1.2
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/components/dropdown/dropdown.ts +35 -70
- package/components/dropdown/index.spec.ts +53 -4
- package/components/dropdown/item.ts +15 -5
- package/components/dropdown/menu.ts +3 -3
- package/components/dropdown/usePosition.ts +3 -0
- package/components/form/index.spec.ts +22 -1
- package/components/menu/demos/collapse.md +1 -1
- package/components/menu/index.spec.ts +9 -1
- package/components/menu/item.ts +7 -0
- package/components/pagination/index.spec.ts +23 -0
- package/components/pagination/index.ts +3 -1
- package/components/tooltip/content.ts +15 -1
- package/components/tooltip/content.vdt +6 -1
- package/components/tooltip/index.spec.ts +87 -1
- package/components/tooltip/styles.ts +1 -1
- package/components/tooltip/tooltip.ts +11 -0
- package/components/virtual.ts +98 -0
- package/es/components/dropdown/dropdown.d.ts +6 -5
- package/es/components/dropdown/dropdown.js +42 -69
- package/es/components/dropdown/index.spec.js +96 -17
- package/es/components/dropdown/item.d.ts +1 -1
- package/es/components/dropdown/item.js +16 -4
- package/es/components/dropdown/usePosition.js +4 -2
- package/es/components/form/index.spec.js +49 -2
- package/es/components/menu/index.spec.js +26 -15
- package/es/components/menu/item.d.ts +2 -0
- package/es/components/menu/item.js +5 -0
- package/es/components/pagination/index.js +4 -1
- package/es/components/pagination/index.spec.js +49 -0
- package/es/components/tooltip/content.d.ts +1 -0
- package/es/components/tooltip/content.js +18 -1
- package/es/components/tooltip/content.vdt.js +3 -1
- package/es/components/tooltip/index.spec.js +165 -0
- package/es/components/tooltip/styles.d.ts +22 -0
- package/es/components/tooltip/styles.js +1 -1
- package/es/components/tooltip/tooltip.d.ts +1 -0
- package/es/components/tooltip/tooltip.js +16 -1
- package/es/components/virtual.d.ts +8 -0
- package/es/components/virtual.js +126 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/copy/demos/basic/index.d.ts +5 -0
- package/es/site/data/components/copy/demos/basic/index.js +17 -0
- package/es/site/data/components/copy/demos/basic/react.d.ts +4 -0
- package/es/site/data/components/copy/demos/basic/react.js +23 -0
- package/es/site/data/components/copy/demos/children/index.d.ts +6 -0
- package/es/site/data/components/copy/demos/children/index.js +18 -0
- package/es/site/data/components/copy/demos/children/react.d.ts +5 -0
- package/es/site/data/components/copy/demos/children/react.js +44 -0
- package/es/site/data/components/copy/index.d.ts +57 -0
- package/es/site/data/components/copy/index.js +42 -0
- package/es/site/data/components/dialog/demos/basic/react.js +1 -4
- package/es/site/data/components/icon/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/icon/demos/disabled/index.js +18 -0
- package/es/site/data/components/icon/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/icon/demos/disabled/react.js +33 -0
- package/es/site/data/components/input/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/input/demos/flat/index.js +17 -0
- package/es/site/data/components/input/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/input/demos/flat/react.js +29 -0
- package/es/site/data/components/input/demos/showCount/index.d.ts +5 -0
- package/es/site/data/components/input/demos/showCount/index.js +17 -0
- package/es/site/data/components/input/demos/showCount/react.d.ts +4 -0
- package/es/site/data/components/input/demos/showCount/react.js +33 -0
- package/es/site/data/components/menu/demos/collapse/index.js +1 -1
- package/es/site/data/components/menu/demos/collapse/react.js +1 -1
- package/es/site/data/components/pagination/demos/flat/index.d.ts +6 -0
- package/es/site/data/components/pagination/demos/flat/index.js +18 -0
- package/es/site/data/components/pagination/demos/flat/react.d.ts +5 -0
- package/es/site/data/components/pagination/demos/flat/react.js +41 -0
- package/es/site/data/components/popover/demos/basic/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/basic/index.js +28 -0
- package/es/site/data/components/popover/demos/basic/react.d.ts +8 -0
- package/es/site/data/components/popover/demos/basic/react.js +59 -0
- package/es/site/data/components/popover/demos/button/index.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/index.js +42 -0
- package/es/site/data/components/popover/demos/button/react.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/react.js +73 -0
- package/es/site/data/components/popover/demos/content/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/content/index.js +28 -0
- package/es/site/data/components/popover/demos/content/react.d.ts +6 -0
- package/es/site/data/components/popover/demos/content/react.js +43 -0
- package/es/site/data/components/popover/demos/text/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/text/index.js +28 -0
- package/es/site/data/components/popover/demos/text/react.d.ts +6 -0
- package/es/site/data/components/popover/demos/text/react.js +36 -0
- package/es/site/data/components/popover/demos/type/index.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/index.js +34 -0
- package/es/site/data/components/popover/demos/type/react.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/react.js +58 -0
- package/es/site/data/components/popover/index.d.ts +57 -0
- package/es/site/data/components/popover/index.js +42 -0
- package/es/site/data/components/progress/demos/circleSize/index.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/index.js +43 -0
- package/es/site/data/components/progress/demos/circleSize/react.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/react.js +98 -0
- package/es/site/data/components/select/demos/draggable/index.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/index.js +24 -0
- package/es/site/data/components/select/demos/draggable/react.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/react.js +85 -0
- package/es/site/data/components/select/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/select/demos/flat/index.js +17 -0
- package/es/site/data/components/select/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/select/demos/flat/react.js +73 -0
- package/es/site/data/components/select/demos/inline/index.d.ts +5 -0
- package/es/site/data/components/select/demos/inline/index.js +17 -0
- package/es/site/data/components/select/demos/inline/react.d.ts +4 -0
- package/es/site/data/components/select/demos/inline/react.js +27 -0
- package/es/site/data/components/select/demos/nowrap/index.d.ts +5 -0
- package/es/site/data/components/select/demos/nowrap/index.js +17 -0
- package/es/site/data/components/select/demos/nowrap/react.d.ts +4 -0
- package/es/site/data/components/select/demos/nowrap/react.js +41 -0
- package/es/site/data/components/steps/demos/vertical/index.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/index.js +40 -0
- package/es/site/data/components/steps/demos/vertical/react.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/react.js +124 -0
- package/es/site/data/components/switch/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/switch/demos/disabled/index.js +18 -0
- package/es/site/data/components/switch/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/switch/demos/disabled/react.js +27 -0
- package/es/site/data/components/tabs/demos/scroll/index.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/index.js +87 -0
- package/es/site/data/components/tabs/demos/scroll/react.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/react.js +166 -0
- package/es/site/data/components/tag/demos/draggable/index.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/index.js +24 -0
- package/es/site/data/components/tag/demos/draggable/react.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/react.js +62 -0
- package/es/site/data/components/tag/demos/tags/index.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/index.js +39 -0
- package/es/site/data/components/tag/demos/tags/react.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/react.js +83 -0
- package/index.ts +2 -2
- package/package.json +4 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Pagination } from '@king-design/react';
|
|
4
|
+
import './index.styl';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var _proto = Demo.prototype;
|
|
14
|
+
|
|
15
|
+
_proto.render = function render() {
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Pagination, {
|
|
17
|
+
flat: true,
|
|
18
|
+
total: 200,
|
|
19
|
+
size: "large",
|
|
20
|
+
showGoto: true
|
|
21
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
22
|
+
flat: true,
|
|
23
|
+
total: 200,
|
|
24
|
+
showGoto: true
|
|
25
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
26
|
+
flat: true,
|
|
27
|
+
total: 200,
|
|
28
|
+
size: "small",
|
|
29
|
+
showGoto: true
|
|
30
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
31
|
+
flat: true,
|
|
32
|
+
total: 200,
|
|
33
|
+
size: "mini",
|
|
34
|
+
showGoto: true
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return Demo;
|
|
39
|
+
}(React.Component);
|
|
40
|
+
|
|
41
|
+
export { Demo as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
import { Message } from 'kpc';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var _proto = default_1.prototype;
|
|
15
|
+
|
|
16
|
+
_proto.ok = function ok() {
|
|
17
|
+
Message.success('Clicked ok!');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
_proto.cancel = function cancel() {
|
|
21
|
+
Message.info('Clicked cancel!');
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return default_1;
|
|
25
|
+
}(Component);
|
|
26
|
+
|
|
27
|
+
default_1.template = template;
|
|
28
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Popover, Button } from '@king-design/react';
|
|
5
|
+
import { Message } from '@king-design/react';
|
|
6
|
+
|
|
7
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inheritsLoose(Demo, _React$Component);
|
|
9
|
+
|
|
10
|
+
function Demo() {
|
|
11
|
+
var _context;
|
|
12
|
+
|
|
13
|
+
var _this;
|
|
14
|
+
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
20
|
+
_this.popover1 = void 0;
|
|
21
|
+
_this.popover2 = void 0;
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.ok = function ok() {
|
|
28
|
+
Message.success('Clicked ok!');
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
_proto.cancel = function cancel() {
|
|
32
|
+
Message.info('Clicked cancel!');
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
_proto.render = function render() {
|
|
36
|
+
var _this2 = this;
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
39
|
+
title: "\u786E\u5B9A\u5220\u9664\uFF1F",
|
|
40
|
+
onOk: this.ok,
|
|
41
|
+
onCancel: this.cancel,
|
|
42
|
+
ref: function ref(i) {
|
|
43
|
+
return _this2.popover1 = i;
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Button, null, "\u5220\u9664")), ' ', /*#__PURE__*/React.createElement(Popover, {
|
|
46
|
+
title: "\u786E\u5B9A\u5220\u9664\uFF1F",
|
|
47
|
+
content: "\u8FD9\u662F\u4E00\u6BB5\u63CF\u8FF0\u6587\u5B57",
|
|
48
|
+
onOk: this.ok,
|
|
49
|
+
onCancel: this.cancel,
|
|
50
|
+
ref: function ref(i) {
|
|
51
|
+
return _this2.popover2 = i;
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Button, null, "\u5220\u9664")));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return Demo;
|
|
57
|
+
}(React.Component);
|
|
58
|
+
|
|
59
|
+
export { Demo as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
export { default as data } from './index.json';
|
|
4
|
+
import { Component } from 'intact';
|
|
5
|
+
import template from './index.vdt';
|
|
6
|
+
import { Message, bind } from 'kpc';
|
|
7
|
+
|
|
8
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inheritsLoose(default_1, _Component);
|
|
10
|
+
|
|
11
|
+
function default_1() {
|
|
12
|
+
return _Component.apply(this, arguments) || this;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var _proto = default_1.prototype;
|
|
16
|
+
|
|
17
|
+
_proto.remove = function remove() {
|
|
18
|
+
Message.warning("Clicked remove!");
|
|
19
|
+
this.refs.popover.hide();
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
_proto.moveToTrash = function moveToTrash() {
|
|
23
|
+
Message.success('Clicked move to trash!');
|
|
24
|
+
this.refs.popover.hide();
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
_proto.cancel = function cancel() {
|
|
28
|
+
Message.info('Clicked cancel!');
|
|
29
|
+
this.refs.popover.hide();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return default_1;
|
|
33
|
+
}(Component);
|
|
34
|
+
|
|
35
|
+
default_1.template = template;
|
|
36
|
+
export { default_1 as default };
|
|
37
|
+
|
|
38
|
+
__decorate([bind], default_1.prototype, "remove", null);
|
|
39
|
+
|
|
40
|
+
__decorate([bind], default_1.prototype, "moveToTrash", null);
|
|
41
|
+
|
|
42
|
+
__decorate([bind], default_1.prototype, "cancel", null);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import { __decorate } from "tslib";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Popover, Button } from '@king-design/react';
|
|
6
|
+
import { Message, bind } from '@king-design/react';
|
|
7
|
+
|
|
8
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
9
|
+
_inheritsLoose(Demo, _React$Component);
|
|
10
|
+
|
|
11
|
+
function Demo() {
|
|
12
|
+
var _context;
|
|
13
|
+
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
21
|
+
_this.popover = void 0;
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.remove = function remove() {
|
|
28
|
+
Message.warning("Clicked remove!");
|
|
29
|
+
this.popover.hide();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
_proto.moveToTrash = function moveToTrash() {
|
|
33
|
+
Message.success('Clicked move to trash!');
|
|
34
|
+
this.popover.hide();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
_proto.cancel = function cancel() {
|
|
38
|
+
Message.info('Clicked cancel!');
|
|
39
|
+
this.popover.hide();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
_proto.render = function render() {
|
|
43
|
+
var _this2 = this;
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
46
|
+
title: "\u786E\u5B9A\u5220\u9664\uFF1F",
|
|
47
|
+
ref: function ref(i) {
|
|
48
|
+
return _this2.popover = i;
|
|
49
|
+
},
|
|
50
|
+
slotFooter: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
51
|
+
size: "small",
|
|
52
|
+
onClick: this.cancel
|
|
53
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
54
|
+
size: "small",
|
|
55
|
+
onClick: this.remove
|
|
56
|
+
}, "\u6C38\u4E45\u5220\u9664"), /*#__PURE__*/React.createElement(Button, {
|
|
57
|
+
size: "small",
|
|
58
|
+
type: "primary",
|
|
59
|
+
onClick: this.moveToTrash
|
|
60
|
+
}, "\u79FB\u5230\u56DE\u6536\u7AD9"))
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Button, null, "\u5220\u9664")));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return Demo;
|
|
65
|
+
}(React.Component);
|
|
66
|
+
|
|
67
|
+
export { Demo as default };
|
|
68
|
+
|
|
69
|
+
__decorate([bind], Demo.prototype, "remove", null);
|
|
70
|
+
|
|
71
|
+
__decorate([bind], Demo.prototype, "moveToTrash", null);
|
|
72
|
+
|
|
73
|
+
__decorate([bind], Demo.prototype, "cancel", null);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
import { Message } from 'kpc';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var _proto = default_1.prototype;
|
|
15
|
+
|
|
16
|
+
_proto.ok = function ok() {
|
|
17
|
+
Message.success('Clicked ok!');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
_proto.cancel = function cancel() {
|
|
21
|
+
Message.info('Clicked cancel!');
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return default_1;
|
|
25
|
+
}(Component);
|
|
26
|
+
|
|
27
|
+
default_1.template = template;
|
|
28
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Popover, Button } from '@king-design/react';
|
|
4
|
+
import { Message } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var _proto = Demo.prototype;
|
|
14
|
+
|
|
15
|
+
_proto.ok = function ok() {
|
|
16
|
+
Message.success('Clicked ok!');
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
_proto.cancel = function cancel() {
|
|
20
|
+
Message.info('Clicked cancel!');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
_proto.render = function render() {
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
25
|
+
onOk: this.ok,
|
|
26
|
+
onCancel: this.cancel,
|
|
27
|
+
slotTitle: /*#__PURE__*/React.createElement(React.Fragment, null, "\u662F\u5426\u786E\u8BA4", /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
style: {
|
|
29
|
+
"color": "red"
|
|
30
|
+
}
|
|
31
|
+
}, "\u5220\u9664"), "\uFF1F"),
|
|
32
|
+
slotContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
style: {
|
|
34
|
+
"color": "red"
|
|
35
|
+
}
|
|
36
|
+
}, "\u5220\u9664"), "\u662F\u4E00\u4E2A\u5371\u9669\u64CD\u4F5C\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C")
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Button, null, "\u5220\u9664")));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return Demo;
|
|
41
|
+
}(React.Component);
|
|
42
|
+
|
|
43
|
+
export { Demo as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
import { Message } from 'kpc';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var _proto = default_1.prototype;
|
|
15
|
+
|
|
16
|
+
_proto.ok = function ok() {
|
|
17
|
+
Message.success('Clicked ok!');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
_proto.cancel = function cancel() {
|
|
21
|
+
Message.info('Clicked cancel!');
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return default_1;
|
|
25
|
+
}(Component);
|
|
26
|
+
|
|
27
|
+
default_1.template = template;
|
|
28
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Popover, Button } from '@king-design/react';
|
|
4
|
+
import { Message } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var _proto = Demo.prototype;
|
|
14
|
+
|
|
15
|
+
_proto.ok = function ok() {
|
|
16
|
+
Message.success('Clicked ok!');
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
_proto.cancel = function cancel() {
|
|
20
|
+
Message.info('Clicked cancel!');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
_proto.render = function render() {
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
25
|
+
title: "\u786E\u5B9A\u5220\u9664\uFF1F",
|
|
26
|
+
onOk: this.ok,
|
|
27
|
+
onCancel: this.cancel,
|
|
28
|
+
okText: "confirm",
|
|
29
|
+
cancelText: "cancel"
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Button, null, "\u5220\u9664")));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return Demo;
|
|
34
|
+
}(React.Component);
|
|
35
|
+
|
|
36
|
+
export { Demo as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
types: ('info' | 'success' | 'error' | 'warning')[];
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): Props;
|
|
9
|
+
ok(): void;
|
|
10
|
+
cancel(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
import { Message } from 'kpc';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
default_1.defaults = function defaults() {
|
|
15
|
+
return {
|
|
16
|
+
types: ['info', 'success', 'error', 'warning']
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _proto = default_1.prototype;
|
|
21
|
+
|
|
22
|
+
_proto.ok = function ok() {
|
|
23
|
+
Message.success('Clicked ok!');
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
_proto.cancel = function cancel() {
|
|
27
|
+
Message.info('Clicked cancel!');
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return default_1;
|
|
31
|
+
}(Component);
|
|
32
|
+
|
|
33
|
+
default_1.template = template;
|
|
34
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
types: ('info' | 'success' | 'error' | 'warning')[];
|
|
4
|
+
}
|
|
5
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
+
state: Props;
|
|
7
|
+
ok(): void;
|
|
8
|
+
cancel(): void;
|
|
9
|
+
render(): JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Popover, Button, ButtonGroup } from '@king-design/react';
|
|
6
|
+
import { Message } from '@king-design/react';
|
|
7
|
+
|
|
8
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
9
|
+
_inheritsLoose(Demo, _React$Component);
|
|
10
|
+
|
|
11
|
+
function Demo() {
|
|
12
|
+
var _context;
|
|
13
|
+
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
21
|
+
_this.state = {
|
|
22
|
+
types: ['info', 'success', 'error', 'warning']
|
|
23
|
+
};
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _proto = Demo.prototype;
|
|
28
|
+
|
|
29
|
+
_proto.ok = function ok() {
|
|
30
|
+
Message.success('Clicked ok!');
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
_proto.cancel = function cancel() {
|
|
34
|
+
Message.info('Clicked cancel!');
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
_proto.render = function render() {
|
|
38
|
+
var _context2,
|
|
39
|
+
_this2 = this;
|
|
40
|
+
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonGroup, null, _mapInstanceProperty(_context2 = this.state.types).call(_context2, function ($value, $key) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
43
|
+
key: $value,
|
|
44
|
+
title: "\u786E\u5B9A\u5220\u9664\uFF1F",
|
|
45
|
+
type: $value,
|
|
46
|
+
onOk: _this2.ok,
|
|
47
|
+
onCancel: _this2.cancel
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
49
|
+
"data-type": $value,
|
|
50
|
+
value: $value
|
|
51
|
+
}, $value));
|
|
52
|
+
})));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return Demo;
|
|
56
|
+
}(React.Component);
|
|
57
|
+
|
|
58
|
+
export { Demo as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Component } from 'intact';
|
|
2
|
+
import Article from '~/../src/components/article';
|
|
3
|
+
export default class extends Article {
|
|
4
|
+
static sidebar: {
|
|
5
|
+
组件: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
order: number;
|
|
9
|
+
sidebar: string;
|
|
10
|
+
path: string;
|
|
11
|
+
}[];
|
|
12
|
+
undefined: ({
|
|
13
|
+
title: string;
|
|
14
|
+
order: number;
|
|
15
|
+
sidebar: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
path: string;
|
|
18
|
+
} | {
|
|
19
|
+
title: string;
|
|
20
|
+
order: number;
|
|
21
|
+
sidebar: string;
|
|
22
|
+
path: string;
|
|
23
|
+
disabled?: undefined;
|
|
24
|
+
})[];
|
|
25
|
+
};
|
|
26
|
+
static data: {
|
|
27
|
+
setting: {
|
|
28
|
+
title: string;
|
|
29
|
+
category: string;
|
|
30
|
+
order: number;
|
|
31
|
+
sidebar: string;
|
|
32
|
+
};
|
|
33
|
+
contents: string;
|
|
34
|
+
index: string;
|
|
35
|
+
catalogs: {
|
|
36
|
+
text: string;
|
|
37
|
+
level: number;
|
|
38
|
+
id: string;
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
static defaults: () => {
|
|
42
|
+
demos: Component<any, {}, {}, {}>[];
|
|
43
|
+
setting: {
|
|
44
|
+
title: string;
|
|
45
|
+
category: string;
|
|
46
|
+
order: number;
|
|
47
|
+
sidebar: string;
|
|
48
|
+
};
|
|
49
|
+
contents: string;
|
|
50
|
+
index: string;
|
|
51
|
+
catalogs: {
|
|
52
|
+
text: string;
|
|
53
|
+
level: number;
|
|
54
|
+
id: string;
|
|
55
|
+
}[];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
3
|
+
import _keysInstanceProperty from "@babel/runtime-corejs3/core-js/instance/keys";
|
|
4
|
+
import _startsWithInstanceProperty from "@babel/runtime-corejs3/core-js/instance/starts-with";
|
|
5
|
+
import Article from '~/../src/components/article';
|
|
6
|
+
import data from './index.json';
|
|
7
|
+
import sidebar from '~/doc.json';
|
|
8
|
+
|
|
9
|
+
var r = require.context('./', true, /demos.*(index|demo).ts/);
|
|
10
|
+
|
|
11
|
+
var keys = _keysInstanceProperty(r).call(r);
|
|
12
|
+
|
|
13
|
+
var demos = [];
|
|
14
|
+
|
|
15
|
+
for (var i = 0; i < keys.length; i++) {
|
|
16
|
+
var file = keys[i];
|
|
17
|
+
if (!_startsWithInstanceProperty(file).call(file, '.')) continue; // if we found demo.js then ignore index.js
|
|
18
|
+
|
|
19
|
+
if (/demo.ts$/.test(file)) i++;
|
|
20
|
+
demos.push(r(file));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var default_1 = /*#__PURE__*/function (_Article) {
|
|
24
|
+
_inheritsLoose(default_1, _Article);
|
|
25
|
+
|
|
26
|
+
function default_1() {
|
|
27
|
+
return _Article.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return default_1;
|
|
31
|
+
}(Article);
|
|
32
|
+
|
|
33
|
+
default_1.sidebar = sidebar;
|
|
34
|
+
default_1.data = data;
|
|
35
|
+
|
|
36
|
+
default_1.defaults = function () {
|
|
37
|
+
return _extends({}, Article.defaults, data, {
|
|
38
|
+
demos: demos
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { default_1 as default };
|