- npm updates - new SearchMap.vue component
This commit is contained in:
parent
7bc9f90cca
commit
a7142f694f
74 changed files with 3360 additions and 3577 deletions
|
@ -1,55 +1,51 @@
|
|||
<script>
|
||||
import { h, defineComponent } from 'vue'
|
||||
import { h, defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'BaseButtons',
|
||||
props: {
|
||||
noWrap: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'justify-start'
|
||||
name: 'BaseButtons',
|
||||
props: {
|
||||
noWrap: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'justify-start',
|
||||
},
|
||||
classAddon: {
|
||||
type: String,
|
||||
default: 'mr-3 last:mr-0 mb-3',
|
||||
},
|
||||
mb: {
|
||||
type: String,
|
||||
default: '-mb-3',
|
||||
},
|
||||
},
|
||||
classAddon: {
|
||||
type: String,
|
||||
default: 'mr-3 last:mr-0 mb-3'
|
||||
render() {
|
||||
const hasSlot = this.$slots && this.$slots.default;
|
||||
|
||||
const parentClass = ['flex', 'items-center', this.type, this.noWrap ? 'flex-nowrap' : 'flex-wrap'];
|
||||
|
||||
if (this.mb) {
|
||||
parentClass.push(this.mb);
|
||||
}
|
||||
|
||||
return h(
|
||||
'div',
|
||||
{ class: parentClass },
|
||||
hasSlot
|
||||
? this.$slots.default().map((element) => {
|
||||
if (element && element.children && typeof element.children === 'object') {
|
||||
return h(
|
||||
element,
|
||||
{},
|
||||
element.children.map((child) => {
|
||||
return h(child, { class: [this.classAddon] });
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return h(element, { class: [this.classAddon] });
|
||||
})
|
||||
: null,
|
||||
);
|
||||
},
|
||||
mb: {
|
||||
type: String,
|
||||
default: '-mb-3'
|
||||
}
|
||||
},
|
||||
render () {
|
||||
const hasSlot = this.$slots && this.$slots.default
|
||||
|
||||
const parentClass = [
|
||||
'flex',
|
||||
'items-center',
|
||||
this.type,
|
||||
this.noWrap ? 'flex-nowrap' : 'flex-wrap'
|
||||
]
|
||||
|
||||
if (this.mb) {
|
||||
parentClass.push(this.mb)
|
||||
}
|
||||
|
||||
return h(
|
||||
'div',
|
||||
{ class: parentClass },
|
||||
hasSlot
|
||||
? this.$slots.default().map(element => {
|
||||
if (element && element.children && typeof element.children === 'object') {
|
||||
return h(
|
||||
element,
|
||||
{},
|
||||
element.children.map(child => {
|
||||
return h(child, { class: [this.classAddon] })
|
||||
}))
|
||||
}
|
||||
|
||||
return h(element, { class: [this.classAddon] })
|
||||
})
|
||||
: null
|
||||
)
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue