initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<template>
<button
:id="idtext"
:value="value"
:class="computedClass"
v-bind="additionalData"
@click="handleClick"
>
<img v-if="img" :src="img" class="btn-icon" />
<slot>{{ content }}</slot>
</button>
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({
content: { type: String, default: '' },
value: { type: [String, Number], default: '' },
idtext: { type: String, default: '' },
btnClass: { type: String, default: '' }, // custom classes
block: { type: Boolean, default: false },
img: { type: String, default: '' },
additionalData: { type: Object, default: () => ({}) },
onClick: { type: Function, default: null }
})
const computedClass = computed(() => {
return `${props.btnClass} ${props.block ? 'btn-block' : ''}`.trim()
})
function handleClick(event) {
if (props.onClick) props.onClick(event)
}
</script>
<style scoped>
.btn-icon {
margin-right: 0.5rem;
height: 1em;
}
</style>

View File

@@ -0,0 +1,15 @@
<template>
<BaseButton v-bind="$props" btn-class="btn btn-danger" />
</template>
<script setup>
import BaseButton from './BaseButton.vue'
defineProps({
content: String,
value: String,
idtext: String,
block: Boolean,
img: String,
additionalData: Object,
onClick: Function
})
</script>

View File

@@ -0,0 +1,18 @@
<template>
<BaseButton v-bind="$props" :btn-class="btnClass || 'btn btn-primary'">
<slot />
</BaseButton>
</template>
<script setup>
import BaseButton from './BaseButton.vue'
defineProps({
content: String,
value: String,
idtext: String,
block: Boolean,
img: String,
btnClass: String,
additionalData: Object,
onClick: Function
})
</script>

View File

@@ -0,0 +1,18 @@
<template>
<BaseButton v-bind="$props" :btn-class="btnClass || 'btn btn-warning'">
<slot />
</BaseButton>
</template>
<script setup>
import BaseButton from './BaseButton.vue'
defineProps({
content: String,
value: String,
idtext: String,
block: Boolean,
img: String,
btnClass: String,
additionalData: Object,
onClick: Function
})
</script>