重构优化框架
这是一个大版本的更新 现在,框架更加稳定
This commit is contained in:
29
Yi.Vue2.x/src/components/app/BarItem.vue
Normal file
29
Yi.Vue2.x/src/components/app/BarItem.vue
Normal 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>
|
||||
22
Yi.Vue2.x/src/components/app/Btn.vue
Normal file
22
Yi.Vue2.x/src/components/app/Btn.vue
Normal 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>
|
||||
12
Yi.Vue2.x/src/components/app/Card.vue
Normal file
12
Yi.Vue2.x/src/components/app/Card.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<v-card
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<slot />
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default { name: 'AppCard' }
|
||||
</script>
|
||||
42
Yi.Vue2.x/src/components/app/Tabs.vue
Normal file
42
Yi.Vue2.x/src/components/app/Tabs.vue
Normal 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>
|
||||
Reference in New Issue
Block a user