allow q-select slots in tactical-dropdown. Fix info icon on run script dialog
This commit is contained in:
parent
83e9b60308
commit
5dcda0e0a0
|
@ -15,9 +15,8 @@
|
|||
</q-btn>
|
||||
</q-bar>
|
||||
<q-form @submit.prevent="sendScript">
|
||||
<q-card-section class="row">
|
||||
<q-card-section>
|
||||
<tactical-dropdown
|
||||
class="col-11"
|
||||
:rules="[val => !!val || '*Required']"
|
||||
v-model="state.script"
|
||||
:options="scriptOptions"
|
||||
|
@ -25,14 +24,13 @@
|
|||
outlined
|
||||
mapOptions
|
||||
filterable
|
||||
/>
|
||||
<q-btn class="col-1" size="sm" round dense flat icon="info" @click="link ? OpenURL(link) : null">
|
||||
<q-tooltip
|
||||
v-if="syntax"
|
||||
class="bg-white text-primary text-body1"
|
||||
v-html="formatScriptSyntax(syntax)"
|
||||
></q-tooltip>
|
||||
</q-btn>
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn size="sm" round dense flat icon="info" @click="openScriptURL">
|
||||
<q-tooltip v-if="syntax" class="bg-white text-primary text-body1" v-html="formatScriptSyntax(syntax)" />
|
||||
</q-btn>
|
||||
</template>
|
||||
</tactical-dropdown>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<tactical-dropdown
|
||||
|
@ -169,6 +167,10 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
function openScriptURL() {
|
||||
link.value ? openURL(link.value) : null;
|
||||
}
|
||||
|
||||
// watchers
|
||||
watch([() => state.value.output, () => state.value.emailMode], () => (state.value.emails = []));
|
||||
|
||||
|
@ -189,7 +191,7 @@ export default {
|
|||
//methods
|
||||
formatScriptSyntax,
|
||||
sendScript,
|
||||
openURL,
|
||||
openScriptURL,
|
||||
|
||||
// quasar dialog plugin
|
||||
dialogRef,
|
||||
|
|
|
@ -11,7 +11,12 @@
|
|||
:use-chips="multiple"
|
||||
:use-input="filterable"
|
||||
@[filterEvent]="filterFn"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template v-for="(_, slot) in $slots" v-slot:[slot]="scope">
|
||||
<slot :name="slot" v-bind="scope || {}" />
|
||||
</template>
|
||||
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
|
@ -22,7 +27,7 @@
|
|||
<q-item-section>
|
||||
<q-item-label v-html="mapOptions ? scope.opt.label : scope.opt"></q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section v-if="filtered && mapOptions" side>{{ scope.opt.cat }}</q-item-section>
|
||||
<q-item-section v-if="filtered && mapOptions && scope.opt.cat" side>{{ scope.opt.cat }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item-label v-if="scope.opt.category" header class="q-pa-sm" :key="scope.opt.category">{{
|
||||
scope.opt.category
|
||||
|
@ -36,6 +41,7 @@ import { ref, computed } from "vue";
|
|||
|
||||
export default {
|
||||
name: "tactical-dropdown",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
modelValue: !String,
|
||||
mapOptions: {
|
||||
|
|
Loading…
Reference in New Issue