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-04-21 11:09:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a439998a6a63c3b5f7587fb9ead03f8fc0484248
a439998a
1 parent
4315ebab
✨ feat(组件): 新增按钮组件
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
src/components/MyButton/index.vue
src/components/MyButton/index.vue
0 → 100644
View file @
a439998
<template>
<div v-if="type === 'primary'" class="button-primary">
<slot></slot>
</div>
<div v-if="type === 'plain'" class="button-plain">
<slot></slot>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
const props = defineProps({
type: String
})
onMounted(() => {
})
</script>
<script>
export default {
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.button-primary {
width: auto;
height: auto;
text-align: center;
padding: 0.6rem;
margin: 0.25rem;
font-size: 1rem;
background: #F9D95C;
border-radius: 24px;
border: 1px solid #F9D95C;
color: #0B3A72;
}
.button-plain {
width: auto;
height: auto;
text-align: center;
padding: 0.6rem;
margin: 0.25rem;
font-size: 1rem;
background: #FFFFFF;
border-radius: 24px;
border: 1px solid #0B3A72;
color: #0B3A72;
}
</style>
\ No newline at end of file
Please
register
or
login
to post a comment