@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,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
notificationId?: number;
|
|
4
|
+
}
|
|
5
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
+
state: {
|
|
7
|
+
notificationId: undefined;
|
|
8
|
+
};
|
|
9
|
+
showNotification(): void;
|
|
10
|
+
closeNotification(): void;
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { ButtonGroup, Button } from '@king-design/react';
|
|
6
|
+
import { Notification, 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
|
+
notificationId: undefined
|
|
18
|
+
};
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
var _proto = Demo.prototype;
|
|
22
|
+
_proto.showNotification = function showNotification() {
|
|
23
|
+
var id = Notification.info({
|
|
24
|
+
title: '可关闭的通知',
|
|
25
|
+
content: '点击"关闭通知"按钮可以关闭此通知',
|
|
26
|
+
duration: 0
|
|
27
|
+
});
|
|
28
|
+
this.setState({
|
|
29
|
+
notificationId: id
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
_proto.closeNotification = function closeNotification() {
|
|
33
|
+
var notificationId = this.state.notificationId;
|
|
34
|
+
if (notificationId !== undefined) {
|
|
35
|
+
Notification.close(notificationId);
|
|
36
|
+
this.setState({
|
|
37
|
+
notificationId: undefined
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
_proto.render = function render() {
|
|
42
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
43
|
+
onClick: this.showNotification
|
|
44
|
+
}, "\u663E\u793A\u901A\u77E5"), /*#__PURE__*/React.createElement(Button, {
|
|
45
|
+
onClick: this.closeNotification
|
|
46
|
+
}, "\u5173\u95ED\u901A\u77E5"));
|
|
47
|
+
};
|
|
48
|
+
return Demo;
|
|
49
|
+
}(React.Component);
|
|
50
|
+
export { Demo as default };
|
|
51
|
+
__decorate([bind], Demo.prototype, "showNotification", null);
|
|
52
|
+
__decorate([bind], Demo.prototype, "closeNotification", null);
|
|
@@ -0,0 +1,33 @@
|
|
|
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 } from 'kpc';
|
|
7
|
+
import { bind } from 'kpc';
|
|
8
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inheritsLoose(default_1, _Component);
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
var _proto = default_1.prototype;
|
|
14
|
+
_proto.showCloseDelay = function showCloseDelay() {
|
|
15
|
+
Notification.warning({
|
|
16
|
+
title: '10s后关闭',
|
|
17
|
+
content: '这条通知10s后才会自动关闭',
|
|
18
|
+
duration: 10000
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
_proto.showStick = function showStick() {
|
|
22
|
+
Notification.warning({
|
|
23
|
+
title: '不会自动关闭',
|
|
24
|
+
content: '这条通知不会自动关闭,需要手动关闭',
|
|
25
|
+
duration: 0
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return default_1;
|
|
29
|
+
}(Component);
|
|
30
|
+
default_1.template = template;
|
|
31
|
+
export { default_1 as default };
|
|
32
|
+
__decorate([bind], default_1.prototype, "showCloseDelay", null);
|
|
33
|
+
__decorate([bind], default_1.prototype, "showStick", null);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ButtonGroup, Button } from '@king-design/react';
|
|
5
|
+
import { Notification } 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
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
_proto.showCloseDelay = function showCloseDelay() {
|
|
14
|
+
Notification.warning({
|
|
15
|
+
title: '10s后关闭',
|
|
16
|
+
content: '这条通知10s后才会自动关闭',
|
|
17
|
+
duration: 10000
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
_proto.showStick = function showStick() {
|
|
21
|
+
Notification.warning({
|
|
22
|
+
title: '不会自动关闭',
|
|
23
|
+
content: '这条通知不会自动关闭,需要手动关闭',
|
|
24
|
+
duration: 0
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
onClick: this.showCloseDelay
|
|
30
|
+
}, "10s\u540E\u5173\u95ED"), /*#__PURE__*/React.createElement(Button, {
|
|
31
|
+
onClick: this.showStick
|
|
32
|
+
}, "\u4E0D\u4F1A\u81EA\u52A8\u5173\u95ED"));
|
|
33
|
+
};
|
|
34
|
+
return Demo;
|
|
35
|
+
}(React.Component);
|
|
36
|
+
export { Demo as default };
|
|
37
|
+
__decorate([bind], Demo.prototype, "showCloseDelay", null);
|
|
38
|
+
__decorate([bind], Demo.prototype, "showStick", null);
|
|
@@ -0,0 +1,31 @@
|
|
|
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, Message } from 'kpc';
|
|
7
|
+
import { bind } from 'kpc';
|
|
8
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inheritsLoose(default_1, _Component);
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
var _proto = default_1.prototype;
|
|
14
|
+
_proto.showNotification = function showNotification() {
|
|
15
|
+
Notification.info({
|
|
16
|
+
title: '事件通知',
|
|
17
|
+
content: '点击通知或等待自动关闭,查看页面信息提示',
|
|
18
|
+
onClick: function onClick(e) {
|
|
19
|
+
Message.info('你点击了通知');
|
|
20
|
+
},
|
|
21
|
+
onClose: function onClose() {
|
|
22
|
+
Message.warning('通知已关闭');
|
|
23
|
+
},
|
|
24
|
+
className: 'event-test'
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
return default_1;
|
|
28
|
+
}(Component);
|
|
29
|
+
default_1.template = template;
|
|
30
|
+
export { default_1 as default };
|
|
31
|
+
__decorate([bind], default_1.prototype, "showNotification", null);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ButtonGroup, Button } from '@king-design/react';
|
|
5
|
+
import { Notification, Message } 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
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
_proto.showNotification = function showNotification() {
|
|
14
|
+
Notification.info({
|
|
15
|
+
title: '事件通知',
|
|
16
|
+
content: '点击通知或等待自动关闭,查看页面信息提示',
|
|
17
|
+
onClick: function onClick(e) {
|
|
18
|
+
Message.info('你点击了通知');
|
|
19
|
+
},
|
|
20
|
+
onClose: function onClose() {
|
|
21
|
+
Message.warning('通知已关闭');
|
|
22
|
+
},
|
|
23
|
+
className: 'event-test'
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
_proto.render = function render() {
|
|
27
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
onClick: this.showNotification
|
|
29
|
+
}, "\u663E\u793A\u901A\u77E5"));
|
|
30
|
+
};
|
|
31
|
+
return Demo;
|
|
32
|
+
}(React.Component);
|
|
33
|
+
export { Demo as default };
|
|
34
|
+
__decorate([bind], Demo.prototype, "showNotification", null);
|
|
@@ -0,0 +1,25 @@
|
|
|
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 } from 'kpc';
|
|
7
|
+
import { bind } from 'kpc';
|
|
8
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inheritsLoose(default_1, _Component);
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
var _proto = default_1.prototype;
|
|
14
|
+
_proto.hideClosable = function hideClosable() {
|
|
15
|
+
Notification.info({
|
|
16
|
+
title: '隐藏关闭按钮',
|
|
17
|
+
content: '这条通知隐藏了关闭按钮',
|
|
18
|
+
closable: false
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
return default_1;
|
|
22
|
+
}(Component);
|
|
23
|
+
default_1.template = template;
|
|
24
|
+
export { default_1 as default };
|
|
25
|
+
__decorate([bind], default_1.prototype, "hideClosable", null);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Button } from '@king-design/react';
|
|
5
|
+
import { Notification } 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
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
_proto.hideClosable = function hideClosable() {
|
|
14
|
+
Notification.info({
|
|
15
|
+
title: '隐藏关闭按钮',
|
|
16
|
+
content: '这条通知隐藏了关闭按钮',
|
|
17
|
+
closable: false
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
_proto.render = function render() {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
22
|
+
onClick: this.hideClosable
|
|
23
|
+
}, "\u9690\u85CF\u5173\u95ED\u6309\u94AE");
|
|
24
|
+
};
|
|
25
|
+
return Demo;
|
|
26
|
+
}(React.Component);
|
|
27
|
+
export { Demo as default };
|
|
28
|
+
__decorate([bind], Demo.prototype, "hideClosable", null);
|
|
@@ -0,0 +1,33 @@
|
|
|
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 } from 'kpc';
|
|
7
|
+
import { bind } from 'kpc';
|
|
8
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inheritsLoose(default_1, _Component);
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
var _proto = default_1.prototype;
|
|
14
|
+
_proto.showNotificationIcon = function showNotificationIcon() {
|
|
15
|
+
Notification.notice({
|
|
16
|
+
title: '自定义图标',
|
|
17
|
+
content: 'hello, kc',
|
|
18
|
+
icon: 'k-icon-notification-fill'
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
_proto.showTimeIcon = function showTimeIcon() {
|
|
22
|
+
Notification.notice({
|
|
23
|
+
title: '自定义图标',
|
|
24
|
+
content: 'hello, kc',
|
|
25
|
+
icon: 'k-icon-time'
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return default_1;
|
|
29
|
+
}(Component);
|
|
30
|
+
default_1.template = template;
|
|
31
|
+
export { default_1 as default };
|
|
32
|
+
__decorate([bind], default_1.prototype, "showNotificationIcon", null);
|
|
33
|
+
__decorate([bind], default_1.prototype, "showTimeIcon", null);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ButtonGroup, Button, Icon } from '@king-design/react';
|
|
5
|
+
import { Notification } 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
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
_proto.showNotificationIcon = function showNotificationIcon() {
|
|
14
|
+
Notification.notice({
|
|
15
|
+
title: '自定义图标',
|
|
16
|
+
content: 'hello, kc',
|
|
17
|
+
icon: 'k-icon-notification-fill'
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
_proto.showTimeIcon = function showTimeIcon() {
|
|
21
|
+
Notification.notice({
|
|
22
|
+
title: '自定义图标',
|
|
23
|
+
content: 'hello, kc',
|
|
24
|
+
icon: 'k-icon-time'
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
onClick: this.showNotificationIcon
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
31
|
+
className: "k-icon-notification-fill"
|
|
32
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
onClick: this.showTimeIcon
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
35
|
+
className: "k-icon-time"
|
|
36
|
+
})));
|
|
37
|
+
};
|
|
38
|
+
return Demo;
|
|
39
|
+
}(React.Component);
|
|
40
|
+
export { Demo as default };
|
|
41
|
+
__decorate([bind], Demo.prototype, "showNotificationIcon", null);
|
|
42
|
+
__decorate([bind], Demo.prototype, "showTimeIcon", null);
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
positions: readonly ["topRight", "topLeft", "bottomRight", "bottomLeft", "top", "bottom"];
|
|
7
|
+
};
|
|
8
|
+
showNotification(position: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'top' | 'bottom'): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
default_1.defaults = function defaults() {
|
|
12
|
+
return {
|
|
13
|
+
positions: ['topRight', 'topLeft', 'bottomRight', 'bottomLeft', 'top', 'bottom']
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
var _proto = default_1.prototype;
|
|
17
|
+
_proto.showNotification = function showNotification(position) {
|
|
18
|
+
Notification.info({
|
|
19
|
+
title: '通知标题',
|
|
20
|
+
content: "\u901A\u77E5\u51FA\u73B0\u5728" + position + "\u4F4D\u7F6E",
|
|
21
|
+
position: position
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return default_1;
|
|
25
|
+
}(Component);
|
|
26
|
+
default_1.template = template;
|
|
27
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default class Demo extends React.Component {
|
|
3
|
+
state: {
|
|
4
|
+
positions: readonly ["topRight", "topLeft", "bottomRight", "bottomLeft", "top", "bottom"];
|
|
5
|
+
};
|
|
6
|
+
showNotification(position: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'top' | 'bottom'): void;
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { ButtonGroup, Button } from '@king-design/react';
|
|
6
|
+
import { Notification } 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
|
+
positions: ['topRight', 'topLeft', 'bottomRight', 'bottomLeft', 'top', 'bottom']
|
|
18
|
+
};
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
var _proto = Demo.prototype;
|
|
22
|
+
_proto.showNotification = function showNotification(position) {
|
|
23
|
+
Notification.info({
|
|
24
|
+
title: '通知标题',
|
|
25
|
+
content: "\u901A\u77E5\u51FA\u73B0\u5728" + position + "\u4F4D\u7F6E",
|
|
26
|
+
position: position
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
_proto.render = function render() {
|
|
30
|
+
var _context2,
|
|
31
|
+
_this2 = this;
|
|
32
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, _mapInstanceProperty(_context2 = this.state.positions).call(_context2, function ($value, $key) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
onClick: _this2.showNotification.bind(_this2, $value)
|
|
35
|
+
}, $value);
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
return Demo;
|
|
39
|
+
}(React.Component);
|
|
40
|
+
export { Demo as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
types: readonly ["info", "error", "warning", "success"];
|
|
7
|
+
};
|
|
8
|
+
showNotification(type: 'info' | 'error' | 'warning' | 'success'): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
default_1.defaults = function defaults() {
|
|
12
|
+
return {
|
|
13
|
+
types: ['info', 'error', 'warning', 'success']
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
var _proto = default_1.prototype;
|
|
17
|
+
_proto.showNotification = function showNotification(type) {
|
|
18
|
+
Notification[type]({
|
|
19
|
+
title: type,
|
|
20
|
+
content: "\u8FD9\u662F\u4E00\u6761" + type + "\u7C7B\u578B\u7684\u901A\u77E5"
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return default_1;
|
|
24
|
+
}(Component);
|
|
25
|
+
default_1.template = template;
|
|
26
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { ButtonGroup, Button } from '@king-design/react';
|
|
6
|
+
import { Notification } 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
|
+
types: ['info', 'error', 'warning', 'success']
|
|
18
|
+
};
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
var _proto = Demo.prototype;
|
|
22
|
+
_proto.showNotification = function showNotification(type) {
|
|
23
|
+
Notification[type]({
|
|
24
|
+
title: type,
|
|
25
|
+
content: "\u8FD9\u662F\u4E00\u6761" + type + "\u7C7B\u578B\u7684\u901A\u77E5"
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
_proto.render = function render() {
|
|
29
|
+
var _context2,
|
|
30
|
+
_this2 = this;
|
|
31
|
+
return /*#__PURE__*/React.createElement(ButtonGroup, null, _mapInstanceProperty(_context2 = this.state.types).call(_context2, function ($value, $key) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
onClick: _this2.showNotification.bind(_this2, $value)
|
|
34
|
+
}, $value);
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
return Demo;
|
|
38
|
+
}(React.Component);
|
|
39
|
+
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
|
+
}
|