@cuvp1225/antd 0.3.18 → 0.3.19

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.
@@ -1,2 +1,3 @@
1
+ import { PopconfirmProps } from 'antd';
1
2
  import React from 'react';
2
- export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<import("antd").PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
3
+ export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -4,12 +4,18 @@ exports.Popconfirm = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const antd_1 = require("antd");
6
6
  const tango_boot_1 = require("@music163/tango-boot");
7
+ const button_1 = require("./button");
7
8
  const react_1 = tslib_1.__importDefault(require("react"));
9
+ function PopconfirmDesigner(_a) {
10
+ var { children, onCancel, cancelText = '取消', okText = '确认', style } = _a, rest = tslib_1.__rest(_a, ["children", "onCancel", "cancelText", "okText", "style"]);
11
+ return (react_1.default.createElement(antd_1.Popconfirm, Object.assign({ title: "Are you sure?" }, rest, { style: style }),
12
+ react_1.default.createElement(button_1.Button, { children: "\u5220\u9664" })));
13
+ }
8
14
  exports.Popconfirm = (0, tango_boot_1.defineComponent)(antd_1.Popconfirm, {
9
15
  name: 'Popconfirm',
10
16
  designerConfig: {
11
- defaultProps: {
12
- children: react_1.default.createElement(antd_1.Button, { children: "\u5220\u9664" }),
17
+ render({ designerProps, originalProps }) {
18
+ return react_1.default.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
13
19
  },
14
20
  },
15
21
  });
@@ -1,2 +1,3 @@
1
+ import { PopconfirmProps } from 'antd';
1
2
  import React from 'react';
2
- export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<import("antd").PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
3
+ export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -1,11 +1,18 @@
1
- import { Button, Popconfirm as AntPopconfirm } from 'antd';
1
+ import { __rest } from "tslib";
2
+ import { Popconfirm as AntPopconfirm } from 'antd';
2
3
  import { defineComponent } from '@music163/tango-boot';
4
+ import { Button } from './button';
3
5
  import React from 'react';
6
+ function PopconfirmDesigner(_a) {
7
+ var { children, onCancel, cancelText = '取消', okText = '确认', style } = _a, rest = __rest(_a, ["children", "onCancel", "cancelText", "okText", "style"]);
8
+ return (React.createElement(AntPopconfirm, Object.assign({ title: "Are you sure?" }, rest, { style: style }),
9
+ React.createElement(Button, { children: "\u5220\u9664" })));
10
+ }
4
11
  export const Popconfirm = defineComponent(AntPopconfirm, {
5
12
  name: 'Popconfirm',
6
13
  designerConfig: {
7
- defaultProps: {
8
- children: React.createElement(Button, { children: "\u5220\u9664" }),
14
+ render({ designerProps, originalProps }) {
15
+ return React.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
9
16
  },
10
17
  },
11
18
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "description": "antd components for tango app",
5
5
  "author": "wwsun <ww.sww@outlook.com>",
6
6
  "homepage": "https://github.com/netease/tango-components#readme",
@@ -54,5 +54,5 @@
54
54
  "classnames": "^2.3.2",
55
55
  "coral-system": "^1.0.6"
56
56
  },
57
- "gitHead": "ff1bff63eaa19f7e9be19a6109d83296147c9a80"
57
+ "gitHead": "e66bd335e2e6e6876be8f06597fe3f9865531609"
58
58
  }