Pārlūkot izejas kodu

:recycle: moving around import for individual wave-ui components | added more samples

tags/0.0.1
J 3 gadus atpakaļ
vecāks
revīzija
4081266f7b
4 mainītis faili ar 39 papildinājumiem un 7 dzēšanām
  1. 23
    5
      frontend/src/App.vue
  2. 1
    1
      frontend/src/main.js
  3. 1
    1
      frontend/src/router/index.js
  4. 14
    0
      frontend/src/wave.js

+ 23
- 5
frontend/src/App.vue Parādīt failu

1
 <template lang="pug">
1
 <template lang="pug">
2
 w-app
2
 w-app
3
-    w-badge
4
-        template(#badge) 3
5
-            w-button(color="primary")
6
-                w-icon(class="mr1") mdi mdi-email Emails
3
+    w-drawer(v-model="openDrawer")
4
+    w-flex.my12(:gap="3" align-center wrap)
5
+        w-button.ma1(@click="$waveui.notify('Information.')" bg-color="info") Notify info
6
+        w-button.ma1(@click="$waveui.notify('Success!', 'success')" bg-color="success") Notify success
7
+        w-button.ma1(@click="$waveui.notify('Warning!', 'warning')" bg-color="warning") Notify warning
8
+        w-button.ma1(@click="$waveui.notify('Error :(', 'error', 0)" bg-color="error") Permanent error
9
+    w-flex.my12(align-center wrap)
10
+        w-spinner(bounce)
11
+        w-input Label
12
+        w-checkbox Single option
13
+    w-flex.my12
14
+        w-button(@click="openDrawer = true" outline="")
15
+            | Open drawer
16
+    w-flex.my12(grow column)
17
+        w-slider(:model-value="40" thumb-label step-label :step="20" color="primary-light3").mt12
18
+        .mt4 v-model:
19
+            code.ml1 {{ sliderVal }}
7
     w-flex.my12(:gap="3" align-center wrap)
20
     w-flex.my12(:gap="3" align-center wrap)
8
         | Show menu on:
21
         | Show menu on:
9
         w-menu
22
         w-menu
10
             template(#activator="{ on }")
23
             template(#activator="{ on }")
11
                 w-button(v-on="on") Show menu
24
                 w-button(v-on="on") Show menu
12
             | Menu content
25
             | Menu content
26
+        w-badge.mr10(bg-color="error")
27
+            template(#badge) 3
28
+            w-icon(color="grey-light1" size="2.5em") mdi mdi-email
13
     SideBar(
29
     SideBar(
14
         v-if="showSidebar"
30
         v-if="showSidebar"
15
         :pid="getPid"
31
         :pid="getPid"
37
     components: { SideBar },
53
     components: { SideBar },
38
     data: () => ({
54
     data: () => ({
39
         showSidebar: false,
55
         showSidebar: false,
56
+        sliderVal: 1,
57
+        openDrawer: false,
40
     }),
58
     }),
41
     computed: {
59
     computed: {
42
-        getPid: () => currentProfile.id.value,
60
+        getPid: () => (currentProfile.id.value ? currentProfile.id.value : 999),
43
     },
61
     },
44
     async created() {
62
     async created() {
45
         /** Get questions so we can compare against profile responses */
63
         /** Get questions so we can compare against profile responses */

+ 1
- 1
frontend/src/main.js Parādīt failu

1
 import { createApp } from 'vue'
1
 import { createApp } from 'vue'
2
-import router from './router'
2
+import { router } from './router'
3
 import { checkLoginStatus } from './router/guards'
3
 import { checkLoginStatus } from './router/guards'
4
 
4
 
5
 import WaveUI from '../node_modules/wave-ui/src/wave-ui/core'
5
 import WaveUI from '../node_modules/wave-ui/src/wave-ui/core'

+ 1
- 1
frontend/src/router/index.js Parādīt failu

49
     routes,
49
     routes,
50
 })
50
 })
51
 
51
 
52
-export default router
52
+export { router }

+ 14
- 0
frontend/src/wave.js Parādīt failu

7
     WBadge,
7
     WBadge,
8
     WButton,
8
     WButton,
9
     WCard,
9
     WCard,
10
+    WCheckbox,
11
+    WDrawer,
10
     WFlex,
12
     WFlex,
11
     WIcon,
13
     WIcon,
12
     WImage,
14
     WImage,
15
+    WInput,
13
     WMenu,
16
     WMenu,
17
+    WProgress,
14
     WOverlay,
18
     WOverlay,
19
+    WSlider,
20
+    WSpinner,
21
+    WSteps,
15
 } from '../node_modules/wave-ui/src/wave-ui/components'
22
 } from '../node_modules/wave-ui/src/wave-ui/components'
16
 
23
 
17
 export default {
24
 export default {
20
     WBadge,
27
     WBadge,
21
     WButton,
28
     WButton,
22
     WCard,
29
     WCard,
30
+    WCheckbox,
31
+    WDrawer,
23
     WFlex,
32
     WFlex,
24
     WIcon,
33
     WIcon,
25
     WImage,
34
     WImage,
35
+    WInput,
26
     WMenu,
36
     WMenu,
37
+    WProgress,
27
     WOverlay,
38
     WOverlay,
39
+    WSlider,
40
+    WSpinner,
41
+    WSteps,
28
 }
42
 }

Notiek ielāde…
Atcelt
Saglabāt