Skip to content

Commit ff53bdd

Browse files
author
Pooya Parsa
committed
feat: f7-components
1 parent 227bbe6 commit ff53bdd

File tree

3 files changed

+154
-5
lines changed

3 files changed

+154
-5
lines changed

Diff for: lib/module.js

+7
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ module.exports = function nuxt7 (moduleOptions) {
120120
options
121121
})
122122

123+
// Framework 7 components
124+
this.addPlugin({
125+
src: resolvePath('templates/f7-components.js'),
126+
fileName: 'f7-components.js',
127+
options
128+
})
129+
123130
// Enable IOS specific meta for web app
124131
if (!this.options.meta) this.options.meta = {}
125132
this.options.meta.mobileAppIOS = true

Diff for: lib/templates/f7-components.js

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
import {
2+
f7AccordionContent,
3+
f7AccordionItem,
4+
f7AccordionToggle,
5+
f7Accordion,
6+
f7Badge,
7+
f7BlockFooter,
8+
f7BlockHeader,
9+
f7BlockTitle,
10+
f7Block,
11+
f7Button,
12+
f7CardContent,
13+
f7CardFooter,
14+
f7CardHeader,
15+
f7Card,
16+
f7Checkbox,
17+
f7Chip,
18+
f7Col,
19+
f7FabButton,
20+
f7FabButtons,
21+
f7Fab,
22+
f7Icon,
23+
f7Input,
24+
f7Label,
25+
f7Link,
26+
f7ListButton,
27+
f7ListGroup,
28+
f7ListItemCell,
29+
f7ListItemContent,
30+
f7ListItemRow,
31+
f7ListItem,
32+
f7List,
33+
f7LoginScreenTitle,
34+
f7Message,
35+
f7MessagebarAttachment,
36+
f7MessagebarAttachments,
37+
f7MessagebarSheetImage,
38+
f7MessagebarSheetItem,
39+
f7MessagebarSheet,
40+
f7Messagebar,
41+
f7MessagesTitle,
42+
f7Messages,
43+
f7NavLeft,
44+
f7NavRight,
45+
f7NavTitle,
46+
f7Navbar,
47+
f7PageContent,
48+
f7Page,
49+
f7Panel,
50+
f7Preloader,
51+
f7Progressbar,
52+
f7Radio,
53+
f7Range,
54+
f7Row,
55+
f7Segmented,
56+
f7Statusbar,
57+
f7Subnavbar,
58+
f7SwipeoutActions,
59+
f7SwipeoutButton,
60+
f7SwiperSlide,
61+
f7Swiper,
62+
f7Tab,
63+
f7Tabs,
64+
f7Toggle,
65+
f7Toolbar,
66+
f7View,
67+
f7Views,
68+
} from 'framework7-vue'
69+
70+
export default {
71+
install(Vue) {
72+
Vue.mixin({
73+
components: {
74+
f7AccordionContent,
75+
f7AccordionItem,
76+
f7AccordionToggle,
77+
f7Accordion,
78+
f7Badge,
79+
f7BlockFooter,
80+
f7BlockHeader,
81+
f7BlockTitle,
82+
f7Block,
83+
f7Button,
84+
f7CardContent,
85+
f7CardFooter,
86+
f7CardHeader,
87+
f7Card,
88+
f7Checkbox,
89+
f7Chip,
90+
f7Col,
91+
f7FabButton,
92+
f7FabButtons,
93+
f7Fab,
94+
f7Icon,
95+
f7Input,
96+
f7Label,
97+
f7Link,
98+
f7ListButton,
99+
f7ListGroup,
100+
f7ListItemCell,
101+
f7ListItemContent,
102+
f7ListItemRow,
103+
f7ListItem,
104+
f7List,
105+
f7LoginScreenTitle,
106+
f7Message,
107+
f7MessagebarAttachment,
108+
f7MessagebarAttachments,
109+
f7MessagebarSheetImage,
110+
f7MessagebarSheetItem,
111+
f7MessagebarSheet,
112+
f7Messagebar,
113+
f7MessagesTitle,
114+
f7Messages,
115+
f7NavLeft,
116+
f7NavRight,
117+
f7NavTitle,
118+
f7Navbar,
119+
f7PageContent,
120+
f7Page,
121+
f7Panel,
122+
f7Preloader,
123+
f7Progressbar,
124+
f7Radio,
125+
f7Range,
126+
f7Row,
127+
f7Segmented,
128+
f7Statusbar,
129+
f7Subnavbar,
130+
f7SwipeoutActions,
131+
f7SwipeoutButton,
132+
f7SwiperSlide,
133+
f7Swiper,
134+
f7Tab,
135+
f7Tabs,
136+
f7Toggle,
137+
f7Toolbar,
138+
f7View,
139+
f7Views,
140+
},
141+
})
142+
}
143+
}

Diff for: lib/templates/f7.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import Vue from 'vue'
55
import Framework7 from 'framework7'
66

77
// Import F7 Vue Plugin
8-
import { Framework7Vue, f7View, f7Navbar, f7Page } from 'framework7-vue'
8+
import { Framework7Vue } from 'framework7-vue'
99

1010
// Init F7 Vue Plugin
1111
Vue.use(Framework7Vue, Framework7)
1212

13-
// Register common components
14-
Vue.component('f7-view', f7View)
15-
Vue.component('f7-navbar', f7Navbar)
16-
Vue.component('f7-page', f7Page)
13+
// Register F7 Vue Components
14+
import Framework7VueComponents from './f7-components'
15+
Vue.use(Framework7VueComponents)
1716

1817
// Routes
1918
import { routes } from './f7-router'

0 commit comments

Comments
 (0)