123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <template>
- <div>
- <q-card
- flat
- bordered
- >
- <q-tooltip v-if="tooltipText">
- {{tooltip_text}}
- </q-tooltip>
- <q-card-section
- horizontal
- class="items-center bg-grey-2">
- <div class="side_note text-grey-9 q-px-xs"
- style="width: 4rem"
- >
- {{title}}
- </div>
- <q-select
- :model-value="name"
- @input-value="$emit('update:name', $event)"
- use-input
- hide-selected
- fill-input
- input-debounce="0"
- :options="options"
- style="width: 10rem"
- options-dense
- dense
- bg-color="white"
- class="q-py-none"
- >
- <template v-slot:no-option>
- <q-item>
- <q-item-section class="text-grey">
- No results
- </q-item-section>
- </q-item>
- </template>
- </q-select>
- <div
- class="side_note text-grey-9 q-px-xs"
- style="width: 3rem"
- >
- {{ units}}
- </div>
- </q-card-section>
- </q-card>
- local options: {{name}}
- </div>
- </template>
- <script lang="ts">
- import {
- defineComponent,
-
-
-
- ref,
-
-
- } from 'vue';
- const stringOptions = [
- 'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
- ]
- export default defineComponent({
- name: 'InputWithUnits',
- props: {
- name: {
- type: String,
- default: ''
- },
- title: {
- type: String,
- required: true,
- default: ''
- },
- units: {
- type:String,
- default: ''
- },
- tooltipText: {
- type: String,
- default: ''
- }
- },
- emits : [
- 'update:name'
- ],
- setup(props, {emit}) {
-
-
-
- const options = ref(stringOptions)
-
-
- return {
-
- options
- }
- },
- });
- </script>
|