@king-design/intact 3.4.3-beta.1 → 3.4.3
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/button/demos/disabled.md +14 -3
- package/components/button/index.vdt +1 -1
- package/components/button/styles.ts +14 -1
- package/components/dialog/styles.ts +3 -3
- package/components/dropdown/item.ts +7 -2
- package/components/editable/demos/textarea.md +53 -0
- package/components/editable/index.md +7 -1
- package/components/editable/index.spec.ts +27 -0
- package/components/editable/index.ts +4 -1
- package/components/editable/index.vdt +13 -4
- package/components/editable/styles.ts +1 -1
- package/components/ellipsis/demos/hoverable.md +23 -0
- package/components/ellipsis/index.ts +4 -1
- package/components/ellipsis/index.vdt +3 -1
- package/components/input/demos/size.md +9 -1
- package/components/input/styles.ts +12 -2
- package/components/select/base.ts +6 -1
- package/components/select/base.vdt +2 -1
- package/components/select/demos/immutable.md +38 -0
- package/components/select/index.spec.ts +31 -0
- package/components/select/useImmutable.ts +44 -0
- package/components/switch/styles.ts +5 -0
- package/components/table/cell.ts +1 -0
- package/components/table/cell.vdt +9 -2
- package/components/table/column.ts +2 -0
- package/components/table/demos/asyncTree.md +70 -0
- package/components/table/demos/ellipsis.md +29 -0
- package/components/table/demos/fixFooter.md +52 -0
- package/components/table/demos/footer.md +38 -0
- package/components/table/index.md +4 -0
- package/components/table/row.ts +26 -17
- package/components/table/row.vdt +2 -2
- package/components/table/styles.ts +24 -3
- package/components/table/table.ts +5 -0
- package/components/table/table.vdt +15 -2
- package/components/table/useTree.ts +9 -2
- package/components/tooltip/demos/content.md +17 -2
- package/components/tooltip/index.spec.ts +21 -2
- package/components/tooltip/tooltip.ts +2 -0
- package/components/treeSelect/demos/basic.md +1 -0
- package/components/treeSelect/index.vdt +1 -0
- package/es/components/button/index.vdt.js +1 -1
- package/es/components/button/styles.js +3 -3
- package/es/components/diagram/shapes/callout.d.ts +1 -1
- package/es/components/diagram/shapes/circle.d.ts +1 -1
- package/es/components/diagram/shapes/document.d.ts +1 -1
- package/es/components/diagram/shapes/ellipse.d.ts +1 -1
- package/es/components/diagram/shapes/hexagon.d.ts +1 -1
- package/es/components/diagram/shapes/image.d.ts +1 -1
- package/es/components/diagram/shapes/parallelogram.d.ts +1 -1
- package/es/components/diagram/shapes/rectangle.d.ts +1 -1
- package/es/components/diagram/shapes/square.d.ts +1 -1
- package/es/components/diagram/shapes/text.d.ts +1 -1
- package/es/components/dialog/styles.js +3 -3
- package/es/components/dropdown/item.js +5 -2
- package/es/components/editable/index.d.ts +2 -0
- package/es/components/editable/index.js +4 -2
- package/es/components/editable/index.spec.js +39 -0
- package/es/components/editable/index.vdt.js +17 -6
- package/es/components/editable/styles.d.ts +1 -0
- package/es/components/editable/styles.js +3 -0
- package/es/components/ellipsis/index.d.ts +1 -0
- package/es/components/ellipsis/index.js +4 -2
- package/es/components/ellipsis/index.vdt.js +3 -1
- package/es/components/input/styles.js +11 -1
- package/es/components/select/base.d.ts +4 -0
- package/es/components/select/base.js +11 -1
- package/es/components/select/base.vdt.js +2 -1
- package/es/components/select/index.spec.js +47 -0
- package/es/components/select/useImmutable.d.ts +4 -0
- package/es/components/select/useImmutable.js +45 -0
- package/es/components/switch/styles.js +1 -1
- package/es/components/table/cell.d.ts +1 -0
- package/es/components/table/cell.vdt.js +14 -3
- package/es/components/table/column.d.ts +1 -0
- package/es/components/table/column.js +1 -0
- package/es/components/table/row.d.ts +2 -1
- package/es/components/table/row.js +24 -15
- package/es/components/table/row.vdt.js +3 -1
- package/es/components/table/styles.js +2 -2
- package/es/components/table/table.d.ts +3 -0
- package/es/components/table/table.js +3 -1
- package/es/components/table/table.vdt.js +19 -3
- package/es/components/table/useTree.d.ts +1 -1
- package/es/components/table/useTree.js +30 -2
- package/es/components/tooltip/index.spec.js +99 -67
- package/es/components/tooltip/tooltip.d.ts +1 -0
- package/es/components/tooltip/tooltip.js +9 -1
- package/es/components/treeSelect/index.vdt.js +1 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/button/demos/disabled/index.d.ts +1 -0
- package/es/site/data/components/button/demos/disabled/index.js +1 -0
- package/es/site/data/components/button/demos/disabled/react.d.ts +1 -0
- package/es/site/data/components/button/demos/disabled/react.js +27 -8
- package/es/site/data/components/editable/demos/textarea/index.d.ts +16 -0
- package/es/site/data/components/editable/demos/textarea/index.js +21 -0
- package/es/site/data/components/editable/demos/textarea/react.d.ts +17 -0
- package/es/site/data/components/editable/demos/textarea/react.js +72 -0
- package/es/site/data/components/ellipsis/demos/hoverable/index.d.ts +6 -0
- package/es/site/data/components/ellipsis/demos/hoverable/index.js +14 -0
- package/es/site/data/components/ellipsis/demos/hoverable/react.d.ts +5 -0
- package/es/site/data/components/ellipsis/demos/hoverable/react.js +21 -0
- package/es/site/data/components/input/demos/size/react.js +20 -0
- package/es/site/data/components/select/demos/immutable/index.d.ts +9 -0
- package/es/site/data/components/select/demos/immutable/index.js +18 -0
- package/es/site/data/components/select/demos/immutable/react.d.ts +9 -0
- package/es/site/data/components/select/demos/immutable/react.js +53 -0
- package/es/site/data/components/table/demos/asyncTree/index.d.ts +20 -0
- package/es/site/data/components/table/demos/asyncTree/index.js +53 -0
- package/es/site/data/components/table/demos/asyncTree/react.d.ts +20 -0
- package/es/site/data/components/table/demos/asyncTree/react.js +76 -0
- package/es/site/data/components/table/demos/ellipsis/index.d.ts +11 -0
- package/es/site/data/components/table/demos/ellipsis/index.js +24 -0
- package/es/site/data/components/table/demos/ellipsis/react.d.ts +10 -0
- package/es/site/data/components/table/demos/ellipsis/react.js +43 -0
- package/es/site/data/components/table/demos/fixFooter/index.d.ts +6 -0
- package/es/site/data/components/table/demos/fixFooter/index.js +14 -0
- package/es/site/data/components/table/demos/fixFooter/react.d.ts +5 -0
- package/es/site/data/components/table/demos/fixFooter/react.js +69 -0
- package/es/site/data/components/table/demos/footer/index.d.ts +12 -0
- package/es/site/data/components/table/demos/footer/index.js +25 -0
- package/es/site/data/components/table/demos/footer/react.d.ts +11 -0
- package/es/site/data/components/table/demos/footer/react.js +46 -0
- package/es/site/data/components/tooltip/demos/content/index.d.ts +2 -0
- package/es/site/data/components/tooltip/demos/content/index.js +3 -1
- package/es/site/data/components/tooltip/demos/content/react.d.ts +2 -0
- package/es/site/data/components/tooltip/demos/content/react.js +21 -3
- package/es/site/data/components/treeSelect/demos/basic/react.js +2 -1
- package/index.ts +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
3
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
4
|
import { Dropdown } from '../dropdown/dropdown';
|
|
4
5
|
import { _$ } from '../../i18n';
|
|
5
6
|
import { themes } from './styles';
|
|
@@ -39,7 +40,14 @@ var events = _extends({}, Dropdown.events, {
|
|
|
39
40
|
export var Tooltip = /*#__PURE__*/function (_Dropdown) {
|
|
40
41
|
_inheritsLoose(Tooltip, _Dropdown);
|
|
41
42
|
function Tooltip() {
|
|
42
|
-
|
|
43
|
+
var _context;
|
|
44
|
+
var _this;
|
|
45
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46
|
+
args[_key] = arguments[_key];
|
|
47
|
+
}
|
|
48
|
+
_this = _Dropdown.call.apply(_Dropdown, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
49
|
+
_this.$isTooltip = true;
|
|
50
|
+
return _this;
|
|
43
51
|
}
|
|
44
52
|
var _proto = Tooltip.prototype;
|
|
45
53
|
_proto.show = function show(shouldFocus) {
|
|
@@ -43,6 +43,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
43
43
|
'multiple': multiple,
|
|
44
44
|
'selectable': !checkbox,
|
|
45
45
|
'load': load,
|
|
46
|
+
'showLine': showLine,
|
|
46
47
|
'filter': filterable ? _filterInstanceProperty(this) : null,
|
|
47
48
|
'ev-transitionEnd': this.position
|
|
48
49
|
}, null, treeRef)
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.4.3
|
|
2
|
+
* @king-design v3.4.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -64,4 +64,4 @@ export * from './components/treeSelect';
|
|
|
64
64
|
export * from './components/upload';
|
|
65
65
|
export * from './components/view';
|
|
66
66
|
export * from './components/wave';
|
|
67
|
-
export declare const version = "3.4.3
|
|
67
|
+
export declare const version = "3.4.3";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.4.3
|
|
2
|
+
* @king-design v3.4.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -65,5 +65,5 @@ export * from './components/treeSelect';
|
|
|
65
65
|
export * from './components/upload';
|
|
66
66
|
export * from './components/view';
|
|
67
67
|
export * from './components/wave';
|
|
68
|
-
export var version = '3.4.3
|
|
68
|
+
export var version = '3.4.3';
|
|
69
69
|
/* generate end */
|
|
@@ -2,6 +2,7 @@ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
|
2
2
|
export { default as data } from './index.json';
|
|
3
3
|
import { Component } from 'intact';
|
|
4
4
|
import template from './index.vdt';
|
|
5
|
+
import './index.styl';
|
|
5
6
|
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
7
|
_inheritsLoose(default_1, _Component);
|
|
7
8
|
function default_1() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Button, Icon } from '@king-design/react';
|
|
4
|
+
import './index.styl';
|
|
4
5
|
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
5
6
|
_inheritsLoose(Demo, _React$Component);
|
|
6
7
|
function Demo() {
|
|
@@ -11,21 +12,39 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
11
12
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
12
13
|
disabled: true
|
|
13
14
|
}, "disabled"), /*#__PURE__*/React.createElement(Button, {
|
|
14
|
-
disabled: true,
|
|
15
|
-
type: "none"
|
|
16
|
-
}, "disabled text"), /*#__PURE__*/React.createElement(Button, {
|
|
17
15
|
disabled: true,
|
|
18
16
|
icon: true,
|
|
19
17
|
circle: true
|
|
20
18
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
21
19
|
className: "k-icon-search"
|
|
22
20
|
})), /*#__PURE__*/React.createElement(Button, {
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
type: "primary",
|
|
22
|
+
disabled: true
|
|
23
|
+
}, "primary"), /*#__PURE__*/React.createElement(Button, {
|
|
24
|
+
type: "secondary",
|
|
25
|
+
disabled: true
|
|
26
|
+
}, "secondary"), /*#__PURE__*/React.createElement(Button, {
|
|
27
|
+
type: "warning",
|
|
28
|
+
disabled: true
|
|
29
|
+
}, "warning"), /*#__PURE__*/React.createElement(Button, {
|
|
30
|
+
type: "danger",
|
|
31
|
+
disabled: true
|
|
32
|
+
}, "danger"), /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
type: "success",
|
|
34
|
+
disabled: true
|
|
35
|
+
}, "success"), /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
type: "none",
|
|
37
|
+
disabled: true
|
|
38
|
+
}, "none"), /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
type: "link",
|
|
40
|
+
disabled: true
|
|
25
41
|
}, "link"), /*#__PURE__*/React.createElement(Button, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, "flat")
|
|
42
|
+
type: "flat",
|
|
43
|
+
disabled: true
|
|
44
|
+
}, "flat"), /*#__PURE__*/React.createElement(Button, {
|
|
45
|
+
color: "red",
|
|
46
|
+
disabled: true
|
|
47
|
+
}, "custom"));
|
|
29
48
|
};
|
|
30
49
|
return Demo;
|
|
31
50
|
}(React.Component);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import './index.styl';
|
|
4
|
+
interface Props {
|
|
5
|
+
text?: string;
|
|
6
|
+
text2?: string;
|
|
7
|
+
text3?: string;
|
|
8
|
+
}
|
|
9
|
+
export default class extends Component<Props> {
|
|
10
|
+
static template: string | import("intact").Template<any>;
|
|
11
|
+
static defaults(): {
|
|
12
|
+
text: string;
|
|
13
|
+
text2: string;
|
|
14
|
+
text3: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 './index.styl';
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
function default_1() {
|
|
9
|
+
return _Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
default_1.defaults = function defaults() {
|
|
12
|
+
return {
|
|
13
|
+
text: 'editable text auto',
|
|
14
|
+
text2: 'editable text for 5 rows',
|
|
15
|
+
text3: 'editable text for many rows'
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
return default_1;
|
|
19
|
+
}(Component);
|
|
20
|
+
default_1.template = template;
|
|
21
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.styl';
|
|
3
|
+
interface Props {
|
|
4
|
+
text?: string;
|
|
5
|
+
text2?: string;
|
|
6
|
+
text3?: string;
|
|
7
|
+
}
|
|
8
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
9
|
+
state: {
|
|
10
|
+
text: string;
|
|
11
|
+
text2: string;
|
|
12
|
+
text3: string;
|
|
13
|
+
};
|
|
14
|
+
private __test;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { Editable } from '@king-design/react';
|
|
5
|
+
import './index.styl';
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
function Demo() {
|
|
9
|
+
var _context;
|
|
10
|
+
var _this;
|
|
11
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12
|
+
args[_key] = arguments[_key];
|
|
13
|
+
}
|
|
14
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
|
+
_this.state = {
|
|
16
|
+
text: 'editable text auto',
|
|
17
|
+
text2: 'editable text for 5 rows',
|
|
18
|
+
text3: 'editable text for many rows'
|
|
19
|
+
};
|
|
20
|
+
_this.__test = void 0;
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
var _proto = Demo.prototype;
|
|
24
|
+
_proto.render = function render() {
|
|
25
|
+
var _this2 = this;
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Editable, {
|
|
27
|
+
value: this.state.text,
|
|
28
|
+
onChangeValue: function onChangeValue(text) {
|
|
29
|
+
return _this2.setState({
|
|
30
|
+
text: text
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
ref: function ref(i) {
|
|
34
|
+
return _this2.__test = i;
|
|
35
|
+
},
|
|
36
|
+
rows: "auto"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
38
|
+
className: "ion-ios-location"
|
|
39
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
40
|
+
href: ""
|
|
41
|
+
}, this.state.text)), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Editable, {
|
|
42
|
+
value: this.state.text2,
|
|
43
|
+
onChangeValue: function onChangeValue(text2) {
|
|
44
|
+
return _this2.setState({
|
|
45
|
+
text2: text2
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
rows: 5
|
|
49
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
50
|
+
className: "ion-ios-location"
|
|
51
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
52
|
+
href: ""
|
|
53
|
+
}, this.state.text2)), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Editable, {
|
|
54
|
+
value: this.state.text3,
|
|
55
|
+
onChangeValue: function onChangeValue(text3) {
|
|
56
|
+
return _this2.setState({
|
|
57
|
+
text3: text3
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
rows: {
|
|
61
|
+
min: 3,
|
|
62
|
+
max: 4
|
|
63
|
+
}
|
|
64
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
65
|
+
className: "ion-ios-location"
|
|
66
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
67
|
+
href: ""
|
|
68
|
+
}, this.state.text3)));
|
|
69
|
+
};
|
|
70
|
+
return Demo;
|
|
71
|
+
}(React.Component);
|
|
72
|
+
export { Demo as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
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 './index.styl';
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
function default_1() {
|
|
9
|
+
return _Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
return default_1;
|
|
12
|
+
}(Component);
|
|
13
|
+
default_1.template = template;
|
|
14
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Ellipsis } from '@king-design/react';
|
|
4
|
+
import './index.styl';
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
function Demo() {
|
|
8
|
+
return _React$Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
var _proto = Demo.prototype;
|
|
11
|
+
_proto.render = function render() {
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Ellipsis, {
|
|
13
|
+
style: {
|
|
14
|
+
width: '50px'
|
|
15
|
+
},
|
|
16
|
+
hoverable: true
|
|
17
|
+
}, "hoverable"));
|
|
18
|
+
};
|
|
19
|
+
return Demo;
|
|
20
|
+
}(React.Component);
|
|
21
|
+
export { Demo as default };
|
|
@@ -47,6 +47,26 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
47
47
|
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
48
48
|
value: "mini",
|
|
49
49
|
size: "mini"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
51
|
+
value: "textarea auto mini",
|
|
52
|
+
size: "mini",
|
|
53
|
+
type: "textarea",
|
|
54
|
+
rows: "auto"
|
|
55
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
56
|
+
value: "textarea auto small",
|
|
57
|
+
size: "small",
|
|
58
|
+
type: "textarea",
|
|
59
|
+
rows: "auto"
|
|
60
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
61
|
+
value: "textarea auto default",
|
|
62
|
+
size: "default",
|
|
63
|
+
type: "textarea",
|
|
64
|
+
rows: "auto"
|
|
65
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
66
|
+
value: "textarea auto large",
|
|
67
|
+
size: "large",
|
|
68
|
+
type: "textarea",
|
|
69
|
+
rows: "auto"
|
|
50
70
|
}));
|
|
51
71
|
};
|
|
52
72
|
return Demo;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
days?: string[];
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): Props;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
default_1.defaults = function defaults() {
|
|
11
|
+
return {
|
|
12
|
+
days: ['Tuesday', 'Sunday', 'Wednesday']
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
return default_1;
|
|
16
|
+
}(Component);
|
|
17
|
+
default_1.template = template;
|
|
18
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Select, Option } from '@king-design/react';
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
function Demo() {
|
|
9
|
+
var _context;
|
|
10
|
+
var _this;
|
|
11
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12
|
+
args[_key] = arguments[_key];
|
|
13
|
+
}
|
|
14
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
|
+
_this.state = {
|
|
16
|
+
days: ['Tuesday', 'Sunday', 'Wednesday']
|
|
17
|
+
};
|
|
18
|
+
return _this;
|
|
19
|
+
}
|
|
20
|
+
var _proto = Demo.prototype;
|
|
21
|
+
_proto.render = function render() {
|
|
22
|
+
var _this2 = this;
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
24
|
+
value: this.state.days,
|
|
25
|
+
onChangeValue: function onChangeValue(days) {
|
|
26
|
+
return _this2.setState({
|
|
27
|
+
days: days
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
multiple: true,
|
|
31
|
+
filterable: true,
|
|
32
|
+
clearable: true
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Option, {
|
|
34
|
+
value: "Monday"
|
|
35
|
+
}, "\u661F\u671F\u4E00"), /*#__PURE__*/React.createElement(Option, {
|
|
36
|
+
value: "Tuesday",
|
|
37
|
+
disabled: true
|
|
38
|
+
}, "\u661F\u671F\u4E8C"), /*#__PURE__*/React.createElement(Option, {
|
|
39
|
+
value: "Wednesday"
|
|
40
|
+
}, "\u661F\u671F\u4E09"), /*#__PURE__*/React.createElement(Option, {
|
|
41
|
+
value: "Thursday"
|
|
42
|
+
}, "\u661F\u671F\u56DB"), /*#__PURE__*/React.createElement(Option, {
|
|
43
|
+
value: "Friday",
|
|
44
|
+
disabled: true
|
|
45
|
+
}, "\u661F\u671F\u4E94"), /*#__PURE__*/React.createElement(Option, {
|
|
46
|
+
value: "Saturday"
|
|
47
|
+
}, "\u661F\u671F\u516D"), /*#__PURE__*/React.createElement(Option, {
|
|
48
|
+
value: "Sunday"
|
|
49
|
+
}, "\u661F\u671F\u5929")), "You selected: ", _JSON$stringify(this.state.days));
|
|
50
|
+
};
|
|
51
|
+
return Demo;
|
|
52
|
+
}(React.Component);
|
|
53
|
+
export { Demo as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
data: NonNullable<any>;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
data: ({
|
|
10
|
+
name: string;
|
|
11
|
+
size: number;
|
|
12
|
+
children: never[];
|
|
13
|
+
} | {
|
|
14
|
+
name: string;
|
|
15
|
+
size: number;
|
|
16
|
+
children?: undefined;
|
|
17
|
+
})[];
|
|
18
|
+
};
|
|
19
|
+
loadData(node: any): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _Promise from "@babel/runtime-corejs3/core-js/promise";
|
|
3
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
export { default as data } from './index.json';
|
|
6
|
+
import { Component } from 'intact';
|
|
7
|
+
import template from './index.vdt';
|
|
8
|
+
import { bind } from 'kpc';
|
|
9
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
10
|
+
_inheritsLoose(default_1, _Component);
|
|
11
|
+
function default_1() {
|
|
12
|
+
return _Component.apply(this, arguments) || this;
|
|
13
|
+
}
|
|
14
|
+
default_1.defaults = function defaults() {
|
|
15
|
+
return {
|
|
16
|
+
data: [{
|
|
17
|
+
name: 'Audios',
|
|
18
|
+
size: 12,
|
|
19
|
+
children: []
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Images',
|
|
22
|
+
size: 14,
|
|
23
|
+
children: []
|
|
24
|
+
}, {
|
|
25
|
+
name: 'doc.pdf',
|
|
26
|
+
size: 18
|
|
27
|
+
}]
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
var _proto = default_1.prototype;
|
|
31
|
+
_proto.loadData = function loadData(node) {
|
|
32
|
+
var _this = this;
|
|
33
|
+
return new _Promise(function (resolve) {
|
|
34
|
+
setTimeout(function () {
|
|
35
|
+
var _context;
|
|
36
|
+
node.children = [{
|
|
37
|
+
name: 'child1',
|
|
38
|
+
size: 17
|
|
39
|
+
}, {
|
|
40
|
+
name: 'child2',
|
|
41
|
+
size: 15,
|
|
42
|
+
loaded: true
|
|
43
|
+
}];
|
|
44
|
+
_this.set('data', _concatInstanceProperty(_context = []).call(_context, _this.get('data')));
|
|
45
|
+
resolve();
|
|
46
|
+
}, 2000);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
return default_1;
|
|
50
|
+
}(Component);
|
|
51
|
+
default_1.template = template;
|
|
52
|
+
export { default_1 as default };
|
|
53
|
+
__decorate([bind], default_1.prototype, "loadData", null);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
data: NonNullable<any>;
|
|
4
|
+
}
|
|
5
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
+
state: {
|
|
7
|
+
data: ({
|
|
8
|
+
name: string;
|
|
9
|
+
size: number;
|
|
10
|
+
children: never[];
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
size: number;
|
|
14
|
+
children?: undefined;
|
|
15
|
+
})[];
|
|
16
|
+
};
|
|
17
|
+
loadData(node: any): Promise<void>;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _Promise from "@babel/runtime-corejs3/core-js/promise";
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { Table, TableColumn } from '@king-design/react';
|
|
7
|
+
import { bind } from '@king-design/react';
|
|
8
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
9
|
+
_inheritsLoose(Demo, _React$Component);
|
|
10
|
+
function Demo() {
|
|
11
|
+
var _context;
|
|
12
|
+
var _this;
|
|
13
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14
|
+
args[_key] = arguments[_key];
|
|
15
|
+
}
|
|
16
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
17
|
+
_this.state = {
|
|
18
|
+
data: [{
|
|
19
|
+
name: 'Audios',
|
|
20
|
+
size: 12,
|
|
21
|
+
children: []
|
|
22
|
+
}, {
|
|
23
|
+
name: 'Images',
|
|
24
|
+
size: 14,
|
|
25
|
+
children: []
|
|
26
|
+
}, {
|
|
27
|
+
name: 'doc.pdf',
|
|
28
|
+
size: 18
|
|
29
|
+
}]
|
|
30
|
+
};
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
var _proto = Demo.prototype;
|
|
34
|
+
_proto.loadData = function loadData(node) {
|
|
35
|
+
var _this2 = this;
|
|
36
|
+
return new _Promise(function (resolve) {
|
|
37
|
+
setTimeout(function () {
|
|
38
|
+
var _context2;
|
|
39
|
+
node.children = [{
|
|
40
|
+
name: 'child1',
|
|
41
|
+
size: 17
|
|
42
|
+
}, {
|
|
43
|
+
name: 'child2',
|
|
44
|
+
size: 15,
|
|
45
|
+
loaded: true
|
|
46
|
+
}];
|
|
47
|
+
_this2.setState({
|
|
48
|
+
data: _concatInstanceProperty(_context2 = []).call(_context2, _this2.state.data)
|
|
49
|
+
});
|
|
50
|
+
resolve();
|
|
51
|
+
}, 2000);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
_proto.render = function render() {
|
|
55
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
56
|
+
data: this.state.data,
|
|
57
|
+
rowKey: function rowKey(data) {
|
|
58
|
+
return data.name;
|
|
59
|
+
},
|
|
60
|
+
load: this.loadData
|
|
61
|
+
}, /*#__PURE__*/React.createElement(TableColumn, {
|
|
62
|
+
key: "name",
|
|
63
|
+
title: "Name"
|
|
64
|
+
}), /*#__PURE__*/React.createElement(TableColumn, {
|
|
65
|
+
key: "size",
|
|
66
|
+
title: "Size",
|
|
67
|
+
slotTemplate: function slotTemplate(_ref) {
|
|
68
|
+
var data = _ref[0];
|
|
69
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, data.size, "MB");
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
return Demo;
|
|
74
|
+
}(React.Component);
|
|
75
|
+
export { Demo as default };
|
|
76
|
+
__decorate([bind], Demo.prototype, "loadData", null);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
export default class extends Component {
|
|
4
|
+
static template: string | import("intact").Template<any>;
|
|
5
|
+
static defaults(): {
|
|
6
|
+
data: {
|
|
7
|
+
a: string;
|
|
8
|
+
b: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
default_1.defaults = function defaults() {
|
|
11
|
+
return {
|
|
12
|
+
data: [{
|
|
13
|
+
a: '测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长测试超长',
|
|
14
|
+
b: 'Cell 1-2'
|
|
15
|
+
}, {
|
|
16
|
+
a: 'Cell 2-1',
|
|
17
|
+
b: 'Cell 2-2'
|
|
18
|
+
}]
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
return default_1;
|
|
22
|
+
}(Component);
|
|
23
|
+
default_1.template = template;
|
|
24
|
+
export { default_1 as default };
|