-
Notifications
You must be signed in to change notification settings - Fork 0
/
rootOld.js
81 lines (70 loc) · 2.47 KB
/
rootOld.js
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
const { createApp, ref, reactive, computed, watch, onMounted, watchEffect, onBeforeUnmount } = Vue;
const { Platform, useQuasar, Loading } = Quasar;
var vueObject = {
name: 'root',
template:
/*html*/
`
<q-list bordered class="rounded-borders bg-grey-10" separator >
<q-expansion-item v-for="item in modelc.addresses" expand-separator icon="place" :label="item.address" expand-icon-toggle :caption="item.status">
<template v-slot:header>
<q-item-section>
<div class="row fit items-center">
<q-icon name="place" size="26px" color="grey"></q-icon>
<q-field dark color="primary" label="Адрес" stack-label borderless :dense="false">
{{item.address}}
</q-field>
</div>
</q-item-section>
<q-item-section>
<div class="row fit items-center">
<q-icon name="info" size="26px" color="grey"></q-icon>
<q-field dark color="primary" label="Статус" stack-label borderless :dense="false">
{{item.status}}
</q-field>
</div>
</q-item-section>
<q-item-section side>
<q-btn flat color="primary" icon="verified" @click="confirm = true">Утвердить план</q-btn>
</q-item-section>
</template>
<position :cAddress='item.address' :cEngineer='item.engineer' cPosition='Инженер'></position>
<position :cAddress='item.address' :cEngineer='item.measurer' cPosition='Обмерщик'></position>
</q-expansion-item>
</q-list>
<q-dialog v-model="confirm" persistent>
<q-card>
<q-card-section class="row items-center">
<q-avatar icon="contact_support" color="primary" text-color="white" />
<span class="q-ml-sm">Вы уверены?</span>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="Да" color="primary" v-close-popup @click="changeStatus()"></q-btn>
<q-btn flat label="Нет" color="primary" v-close-popup></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
`
,
setup() {
let modelc = reactive(model)
const $q = useQuasar()
function changeStatus() {
// console.log($q.platform.is.desktop)
};
return {
modelc, changeStatus, confirm: ref()
}
}
}
const app = Vue.createApp(vueObject);
app.use(Quasar, {
config: {
notify: { /* look at QuasarConfOptions from the API card */ },
loading: { /* look at QuasarConfOptions from the API card */ },
plugins: [
'Meta'
]
}
});
Quasar.lang.set(Quasar.lang.ru);