UNPKG

@cainiaofe/cn-ui-m

Version:
16 lines (15 loc) 1.52 kB
import * as React from 'react'; import { CnBox, CnButton, CnDemoBlock, CnDemoPage } from "../../.."; export var 标签类型 = function () { return (React.createElement(CnDemoPage, { title: "\u6807\u7B7E\u7C7B\u578B", noPadding: true }, React.createElement(CnDemoBlock, { title: "\u6309\u94AE" }, React.createElement(CnBox, { direction: "row", justify: "space-between", wrap: true }, React.createElement(CnButton, { type: "normal", htmlType: "button" }, "Normal"), React.createElement(CnButton, { type: "primary", htmlType: "submit" }, "Primary"), React.createElement(CnButton, { type: "secondary", htmlType: "reset" }, "Secondary"))), React.createElement(CnDemoBlock, { title: "\u94FE\u63A5" }, React.createElement(CnBox, { direction: "row", justify: "space-between", wrap: true }, React.createElement(CnButton, { type: "normal", component: "a", href: "https://www.taobao.com" }, "\u5F53\u524D\u9875\u9762\u6253\u5F00\u94FE\u63A5"), React.createElement(CnButton, { type: "primary", component: "a", href: "https://www.taobao.com", target: "_blank" }, "\u65B0\u9875\u9762\u6253\u5F00\u94FE\u63A5"))))); }; 标签类型.desc = '通过component可以指定按钮的标签类型。默认为button,此时可以通过htmlType配置按钮的行为,比如提交表单等。当标签为a时,可以通过href和target配置打开的链接和位置,将按钮当做标准的a标签使用。'; export default { title: 'demo/CnButton' };