Skip to content

Commit c82503e

Browse files
author
Nathan Reyes
committed
Update main.ts
1 parent 5f9e257 commit c82503e

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/main.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@ import { createApp } from 'vue';
22
import App from './App.vue';
33

44
const defaults = {
5+
componentPrefix: '',
56
titlePosition: 'left',
67
};
78

8-
declare const window: any;
9-
window.__vcalendar__ = defaults;
9+
// declare const window: any;
10+
// window.__vcalendar__ = defaults;
1011

11-
const app = createApp(App);
12+
// Method 1
13+
// import VCalendar from './index';
14+
// createApp(App)
15+
// .use(VCalendar, defaults)
16+
// .mount('#app');
1217

13-
import VCalendar from './index';
14-
app.use(VCalendar, defaults)
15-
16-
// import { setupCalendar, Calendar, DatePicker } from './index';
17-
// setupCalendar(app, defaults);
18-
// app.use(Calendar);
19-
// app.use(DatePicker);
20-
21-
app.mount('#app');
18+
// Method 2
19+
import { SetupCalendar, Calendar, DatePicker } from './index';
20+
createApp(App)
21+
.use(SetupCalendar, defaults)
22+
.component('Calendar', Calendar)
23+
.component('DatePicker', DatePicker)
24+
.mount('#app');

0 commit comments

Comments
 (0)