Our pure JavaScript Scheduler component


Post by simon »

问题7.png
问题7.png (160.98 KiB) Viewed 4906 times
问题8.png
问题8.png (64 KiB) Viewed 4906 times

Post by Maxim Gorkovsky »

Hello.
Can we get runnable test case?

Post by simon »

runtime environment
runtime environment
问题9.png (163.09 KiB) Viewed 4895 times
test.zip
runnable test case
(2.19 MiB) Downloaded 205 times
npm install    dependency packages need to be loaded before running
npm install dependency packages need to be loaded before running
问题10.png (165.95 KiB) Viewed 4895 times

Post by Maxim Gorkovsky »

Hello.
I assume that problem is caused by using scheduler bundle as module (using import). Try to just load it on the page, old style? Script tag or some config for webpack to compile our bundle into your app.

When you will resolve that issue, you will face more, related to incorrect usage.
Scheduler at the moment doesnt support reconfiguring all columns at once
// main.js
// you instantiate empty scheduler that is not rendered anywhere
Vue.prototype.$scheduler = new Scheduler({})

// Scheduler.vue
this.$scheduler.setConfig(config) // you overwrite configs here, including columns
this.schedulerEngine = this.$scheduler
I see at least two options here:
1) store not the instance, but class:
// main.js
Vue.prototype.$scheduler = Scheduler

//scheduler.vue
this.schedulingEngine = new this.$scheduler(config)
2) import class in vue component as such:
var bryntum = require('../../lib/scheduler/scheduler.umd.js')
this.schedulerEngine = new bryntum.Scheduler(config)
Let us know about the result!

Post by simon »

问题12.png
问题12.png (163.89 KiB) Viewed 4877 times
There is still a problem with require. I think this version is unfriendly to webpack, and my version is scheduler-1.0.0-alpha1-trial.

Expect the next version to support webpack

Post by Maxim Gorkovsky »

We will look into that issue shortly. Sorry for inconvenience

Post by Maxim Gorkovsky »

In the meantime please try this:
1) include scheduler bundle on the page (e.g. using simple script tag)
2) remove all imports of that bundle
3) instantiate scheduler using
scheduler = new bryntum.scheduler.Scheduler(...)

Post by simon »

Hey,
simple page reference is all right,
because now it's modular programming, Scheduler is packaged into a program as a module, and when you use a package tool like webpack, you make a mistake.
Can you provide a case of using webpack packaging tool?

Post by Maxim Gorkovsky »

Trial will support webpack in the next release.

Post by simon »

my version is scheduler-1.0.0-beta1
my version is scheduler-1.0.0-beta1
问题13.png (189.55 KiB) Viewed 4774 times

Post Reply