@cainiaofe/cn-ui-m
Version:
23 lines (22 loc) • 1.27 kB
JavaScript
import * as React from 'react';
import { CnPage, CnDownload, CnButton } from "../../..";
export default { title: 'demo/CnDownload' };
export var 自定义下载按钮文案 = function () {
return (React.createElement(CnPage, null,
React.createElement(CnDownload, { buttonText: "\u81EA\u5B9A\u4E49\u4E0B\u8F7D\u6309\u94AE\u6587\u6848", requestConfig: {
url: 'https://oneapi.alibaba-inc.com/mock/l00nz0jl/ei/oss-download',
} })));
};
export var 通过customrender自定义下载按钮 = function () {
return (React.createElement(CnPage, null,
React.createElement(CnDownload, { requestConfig: {
url: 'https://oneapi.alibaba-inc.com/mock/l00nz0jl/ei/oss-download',
}, customRender: function (download) { return (React.createElement(CnButton, { type: "primary", onClick: download }, "\u81EA\u5B9A\u4E49\u6309\u94AE")); } })));
};
export var 通过子节点自定义下载按钮 = function () {
return (React.createElement(CnPage, null,
React.createElement(CnDownload, { requestConfig: {
url: 'https://oneapi.alibaba-inc.com/mock/l00nz0jl/ei/oss-download',
} },
React.createElement("a", null, "\u81EA\u5B9A\u4E49\u4E0B\u8F7D\u6309\u94AE"))));
};