Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | <template>
<v-dialog v-model="mydialog" max-width="700">
<v-card
:loading="isUpdating"
class="mx-auto"
color="blue-grey-darken-1"
max-width="420"
>
<template v-slot:loader="{ isActive }">
<v-progress-linear
:active="isActive"
color="green-lighten-3"
height="4"
indeterminate
></v-progress-linear>
</template>
<v-img
height="200"
src="https://cdn.vuetifyjs.com/images/cards/dark-beach.jpg"
cover
>
<v-row class="pa-3">
<v-col cols="12">
<v-menu
location="bottom start"
origin="overlap"
transition="slide-y-transition"
>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
density="comfortable"
icon="mdi-dots-vertical"
variant="tonal"
></v-btn>
</template>
<v-list :lines="false">
<v-list-item
title="Update"
@click="isUpdating = true"
></v-list-item>
</v-list>
</v-menu>
</v-col>
<v-row>
<v-col class="text-center">
<h3 class="text-h5">{{ name }}</h3>
<span class="text-grey-lighten-1">{{ title }}</span>
</v-col>
</v-row>
</v-row>
</v-img>
<v-form>
<v-container>
<v-row dense>
<v-col cols="12" md="6">
<v-text-field
v-model="name"
:disabled="isUpdating"
color="blue-grey-lighten-2"
label="Name"
></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
v-model="title"
:disabled="isUpdating"
color="blue-grey-lighten-2"
label="Title"
></v-text-field>
</v-col>
<v-col cols="12">
<v-autocomplete
v-model="friends"
:disabled="isUpdating"
:items="people"
color="blue-grey-lighten-2"
item-title="name"
item-value="name"
label="Select"
chips
closable-chips
multiple
>
<template v-slot:chip="{ props, item }">
<v-chip
v-bind="props"
:prepend-avatar="item.raw.avatar"
:text="item.raw.name"
></v-chip>
</template>
<template v-slot:item="{ props, item }">
<v-list-item
v-bind="props"
:prepend-avatar="item.raw.avatar"
:subtitle="item.raw.group"
:title="item.raw.name"
></v-list-item>
</template>
</v-autocomplete>
</v-col>
</v-row>
</v-container>
</v-form>
<v-divider></v-divider>
<v-card-actions>
<v-switch
v-model="autoUpdate"
:disabled="isUpdating"
class="mt-0 ms-2"
color="green-lighten-2"
density="compact"
label="Auto Update"
hide-details
></v-switch>
<v-spacer></v-spacer>
<v-btn
:disabled="autoUpdate"
:loading="isUpdating"
:variant="isUpdating ? 'tonal' : undefined"
color="blue-grey-lighten-3"
prepend-icon="mdi-update"
@click="isUpdating = true"
>
Update Now
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
import { ref, computed } from "vue";
export default {
props: {
opendialog: {
type: Boolean,
default: false,
},
},
setup(props, { emit }) {
const mydialog = computed({
get: () => props.opendialog,
set: (value) => emit("update:opendialog", value),
});
const people= [
// TODO: https://github.com/vuetifyjs/vuetify/issues/15721
// { header: 'Group 1' },
{ name: 'Sandra Adams', group: 'Group 1', avatar: srcs[1] },
{ name: 'Ali Connors', group: 'Group 1', avatar: srcs[2] },
{ name: 'Trevor Hansen', group: 'Group 1', avatar: srcs[3] },
{ name: 'Tucker Smith', group: 'Group 1', avatar: srcs[2] },
// { divider: true },
// { header: 'Group 2' },
{ name: 'Britta Holt', group: 'Group 2', avatar: srcs[4] },
{ name: 'Jane Smith ', group: 'Group 2', avatar: srcs[5] },
{ name: 'John Smith', group: 'Group 2', avatar: srcs[1] },
{ name: 'Sandra Williams', group: 'Group 2', avatar: srcs[3] },
]
return {
mydialog,
};
},
};
</script>
<style></style>
|