Showing
1 changed file
with
62 additions
and
0 deletions
src/components/MyButton/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div v-if="type === 'primary'" class="button-primary"> | ||
| 3 | + <slot></slot> | ||
| 4 | + </div> | ||
| 5 | + <div v-if="type === 'plain'" class="button-plain"> | ||
| 6 | + <slot></slot> | ||
| 7 | + </div> | ||
| 8 | +</template> | ||
| 9 | + | ||
| 10 | +<script setup> | ||
| 11 | +import { ref, reactive, onMounted } from 'vue' | ||
| 12 | +const props = defineProps({ | ||
| 13 | + type: String | ||
| 14 | +}) | ||
| 15 | + | ||
| 16 | + onMounted(() => { | ||
| 17 | + | ||
| 18 | + }) | ||
| 19 | +</script> | ||
| 20 | + | ||
| 21 | +<script> | ||
| 22 | +export default { | ||
| 23 | + data () { | ||
| 24 | + return { | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + }, | ||
| 28 | + mounted () { | ||
| 29 | + | ||
| 30 | + }, | ||
| 31 | + methods: { | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | +} | ||
| 35 | +</script> | ||
| 36 | + | ||
| 37 | +<style lang="less" scoped> | ||
| 38 | + .button-primary { | ||
| 39 | + width: auto; | ||
| 40 | + height: auto; | ||
| 41 | + text-align: center; | ||
| 42 | + padding: 0.6rem; | ||
| 43 | + margin: 0.25rem; | ||
| 44 | + font-size: 1rem; | ||
| 45 | + background: #F9D95C; | ||
| 46 | + border-radius: 24px; | ||
| 47 | + border: 1px solid #F9D95C; | ||
| 48 | + color: #0B3A72; | ||
| 49 | + } | ||
| 50 | + .button-plain { | ||
| 51 | + width: auto; | ||
| 52 | + height: auto; | ||
| 53 | + text-align: center; | ||
| 54 | + padding: 0.6rem; | ||
| 55 | + margin: 0.25rem; | ||
| 56 | + font-size: 1rem; | ||
| 57 | + background: #FFFFFF; | ||
| 58 | + border-radius: 24px; | ||
| 59 | + border: 1px solid #0B3A72; | ||
| 60 | + color: #0B3A72; | ||
| 61 | + } | ||
| 62 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment