|
|
@@ -15,14 +15,8 @@ import { PropType, CSSProperties, toRefs, computed } from 'vue';
|
|
|
import { createComponent } from '../../utils/create';
|
|
|
const { componentName, create } = createComponent('button');
|
|
|
import Icon from '../icon/index.taro.vue';
|
|
|
-export type ButtonType =
|
|
|
- | 'default'
|
|
|
- | 'primary'
|
|
|
- | 'info'
|
|
|
- | 'success'
|
|
|
- | 'warning'
|
|
|
- | 'danger';
|
|
|
-export type ButtonSize = 'large' | 'normal' | 'small';
|
|
|
+export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
|
+export type ButtonSize = 'large' | 'normal' | 'small' | 'mini';
|
|
|
export type ButtonShape = 'square' | 'round';
|
|
|
export default create({
|
|
|
components: {
|
|
|
@@ -65,8 +59,7 @@ export default create({
|
|
|
},
|
|
|
emits: ['click'],
|
|
|
setup(props, { emit, slots }) {
|
|
|
- const { type, size, shape, disabled, loading, color, plain, block } =
|
|
|
- toRefs(props);
|
|
|
+ const { type, size, shape, disabled, loading, color, plain, block } = toRefs(props);
|
|
|
|
|
|
const handleClick = (event: MouseEvent) => {
|
|
|
if (!loading.value && !disabled.value) {
|