Sub-Store/web/src/components/base/MaterialAlert.vue
Peng-YM 2766e23aa0 Sub-Store 1.0版本
1. 移除了所有基于关键词的节点操作,统一使用基于正则表达式的节点操作。
2. UI的大量改进。
2020-12-05 13:39:11 +08:00

65 lines
1.3 KiB
Vue

<script>
// Components
import { VAlert, VBtn, VIcon } from 'vuetify/lib'
export default {
name: 'MaterialAlert',
extends: VAlert,
computed: {
__cachedDismissible() {
if (!this.dismissible) return null
const color = 'white'
return this.$createElement(VBtn, {
staticClass: 'v-alert__dismissible',
props: {
color,
icon: true,
small: true
},
attrs: {
'aria-label': this.$vuetify.lang.t(this.closeLabel)
},
on: {
// eslint-disable-next-line
click: () => (this.isActive = false)
}
}, [
this.$createElement(VIcon, {
props: { color }
}, '$vuetify.icons.cancel')
])
},
classes() {
return {
...VAlert.options.computed.classes.call(this),
'v-alert--material': true
}
},
hasColoredIcon() {
return true
}
}
}
</script>
<style lang="sass">
.v-alert--material
margin-top: 32px
.v-alert__icon
background-color: #FFFFFF
height: 44px
min-width: 44px
top: -36px
.v-alert__dismissible
align-self: flex-start
margin: 0 !important
padding: 0 !important
</style>