重构优化框架

这是一个大版本的更新
现在,框架更加稳定
This commit is contained in:
橙子
2022-02-21 15:00:15 +08:00
parent 769cf2285a
commit 8d90abd22e
146 changed files with 801 additions and 15635 deletions

View File

@@ -0,0 +1,29 @@
<script>
import { VHover, VListItem } from 'vuetify/lib'
export default {
name: 'AppBarItem',
render (h) {
return h(VHover, {
scopedSlots: {
default: ({ hover }) => {
return h(VListItem, {
attrs: this.$attrs,
class: {
'black--text': !hover,
'white--text secondary elevation-12': hover,
},
props: {
activeClass: '',
dark: hover,
link: true,
...this.$attrs,
},
}, this.$slots.default)
},
},
})
},
}
</script>

View File

@@ -0,0 +1,22 @@
<template>
<v-btn
:color="color"
v-bind="$attrs"
v-on="$listeners"
>
<slot />
</v-btn>
</template>
<script>
export default {
name: 'AppBtn',
props: {
color: {
type: String,
default: 'primary',
},
},
}
</script>

View File

@@ -0,0 +1,12 @@
<template>
<v-card
v-bind="$attrs"
v-on="$listeners"
>
<slot />
</v-card>
</template>
<script>
export default { name: 'AppCard' }
</script>

View File

@@ -0,0 +1,42 @@
<template>
<v-tabs
:active-class="`${color} ${theme.isDark ? 'black' : 'white'}--text`"
class="v-tabs--pill"
hide-slider
v-bind="$attrs"
v-on="$listeners"
>
<slot />
<slot name="items" />
</v-tabs>
</template>
<script>
export default {
name: 'AppTabs',
inject: ['theme'],
props: {
color: {
type: String,
default: 'primary',
},
},
}
</script>
<style lang="sass">
.v-tabs--pill
.v-tab,
.v-tab:before
border-radius: 24px
&.v-tabs--icons-and-text
&:not(.v-tabs--vertical) > .v-tabs-bar
height: 100px
.v-tab,
.v-tab:before
border-radius: 4px
</style>