[improvement] GoodsAction: tsx (#2786)
This commit is contained in:
@@ -89,13 +89,12 @@ Use `info` prop to show messages in upper right corner of icon
|
||||
|------|------|------|------|
|
||||
| text | Button text | `String` | - |
|
||||
| icon | Icon | `String` | - |
|
||||
| icon-class | Icon class name | `String` | `''` |
|
||||
| icon-class | Icon class name | `any` | `''` |
|
||||
| info | Info message | `String | Number` | - |
|
||||
| url | Link | `String` | - |
|
||||
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - |
|
||||
| replace | If true, the navigation will not leave a history record | `String` | `false` |
|
||||
|
||||
|
||||
#### GoodsActionBigBtn
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
import { use } from '../utils';
|
||||
import { inherit } from '../utils/functional';
|
||||
|
||||
// Types
|
||||
import { CreateElement, RenderContext } from 'vue/types';
|
||||
import { DefaultProps, DefaultSlots } from '../utils/use/sfc';
|
||||
|
||||
const [sfc, bem] = use('goods-action');
|
||||
|
||||
function GoodsAction(h, props, slots, ctx) {
|
||||
function GoodsAction(
|
||||
h: CreateElement,
|
||||
props: DefaultProps,
|
||||
slots: DefaultSlots,
|
||||
ctx: RenderContext
|
||||
) {
|
||||
return (
|
||||
<div class={bem()} {...inherit(ctx, true)}>
|
||||
{slots.default && slots.default()}
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
|------|------|------|------|------|
|
||||
| text | 按钮文字 | `String` | - | - |
|
||||
| icon | 图标 | `String` | - | - |
|
||||
| icon-class | 图标额外类名 | `String` | - | - |
|
||||
| icon-class | 图标额外类名 | `any` | - | - |
|
||||
| info | 图标右上角提示信息 | `String | Number` | - | - |
|
||||
| url | 跳转链接 | `String` | - | - |
|
||||
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
|
||||
|
||||
Reference in New Issue
Block a user