framework7io / framework7-vue

Deprecated! Build full featured iOS & Android apps using Framework7 & Vue
http://framework7.io/vue/
MIT License
674 stars 154 forks source link

`mixins/calendar-datepicker.vue` can't be used in framework7-react #140

Closed achmadk closed 7 years ago

achmadk commented 7 years ago

I try to update framework7 and framework7-vue to their's recent version in framework7-react. After running gulp command in framework7-react, I got error like this in command prompt window

I:\OUTSIDE_PROJECTS\framework7-react>gulp
[06:46:29] Requiring external module babel-register
[06:46:32] Using gulpfile I:\OUTSIDE_PROJECTS\framework7-react\gulpfile.babel.js
...
error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
framework7-react\Calendar.ts(4,9): error TS2305: Module '"I:/OUTSIDE_PROJECTS/framework7-react/framework7-vue/framework7-vue"' has no exported member 'VueCalendarMixin'.
framework7-react\Calendar.ts(5,35): error TS2307: Cannot find module './CalendarMixin'.
framework7-react\Datepicker.ts(4,9): error TS2305: Module '"I:/OUTSIDE_PROJECTS/framework7-react/framework7-vue/framework7-vue"' has no exported member 'VueCalendarMixin'.
framework7-react\Datepicker.ts(5,35): error TS2307: Cannot find module './CalendarMixin'.
...
[06:46:56] Starting 'default'...
[06:46:56] Finished 'default' after 14 μs

framework7-react can generate React component files from framework7-vue component files, e.g. accordion-content.vue to AccordionContent.ts and mixins/link.vue to LinkMixin.ts. Maybe the only possible solution to solve this problem is rename CalendarMixin to CalendarDatepickerMixin in both calendar.vue and datepicker.vue files.

bencompton commented 7 years ago

Yeah, I ran into this issue when I tried upgrading several days ago, but haven't had much time to devote to looking into it. I agree with you that the that the inconsistent mixin naming is problematic and that the simplest fix may be to rename the Vue files. It might also be possible to enhance the way F7 React handles mixins instead.