От: | BlackEric | http://black-eric.lj.ru | |
Дата: | 14.05.19 15:48 | ||
Оценка: |
import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import { SweetCalendar } from 'vue-sweet-calendar';
import 'vue-sweet-calendar/dist/SweetCalendar.css';
@Component({
components: {
SweetCalendar
}
})
export default class CalendarComponent extends Vue {
data() {
return {
eventCategories: [....
@Component({
components: {
SweetCalendar: require('vue-sweet-calendar').default
}
})
[Vue warn]: Unknown custom element: <sweet-calendar> — did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <CalendarComponent> at ClientApp/components/calendar/calendar.vue.html
От: | BlackEric | http://black-eric.lj.ru | |
Дата: | 15.05.19 08:07 | ||
Оценка: |
Из папки node_modules выполняться почему-то не захотело:d:\>npm install -g vue-sweet-calendar
+ vue-sweet-calendar@0.2.7
added 3 packages from 2 contributors in 2.289s
d:\>dts-gen -m vue-sweet-calendar
Wrote 52 lines to vue-sweet-calendar.d.ts.
d:\GitRep\vuets\node_modules>dts-gen -m vue-sweet-calendar
Couldn't load module "vue-sweet-calendar". Please install it globally (npm install -g vue-sweet-calendar) and try again.
d:\GitRep\vuets\types\
import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import { Calendar } from 'vue-sweet-calendar';
import 'vue-sweet-calendar/dist/SweetCalendar.css';
@Component({
components: {
Calendar
}
})
export default class CalendarWrapperComponent extends Vue {
data() {
<template>
<div id="calendar">
<!-- Using Component -->
<calendar :eventCategories="eventCategories"
:events="events"
ref="calendar" />
</div>
</template>
<script src="./calendarWrapper.ts"></script>
От: | VladCore | ||
Дата: | 17.05.19 14:36 | ||
Оценка: |