forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWrapperTwo.vue
More file actions
38 lines (31 loc) · 905 Bytes
/
WrapperTwo.vue
File metadata and controls
38 lines (31 loc) · 905 Bytes
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
<template>
<div style="margin: 200px auto" class="row justify-center">
<q-btn color="primary" data-cy="wrapper" label="Wrapper" style="width: 100px;">
<q-menu v-bind="$attrs" data-cy="menu" ref="menuRef">
<q-form data-cy="div" style="height: 200px">
<q-input label="input" data-cy="input"></q-input>
<q-input label="input" data-cy="input-2" autofocus></q-input>
</q-form>
</q-menu>
</q-btn>
</div>
</template>
<script>
import { defineComponent, ref } from 'vue'
export default defineComponent({
inheritAttrs: false,
setup () {
const menuRef = ref(null)
function toggle () {
menuRef.value.toggle()
}
function focusMethod () {
menuRef.value.focus()
}
function updatePosition () {
menuRef.value.updatePosition()
}
return { menuRef, toggle, focusMethod, updatePosition }
}
})
</script>