mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fixed lint und test ok
This commit is contained in:
parent
1b2396645f
commit
ac6da2e42c
@ -10,9 +10,7 @@
|
|||||||
>
|
>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<a v-if="isActive" class="search-clear-btn" @click="clear">
|
<a v-if="isActive" class="search-clear-btn" @click="clear"> </a>
|
||||||
|
|
||||||
</a>
|
|
||||||
<ds-select
|
<ds-select
|
||||||
:id="id"
|
:id="id"
|
||||||
ref="input"
|
ref="input"
|
||||||
@ -41,9 +39,7 @@
|
|||||||
<template slot="option" slot-scope="{ option }">
|
<template slot="option" slot-scope="{ option }">
|
||||||
<ds-flex>
|
<ds-flex>
|
||||||
<ds-flex-item class="search-option-label">
|
<ds-flex-item class="search-option-label">
|
||||||
<ds-text>
|
<ds-text>{{ option.label | truncate(70) }}</ds-text>
|
||||||
{{ option.label | truncate(70) }}
|
|
||||||
</ds-text>
|
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
<ds-flex-item class="search-option-meta" width="280px">
|
<ds-flex-item class="search-option-meta" width="280px">
|
||||||
<ds-flex>
|
<ds-flex>
|
||||||
|
|||||||
@ -1,16 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-default">
|
<div class="layout-default">
|
||||||
<div class="main-navigation">
|
<div class="main-navigation">
|
||||||
<ds-container class="main-navigation-container">
|
{{ this.window.height }}
|
||||||
|
<ds-container class="main-navigation-container" style="padding: 10px 10px;">
|
||||||
<div>
|
<div>
|
||||||
<ds-flex>
|
<ds-flex>
|
||||||
<ds-flex-item :width="{ base: '50px', md: '150px' }">
|
<ds-flex-item :width="{ base: '49px', md: '150px' }">
|
||||||
<a v-router-link style="display: inline-flex" href="/">
|
<a v-router-link style="display: inline-flex" href="/">
|
||||||
<ds-logo />
|
<ds-logo />
|
||||||
</a>
|
</a>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
<ds-flex-item>
|
<ds-flex-item>
|
||||||
<div id="nav-search-box" v-on:click="unfolded" v-click-outside="foldedup">
|
<div id="nav-search-box" v-on:click="unfolded" @blur.capture="foldedup">
|
||||||
<search-input
|
<search-input
|
||||||
id="nav-search"
|
id="nav-search"
|
||||||
:delay="300"
|
:delay="300"
|
||||||
@ -22,7 +23,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
<ds-flex-item width="200px">
|
<ds-flex-item width="200px" style="background-color:white">
|
||||||
<div class="main-navigation-right" style="float:right">
|
<div class="main-navigation-right" style="float:right">
|
||||||
<no-ssr>
|
<no-ssr>
|
||||||
<locale-switch class="topbar-locale-switch" placement="bottom" offset="23" />
|
<locale-switch class="topbar-locale-switch" placement="bottom" offset="23" />
|
||||||
@ -198,48 +199,9 @@ export default {
|
|||||||
document.getElementById('nav-search-box').classList.remove('unfolded')
|
document.getElementById('nav-search-box').classList.remove('unfolded')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
directives: {
|
|
||||||
'click-outside': {
|
|
||||||
bind: function(el, binding, vNode) {
|
|
||||||
// Provided expression must evaluate to a function.
|
|
||||||
if (typeof binding.value !== 'function') {
|
|
||||||
const compName = vNode.context.name
|
|
||||||
let warn = `[Vue-click-outside:] provided expression '${binding.expression}' is not a function, but has to be`
|
|
||||||
if (compName) {
|
|
||||||
warn += `Found in component '${compName}'`
|
|
||||||
}
|
|
||||||
|
|
||||||
console.warn(warn)
|
|
||||||
}
|
|
||||||
// Define Handler and cache it on the element
|
|
||||||
const bubble = binding.modifiers.bubble
|
|
||||||
const handler = e => {
|
|
||||||
if (bubble || (!el.contains(e.target) && el !== e.target)) {
|
|
||||||
binding.value(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
el.__vueClickOutside__ = handler
|
|
||||||
|
|
||||||
// add Event Listeners
|
|
||||||
document.addEventListener('click', handler)
|
|
||||||
},
|
|
||||||
|
|
||||||
unbind: function(el, binding) {
|
|
||||||
// Remove Event Listeners
|
|
||||||
document.removeEventListener('click', el.__vueClickOutside__)
|
|
||||||
el.__vueClickOutside__ = null
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.foldedup {
|
|
||||||
position: '';
|
|
||||||
right: ;
|
|
||||||
left: ;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.unfolded {
|
.unfolded {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user