🎨 (fab) update fab button z index to overlap bulma select dropdown icon
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
:class="getClass"
|
||||
:style="buttonStyle"
|
||||
:to="to"
|
||||
@click.native="valid">
|
||||
@click.native="valid"
|
||||
>
|
||||
<span class="icon is-medium">
|
||||
<slot>
|
||||
<awe-icon icon="plus" />
|
||||
@@ -22,7 +23,8 @@
|
||||
class="button is-primary is-large is-fab"
|
||||
:class="getClass"
|
||||
:style="buttonStyle"
|
||||
@click="valid">
|
||||
@click="valid"
|
||||
>
|
||||
<span class="icon is-medium">
|
||||
<slot>
|
||||
<awe-icon icon="plus" />
|
||||
@@ -46,7 +48,7 @@ export default class Home extends Vue {
|
||||
public margin!: boolean
|
||||
@Prop({ type: Object, default: () => null })
|
||||
public to!: any | null
|
||||
@Prop({ type: Object, required: false, default: () => ({})})
|
||||
@Prop({ type: Object, required: false, default: () => ({}) })
|
||||
public buttonStyle!: any
|
||||
public uniqueId: string = Date.now().toString()
|
||||
public isLoading: boolean = false
|
||||
@@ -59,14 +61,17 @@ export default class Home extends Vue {
|
||||
const main = document.getElementById('main')
|
||||
const fabElm = document.getElementById(`fab-${this.uniqueId}`)
|
||||
if (main && fabElm) {
|
||||
document.addEventListener('scroll', throttle((evt) => {
|
||||
this.showFull = main.getBoundingClientRect().top > 0
|
||||
if (this.showFull) {
|
||||
fabElm.classList.remove('small')
|
||||
} else {
|
||||
fabElm.classList.add('small')
|
||||
}
|
||||
}, 150))
|
||||
document.addEventListener(
|
||||
'scroll',
|
||||
throttle((evt) => {
|
||||
this.showFull = main.getBoundingClientRect().top > 0
|
||||
if (this.showFull) {
|
||||
fabElm.classList.remove('small')
|
||||
} else {
|
||||
fabElm.classList.add('small')
|
||||
}
|
||||
}, 150)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +124,7 @@ $padding-fab: 24px;
|
||||
bottom: $padding-fab;
|
||||
position: fixed;
|
||||
right: $padding-fab;
|
||||
z-index: 2;
|
||||
z-index: 5;
|
||||
border: 2px solid $white;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user