@king-design/intact 3.1.0-beta.3 → 3.1.0
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/cascader/index.vdt +1 -0
- package/components/config/demos/basic.md +19 -0
- package/components/config/index.md +20 -0
- package/components/config/index.ts +8 -4
- package/components/dialog/index.spec.ts +41 -2
- package/components/drawer/index.spec.ts +4 -2
- package/components/icon/demos/icons.md +20 -9
- package/components/input/demos/blocks.md +16 -1
- package/components/input/styles.ts +2 -1
- package/components/portal.ts +6 -1
- package/components/table/styles.ts +2 -0
- package/components/tree/demos/expandAll.md +36 -8
- package/components/tree/index.md +1 -1
- package/components/tree/useExpanded.ts +14 -2
- package/components/treeSelect/index.md +1 -1
- package/components/upload/demos/files.md +14 -12
- package/components/upload/index.md +5 -5
- package/components/upload/index.ts +6 -5
- package/components/upload/useFiles.ts +19 -8
- package/es/components/cascader/index.vdt.js +1 -0
- package/es/components/config/index.d.ts +9 -2
- package/es/components/config/index.js +4 -3
- package/es/components/dialog/index.spec.js +87 -5
- package/es/components/drawer/index.spec.js +6 -4
- package/es/components/input/styles.js +1 -1
- package/es/components/portal.js +7 -1
- package/es/components/table/styles.js +3 -2
- package/es/components/tree/useExpanded.js +21 -6
- package/es/components/upload/index.d.ts +6 -5
- package/es/components/upload/index.js +1 -0
- package/es/components/upload/useFiles.js +21 -8
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/config/demos/basic/index.d.ts +5 -0
- package/es/site/data/components/config/demos/basic/index.js +17 -0
- package/es/site/data/components/config/demos/basic/react.d.ts +4 -0
- package/es/site/data/components/config/demos/basic/react.js +29 -0
- package/es/site/data/components/config/index.d.ts +57 -0
- package/es/site/data/components/config/index.js +42 -0
- package/es/site/data/components/icon/demos/icons/index.js +3 -2
- package/es/site/data/components/input/demos/blocks/react.js +11 -1
- package/es/site/data/components/tree/demos/draggable/react.js +1 -1
- package/es/site/data/components/tree/demos/expandAll/index.d.ts +9 -1
- package/es/site/data/components/tree/demos/expandAll/index.js +14 -2
- package/es/site/data/components/tree/demos/expandAll/react.d.ts +10 -1
- package/es/site/data/components/tree/demos/expandAll/react.js +24 -5
- package/es/site/data/components/upload/demos/files/index.d.ts +2 -5
- package/es/site/data/components/upload/demos/files/index.js +5 -1
- package/es/site/data/components/upload/demos/files/react.d.ts +2 -5
- package/es/site/data/components/upload/demos/files/react.js +13 -2
- package/es/site/src/pages/document/styles.js +1 -1
- package/index.ts +2 -2
- package/package.json +2 -2
- package/es/site/data/components/icon/demos/icons/react.d.ts +0 -15
- package/es/site/data/components/icon/demos/icons/react.js +0 -107
|
@@ -7,7 +7,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
|
7
7
|
|
|
8
8
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { var
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { var _context21; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context21 = Object.prototype.toString.call(o)).call(_context21, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
11
|
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
13
13
|
|
|
@@ -19,7 +19,7 @@ import { __decorate } from "tslib";
|
|
|
19
19
|
import { Component } from 'intact';
|
|
20
20
|
import { Dialog, BaseDialog } from './';
|
|
21
21
|
import { bind } from '../utils';
|
|
22
|
-
import { getElement, mount, unmount, dispatchEvent, wait } from '../../test/utils';
|
|
22
|
+
import { getElement, mount, unmount, dispatchEvent, wait, getElements } from '../../test/utils';
|
|
23
23
|
import BasicDemo from '~/components/dialog/demos/basic';
|
|
24
24
|
import AsyncCloseDemo from '~/components/dialog/demos/asyncClose';
|
|
25
25
|
import TerminateDemo from '~/components/dialog/demos/terminate';
|
|
@@ -594,7 +594,7 @@ describe('Dialog', function () {
|
|
|
594
594
|
}, _callee12);
|
|
595
595
|
})));
|
|
596
596
|
it('should remove body style when destroy', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
597
|
-
var Demo, _mount13, instance, element;
|
|
597
|
+
var Demo, _mount13, instance, element, style;
|
|
598
598
|
|
|
599
599
|
return _regeneratorRuntime.wrap(function _callee13$(_context17) {
|
|
600
600
|
while (1) {
|
|
@@ -642,14 +642,96 @@ describe('Dialog', function () {
|
|
|
642
642
|
return wait();
|
|
643
643
|
|
|
644
644
|
case 7:
|
|
645
|
-
|
|
645
|
+
style = document.body.getAttribute('style');
|
|
646
|
+
expect(style === null || style === '').to.be.true;
|
|
646
647
|
|
|
647
|
-
case
|
|
648
|
+
case 9:
|
|
648
649
|
case "end":
|
|
649
650
|
return _context17.stop();
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
}, _callee13);
|
|
654
|
+
})));
|
|
655
|
+
it('show nested dialog', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
656
|
+
var Test, Demo, _mount14, instance, element, _getElements, dialog1, dialog2;
|
|
657
|
+
|
|
658
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context20) {
|
|
659
|
+
while (1) {
|
|
660
|
+
switch (_context20.prev = _context20.next) {
|
|
661
|
+
case 0:
|
|
662
|
+
Test = /*#__PURE__*/function (_Component5) {
|
|
663
|
+
_inheritsLoose(Test, _Component5);
|
|
664
|
+
|
|
665
|
+
function Test() {
|
|
666
|
+
var _context18;
|
|
667
|
+
|
|
668
|
+
var _this5;
|
|
669
|
+
|
|
670
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
671
|
+
args[_key5] = arguments[_key5];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
_this5 = _Component5.call.apply(_Component5, _concatInstanceProperty(_context18 = [this]).call(_context18, args)) || this;
|
|
675
|
+
_this5.Dialog = Dialog;
|
|
676
|
+
return _this5;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
return Test;
|
|
680
|
+
}(Component);
|
|
681
|
+
|
|
682
|
+
Test.template = "\n const { Dialog } = this;\n <Dialog v-model=\"value\">test</Dialog>\n ";
|
|
683
|
+
|
|
684
|
+
Demo = /*#__PURE__*/function (_Component6) {
|
|
685
|
+
_inheritsLoose(Demo, _Component6);
|
|
686
|
+
|
|
687
|
+
function Demo() {
|
|
688
|
+
var _context19;
|
|
689
|
+
|
|
690
|
+
var _this6;
|
|
691
|
+
|
|
692
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
693
|
+
args[_key6] = arguments[_key6];
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
_this6 = _Component6.call.apply(_Component6, _concatInstanceProperty(_context19 = [this]).call(_context19, args)) || this;
|
|
697
|
+
_this6.Test = Test;
|
|
698
|
+
_this6.Dialog = Dialog;
|
|
699
|
+
return _this6;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
var _proto2 = Demo.prototype;
|
|
703
|
+
|
|
704
|
+
_proto2.showTest = function showTest() {
|
|
705
|
+
this.set('testShow', true);
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
return Demo;
|
|
709
|
+
}(Component);
|
|
710
|
+
|
|
711
|
+
Demo.template = "\n const { Test, Dialog } = this;\n <Dialog v-model=\"show\">\n <div ev-click={this.showTest}>click</div>\n <Test v-model=\"testShow\" /> \n </Dialog>\n ";
|
|
712
|
+
|
|
713
|
+
__decorate([bind], Demo.prototype, "showTest", null);
|
|
714
|
+
|
|
715
|
+
_mount14 = mount(Demo), instance = _mount14[0], element = _mount14[1];
|
|
716
|
+
instance.set('show', true);
|
|
717
|
+
_context20.next = 9;
|
|
718
|
+
return wait();
|
|
719
|
+
|
|
720
|
+
case 9:
|
|
721
|
+
instance.showTest();
|
|
722
|
+
_context20.next = 12;
|
|
723
|
+
return wait();
|
|
724
|
+
|
|
725
|
+
case 12:
|
|
726
|
+
_getElements = getElements('.k-dialog'), dialog1 = _getElements[0], dialog2 = _getElements[1];
|
|
727
|
+
expect(dialog2.querySelector('.k-dialog-body').textContent).to.eql('test');
|
|
728
|
+
|
|
729
|
+
case 14:
|
|
730
|
+
case "end":
|
|
731
|
+
return _context20.stop();
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}, _callee14);
|
|
653
735
|
}))); // it('should handle v-if and v-model at the same time correctly in Vue', async () => {
|
|
654
736
|
// const Test = {
|
|
655
737
|
// template: `<Dialog v-model="show" v-if="show" ref="dialog">test</Dialog>`,
|
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
|
5
5
|
import BasicDemo from '~/components/drawer/demos/basic';
|
|
6
6
|
import PlacementDemo from '~/components/drawer/demos/placement';
|
|
7
7
|
import overlayDemo from '~/components/drawer/demos/overlay';
|
|
8
|
-
import { mount, unmount, dispatchEvent, getElement, wait } from '../../test/utils';
|
|
8
|
+
import { mount, unmount, dispatchEvent, getElement, wait, getElements } from '../../test/utils';
|
|
9
9
|
import { Component } from 'intact';
|
|
10
10
|
import { Drawer } from '.';
|
|
11
11
|
import { Dialog } from '../dialog';
|
|
@@ -165,7 +165,7 @@ describe('Drawer', function () {
|
|
|
165
165
|
}, _callee4);
|
|
166
166
|
})));
|
|
167
167
|
it('nested dialog', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
168
|
-
var Demo, _mount4, instance, element;
|
|
168
|
+
var Demo, _mount4, instance, element, _getElements, dialog1, dialog2;
|
|
169
169
|
|
|
170
170
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
171
171
|
while (1) {
|
|
@@ -198,9 +198,11 @@ describe('Drawer', function () {
|
|
|
198
198
|
return wait();
|
|
199
199
|
|
|
200
200
|
case 5:
|
|
201
|
-
expect(instance.refs.dialog.dialogRef.value.parentElement.parentElement).to.eql(document.body);
|
|
201
|
+
// expect(instance.refs.dialog.dialogRef.value.parentElement.parentElement).to.eql(document.body);
|
|
202
|
+
_getElements = getElements('.k-dialog'), dialog1 = _getElements[0], dialog2 = _getElements[1];
|
|
203
|
+
expect(dialog2.querySelector('.k-dialog-body').textContent).to.eql('Dialog');
|
|
202
204
|
|
|
203
|
-
case
|
|
205
|
+
case 7:
|
|
204
206
|
case "end":
|
|
205
207
|
return _context6.stop();
|
|
206
208
|
}
|
|
@@ -132,7 +132,7 @@ setDefault(function () {
|
|
|
132
132
|
export function makeStyles(k) {
|
|
133
133
|
var _context;
|
|
134
134
|
|
|
135
|
-
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px
|
|
135
|
+
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;flex:1;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px;&.", k, "-none:hover{background:transparent;}}.", k, "-select{margin:-1px;text-align:left;}}.", k, "-input-prepend{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.", k, "-input-append{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-padding{padding:0 ", input.groupPaddingGap, ";}.", k, "-input-prepend{border-right:none;}.", k, "-input-append{border-left:none;}&.", k, "-flat{color:", _flatInstanceProperty(input).color, ";.", k, "-input-wrapper{border:none;background:", _flatInstanceProperty(input).bgColor, ";}}&.", k, "-disabled{color:", input.disabledColor, ";cursor:not-allowed;.", k, "-input-wrapper{border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";}.", k, "-input-inner{cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
136
136
|
var styles = input[size];
|
|
137
137
|
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.", k, "-input-wrapper{height:", styles.height, ";padding:0 ", styles.paddingGap, ";}");
|
|
138
138
|
if (size === 'default') return sizeClassName;
|
package/es/components/portal.js
CHANGED
|
@@ -114,7 +114,13 @@ export var Portal = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
if (!this.container) {
|
|
115
115
|
if (this.$senior instanceof BaseDialog) {
|
|
116
116
|
// Dialog and Drawer must be inserted into document.body
|
|
117
|
-
this.container = document.body;
|
|
117
|
+
// this.container = document.body;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @Modify https://github.com/ksc-fe/kpc/issues/915
|
|
121
|
+
* shoud insert to parent .k-dialog-wrapper to show nested dialog in Vue
|
|
122
|
+
*/
|
|
123
|
+
this.container = parentDom.closest("." + this.config.k + "-dialog-wrapper") || document.body;
|
|
118
124
|
} else {
|
|
119
125
|
// find the closest dialog if exists
|
|
120
126
|
this.container = parentDom.closest("." + this.config.k + "-dialog") || document.body;
|
|
@@ -89,7 +89,8 @@ var defaults = {
|
|
|
89
89
|
|
|
90
90
|
// tree
|
|
91
91
|
arrow: {
|
|
92
|
-
gap: "4px"
|
|
92
|
+
gap: "4px",
|
|
93
|
+
width: "16px"
|
|
93
94
|
},
|
|
94
95
|
resizeWidth: "5px",
|
|
95
96
|
draggingOpacity: ".4"
|
|
@@ -102,7 +103,7 @@ setDefault(function () {
|
|
|
102
103
|
}).table;
|
|
103
104
|
});
|
|
104
105
|
export function makeStyles(k) {
|
|
105
|
-
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;td,th{transition:all ", table.transition, ";}}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-table-arrow{margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
106
|
+
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;td,th{transition:all ", table.transition, ";}}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
106
107
|
return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
|
|
107
108
|
}), ">.", k, "-pagination{margin:16px 0;}");
|
|
108
109
|
}
|
|
@@ -10,8 +10,23 @@ export function useExpanded(getNodes) {
|
|
|
10
10
|
expandedKeys = new _Set(v);
|
|
11
11
|
});
|
|
12
12
|
onBeforeMount(function () {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* change the behavior
|
|
15
|
+
* if the data is undefined, we expand all keys after we received data
|
|
16
|
+
*/
|
|
17
|
+
var _instance$get = instance.get(),
|
|
18
|
+
defaultExpandAll = _instance$get.defaultExpandAll,
|
|
19
|
+
data = _instance$get.data;
|
|
20
|
+
|
|
21
|
+
if (defaultExpandAll) {
|
|
22
|
+
if (data && data.length) {
|
|
23
|
+
expandAll();
|
|
24
|
+
} else {
|
|
25
|
+
instance.on("$receive:data", function cb() {
|
|
26
|
+
expandAll();
|
|
27
|
+
instance.off("$receive:data", cb);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
15
30
|
}
|
|
16
31
|
});
|
|
17
32
|
|
|
@@ -21,13 +36,13 @@ export function useExpanded(getNodes) {
|
|
|
21
36
|
|
|
22
37
|
function _toggle() {
|
|
23
38
|
_toggle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(node) {
|
|
24
|
-
var _instance$
|
|
39
|
+
var _instance$get3, load, key, expanded;
|
|
25
40
|
|
|
26
41
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
42
|
while (1) {
|
|
28
43
|
switch (_context.prev = _context.next) {
|
|
29
44
|
case 0:
|
|
30
|
-
_instance$
|
|
45
|
+
_instance$get3 = instance.get(), load = _instance$get3.load;
|
|
31
46
|
key = node.key;
|
|
32
47
|
expanded = expandedKeys.has(key);
|
|
33
48
|
|
|
@@ -64,8 +79,8 @@ export function useExpanded(getNodes) {
|
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
function expandAll() {
|
|
67
|
-
var _instance$
|
|
68
|
-
load = _instance$
|
|
82
|
+
var _instance$get2 = instance.get(),
|
|
83
|
+
load = _instance$get2.load;
|
|
69
84
|
|
|
70
85
|
var loop = function loop(nodes) {
|
|
71
86
|
for (var i = 0; i < nodes.length; i++) {
|
|
@@ -2,7 +2,8 @@ import { Component, TypeDefs } from 'intact';
|
|
|
2
2
|
import { UploadFileStatus } from './useUpload';
|
|
3
3
|
import type { RequestError } from './ajaxUploader';
|
|
4
4
|
import type { Events } from '../types';
|
|
5
|
-
export type { RequestError
|
|
5
|
+
export type { RequestError };
|
|
6
|
+
export { UploadFileStatus };
|
|
6
7
|
export interface UploadProps {
|
|
7
8
|
accept?: string;
|
|
8
9
|
files?: UploadFile[];
|
|
@@ -33,13 +34,13 @@ export interface UploadBlocks {
|
|
|
33
34
|
tip: null;
|
|
34
35
|
}
|
|
35
36
|
export declare type UploadFile = {
|
|
36
|
-
status
|
|
37
|
+
status?: UploadFileStatus;
|
|
37
38
|
type?: string;
|
|
38
39
|
size?: number;
|
|
39
40
|
name: string;
|
|
40
|
-
percent
|
|
41
|
-
uid
|
|
42
|
-
raw
|
|
41
|
+
percent?: number;
|
|
42
|
+
uid?: number | string;
|
|
43
|
+
raw?: File | Partial<UploadFile>;
|
|
43
44
|
url?: string;
|
|
44
45
|
request?: any;
|
|
45
46
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
2
3
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
3
4
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slice";
|
|
5
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
6
|
import _Array$from from "@babel/runtime-corejs3/core-js/array/from";
|
|
5
7
|
import _URL from "@babel/runtime-corejs3/core-js/url";
|
|
6
8
|
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
|
|
@@ -20,20 +22,22 @@ export function useFiles(isValidType, upload) {
|
|
|
20
22
|
var _files = _sliceInstanceProperty(files).call(files, 0);
|
|
21
23
|
|
|
22
24
|
if (defaultFiles) {
|
|
25
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
26
|
+
console.warn("'defaultFiles' is deprecated, use 'files' instead for reactive updating.");
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
defaultFiles.forEach(function (file) {
|
|
24
|
-
_files.push(
|
|
25
|
-
status: UploadFileStatus.Done,
|
|
26
|
-
name: file.name,
|
|
27
|
-
percent: 100,
|
|
28
|
-
uid: uid++,
|
|
29
|
-
raw: file,
|
|
30
|
-
url: file.url
|
|
31
|
-
});
|
|
30
|
+
_files.push(normalizeFile(file));
|
|
32
31
|
});
|
|
33
32
|
instance.set('files', _files);
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
|
|
36
|
+
instance.on("$receive:files", function (files) {
|
|
37
|
+
if (!files) return;
|
|
38
|
+
instance.set('files', _mapInstanceProperty(files).call(files, normalizeFile));
|
|
39
|
+
});
|
|
40
|
+
|
|
37
41
|
function addFiles(_x) {
|
|
38
42
|
return _addFiles.apply(this, arguments);
|
|
39
43
|
}
|
|
@@ -205,4 +209,13 @@ export function useFiles(isValidType, upload) {
|
|
|
205
209
|
addFiles: addFiles,
|
|
206
210
|
removeFile: removeFile
|
|
207
211
|
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function normalizeFile(file) {
|
|
215
|
+
return _extends({
|
|
216
|
+
status: UploadFileStatus.Done,
|
|
217
|
+
percent: 100,
|
|
218
|
+
uid: uid++,
|
|
219
|
+
raw: file
|
|
220
|
+
}, file);
|
|
208
221
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1.0
|
|
2
|
+
* @king-design v3.1.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -60,4 +60,4 @@ export * from './components/tree';
|
|
|
60
60
|
export * from './components/treeSelect';
|
|
61
61
|
export * from './components/upload';
|
|
62
62
|
export * from './components/wave';
|
|
63
|
-
export declare const version = "3.1.0
|
|
63
|
+
export declare const version = "3.1.0";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1.0
|
|
2
|
+
* @king-design v3.1.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -62,5 +62,5 @@ export * from './components/tree';
|
|
|
62
62
|
export * from './components/treeSelect';
|
|
63
63
|
export * from './components/upload';
|
|
64
64
|
export * from './components/wave';
|
|
65
|
-
export var version = '3.1.0
|
|
65
|
+
export var version = '3.1.0';
|
|
66
66
|
/* generate end */
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return default_1;
|
|
14
|
+
}(Component);
|
|
15
|
+
|
|
16
|
+
default_1.template = template;
|
|
17
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ConfigProvider, Button, Input } from '@king-design/react';
|
|
4
|
+
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
|
|
8
|
+
function Demo() {
|
|
9
|
+
return _React$Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
|
|
14
|
+
_proto.render = function render() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
16
|
+
value: {
|
|
17
|
+
classNamePrefix: 'kd'
|
|
18
|
+
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Button"), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
style: {
|
|
21
|
+
"marginTop": "8px"
|
|
22
|
+
}
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Input, null)));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return Demo;
|
|
27
|
+
}(React.Component);
|
|
28
|
+
|
|
29
|
+
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 };
|
|
@@ -50,7 +50,8 @@ var default_1 = /*#__PURE__*/function (_Component) {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
_proto.filter = function filter() {
|
|
53
|
-
var _context2
|
|
53
|
+
var _context2,
|
|
54
|
+
_this2 = this;
|
|
54
55
|
|
|
55
56
|
var keywords = _trimInstanceProperty(_context2 = this.get('keywords')).call(_context2).toLowerCase();
|
|
56
57
|
|
|
@@ -59,7 +60,7 @@ var default_1 = /*#__PURE__*/function (_Component) {
|
|
|
59
60
|
return _filterInstanceProperty(fonts).call(fonts, function (font) {
|
|
60
61
|
var _context3, _context4;
|
|
61
62
|
|
|
62
|
-
return _includesInstanceProperty(_context3 = font[0]).call(_context3, keywords) || font[1] && _includesInstanceProperty(_context4 = font[1]).call(_context4, keywords);
|
|
63
|
+
return _includesInstanceProperty(_context3 = _this2.config.k + "-icon-" + font[0]).call(_context3, keywords) || font[1] && _includesInstanceProperty(_context4 = font[1]).call(_context4, keywords);
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
66
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Input, Button, Icon } from '@king-design/react';
|
|
3
|
+
import { Input, Button, Icon, ButtonGroup } from '@king-design/react';
|
|
4
4
|
import './index.styl';
|
|
5
5
|
|
|
6
6
|
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
@@ -25,6 +25,16 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
25
25
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
26
26
|
className: "k-icon-search"
|
|
27
27
|
})))
|
|
28
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
29
|
+
placeholder: "please enter",
|
|
30
|
+
slotAppend: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, null, "\u63D0\u4EA4"))
|
|
31
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
32
|
+
placeholder: "please enter",
|
|
33
|
+
slotAppend: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
type: "primary"
|
|
35
|
+
}, "\u63D0\u4EA4"), /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
type: "primary"
|
|
37
|
+
}, "\u521B\u5EFA")))
|
|
28
38
|
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
29
39
|
placeholder: "please enter",
|
|
30
40
|
slotAppend: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -3,7 +3,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/con
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Tree, Icon } from '@king-design/react';
|
|
5
5
|
import './index.styl';
|
|
6
|
-
import { Message } from '@king-design/react';
|
|
6
|
+
import { Message, TreeMode } from '@king-design/react';
|
|
7
7
|
|
|
8
8
|
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
9
9
|
_inheritsLoose(Demo, _React$Component);
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export { default as data } from './index.json';
|
|
2
2
|
import { Component } from 'intact';
|
|
3
|
-
|
|
3
|
+
import './index.styl';
|
|
4
|
+
import { TreeDataItem } from 'kpc';
|
|
5
|
+
interface Props {
|
|
6
|
+
data: TreeDataItem<string>[];
|
|
7
|
+
delayData?: TreeDataItem<string>[];
|
|
8
|
+
}
|
|
9
|
+
export default class extends Component<Props> {
|
|
4
10
|
static template: string | import("intact").Template<any>;
|
|
5
11
|
static defaults(): {
|
|
6
12
|
data: ({
|
|
@@ -33,5 +39,7 @@ export default class extends Component {
|
|
|
33
39
|
}[];
|
|
34
40
|
})[];
|
|
35
41
|
})[];
|
|
42
|
+
delayData: undefined;
|
|
36
43
|
};
|
|
44
|
+
load(): void;
|
|
37
45
|
}
|