refactor: reorganize all components (#8303)

This commit is contained in:
neverland
2021-03-08 11:50:37 +08:00
committed by GitHub
parent 3144a63d2b
commit e540876398
193 changed files with 1307 additions and 400 deletions
+10 -3
View File
@@ -1,4 +1,9 @@
import { PropType, CSSProperties, ButtonHTMLAttributes } from 'vue';
import {
PropType,
CSSProperties,
ButtonHTMLAttributes,
defineComponent,
} from 'vue';
// Utils
import { createNamespace } from '../utils';
@@ -9,7 +14,7 @@ import { useRoute, routeProps } from '../composables/use-route';
import Icon from '../icon';
import Loading, { LoadingType } from '../loading';
const [createComponent, bem] = createNamespace('button');
const [name, bem] = createNamespace('button');
export type ButtonType =
| 'default'
@@ -20,7 +25,9 @@ export type ButtonType =
export type ButtonSize = 'large' | 'normal' | 'small' | 'mini';
export default createComponent({
export default defineComponent({
name,
props: {
...routeProps,
text: String,
+8
View File
@@ -0,0 +1,8 @@
import { installable } from '../utils';
import _Button from './Button';
const Button = installable(_Button);
export default Button;
export { Button };
export type { ButtonType, ButtonSize } from './Button';