publish(@omiu/button)
This commit is contained in:
parent
338157d251
commit
500bea8549
|
@ -0,0 +1,60 @@
|
|||
## Button
|
||||
|
||||
Button
|
||||
|
||||
* [→ CodePen](https://codepen.io/omijs/pen/LYppwYG)
|
||||
|
||||
## Import
|
||||
|
||||
```js
|
||||
import '@omiu/button'
|
||||
```
|
||||
|
||||
Or use script tag to ref it.
|
||||
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/@omiu/button"></script>
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```html
|
||||
<o-button></o-button>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
|
||||
```tsx
|
||||
{
|
||||
size?: 'medium' | 'small' | 'mini',
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
|
||||
plain?: boolean,
|
||||
round?: boolean,
|
||||
circle?: boolean,
|
||||
loading?: boolean,
|
||||
disabled?: boolean,
|
||||
icon?: string,
|
||||
autofocus?: boolean,
|
||||
nativeType?: 'button' | 'submit' | 'reset',
|
||||
block?: boolean
|
||||
text?: string
|
||||
}
|
||||
```
|
||||
|
||||
### 默认属性
|
||||
|
||||
```tsx
|
||||
{
|
||||
plain: false,
|
||||
round: false,
|
||||
circle: false,
|
||||
loading: false,
|
||||
disabled: false,
|
||||
autofocus: false,
|
||||
nativeType: 'button',
|
||||
block: false
|
||||
}
|
||||
```
|
|
@ -2,134 +2,134 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
|
||||
<meta charset="UTF-8" />
|
||||
<title>Omiu Button</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
|
||||
<meta charset="UTF-8" />
|
||||
<title>Omiu Button</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<a href="https://github.com/Tencent/omi" target="_blank" style="position: fixed; right: 0; top: 0; z-index: 3;">
|
||||
<img src="//alloyteam.github.io/github.png" alt="">
|
||||
</a>
|
||||
<script src="https://tencent.github.io/omi/packages/omi/dist/omi.js"></script>
|
||||
<script src="../../../common//src/index.js"></script>
|
||||
<script src="../../src/index.js"></script>
|
||||
<script src="../../../icon/ac-unit-outlined.js"></script>
|
||||
<script src="../../../icon/accessible-rounded.js"></script>
|
||||
<style>
|
||||
o-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
<a href="https://github.com/Tencent/omi" target="_blank" style="position: fixed; right: 0; top: 0; z-index: 3;">
|
||||
<img src="//alloyteam.github.io/github.png" alt="">
|
||||
</a>
|
||||
<script src="https://tencent.github.io/omi/packages/omi/dist/omi.js"></script>
|
||||
<script src="../../../common//src/index.js"></script>
|
||||
<script src="../../src/index.js"></script>
|
||||
<script src="../../../icon/ac-unit-outlined.js"></script>
|
||||
<script src="../../../icon/accessible-rounded.js"></script>
|
||||
<style>
|
||||
o-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div>
|
||||
<o-button>Default</o-button>
|
||||
<o-button type="primary">Primary</o-button>
|
||||
</style>
|
||||
<div>
|
||||
<o-button text="Default"></o-button>
|
||||
<o-button type="primary">Primary</o-button>
|
||||
|
||||
<o-button type="danger">Danger</o-button>
|
||||
<o-button type="danger">Danger</o-button>
|
||||
|
||||
<o-button type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
<o-button type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<o-button disabled>Default</o-button>
|
||||
<o-button disabled type="primary">Primary</o-button>
|
||||
<div>
|
||||
<o-button disabled>Default</o-button>
|
||||
<o-button disabled type="primary">Primary</o-button>
|
||||
|
||||
<o-button disabled type="danger">Danger</o-button>
|
||||
<o-button disabled type="danger">Danger</o-button>
|
||||
|
||||
<o-button disabled type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button disabled type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
<o-button disabled type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button disabled type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<o-button plain>Plain</o-button>
|
||||
<o-button plain type="primary">Primary</o-button>
|
||||
<div>
|
||||
<o-button plain>Plain</o-button>
|
||||
<o-button plain type="primary">Primary</o-button>
|
||||
|
||||
<o-button plain type="danger">Danger</o-button>
|
||||
<o-button plain type="danger">Danger</o-button>
|
||||
|
||||
<o-button plain type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button plain type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined> Icon
|
||||
</o-button>
|
||||
<o-button plain type="danger">Icon <o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
|
||||
|
||||
<o-button plain type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button plain type="danger">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button plain type="danger">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
|
||||
<o-button plain type="danger" size="medium">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="danger" size="small">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="danger" size="mini">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
<o-button plain type="danger" size="medium">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="danger" size="small">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
<o-button plain type="danger" size="mini">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<o-button plain loading>Plain</o-button>
|
||||
<o-button plain loading type="primary">Primary</o-button>
|
||||
<div>
|
||||
<o-button plain loading>Plain</o-button>
|
||||
<o-button plain loading type="primary">Primary</o-button>
|
||||
|
||||
<o-button plain loading type="danger">Danger</o-button>
|
||||
<o-button plain loading type="danger">Danger</o-button>
|
||||
|
||||
|
||||
<o-button plain loading type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button plain loading type="danger">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
<o-button plain loading type="primary">
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button plain loading type="danger">
|
||||
<o-icon-accessible-rounded></o-icon-accessible-rounded>
|
||||
</o-button>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<o-button>Default</o-button>
|
||||
<o-button size="medium">Medium</o-button>
|
||||
<o-button size="small">Small</o-button>
|
||||
<o-button size="mini">Mini</o-button>
|
||||
</div>
|
||||
<div>
|
||||
<o-button>Default</o-button>
|
||||
<o-button size="medium">Medium</o-button>
|
||||
<o-button size="small">Small</o-button>
|
||||
<o-button size="mini">Mini</o-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<o-button round>Default</o-button>
|
||||
<o-button round size="medium">Medium</o-button>
|
||||
<o-button round size="small">Small</o-button>
|
||||
<o-button round size="mini">Mini</o-button>
|
||||
</div>
|
||||
<div>
|
||||
<o-button round>Default</o-button>
|
||||
<o-button round size="medium">Medium</o-button>
|
||||
<o-button round size="small">Small</o-button>
|
||||
<o-button round size="mini">Mini</o-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<o-button circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="primary" circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="danger" circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="primary" plain circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="danger" plain circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
</div>
|
||||
<div>
|
||||
<o-button circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="primary" circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="danger" circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="primary" plain circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
<o-button type="danger" plain circle>
|
||||
<o-icon-ac-unit-outlined></o-icon-ac-unit-outlined>
|
||||
</o-button>
|
||||
</div>
|
||||
|
||||
<o-button block>Block button</o-button>
|
||||
<o-button block>Block button</o-button>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
{
|
||||
"name": "@omiu/button",
|
||||
"version": "0.0.7",
|
||||
"description": "Omi UI Components.",
|
||||
"version": "0.0.8",
|
||||
"description": "Button",
|
||||
"docsExtend": {
|
||||
"cnName": "按钮",
|
||||
"cnDescription": "按钮",
|
||||
"codepen": "LYppwYG",
|
||||
"codepenHeight": 351,
|
||||
"codepenDefaultTab": "html,result"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"module": "src/index.esm.js",
|
||||
"types": "src/index.d.ts",
|
||||
"scripts": {
|
||||
"docs": "node ./scripts/docs-gen.js",
|
||||
"start": "node ./scripts/webpack.build.js -- demo",
|
||||
"build": "node ./scripts/webpack.build.js -- build && rollup -c scripts/rollup.config.js && node ./scripts/rollup.end.js"
|
||||
},
|
||||
|
@ -80,12 +88,6 @@
|
|||
"rollup-plugin-babel"
|
||||
]
|
||||
},
|
||||
"bundlesize": [
|
||||
{
|
||||
"path": "./dist/omim.min.js",
|
||||
"threshold": "4Kb"
|
||||
}
|
||||
],
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
//自动扫描 index.tsx 生成 readme
|
||||
const fs = require('fs')
|
||||
|
||||
const content = fs.readFileSync('./src/index.tsx', 'utf-8')
|
||||
|
||||
const props = extract('interface Props {', content).replace('interface Props ', '')
|
||||
|
||||
const defaultProps = extract('static defaultProps = {', content).replace('static defaultProps = ', '').replace(/ }/g, '}').replace(/ /g, ' ')
|
||||
|
||||
|
||||
const eventContexts = content.match(new RegExp('this.fire\\([\\s\\S]*?[,|)]', 'g'))
|
||||
const package = require('../package.json')
|
||||
const packageName = package.name
|
||||
const name = packageName.split('/')[1]
|
||||
|
||||
const upperCaseName = name.split('-').map(item => {
|
||||
return item.charAt(0).toUpperCase() + item.slice(1)
|
||||
}).join('')
|
||||
const tagName = 'o-' + name
|
||||
|
||||
//fire 附近打标标记 event.detail 类型?
|
||||
let events, eventMap
|
||||
if (eventContexts) {
|
||||
|
||||
events = eventContexts.map(event => {
|
||||
return event.replace('this.fire(\'', '').replace('\',', '').replace('\')', '')
|
||||
})
|
||||
eventMap = {}
|
||||
events.forEach(event => {
|
||||
eventMap[event] = 1
|
||||
})
|
||||
}
|
||||
|
||||
const cnContent = `## ${upperCaseName} ${package.docsExtend.cnName}
|
||||
|
||||
${package.docsExtend.cnDescription}
|
||||
|
||||
<iframe height="${package.docsExtend.codepenHeight}" style="width: 100%;" scrolling="no" title="OMIU ${upperCaseName}" src="https://codepen.io/omijs/embed/${package.docsExtend.codepen}?height=${package.docsExtend.codepenHeight}&theme-id=default&default-tab=${package.docsExtend.codepenDefaultTab}" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/${package.docsExtend.codepen}'>OMIU Checkbox</a> by OMI
|
||||
(<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.
|
||||
</iframe>
|
||||
|
||||
## 导入
|
||||
|
||||
\`\`\`js
|
||||
import '${packageName}'
|
||||
\`\`\`
|
||||
|
||||
或者直接 script 标签引入。
|
||||
|
||||
|
||||
\`\`\`html
|
||||
<script src="https://unpkg.com/${packageName}"></script>
|
||||
\`\`\`
|
||||
|
||||
## 使用
|
||||
|
||||
\`\`\`html
|
||||
<${tagName}></${tagName}>
|
||||
\`\`\`
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### 属性
|
||||
|
||||
\`\`\`tsx
|
||||
${props}
|
||||
\`\`\`
|
||||
|
||||
${defaultProps ? '### 默认属性\n' : ''}${defaultProps ? '\`\`\`tsx\n' : ''}${defaultProps ? defaultProps : ''}
|
||||
${defaultProps ? '\`\`\`\n' : ''}${eventMap ? '### 事件\n' : ''}${eventMap ? Object.keys(eventMap).map(event => {
|
||||
return `* ${event}\n`
|
||||
}).join('') : ''}`
|
||||
|
||||
fs.writeFileSync(`../docs-src/src/docs/zh-cn/${name}.md`, cnContent)
|
||||
|
||||
|
||||
|
||||
const enContent = `## ${upperCaseName}
|
||||
|
||||
${package.description}
|
||||
|
||||
<iframe height="${package.docsExtend.codepenHeight}" style="width: 100%;" scrolling="no" title="OMIU ${upperCaseName}" src="https://codepen.io/omijs/embed/${package.docsExtend.codepen}?height=${package.docsExtend.codepenHeight}&theme-id=default&default-tab=${package.docsExtend.codepenDefaultTab}" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/${package.docsExtend.codepen}'>OMIU Checkbox</a> by OMI
|
||||
(<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.
|
||||
</iframe>
|
||||
|
||||
## Import
|
||||
|
||||
\`\`\`js
|
||||
import '${packageName}'
|
||||
\`\`\`
|
||||
|
||||
Or use script tag to ref it.
|
||||
|
||||
|
||||
\`\`\`html
|
||||
<script src="https://unpkg.com/${packageName}"></script>
|
||||
\`\`\`
|
||||
|
||||
## Usage
|
||||
|
||||
\`\`\`html
|
||||
<${tagName}></${tagName}>
|
||||
\`\`\`
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
|
||||
\`\`\`tsx
|
||||
${props}
|
||||
\`\`\`
|
||||
|
||||
${defaultProps ? '### 默认属性\n\n' : ''}${defaultProps ? '\`\`\`tsx\n' : ''}${defaultProps ? defaultProps : ''}
|
||||
${defaultProps ? '\`\`\`\n' : ''}${eventMap ? '### Events\n\n' : ''}${eventMap ? Object.keys(eventMap).map(event => {
|
||||
return `* ${event}\n`
|
||||
}).join('') : ''}`
|
||||
|
||||
|
||||
fs.writeFileSync(`../docs-src/src/docs/en/${name}.md`, enContent)
|
||||
|
||||
|
||||
fs.writeFileSync(`../${name}/README.md`, enContent.replace(/<iframe[\s\S]*?<\/iframe>/, `* [→ CodePen](https://codepen.io/omijs/pen/${package.docsExtend.codepen})`))
|
||||
// console.log(props)
|
||||
// console.log(defaultProps)
|
||||
// console.log(Object.keys(eventMap))
|
||||
|
||||
|
||||
|
||||
function extract(startWith, str) {
|
||||
const start = str.indexOf(startWith)
|
||||
if (start === -1) return ''
|
||||
let end = start + startWith.length
|
||||
let stackCount = 1
|
||||
while (end < str.length) {
|
||||
if (str[end] === '}') {
|
||||
if (stackCount === 1) {
|
||||
|
||||
break
|
||||
} else {
|
||||
stackCount--
|
||||
}
|
||||
} else if (str[end] === '{') {
|
||||
stackCount++
|
||||
}
|
||||
|
||||
end++
|
||||
}
|
||||
|
||||
return str.substring(start, end + 1)
|
||||
}
|
|
@ -11,6 +11,7 @@ interface Props {
|
|||
autofocus?: boolean;
|
||||
nativeType?: 'button' | 'submit' | 'reset';
|
||||
block?: boolean;
|
||||
text?: string;
|
||||
}
|
||||
export default class Button extends WeElement<Props> {
|
||||
static css: any;
|
||||
|
@ -36,6 +37,7 @@ export default class Button extends WeElement<Props> {
|
|||
autofocus: BooleanConstructor;
|
||||
nativeType: StringConstructor;
|
||||
block: BooleanConstructor;
|
||||
text: StringConstructor;
|
||||
};
|
||||
render(props: any): JSX.Element;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/button v0.0.7 http://omijs.org
|
||||
* @omiu/button v0.0.8 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -229,6 +229,7 @@ var Button = /** @class */ (function (_super) {
|
|||
_a)), { type: props.nativeType }),
|
||||
props.loading && [h("svg", { class: "loading", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" },
|
||||
h("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })), ' '],
|
||||
props.text,
|
||||
h("slot", null));
|
||||
};
|
||||
Button.css = css;
|
||||
|
@ -253,7 +254,8 @@ var Button = /** @class */ (function (_super) {
|
|||
icon: String,
|
||||
autofocus: Boolean,
|
||||
nativeType: String,
|
||||
block: Boolean
|
||||
block: Boolean,
|
||||
text: String
|
||||
};
|
||||
Button = __decorate([
|
||||
tag('o-button')
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -281,6 +281,7 @@ var Button = /** @class */ (function (_super) {
|
|||
_a)), { type: props.nativeType }),
|
||||
props.loading && [omi_1.h("svg", { class: "loading", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" },
|
||||
omi_1.h("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })), ' '],
|
||||
props.text,
|
||||
omi_1.h("slot", null));
|
||||
};
|
||||
Button.css = css;
|
||||
|
@ -305,7 +306,8 @@ var Button = /** @class */ (function (_super) {
|
|||
icon: String,
|
||||
autofocus: Boolean,
|
||||
nativeType: String,
|
||||
block: Boolean
|
||||
block: Boolean,
|
||||
text: String
|
||||
};
|
||||
Button = __decorate([
|
||||
omi_1.tag('o-button')
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,7 @@ interface Props {
|
|||
autofocus?: boolean,
|
||||
nativeType?: 'button' | 'submit' | 'reset',
|
||||
block?: boolean
|
||||
text?: string
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,7 +46,8 @@ export default class Button extends WeElement<Props>{
|
|||
icon: String,
|
||||
autofocus: Boolean,
|
||||
nativeType: String,
|
||||
block: Boolean
|
||||
block: Boolean,
|
||||
text: String
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,6 +63,7 @@ export default class Button extends WeElement<Props>{
|
|||
'is-block': props.block
|
||||
})} type={props.nativeType} >
|
||||
{props.loading && [<svg class="loading" viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg>, ' ']}
|
||||
{props.text}
|
||||
<slot></slot>
|
||||
</button>
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"experimentalDecorators": true,
|
||||
"jsx": "react",
|
||||
"jsxFactory": "h",
|
||||
"target": "es5",
|
||||
"outDir": "dist",
|
||||
"allowJs": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
## Button
|
||||
## Button
|
||||
|
||||
Click or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.
|
||||
|
||||
<iframe height="350" style="width: 100%;" scrolling="no" title="OMIU Button" src="https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI
|
||||
<iframe height="351" style="width: 100%;" scrolling="no" title="OMIU Button" src="https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI
|
||||
(<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.
|
||||
</iframe>
|
||||
|
||||
|
@ -15,6 +15,7 @@ import '@omiu/button'
|
|||
|
||||
Or use script tag to ref it.
|
||||
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/@omiu/button"></script>
|
||||
```
|
||||
|
@ -22,7 +23,7 @@ Or use script tag to ref it.
|
|||
## Usage
|
||||
|
||||
```html
|
||||
<o-button type="primary">Primary Button</o-button>
|
||||
<o-button></o-button>
|
||||
```
|
||||
|
||||
## API
|
||||
|
@ -31,21 +32,22 @@ Or use script tag to ref it.
|
|||
|
||||
```tsx
|
||||
{
|
||||
size?: 'medium' | 'small' | 'mini';
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
||||
plain?: boolean;
|
||||
round?: boolean;
|
||||
circle?: boolean;
|
||||
loading?: boolean;
|
||||
disabled?: boolean;
|
||||
icon?: string;
|
||||
autofocus?: boolean;
|
||||
nativeType?: 'button' | 'submit' | 'reset';
|
||||
block?: boolean;
|
||||
size?: 'medium' | 'small' | 'mini',
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
|
||||
plain?: boolean,
|
||||
round?: boolean,
|
||||
circle?: boolean,
|
||||
loading?: boolean,
|
||||
disabled?: boolean,
|
||||
icon?: string,
|
||||
autofocus?: boolean,
|
||||
nativeType?: 'button' | 'submit' | 'reset',
|
||||
block?: boolean
|
||||
text?: string
|
||||
}
|
||||
```
|
||||
|
||||
### defaultProps
|
||||
### 默认属性
|
||||
|
||||
```tsx
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
## Button 按钮
|
||||
## Button 按钮
|
||||
|
||||
点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。
|
||||
|
||||
<iframe height="350" style="width: 100%;" scrolling="no" title="OMIU Button" src="https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI
|
||||
<iframe height="351" style="width: 100%;" scrolling="no" title="OMIU Button" src="https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result" frameborder="no" allowtransparency="true" allowfullscreen="true" loading="lazy">
|
||||
See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI
|
||||
(<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.
|
||||
</iframe>
|
||||
|
||||
|
@ -23,7 +23,7 @@ import '@omiu/button'
|
|||
## 使用
|
||||
|
||||
```html
|
||||
<o-button type="primary">Primary Button</o-button>
|
||||
<o-button></o-button>
|
||||
```
|
||||
|
||||
|
||||
|
@ -33,22 +33,22 @@ import '@omiu/button'
|
|||
|
||||
```tsx
|
||||
{
|
||||
size?: 'medium' | 'small' | 'mini';
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
||||
plain?: boolean;
|
||||
round?: boolean;
|
||||
circle?: boolean;
|
||||
loading?: boolean;
|
||||
disabled?: boolean;
|
||||
icon?: string;
|
||||
autofocus?: boolean;
|
||||
nativeType?: 'button' | 'submit' | 'reset';
|
||||
block?: boolean;
|
||||
size?: 'medium' | 'small' | 'mini',
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
|
||||
plain?: boolean,
|
||||
round?: boolean,
|
||||
circle?: boolean,
|
||||
loading?: boolean,
|
||||
disabled?: boolean,
|
||||
icon?: string,
|
||||
autofocus?: boolean,
|
||||
nativeType?: 'button' | 'submit' | 'reset',
|
||||
block?: boolean
|
||||
text?: string
|
||||
}
|
||||
```
|
||||
|
||||
### 属性默认值
|
||||
|
||||
### 默认属性
|
||||
```tsx
|
||||
{
|
||||
plain: false,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"cn.css": "static/css/cn.0726442c.css",
|
||||
"cn.css.map": "static/css/cn.0726442c.css.map",
|
||||
"cn.js": "static/js/cn.5311c08d.js",
|
||||
"cn.js.map": "static/js/cn.5311c08d.js.map",
|
||||
"cn.js": "static/js/cn.044e5910.js",
|
||||
"cn.js.map": "static/js/cn.044e5910.js.map",
|
||||
"index.css": "static/css/index.0726442c.css",
|
||||
"index.css.map": "static/css/index.0726442c.css.map",
|
||||
"index.js": "static/js/index.1061c400.js",
|
||||
"index.js.map": "static/js/index.1061c400.js.map",
|
||||
"index.js": "static/js/index.c95ba359.js",
|
||||
"index.js.map": "static/js/index.c95ba359.js.map",
|
||||
"static/js/0.0e3827aa.chunk.js": "static/js/0.0e3827aa.chunk.js",
|
||||
"static/js/0.0e3827aa.chunk.js.map": "static/js/0.0e3827aa.chunk.js.map",
|
||||
"static/js/1.795360df.chunk.js": "static/js/1.795360df.chunk.js",
|
||||
|
@ -51,8 +51,8 @@
|
|||
"static/js/27.c154cb7a.chunk.js.map": "static/js/27.c154cb7a.chunk.js.map",
|
||||
"static/js/28.491d7d1d.chunk.js": "static/js/28.491d7d1d.chunk.js",
|
||||
"static/js/28.491d7d1d.chunk.js.map": "static/js/28.491d7d1d.chunk.js.map",
|
||||
"static/js/29.e2b9df68.chunk.js": "static/js/29.e2b9df68.chunk.js",
|
||||
"static/js/29.e2b9df68.chunk.js.map": "static/js/29.e2b9df68.chunk.js.map",
|
||||
"static/js/29.76b7b316.chunk.js": "static/js/29.76b7b316.chunk.js",
|
||||
"static/js/29.76b7b316.chunk.js.map": "static/js/29.76b7b316.chunk.js.map",
|
||||
"static/js/3.5ff815ac.chunk.js": "static/js/3.5ff815ac.chunk.js",
|
||||
"static/js/3.5ff815ac.chunk.js.map": "static/js/3.5ff815ac.chunk.js.map",
|
||||
"static/js/30.e32461a3.chunk.js": "static/js/30.e32461a3.chunk.js",
|
||||
|
@ -135,8 +135,8 @@
|
|||
"static/js/65.e8c3f4e2.chunk.js.map": "static/js/65.e8c3f4e2.chunk.js.map",
|
||||
"static/js/66.bed8adbf.chunk.js": "static/js/66.bed8adbf.chunk.js",
|
||||
"static/js/66.bed8adbf.chunk.js.map": "static/js/66.bed8adbf.chunk.js.map",
|
||||
"static/js/67.4f906162.chunk.js": "static/js/67.4f906162.chunk.js",
|
||||
"static/js/67.4f906162.chunk.js.map": "static/js/67.4f906162.chunk.js.map",
|
||||
"static/js/67.2dc0f7a4.chunk.js": "static/js/67.2dc0f7a4.chunk.js",
|
||||
"static/js/67.2dc0f7a4.chunk.js.map": "static/js/67.2dc0f7a4.chunk.js.map",
|
||||
"static/js/68.20a54c1b.chunk.js": "static/js/68.20a54c1b.chunk.js",
|
||||
"static/js/68.20a54c1b.chunk.js.map": "static/js/68.20a54c1b.chunk.js.map",
|
||||
"static/js/69.87214dbb.chunk.js": "static/js/69.87214dbb.chunk.js",
|
||||
|
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="shortcut icon" href="./favicon.ico"><link rel="stylesheet" href="./highlight/prism.css"><style>*{-webkit-tap-highlight-color:rgba(255,255,255,0);-moz-user-focus:none}</style><title>OMIU - Cross-Frameworks UI Framework</title><link href="./static/css/cn.0726442c.css" rel="stylesheet"></head><body><script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script><script src="./highlight/prism.js"></script><script src="./js/remarkable.min.js"></script><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/cn.5311c08d.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="shortcut icon" href="./favicon.ico"><link rel="stylesheet" href="./highlight/prism.css"><style>*{-webkit-tap-highlight-color:rgba(255,255,255,0);-moz-user-focus:none}</style><title>OMIU - Cross-Frameworks UI Framework</title><link href="./static/css/cn.0726442c.css" rel="stylesheet"></head><body><script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script><script src="./highlight/prism.js"></script><script src="./js/remarkable.min.js"></script><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/cn.044e5910.js"></script></body></html>
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="shortcut icon" href="./favicon.ico"><link rel="stylesheet" href="./highlight/prism.css"><style>*{-webkit-tap-highlight-color:rgba(255,255,255,0);-moz-user-focus:none}</style><title>OMIU - Cross-Frameworks UI Framework</title><link href="./static/css/index.0726442c.css" rel="stylesheet"></head><body><script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script><script src="./highlight/prism.js"></script><script src="./js/remarkable.min.js"></script><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/index.1061c400.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="shortcut icon" href="./favicon.ico"><link rel="stylesheet" href="./highlight/prism.css"><style>*{-webkit-tap-highlight-color:rgba(255,255,255,0);-moz-user-focus:none}</style><title>OMIU - Cross-Frameworks UI Framework</title><link href="./static/css/index.0726442c.css" rel="stylesheet"></head><body><script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script><script src="./highlight/prism.js"></script><script src="./js/remarkable.min.js"></script><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/index.c95ba359.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
webpackJsonp([29],{85:function(n,e){n.exports="## Button \u6309\u94ae\n\n\u70b9\u51fb\u6216\u89e6\u6478\u89e6\u53d1\u4e00\u4e2a\u64cd\u4f5c\u7684\u5143\u7d20\u3002\u54cd\u5e94\u7528\u6237\u70b9\u51fb\u64cd\u4f5c\uff0c\u89e6\u53d1\u5c01\u88c5\u7684\u903b\u8f91\u3002\n\n<iframe height=\"351\" style=\"width: 100%;\" scrolling=\"no\" title=\"OMIU Button\" src=\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" loading=\"lazy\">\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n\n## \u5bfc\u5165\n\n```js\nimport '@omiu/button'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n<script src=\"https://unpkg.com/@omiu/button\"><\/script>\n```\n\n## \u4f7f\u7528\n\n```html\n<o-button></o-button>\n```\n\n\n## API\n\n### \u5c5e\u6027\n\n```tsx\n{\n size?: 'medium' | 'small' | 'mini',\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\n plain?: boolean,\n round?: boolean,\n circle?: boolean,\n loading?: boolean,\n disabled?: boolean,\n icon?: string,\n autofocus?: boolean,\n nativeType?: 'button' | 'submit' | 'reset',\n block?: boolean\n text?: string\n}\n```\n\n### \u9ed8\u8ba4\u5c5e\u6027\n```tsx\n{\n plain: false,\n round: false,\n circle: false,\n loading: false,\n disabled: false,\n autofocus: false,\n nativeType: 'button',\n block: false\n}\n```\n"}});
|
||||
//# sourceMappingURL=29.76b7b316.chunk.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../static/js/29.76b7b316.chunk.js","docs/zh-cn/button.md"],"names":["webpackJsonp","85","module","exports"],"mappings":"AAAAA,cAAc,KAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/29.76b7b316.chunk.js","sourcesContent":["webpackJsonp([29],{\n\n/***/ 85:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button 按钮\\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n<iframe height=\\\"351\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## 使用\\n\\n```html\\n<o-button></o-button>\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini',\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\\n plain?: boolean,\\n round?: boolean,\\n circle?: boolean,\\n loading?: boolean,\\n disabled?: boolean,\\n icon?: string,\\n autofocus?: boolean,\\n nativeType?: 'button' | 'submit' | 'reset',\\n block?: boolean\\n text?: string\\n}\\n```\\n\\n### 默认属性\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/29.76b7b316.chunk.js","module.exports = \"## Button 按钮\\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n<iframe height=\\\"351\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## 使用\\n\\n```html\\n<o-button></o-button>\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini',\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\\n plain?: boolean,\\n round?: boolean,\\n circle?: boolean,\\n loading?: boolean,\\n disabled?: boolean,\\n icon?: string,\\n autofocus?: boolean,\\n nativeType?: 'button' | 'submit' | 'reset',\\n block?: boolean\\n text?: string\\n}\\n```\\n\\n### 默认属性\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/button.md\n// module id = 85\n// module chunks = 29"],"sourceRoot":""}
|
|
@ -1,2 +0,0 @@
|
|||
webpackJsonp([29],{85:function(n,e){n.exports="## Button \u6309\u94ae \n\n\u70b9\u51fb\u6216\u89e6\u6478\u89e6\u53d1\u4e00\u4e2a\u64cd\u4f5c\u7684\u5143\u7d20\u3002\u54cd\u5e94\u7528\u6237\u70b9\u51fb\u64cd\u4f5c\uff0c\u89e6\u53d1\u5c01\u88c5\u7684\u903b\u8f91\u3002\n\n<iframe height=\"350\" style=\"width: 100%;\" scrolling=\"no\" title=\"OMIU Button\" src=\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" loading=\"lazy\">\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n\n## \u5bfc\u5165\n\n```js\nimport '@omiu/button'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n<script src=\"https://unpkg.com/@omiu/button\"><\/script>\n```\n\n## \u4f7f\u7528\n\n```html\n<o-button type=\"primary\">Primary Button</o-button>\n```\n\n\n## API\n\n### \u5c5e\u6027\n\n```tsx\n{\n size?: 'medium' | 'small' | 'mini';\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\n plain?: boolean;\n round?: boolean;\n circle?: boolean;\n loading?: boolean;\n disabled?: boolean;\n icon?: string;\n autofocus?: boolean;\n nativeType?: 'button' | 'submit' | 'reset';\n block?: boolean;\n}\n```\n\n### \u5c5e\u6027\u9ed8\u8ba4\u503c\n\n```tsx\n{\n plain: false,\n round: false,\n circle: false,\n loading: false,\n disabled: false,\n autofocus: false,\n nativeType: 'button',\n block: false\n}\n```\n"}});
|
||||
//# sourceMappingURL=29.e2b9df68.chunk.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"sources":["../static/js/29.e2b9df68.chunk.js","docs/zh-cn/button.md"],"names":["webpackJsonp","85","module","exports"],"mappings":"AAAAA,cAAc,KAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/29.e2b9df68.chunk.js","sourcesContent":["webpackJsonp([29],{\n\n/***/ 85:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button 按钮 \\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n<iframe height=\\\"350\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## 使用\\n\\n```html\\n<o-button type=\\\"primary\\\">Primary Button</o-button>\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/29.e2b9df68.chunk.js","module.exports = \"## Button 按钮 \\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n<iframe height=\\\"350\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## 使用\\n\\n```html\\n<o-button type=\\\"primary\\\">Primary Button</o-button>\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/button.md\n// module id = 85\n// module chunks = 29"],"sourceRoot":""}
|
|
@ -0,0 +1,2 @@
|
|||
webpackJsonp([67],{47:function(n,e){n.exports="## Button\n\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\n\n<iframe height=\"351\" style=\"width: 100%;\" scrolling=\"no\" title=\"OMIU Button\" src=\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" loading=\"lazy\">\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n\n## Import\n\n```js\nimport '@omiu/button'\n```\n\nOr use script tag to ref it.\n\n\n```html\n<script src=\"https://unpkg.com/@omiu/button\"><\/script>\n```\n\n## Usage\n\n```html\n<o-button></o-button>\n```\n\n## API\n\n### Props\n\n```tsx\n{\n size?: 'medium' | 'small' | 'mini',\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\n plain?: boolean,\n round?: boolean,\n circle?: boolean,\n loading?: boolean,\n disabled?: boolean,\n icon?: string,\n autofocus?: boolean,\n nativeType?: 'button' | 'submit' | 'reset',\n block?: boolean\n text?: string\n}\n```\n\n### \u9ed8\u8ba4\u5c5e\u6027\n\n```tsx\n{\n plain: false,\n round: false,\n circle: false,\n loading: false,\n disabled: false,\n autofocus: false,\n nativeType: 'button',\n block: false\n}\n```\n"}});
|
||||
//# sourceMappingURL=67.2dc0f7a4.chunk.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../static/js/67.2dc0f7a4.chunk.js","docs/en/button.md"],"names":["webpackJsonp","47","module","exports"],"mappings":"AAAAA,cAAc,KAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/67.2dc0f7a4.chunk.js","sourcesContent":["webpackJsonp([67],{\n\n/***/ 47:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button\\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n<iframe height=\\\"351\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## Usage\\n\\n```html\\n<o-button></o-button>\\n```\\n\\n## API\\n\\n### Props\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini',\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\\n plain?: boolean,\\n round?: boolean,\\n circle?: boolean,\\n loading?: boolean,\\n disabled?: boolean,\\n icon?: string,\\n autofocus?: boolean,\\n nativeType?: 'button' | 'submit' | 'reset',\\n block?: boolean\\n text?: string\\n}\\n```\\n\\n### 默认属性\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/67.2dc0f7a4.chunk.js","module.exports = \"## Button\\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n<iframe height=\\\"351\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=351&theme-id=default&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Checkbox</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## Usage\\n\\n```html\\n<o-button></o-button>\\n```\\n\\n## API\\n\\n### Props\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini',\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'\\n plain?: boolean,\\n round?: boolean,\\n circle?: boolean,\\n loading?: boolean,\\n disabled?: boolean,\\n icon?: string,\\n autofocus?: boolean,\\n nativeType?: 'button' | 'submit' | 'reset',\\n block?: boolean\\n text?: string\\n}\\n```\\n\\n### 默认属性\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/button.md\n// module id = 47\n// module chunks = 67"],"sourceRoot":""}
|
|
@ -1,2 +0,0 @@
|
|||
webpackJsonp([67],{47:function(n,e){n.exports="## Button \n\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\n\n<iframe height=\"350\" style=\"width: 100%;\" scrolling=\"no\" title=\"OMIU Button\" src=\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" loading=\"lazy\">\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\n</iframe>\n\n## Import\n\n```js\nimport '@omiu/button'\n```\n\nOr use script tag to ref it.\n\n```html\n<script src=\"https://unpkg.com/@omiu/button\"><\/script>\n```\n\n## Usage\n\n```html\n<o-button type=\"primary\">Primary Button</o-button>\n```\n\n## API\n\n### Props\n\n```tsx\n{\n size?: 'medium' | 'small' | 'mini';\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\n plain?: boolean;\n round?: boolean;\n circle?: boolean;\n loading?: boolean;\n disabled?: boolean;\n icon?: string;\n autofocus?: boolean;\n nativeType?: 'button' | 'submit' | 'reset';\n block?: boolean;\n}\n```\n\n### defaultProps\n\n```tsx\n{\n plain: false,\n round: false,\n circle: false,\n loading: false,\n disabled: false,\n autofocus: false,\n nativeType: 'button',\n block: false\n}\n```\n"}});
|
||||
//# sourceMappingURL=67.4f906162.chunk.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"sources":["../static/js/67.4f906162.chunk.js","docs/en/button.md"],"names":["webpackJsonp","47","module","exports"],"mappings":"AAAAA,cAAc,KAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/67.4f906162.chunk.js","sourcesContent":["webpackJsonp([67],{\n\n/***/ 47:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button \\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n<iframe height=\\\"350\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## Usage\\n\\n```html\\n<o-button type=\\\"primary\\\">Primary Button</o-button>\\n```\\n\\n## API\\n\\n### Props\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/67.4f906162.chunk.js","module.exports = \"## Button \\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n<iframe height=\\\"350\\\" style=\\\"width: 100%;\\\" scrolling=\\\"no\\\" title=\\\"OMIU Button\\\" src=\\\"https://codepen.io/omijs/embed/LYppwYG?height=350&theme-id=dark&default-tab=html,result\\\" frameborder=\\\"no\\\" allowtransparency=\\\"true\\\" allowfullscreen=\\\"true\\\" loading=\\\"lazy\\\">\\n See the Pen <a href='https://codepen.io/omijs/pen/LYppwYG'>OMIU Button</a> by OMI\\n (<a href='https://codepen.io/omijs'>@omijs</a>) on <a href='https://codepen.io'>CodePen</a>.\\n</iframe>\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n```html\\n<script src=\\\"https://unpkg.com/@omiu/button\\\"></script>\\n```\\n\\n## Usage\\n\\n```html\\n<o-button type=\\\"primary\\\">Primary Button</o-button>\\n```\\n\\n## API\\n\\n### Props\\n\\n```tsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```tsx\\n{\\n plain: false,\\n round: false,\\n circle: false,\\n loading: false,\\n disabled: false,\\n autofocus: false,\\n nativeType: 'button',\\n block: false\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/button.md\n// module id = 47\n// module chunks = 67"],"sourceRoot":""}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue