hookehuyr

馃寛 style:

<!--
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-04-21 10:04:58
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-01 17:07:58
* @FilePath: /tswj/src/components/MyButton/index.vue
* @Description:
-->
<template>
<div v-if="type === 'primary'" class="button-primary" @click="handle">
<slot></slot>
<slot />
</div>
<div v-if="type === 'plain'" class="button-plain" @click="handle">
<slot></slot>
<slot />
</div>
<div v-if="type === 'custom'" :style="customStyle" class="button-custom" @click="handle">
<slot></slot>
<slot />
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { onMounted } from 'vue'
const props = defineProps({
type: String,
customStyle: Object
customStyle: Object,
disable: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['on-click']);
const handle = () => {
......