Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-01 17:48:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd742e2af51f50960a23083f6775ba3fd868f5d3
cd742e2a
1 parent
ce31a23a
馃寛 style:
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
src/components/MyButton/index.vue
src/components/MyButton/index.vue
View file @
cd742e2
<!--
* @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 = () => {
...
...
Please
register
or
login
to post a comment