@king-design/intact 2.0.10 → 2.0.11
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/dialog/demos/block.md +4 -4
- package/components/dialog/useEscClosable.ts +1 -1
- package/es/components/dialog/useEscClosable.js +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/packages/kpc-react/__tests__/components/drawer.spec.js +13 -6
- package/es/site/data/components/dialog/demos/block/react.js +4 -4
- package/index.ts +2 -2
- package/package.json +3 -3
|
@@ -105,13 +105,13 @@ export default class Demo extends React.Component {
|
|
|
105
105
|
>Show No Footer Dialog</Button>
|
|
106
106
|
<Dialog value={this.state.show}
|
|
107
107
|
onChangeValue={(show) => this.setState({show})}
|
|
108
|
-
|
|
108
|
+
slotHeader={
|
|
109
109
|
<div className="k-title">
|
|
110
110
|
<i className="ion-person"></i>
|
|
111
111
|
Custom Header
|
|
112
112
|
</div>
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
slotFooter={
|
|
115
115
|
<React.Fragment>
|
|
116
116
|
Custom Footer
|
|
117
117
|
<Button type="primary" onClick={() => this.setState({show: false})}>确认</Button>
|
|
@@ -124,8 +124,8 @@ export default class Demo extends React.Component {
|
|
|
124
124
|
<Dialog value={this.state.show1}
|
|
125
125
|
onChangeValue={(show1) => this.setState({show1})}
|
|
126
126
|
title="No Footer"
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
slotBody="body"
|
|
128
|
+
slotFooterWrapper=""
|
|
129
129
|
>
|
|
130
130
|
</Dialog>
|
|
131
131
|
</div>
|
|
@@ -32,7 +32,7 @@ export function useEscClosable() {
|
|
|
32
32
|
throw new Error('The dialog has handled hide callback. Maybe it is a bug of KPC');
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
dialogs.splice(
|
|
35
|
+
dialogs.splice(index, 1);
|
|
36
36
|
|
|
37
37
|
if (!dialogs.length) {
|
|
38
38
|
document.removeEventListener('keydown', escClose);
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.11
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,4 +57,4 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.0.
|
|
60
|
+
export declare const version = "2.0.11";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.11
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,5 +59,5 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.0.
|
|
62
|
+
export var version = '2.0.11';
|
|
63
63
|
/* generate end */
|
|
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import * as ReactDOM from 'react-dom';
|
|
6
|
-
import { Drawer, Card } from '../../';
|
|
6
|
+
import { Drawer, Card, Button } from '../../';
|
|
7
7
|
import { Component } from 'intact-react';
|
|
8
8
|
import { wait, dispatchEvent } from '../../../../test/utils';
|
|
9
9
|
describe('Drawer', function () {
|
|
@@ -68,7 +68,15 @@ describe('Drawer', function () {
|
|
|
68
68
|
}, "click")), /*#__PURE__*/React.createElement(Drawer, {
|
|
69
69
|
value: true,
|
|
70
70
|
placement: "left",
|
|
71
|
-
title: "2"
|
|
71
|
+
title: "2",
|
|
72
|
+
onClose: function onClose() {
|
|
73
|
+
return console.log('click');
|
|
74
|
+
},
|
|
75
|
+
slotFooter: /*#__PURE__*/React.createElement(Button, {
|
|
76
|
+
onClick: function onClick(e) {
|
|
77
|
+
return console.log(1);
|
|
78
|
+
}
|
|
79
|
+
}, "click")
|
|
72
80
|
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
73
81
|
className: "click",
|
|
74
82
|
onClick: click2
|
|
@@ -85,11 +93,10 @@ describe('Drawer', function () {
|
|
|
85
93
|
return wait();
|
|
86
94
|
|
|
87
95
|
case 13:
|
|
88
|
-
expect(click2.callCount).to.eql(1);
|
|
89
|
-
|
|
90
|
-
document.body.removeChild(container);
|
|
96
|
+
expect(click2.callCount).to.eql(1); // ReactDOM.unmountComponentAtNode(container);
|
|
97
|
+
// document.body.removeChild(container);
|
|
91
98
|
|
|
92
|
-
case
|
|
99
|
+
case 14:
|
|
93
100
|
case "end":
|
|
94
101
|
return _context2.stop();
|
|
95
102
|
}
|
|
@@ -50,12 +50,12 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
50
50
|
show: show
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
slotHeader: /*#__PURE__*/React.createElement("div", {
|
|
54
54
|
className: "k-title"
|
|
55
55
|
}, /*#__PURE__*/React.createElement("i", {
|
|
56
56
|
className: "ion-person"
|
|
57
57
|
}), "Custom Header"),
|
|
58
|
-
|
|
58
|
+
slotFooter: /*#__PURE__*/React.createElement(React.Fragment, null, "Custom Footer", /*#__PURE__*/React.createElement(Button, {
|
|
59
59
|
type: "primary",
|
|
60
60
|
onClick: function onClick() {
|
|
61
61
|
return _this2.setState({
|
|
@@ -77,8 +77,8 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
title: "No Footer",
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
slotBody: "body",
|
|
81
|
+
slotFooterWrapper: ""
|
|
82
82
|
}));
|
|
83
83
|
};
|
|
84
84
|
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.11
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -62,6 +62,6 @@ export * from './components/treeSelect';
|
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
64
|
|
|
65
|
-
export const version = '2.0.
|
|
65
|
+
export const version = '2.0.11';
|
|
66
66
|
|
|
67
67
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"highlight.js": "^10.4.1",
|
|
117
117
|
"history": "^5.0.0",
|
|
118
118
|
"html-webpack-plugin": "5.3.1",
|
|
119
|
-
"intact-react": "^3.0.
|
|
119
|
+
"intact-react": "^3.0.12",
|
|
120
120
|
"istanbul-instrumenter-loader": "^3.0.0",
|
|
121
121
|
"js-yaml": "^4.1.0",
|
|
122
122
|
"karma": "^6.3.2",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"dayjs": "^1.10.7",
|
|
179
179
|
"downloadjs": "^1.4.7",
|
|
180
180
|
"enquire.js": "^2.1.6",
|
|
181
|
-
"intact": "^3.0.
|
|
181
|
+
"intact": "^3.0.12",
|
|
182
182
|
"monaco-editor": "^0.26.1",
|
|
183
183
|
"mxgraphx": "^4.0.7",
|
|
184
184
|
"resize-observer-polyfill": "^1.5.1",
|