@king-design/intact 3.6.2-beta.1 → 3.7.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/.DS_Store +0 -0
- package/components/anchor/constants.ts +3 -0
- package/components/anchor/demos/basic.md +34 -0
- package/components/anchor/demos/container.md +76 -0
- package/components/anchor/demos/events.md +100 -0
- package/components/anchor/demos/horizontal.md +33 -0
- package/components/anchor/demos/nested.md +132 -0
- package/components/anchor/index.md +38 -0
- package/components/anchor/index.spec.ts +171 -0
- package/components/anchor/index.ts +159 -0
- package/components/anchor/index.vdt +24 -0
- package/components/anchor/link.ts +44 -0
- package/components/anchor/link.vdt +49 -0
- package/components/anchor/styles.ts +50 -0
- package/components/anchor/useScroll.ts +221 -0
- package/components/config/demos/basic.md +11 -3
- package/components/descriptions/.DS_Store +0 -0
- package/components/dialog/base.vdt +3 -1
- package/components/drawer/demos/resizable.md +67 -0
- package/components/drawer/index.md +1 -0
- package/components/drawer/index.spec.ts +43 -0
- package/components/drawer/index.ts +14 -0
- package/components/drawer/index.vdt +20 -3
- package/components/drawer/styles.ts +44 -0
- package/components/drawer/useDrawerResizable.ts +190 -0
- package/components/icon/demos/color.md +1 -1
- package/components/icon/demos/icons.md +18 -0
- package/components/menu/.DS_Store +0 -0
- package/components/menu/demos/.DS_Store +0 -0
- package/components/menu/demos/collapse.md +2 -2
- package/components/menu/demos/showCollapseArrow.md +3 -3
- package/components/menu/demos/size.md +4 -4
- package/components/menu/styles.ts +7 -3
- package/components/notification/demos/basic.md +27 -0
- package/components/notification/demos/close.md +52 -0
- package/components/notification/demos/duration.md +43 -0
- package/components/notification/demos/events.md +39 -0
- package/components/notification/demos/hideClose.md +30 -0
- package/components/notification/demos/icon.md +47 -0
- package/components/notification/demos/position.md +39 -0
- package/components/notification/demos/types.md +38 -0
- package/components/notification/index.md +62 -0
- package/components/notification/index.spec.ts +211 -0
- package/components/notification/index.ts +2 -0
- package/components/notification/notification.ts +185 -0
- package/components/notification/notification.vdt +62 -0
- package/components/notification/notifications.ts +46 -0
- package/components/notification/notifications.vdt +16 -0
- package/components/notification/styles.ts +179 -0
- package/components/select/styles.ts +2 -0
- package/components/table/.DS_Store +0 -0
- package/components/table/demos/hidden.md +8 -2
- package/components/table/demos/sort.md +4 -4
- package/components/table/styles.ts +6 -2
- package/components/tabs/useActiveBar.ts +3 -3
- package/components/tag/base.ts +4 -0
- package/components/tag/demos/border.md +1 -1
- package/components/tag/demos/color.md +40 -0
- package/components/tag/demos/draggable.md +1 -1
- package/components/tag/demos/tags.md +1 -1
- package/components/tag/index.md +1 -0
- package/components/tag/index.spec.ts +8 -0
- package/components/tag/index.vdt +6 -4
- package/components/tag/styles.ts +23 -0
- package/components/tag/useColor.ts +79 -0
- package/components/timepicker/index.spec.ts +16 -5
- package/components/timepicker/useDefaultValue.ts +16 -7
- package/components/timepicker/useStep.ts +3 -2
- package/components/tour/.DS_Store +0 -0
- package/components/transfer/demos/customFilter.md +1 -1
- package/components/transfer/demos/customList.md +1 -1
- package/components/transfer/demos/getData.md +1 -1
- package/components/transfer/demos/leftChecked.md +1 -1
- package/components/transfer/demos/pagination.md +63 -0
- package/components/transfer/demos/table.md +248 -0
- package/components/transfer/demos/tree.md +1 -1
- package/components/transfer/index.md +2 -0
- package/components/transfer/index.spec.ts +147 -0
- package/components/transfer/index.ts +7 -0
- package/components/transfer/index.vdt +30 -4
- package/components/transfer/styles.ts +11 -1
- package/components/transfer/useCheck.ts +5 -5
- package/components/transfer/usePagination.ts +92 -0
- package/components/virtualList/.DS_Store +0 -0
- package/components/virtualList/demos/.DS_Store +0 -0
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.svg +235 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/dist/fonts/iconfont.woff2 +0 -0
- package/dist/fonts/ionicons.eot +0 -0
- package/dist/fonts/ionicons.svg +2230 -0
- package/dist/fonts/ionicons.ttf +0 -0
- package/dist/fonts/ionicons.woff +0 -0
- package/dist/fonts/ionicons.woff2 +0 -0
- package/dist/i18n/en-US.js +1411 -0
- package/dist/i18n/en-US.js.map +1 -0
- package/dist/i18n/en-US.min.js +1 -0
- package/dist/i18n/index.js +283 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/index.min.js +1 -0
- package/dist/kpc.js +50764 -0
- package/dist/kpc.js.map +1 -0
- package/dist/kpc.min.js +1 -0
- package/dist/kpc.react.js +58380 -0
- package/dist/kpc.react.js.map +1 -0
- package/dist/kpc.react.min.js +1 -0
- package/dist/kpc.tmp.js.map +1 -0
- package/dist/kpc.vue-legacy.js +58272 -0
- package/dist/kpc.vue-legacy.js.map +1 -0
- package/dist/kpc.vue-legacy.min.js +1 -0
- package/dist/kpc.vue.js +58128 -0
- package/dist/kpc.vue.js.map +1 -0
- package/dist/kpc.vue.min.js +1 -0
- package/es/components/anchor/constants.d.ts +2 -0
- package/es/components/anchor/constants.js +2 -0
- package/es/components/anchor/index.d.ts +41 -0
- package/es/components/anchor/index.js +141 -0
- package/es/components/anchor/index.spec.d.ts +1 -0
- package/es/components/anchor/index.spec.js +230 -0
- package/es/components/anchor/index.vdt.js +31 -0
- package/es/components/anchor/link.d.ts +16 -0
- package/es/components/anchor/link.js +52 -0
- package/es/components/anchor/link.vdt.js +49 -0
- package/es/components/anchor/styles.d.ts +5 -0
- package/es/components/anchor/styles.js +30 -0
- package/es/components/anchor/useScroll.d.ts +7 -0
- package/es/components/anchor/useScroll.js +218 -0
- package/es/components/dialog/base.vdt.js +1 -1
- package/es/components/drawer/index.d.ts +3 -0
- package/es/components/drawer/index.js +22 -3
- package/es/components/drawer/index.spec.js +83 -0
- package/es/components/drawer/index.vdt.js +23 -3
- package/es/components/drawer/styles.js +1 -1
- package/es/components/drawer/useDrawerResizable.d.ts +10 -0
- package/es/components/drawer/useDrawerResizable.js +162 -0
- package/es/components/menu/styles.d.ts +1 -0
- package/es/components/menu/styles.js +4 -1
- package/es/components/notification/index.d.ts +1 -0
- package/es/components/notification/index.js +1 -0
- package/es/components/notification/index.spec.d.ts +1 -0
- package/es/components/notification/index.spec.js +317 -0
- package/es/components/notification/notification.d.ts +39 -0
- package/es/components/notification/notification.js +183 -0
- package/es/components/notification/notification.vdt.js +56 -0
- package/es/components/notification/notifications.d.ts +16 -0
- package/es/components/notification/notifications.js +51 -0
- package/es/components/notification/notifications.vdt.js +24 -0
- package/es/components/notification/styles.d.ts +9 -0
- package/es/components/notification/styles.js +110 -0
- package/es/components/select/styles.js +1 -1
- package/es/components/table/styles.js +1 -1
- package/es/components/tabs/useActiveBar.js +7 -3
- package/es/components/tag/base.d.ts +2 -0
- package/es/components/tag/base.js +3 -0
- package/es/components/tag/index.spec.js +17 -0
- package/es/components/tag/index.vdt.js +12 -5
- package/es/components/tag/styles.d.ts +9 -0
- package/es/components/tag/styles.js +14 -1
- package/es/components/tag/useColor.d.ts +7 -0
- package/es/components/tag/useColor.js +71 -0
- package/es/components/timepicker/index.spec.js +70 -42
- package/es/components/timepicker/useDefaultValue.js +12 -7
- package/es/components/timepicker/useStep.js +4 -2
- package/es/components/transfer/index.d.ts +13 -0
- package/es/components/transfer/index.js +6 -2
- package/es/components/transfer/index.spec.js +197 -0
- package/es/components/transfer/index.vdt.js +28 -5
- package/es/components/transfer/styles.js +4 -1
- package/es/components/transfer/useCheck.js +2 -1
- package/es/components/transfer/usePagination.d.ts +12 -0
- package/es/components/transfer/usePagination.js +79 -0
- package/es/index.d.ts +4 -2
- package/es/index.js +4 -2
- package/es/site/data/components/anchor/demos/basic/index.d.ts +11 -0
- package/es/site/data/components/anchor/demos/basic/index.js +18 -0
- package/es/site/data/components/anchor/demos/basic/react.d.ts +11 -0
- package/es/site/data/components/anchor/demos/basic/react.js +46 -0
- package/es/site/data/components/anchor/demos/container/index.d.ts +12 -0
- package/es/site/data/components/anchor/demos/container/index.js +19 -0
- package/es/site/data/components/anchor/demos/container/react.d.ts +12 -0
- package/es/site/data/components/anchor/demos/container/react.js +52 -0
- package/es/site/data/components/anchor/demos/events/index.d.ts +17 -0
- package/es/site/data/components/anchor/demos/events/index.js +36 -0
- package/es/site/data/components/anchor/demos/events/react.d.ts +17 -0
- package/es/site/data/components/anchor/demos/events/react.js +88 -0
- package/es/site/data/components/anchor/demos/horizontal/index.d.ts +11 -0
- package/es/site/data/components/anchor/demos/horizontal/index.js +18 -0
- package/es/site/data/components/anchor/demos/horizontal/react.d.ts +11 -0
- package/es/site/data/components/anchor/demos/horizontal/react.js +46 -0
- package/es/site/data/components/anchor/demos/nested/index.d.ts +12 -0
- package/es/site/data/components/anchor/demos/nested/index.js +19 -0
- package/es/site/data/components/anchor/demos/nested/react.d.ts +12 -0
- package/es/site/data/components/anchor/demos/nested/react.js +100 -0
- package/es/site/data/components/anchor/index.d.ts +57 -0
- package/es/site/data/components/anchor/index.js +32 -0
- package/es/site/data/components/config/demos/basic/index.d.ts +1 -0
- package/es/site/data/components/config/demos/basic/index.js +8 -1
- package/es/site/data/components/config/demos/basic/react.d.ts +1 -0
- package/es/site/data/components/config/demos/basic/react.js +15 -3
- package/es/site/data/components/drawer/demos/resizable/index.d.ts +15 -0
- package/es/site/data/components/drawer/demos/resizable/index.js +26 -0
- package/es/site/data/components/drawer/demos/resizable/react.d.ts +15 -0
- package/es/site/data/components/drawer/demos/resizable/react.js +63 -0
- package/es/site/data/components/icon/demos/icons/index.js +1 -1
- package/es/site/data/components/menu/demos/collapse/index.d.ts +6 -1
- package/es/site/data/components/menu/demos/collapse/react.d.ts +6 -1
- package/es/site/data/components/menu/demos/showCollapseArrow/index.d.ts +8 -1
- package/es/site/data/components/menu/demos/showCollapseArrow/react.d.ts +8 -1
- package/es/site/data/components/menu/demos/size/index.d.ts +7 -2
- package/es/site/data/components/menu/demos/size/react.d.ts +7 -2
- package/es/site/data/components/notification/demos/basic/index.d.ts +6 -0
- package/es/site/data/components/notification/demos/basic/index.js +21 -0
- package/es/site/data/components/notification/demos/basic/react.d.ts +5 -0
- package/es/site/data/components/notification/demos/basic/react.js +24 -0
- package/es/site/data/components/notification/demos/close/index.d.ts +13 -0
- package/es/site/data/components/notification/demos/close/index.js +38 -0
- package/es/site/data/components/notification/demos/close/react.d.ts +13 -0
- package/es/site/data/components/notification/demos/close/react.js +52 -0
- package/es/site/data/components/notification/demos/duration/index.d.ts +7 -0
- package/es/site/data/components/notification/demos/duration/index.js +33 -0
- package/es/site/data/components/notification/demos/duration/react.d.ts +6 -0
- package/es/site/data/components/notification/demos/duration/react.js +38 -0
- package/es/site/data/components/notification/demos/events/index.d.ts +6 -0
- package/es/site/data/components/notification/demos/events/index.js +31 -0
- package/es/site/data/components/notification/demos/events/react.d.ts +5 -0
- package/es/site/data/components/notification/demos/events/react.js +34 -0
- package/es/site/data/components/notification/demos/hideClose/index.d.ts +6 -0
- package/es/site/data/components/notification/demos/hideClose/index.js +25 -0
- package/es/site/data/components/notification/demos/hideClose/react.d.ts +5 -0
- package/es/site/data/components/notification/demos/hideClose/react.js +28 -0
- package/es/site/data/components/notification/demos/icon/index.d.ts +7 -0
- package/es/site/data/components/notification/demos/icon/index.js +33 -0
- package/es/site/data/components/notification/demos/icon/react.d.ts +6 -0
- package/es/site/data/components/notification/demos/icon/react.js +42 -0
- package/es/site/data/components/notification/demos/position/index.d.ts +9 -0
- package/es/site/data/components/notification/demos/position/index.js +27 -0
- package/es/site/data/components/notification/demos/position/react.d.ts +8 -0
- package/es/site/data/components/notification/demos/position/react.js +40 -0
- package/es/site/data/components/notification/demos/types/index.d.ts +9 -0
- package/es/site/data/components/notification/demos/types/index.js +26 -0
- package/es/site/data/components/notification/demos/types/react.d.ts +8 -0
- package/es/site/data/components/notification/demos/types/react.js +39 -0
- package/es/site/data/components/notification/index.d.ts +57 -0
- package/es/site/data/components/notification/index.js +32 -0
- package/es/site/data/components/table/demos/hidden/react.js +21 -3
- package/es/site/data/components/tag/demos/color/index.d.ts +10 -0
- package/es/site/data/components/tag/demos/color/index.js +19 -0
- package/es/site/data/components/tag/demos/color/react.d.ts +10 -0
- package/es/site/data/components/tag/demos/color/react.js +34 -0
- package/es/site/data/components/transfer/demos/pagination/index.d.ts +19 -0
- package/es/site/data/components/transfer/demos/pagination/index.js +42 -0
- package/es/site/data/components/transfer/demos/pagination/react.d.ts +20 -0
- package/es/site/data/components/transfer/demos/pagination/react.js +65 -0
- package/es/site/data/components/transfer/demos/table/index.d.ts +33 -0
- package/es/site/data/components/transfer/demos/table/index.js +132 -0
- package/es/site/data/components/transfer/demos/table/react.d.ts +35 -0
- package/es/site/data/components/transfer/demos/table/react.js +246 -0
- package/es/site/src/router/index.js +4 -33
- package/es/styles/fonts/iconfont.eot +0 -0
- package/es/styles/fonts/iconfont.js +1 -1
- package/es/styles/fonts/iconfont.svg +38 -0
- package/es/styles/fonts/iconfont.ttf +0 -0
- package/es/styles/fonts/iconfont.woff +0 -0
- package/es/styles/fonts/iconfont.woff2 +0 -0
- package/es/styles/theme.d.ts +8 -0
- package/es/styles/theme.js +5 -1
- package/index.ts +4 -2
- package/package.json +2 -2
- package/styles/.DS_Store +0 -0
- package/styles/fonts/demo_index.html +443 -6
- package/styles/fonts/iconfont.css +82 -6
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.js +1 -1
- package/styles/fonts/iconfont.json +133 -0
- package/styles/fonts/iconfont.svg +38 -0
- package/styles/fonts/iconfont.ts +76 -0
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/fonts/iconfont.woff2 +0 -0
- package/styles/theme.ts +4 -0
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
activeAnchor: 'section1'
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
return default_1;
|
|
17
|
+
}(Component);
|
|
18
|
+
default_1.template = template;
|
|
19
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,100 @@
|
|
|
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 { Anchor, AnchorLink } 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
|
+
activeAnchor: 'section1'
|
|
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", {
|
|
24
|
+
className: "anchor-demo"
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
id: "scroll-container3",
|
|
27
|
+
className: "scroll-container3"
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
id: "section1",
|
|
30
|
+
className: "section section1"
|
|
31
|
+
}, /*#__PURE__*/React.createElement("h2", null, "Part1"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1\u7684\u5185\u5BB9"), /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
id: "section1-1",
|
|
33
|
+
className: "subsection"
|
|
34
|
+
}, /*#__PURE__*/React.createElement("h3", null, "Part1.1"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1.1")), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
id: "section1-2",
|
|
36
|
+
className: "subsection"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("h3", null, "Part1.2"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1.2\u7684\u5185\u5BB9"), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
id: "section1-2-1",
|
|
39
|
+
className: "subsubsection"
|
|
40
|
+
}, /*#__PURE__*/React.createElement("h4", null, "Part1.2.1"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1.2.1\u7684\u5185\u5BB9")), /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
id: "section1-2-2",
|
|
42
|
+
className: "subsubsection"
|
|
43
|
+
}, /*#__PURE__*/React.createElement("h4", null, "Part1.2.2"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1.2.2\u7684\u5185\u5BB9"))), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
id: "section1-3",
|
|
45
|
+
className: "subsection"
|
|
46
|
+
}, /*#__PURE__*/React.createElement("h3", null, "Part1.3"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart1.3\u7684\u5185\u5BB9"))), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
id: "section2",
|
|
48
|
+
className: "section section2"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("h2", null, "Part2"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart2\u7684\u5185\u5BB9"), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
id: "section2-1",
|
|
51
|
+
className: "subsection"
|
|
52
|
+
}, /*#__PURE__*/React.createElement("h3", null, "Part2.1"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart2.1\u7684\u5185\u5BB9")), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
id: "section2-2",
|
|
54
|
+
className: "subsection"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("h3", null, "Part2.2"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart2.2\u7684\u5185\u5BB9"))), /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
id: "section3",
|
|
57
|
+
className: "section section3"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("h2", null, "Part3"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u662FPart3\u7684\u5185\u5BB9"))), /*#__PURE__*/React.createElement(Anchor, {
|
|
59
|
+
value: this.state.activeAnchor,
|
|
60
|
+
onChangeValue: function onChangeValue(activeAnchor) {
|
|
61
|
+
return _this2.setState({
|
|
62
|
+
activeAnchor: activeAnchor
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
container: "#scroll-container3"
|
|
66
|
+
}, /*#__PURE__*/React.createElement(AnchorLink, {
|
|
67
|
+
href: "section1",
|
|
68
|
+
title: "Part1"
|
|
69
|
+
}, /*#__PURE__*/React.createElement(AnchorLink, {
|
|
70
|
+
href: "section1-1",
|
|
71
|
+
title: "Part1.1"
|
|
72
|
+
}), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
73
|
+
href: "section1-2",
|
|
74
|
+
title: "Part1.2"
|
|
75
|
+
}, /*#__PURE__*/React.createElement(AnchorLink, {
|
|
76
|
+
href: "section1-2-1",
|
|
77
|
+
title: "Part1.2.1"
|
|
78
|
+
}), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
79
|
+
href: "section1-2-2",
|
|
80
|
+
title: "Part1.2.2"
|
|
81
|
+
})), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
82
|
+
href: "section1-3",
|
|
83
|
+
title: "Part1.3"
|
|
84
|
+
})), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
85
|
+
href: "section2",
|
|
86
|
+
title: "Part2"
|
|
87
|
+
}, /*#__PURE__*/React.createElement(AnchorLink, {
|
|
88
|
+
href: "section2-1",
|
|
89
|
+
title: "Part2.1"
|
|
90
|
+
}), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
91
|
+
href: "section2-2",
|
|
92
|
+
title: "Part2.2"
|
|
93
|
+
})), /*#__PURE__*/React.createElement(AnchorLink, {
|
|
94
|
+
href: "section3",
|
|
95
|
+
title: "Part3"
|
|
96
|
+
})));
|
|
97
|
+
};
|
|
98
|
+
return Demo;
|
|
99
|
+
}(React.Component);
|
|
100
|
+
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,32 @@
|
|
|
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
|
+
var r = require.context('./', true, /demos.*(index|demo).ts/);
|
|
9
|
+
var keys = _keysInstanceProperty(r).call(r);
|
|
10
|
+
var demos = [];
|
|
11
|
+
for (var i = 0; i < keys.length; i++) {
|
|
12
|
+
var file = keys[i];
|
|
13
|
+
if (!_startsWithInstanceProperty(file).call(file, '.')) continue;
|
|
14
|
+
// if we found demo.js then ignore index.js
|
|
15
|
+
if (/demo.ts$/.test(file)) i++;
|
|
16
|
+
demos.push(r(file));
|
|
17
|
+
}
|
|
18
|
+
var default_1 = /*#__PURE__*/function (_Article) {
|
|
19
|
+
_inheritsLoose(default_1, _Article);
|
|
20
|
+
function default_1() {
|
|
21
|
+
return _Article.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
return default_1;
|
|
24
|
+
}(Article);
|
|
25
|
+
default_1.sidebar = sidebar;
|
|
26
|
+
default_1.data = data;
|
|
27
|
+
default_1.defaults = function () {
|
|
28
|
+
return _extends({}, Article.defaults, data, {
|
|
29
|
+
demos: demos
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export { default_1 as default };
|
|
@@ -2,7 +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 { Message } from 'kpc';
|
|
5
|
+
import { Message, Notification } from 'kpc';
|
|
6
6
|
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
7
|
_inheritsLoose(default_1, _Component);
|
|
8
8
|
function default_1() {
|
|
@@ -13,6 +13,13 @@ var default_1 = /*#__PURE__*/function (_Component) {
|
|
|
13
13
|
Message.classNamePrefix = 'kd';
|
|
14
14
|
Message.info('Message with classNamePrefix');
|
|
15
15
|
};
|
|
16
|
+
_proto.showNotification = function showNotification() {
|
|
17
|
+
Notification.classNamePrefix = 'kd';
|
|
18
|
+
Notification.info({
|
|
19
|
+
title: 'Notification',
|
|
20
|
+
content: 'Notification with classNamePrefix'
|
|
21
|
+
});
|
|
22
|
+
};
|
|
16
23
|
return default_1;
|
|
17
24
|
}(Component);
|
|
18
25
|
default_1.template = template;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ConfigProvider, Button, Input } from '@king-design/react';
|
|
4
|
-
import { Message } from '@king-design/react';
|
|
4
|
+
import { Message, Notification } from '@king-design/react';
|
|
5
5
|
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
6
|
_inheritsLoose(Demo, _React$Component);
|
|
7
7
|
function Demo() {
|
|
@@ -12,14 +12,26 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
12
12
|
Message.classNamePrefix = 'kd';
|
|
13
13
|
Message.info('Message with classNamePrefix');
|
|
14
14
|
};
|
|
15
|
+
_proto.showNotification = function showNotification() {
|
|
16
|
+
Notification.classNamePrefix = 'kd';
|
|
17
|
+
Notification.info({
|
|
18
|
+
title: 'Notification',
|
|
19
|
+
content: 'Notification with classNamePrefix'
|
|
20
|
+
});
|
|
21
|
+
};
|
|
15
22
|
_proto.render = function render() {
|
|
16
23
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
17
24
|
value: {
|
|
18
25
|
classNamePrefix: 'kd'
|
|
19
26
|
}
|
|
20
27
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
21
|
-
onClick: this.showMessage
|
|
22
|
-
|
|
28
|
+
onClick: this.showMessage,
|
|
29
|
+
style: {
|
|
30
|
+
"marginRight": "16px"
|
|
31
|
+
}
|
|
32
|
+
}, "Show Message"), /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
onClick: this.showNotification
|
|
34
|
+
}, "Show Notification"), /*#__PURE__*/React.createElement("div", {
|
|
23
35
|
style: {
|
|
24
36
|
"marginTop": "8px"
|
|
25
37
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import { DrawerProps } from 'kpc';
|
|
4
|
+
interface Props {
|
|
5
|
+
show?: boolean;
|
|
6
|
+
placement: DrawerProps['placement'];
|
|
7
|
+
}
|
|
8
|
+
export default class extends Component<Props> {
|
|
9
|
+
static template: string | import("intact").Template<any>;
|
|
10
|
+
static defaults(): {
|
|
11
|
+
show: boolean;
|
|
12
|
+
placement: "left" | "top" | "right" | "bottom" | undefined;
|
|
13
|
+
};
|
|
14
|
+
showDrawer(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { bind } from 'kpc';
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
default_1.defaults = function defaults() {
|
|
13
|
+
return {
|
|
14
|
+
show: false,
|
|
15
|
+
placement: 'right'
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
var _proto = default_1.prototype;
|
|
19
|
+
_proto.showDrawer = function showDrawer() {
|
|
20
|
+
this.set('show', true);
|
|
21
|
+
};
|
|
22
|
+
return default_1;
|
|
23
|
+
}(Component);
|
|
24
|
+
default_1.template = template;
|
|
25
|
+
export { default_1 as default };
|
|
26
|
+
__decorate([bind], default_1.prototype, "showDrawer", null);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawerProps } from '@king-design/react';
|
|
3
|
+
interface Props {
|
|
4
|
+
show?: boolean;
|
|
5
|
+
placement: DrawerProps['placement'];
|
|
6
|
+
}
|
|
7
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
8
|
+
state: {
|
|
9
|
+
show: boolean;
|
|
10
|
+
placement: "left" | "top" | "right" | "bottom" | undefined;
|
|
11
|
+
};
|
|
12
|
+
showDrawer(): void;
|
|
13
|
+
render(): React.JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { Drawer, Button, ButtonGroup } from '@king-design/react';
|
|
6
|
+
import { bind } from '@king-design/react';
|
|
7
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inheritsLoose(Demo, _React$Component);
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
var _this;
|
|
12
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13
|
+
args[_key] = arguments[_key];
|
|
14
|
+
}
|
|
15
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
16
|
+
_this.state = {
|
|
17
|
+
show: false,
|
|
18
|
+
placement: 'right'
|
|
19
|
+
};
|
|
20
|
+
return _this;
|
|
21
|
+
}
|
|
22
|
+
var _proto = Demo.prototype;
|
|
23
|
+
_proto.showDrawer = function showDrawer() {
|
|
24
|
+
this.setState({
|
|
25
|
+
show: true
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
_proto.render = function render() {
|
|
29
|
+
var _this2 = this;
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
31
|
+
checkType: "radio",
|
|
32
|
+
value: this.state.placement,
|
|
33
|
+
onChangeValue: function onChangeValue(placement) {
|
|
34
|
+
return _this2.setState({
|
|
35
|
+
placement: placement
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
value: "top"
|
|
40
|
+
}, "top"), /*#__PURE__*/React.createElement(Button, {
|
|
41
|
+
value: "bottom"
|
|
42
|
+
}, "bottom"), /*#__PURE__*/React.createElement(Button, {
|
|
43
|
+
value: "left"
|
|
44
|
+
}, "left"), /*#__PURE__*/React.createElement(Button, {
|
|
45
|
+
value: "right"
|
|
46
|
+
}, "right")), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
|
|
47
|
+
onClick: this.showDrawer
|
|
48
|
+
}, "\u6253\u5F00 Drawer"), /*#__PURE__*/React.createElement(Drawer, {
|
|
49
|
+
value: this.state.show,
|
|
50
|
+
onChangeValue: function onChangeValue(show) {
|
|
51
|
+
return _this2.setState({
|
|
52
|
+
show: show
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
title: "\u53EF\u8C03\u6574\u5927\u5C0F\u7684 Drawer",
|
|
56
|
+
placement: this.state.placement,
|
|
57
|
+
resizable: true
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u53EF\u4EE5\u901A\u8FC7\u62D6\u62FD\u8FB9\u7F18\u6765\u8C03\u6574 drawer \u7684\u5927\u5C0F\uFF1A"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("strong", null, "top/bottom"), "\uFF1A", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "\u5BBD\u5EA6\uFF1A\u53EF\u4EE5\u901A\u8FC7\u62D6\u62FD\u53F3\u4FA7\u8FB9\u7F18\u6765\u8C03\u6574\u5BBD\u5EA6\uFF0C\u8C03\u6574\u65F6\u4F1A\u81EA\u52A8\u4FDD\u6301\u5C45\u4E2D"), /*#__PURE__*/React.createElement("li", null, "\u9AD8\u5EA6\uFF1A\u53EF\u4EE5\u901A\u8FC7\u62D6\u62FD\u5E95\u90E8\uFF08top\uFF09\u6216\u9876\u90E8\uFF08bottom\uFF09\u8FB9\u7F18\u6765\u8C03\u6574\u9AD8\u5EA6"))), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("strong", null, "left"), "\uFF1A\u53EF\u4EE5\u901A\u8FC7\u62D6\u62FD\u53F3\u4FA7\u8FB9\u7F18\u6765\u8C03\u6574\u5BBD\u5EA6"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("strong", null, "right"), "\uFF1A\u53EF\u4EE5\u901A\u8FC7\u62D6\u62FD\u5DE6\u4FA7\u8FB9\u7F18\u6765\u8C03\u6574\u5BBD\u5EA6")), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D placement: ", this.state.placement))));
|
|
59
|
+
};
|
|
60
|
+
return Demo;
|
|
61
|
+
}(React.Component);
|
|
62
|
+
export { Demo as default };
|
|
63
|
+
__decorate([bind], Demo.prototype, "showDrawer", null);
|
|
@@ -23,7 +23,7 @@ var default_1 = /*#__PURE__*/function (_Component) {
|
|
|
23
23
|
default_1.defaults = function defaults() {
|
|
24
24
|
return {
|
|
25
25
|
keywords: '',
|
|
26
|
-
fonts: [["information-fill"], ["warning-fill"], ["success-fill"], ["error-fill"], ["question-fill"], ["heart-fill"], ['heart'], ['notification-fill'], ['notification'], ["information"], ["alert"], ["question"], ["zoom-in"], ["zoom-out"], ["close-outline"], ["check-outline"], ["time"], ['right-circled', 'arrow'], ['down-circled', 'arrow'], ['right-circled', 'arrow'], ['up-circled', 'arrow'], ['right-squared', 'arrow'], ['down-squared', 'arrow'], ['left-squared', 'arrow'], ['up-squared', 'arrow'], ['right', 'arrow'], ['down', 'arrow'], ['left', 'arrow'], ['up', 'arrow'], ['right-bold', 'arrow'], ['down-bold', 'arrow'], ['left-bold', 'arrow'], ['up-bold', 'arrow'], ['sort'], ['sort-bold'], ['close'], ['close-bold'], ['check'], ['check-bold'], ['add'], ['add-bold'], ['minus'], ['minus-bold'], ['share'], ['tag'], ['clone'], ['cloud'], ['pin'], ['home'], ['cut'], ['server'], ['internet'], ['mail'], ['paper'], ['phone'], ['panel'], ['alarm'], ['earphone'], ['settings-horizontal'], ['settings-vertical'], ['settings'], ['message'], ['return-right'], ['picture'], ['logout'], ['all'], ['drag'], ['more'], ['more-circled'], ['folder'], ['folder-open'], ['lock'], ['unlock'], ['user'], ['users'], ['edit'], ['location'], ['delete'], ['calendar'], ['search'], ['batchsearch'], ['hidden'], ['visible'], ['refresh'], ['upload'], ['download'], ['start'], ['stop'], ['sortorder']]
|
|
26
|
+
fonts: [["information-fill"], ["warning-fill"], ["success-fill"], ["error-fill"], ["question-fill"], ["heart-fill"], ['heart'], ['notification-fill'], ['notification'], ["information"], ["alert"], ["question"], ["zoom-in"], ["zoom-out"], ["close-outline"], ["check-outline"], ["time"], ['right-circled', 'arrow'], ['down-circled', 'arrow'], ['right-circled', 'arrow'], ['up-circled', 'arrow'], ['right-squared', 'arrow'], ['down-squared', 'arrow'], ['left-squared', 'arrow'], ['up-squared', 'arrow'], ['right', 'arrow'], ['down', 'arrow'], ['left', 'arrow'], ['up', 'arrow'], ['right-bold', 'arrow'], ['down-bold', 'arrow'], ['left-bold', 'arrow'], ['up-bold', 'arrow'], ['sort'], ['sort-bold'], ['close'], ['close-bold'], ['check'], ['check-bold'], ['add'], ['add-bold'], ['minus'], ['minus-bold'], ['share'], ['tag'], ['clone'], ['cloud'], ['pin'], ['home'], ['cut'], ['server'], ['internet'], ['mail'], ['paper'], ['phone'], ['panel'], ['alarm'], ['earphone'], ['settings-horizontal'], ['settings-vertical'], ['settings'], ['message'], ['return-right'], ['picture'], ['logout'], ['all'], ['drag'], ['more'], ['more-circled'], ['folder'], ['folder-open'], ['lock'], ['unlock'], ['user'], ['users'], ['edit'], ['location'], ['delete'], ['calendar'], ['search'], ['batchsearch'], ['hidden'], ['visible'], ['refresh'], ['upload'], ['download'], ['start'], ['stop'], ['sortorder'], ["history"], ["correlation"], ["webui"], ["log"], ["save"], ["memory"], ["Physicalport"], ["queue"], ["channel"], ["cpu"], ["change"], ["subnet"], ["listener"], ["outboundrules"], ["inboundrules"], ["fullscreen"], ["add-circled"], ["think"]]
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
var _proto = default_1.prototype;
|
|
@@ -5,6 +5,11 @@ interface Props extends MenuProps {
|
|
|
5
5
|
}
|
|
6
6
|
export default class extends Component<Props> {
|
|
7
7
|
static template: string | import("intact").Template<any>;
|
|
8
|
-
static defaults():
|
|
8
|
+
static defaults(): {
|
|
9
|
+
expandedKeys: string[];
|
|
10
|
+
selectedKey: string;
|
|
11
|
+
collapse: boolean;
|
|
12
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
13
|
+
};
|
|
9
14
|
setTheme(theme?: string): void;
|
|
10
15
|
}
|
|
@@ -3,7 +3,12 @@ import { MenuProps } from '@king-design/react';
|
|
|
3
3
|
interface Props extends MenuProps {
|
|
4
4
|
}
|
|
5
5
|
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
-
state:
|
|
6
|
+
state: {
|
|
7
|
+
expandedKeys: string[];
|
|
8
|
+
selectedKey: string;
|
|
9
|
+
collapse: boolean;
|
|
10
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
11
|
+
};
|
|
7
12
|
private __test;
|
|
8
13
|
setTheme(theme?: string): void;
|
|
9
14
|
render(): React.JSX.Element;
|
|
@@ -6,5 +6,12 @@ interface Props extends MenuProps {
|
|
|
6
6
|
}
|
|
7
7
|
export default class extends Component<Props> {
|
|
8
8
|
static template: string | import("intact").Template<any>;
|
|
9
|
-
static defaults():
|
|
9
|
+
static defaults(): {
|
|
10
|
+
expandedKeys: never[];
|
|
11
|
+
selectedKey: string;
|
|
12
|
+
size: "small" | "large" | "default" | undefined;
|
|
13
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
14
|
+
showCollapseArrow: boolean;
|
|
15
|
+
collapse: boolean;
|
|
16
|
+
};
|
|
10
17
|
}
|
|
@@ -4,7 +4,14 @@ import type { MenuProps } from '@king-design/react';
|
|
|
4
4
|
interface Props extends MenuProps {
|
|
5
5
|
}
|
|
6
6
|
export default class Demo extends React.Component<{}, Props> {
|
|
7
|
-
state:
|
|
7
|
+
state: {
|
|
8
|
+
expandedKeys: never[];
|
|
9
|
+
selectedKey: string;
|
|
10
|
+
size: "small" | "large" | "default" | undefined;
|
|
11
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
12
|
+
showCollapseArrow: boolean;
|
|
13
|
+
collapse: boolean;
|
|
14
|
+
};
|
|
8
15
|
render(): React.JSX.Element;
|
|
9
16
|
}
|
|
10
17
|
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { default as data } from './index.json';
|
|
2
2
|
import { Component } from 'intact';
|
|
3
3
|
import './index.styl';
|
|
4
|
-
import type { MenuProps } from 'kpc';
|
|
5
4
|
export default class extends Component {
|
|
6
5
|
static template: string | import("intact").Template<any>;
|
|
7
|
-
static defaults():
|
|
6
|
+
static defaults(): {
|
|
7
|
+
expandedKeys: string[];
|
|
8
|
+
size: "small" | "large" | "default" | undefined;
|
|
9
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
10
|
+
type: "vertical" | "horizontal" | undefined;
|
|
11
|
+
collapse: boolean;
|
|
12
|
+
};
|
|
8
13
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.styl';
|
|
3
|
-
import type { MenuProps } from '@king-design/react';
|
|
4
3
|
export default class Demo extends React.Component {
|
|
5
|
-
state:
|
|
4
|
+
state: {
|
|
5
|
+
expandedKeys: string[];
|
|
6
|
+
size: "small" | "large" | "default" | undefined;
|
|
7
|
+
theme: "white" | "dark" | "light" | undefined;
|
|
8
|
+
type: "vertical" | "horizontal" | undefined;
|
|
9
|
+
collapse: boolean;
|
|
10
|
+
};
|
|
6
11
|
render(): React.JSX.Element;
|
|
7
12
|
}
|
|
@@ -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 { Notification } from 'kpc';
|
|
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
|
+
var _proto = default_1.prototype;
|
|
12
|
+
_proto.showNotification = function showNotification() {
|
|
13
|
+
Notification.notice({
|
|
14
|
+
title: 'Hello, Kingcloud Design!',
|
|
15
|
+
content: '这是一条基础用法的通知'
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
return default_1;
|
|
19
|
+
}(Component);
|
|
20
|
+
default_1.template = template;
|
|
21
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button } from '@king-design/react';
|
|
4
|
+
import { Notification } from '@king-design/react';
|
|
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.showNotification = function showNotification() {
|
|
12
|
+
Notification.notice({
|
|
13
|
+
title: 'Hello, Kingcloud Design!',
|
|
14
|
+
content: '这是一条基础用法的通知'
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
_proto.render = function render() {
|
|
18
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
19
|
+
onClick: this.showNotification.bind(this)
|
|
20
|
+
}, "\u57FA\u7840\u7528\u6CD5");
|
|
21
|
+
};
|
|
22
|
+
return Demo;
|
|
23
|
+
}(React.Component);
|
|
24
|
+
export { Demo as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
notificationId?: number;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
notificationId: undefined;
|
|
10
|
+
};
|
|
11
|
+
showNotification(): void;
|
|
12
|
+
closeNotification(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Notification, bind } from 'kpc';
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
default_1.defaults = function defaults() {
|
|
13
|
+
return {
|
|
14
|
+
notificationId: undefined
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
var _proto = default_1.prototype;
|
|
18
|
+
_proto.showNotification = function showNotification() {
|
|
19
|
+
var id = Notification.info({
|
|
20
|
+
title: '可关闭的通知',
|
|
21
|
+
content: '点击"关闭通知"按钮可以关闭此通知',
|
|
22
|
+
duration: 0
|
|
23
|
+
});
|
|
24
|
+
this.set('notificationId', id);
|
|
25
|
+
};
|
|
26
|
+
_proto.closeNotification = function closeNotification() {
|
|
27
|
+
var notificationId = this.get('notificationId');
|
|
28
|
+
if (notificationId !== undefined) {
|
|
29
|
+
Notification.close(notificationId);
|
|
30
|
+
this.set('notificationId', undefined);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return default_1;
|
|
34
|
+
}(Component);
|
|
35
|
+
default_1.template = template;
|
|
36
|
+
export { default_1 as default };
|
|
37
|
+
__decorate([bind], default_1.prototype, "showNotification", null);
|
|
38
|
+
__decorate([bind], default_1.prototype, "closeNotification", null);
|