mirror of https://github.com/artf/grapesjs.git
4 changed files with 23 additions and 16 deletions
@ -1,6 +1,6 @@ |
|||||
import Backbone from 'backbone'; |
import { Collection } from 'common'; |
||||
import Block from './Block'; |
import Block from './Block'; |
||||
|
|
||||
export default Backbone.Collection.extend({ |
export default class Blocks extends Collection {} |
||||
model: Block |
|
||||
}); |
Blocks.prototype.model = Block; |
||||
|
|||||
@ -1,6 +1,6 @@ |
|||||
import Backbone from 'backbone'; |
import { Collection } from 'common'; |
||||
import Category from './Category'; |
import Category from './Category'; |
||||
|
|
||||
export default Backbone.Collection.extend({ |
export default class Categories extends Collection {} |
||||
model: Category |
|
||||
}); |
Categories.prototype.model = Category; |
||||
|
|||||
@ -1,10 +1,12 @@ |
|||||
import Backbone from 'backbone'; |
import { Model } from 'common'; |
||||
|
|
||||
export default Backbone.Model.extend({ |
export default class Category extends Model { |
||||
defaults: { |
defaults() { |
||||
id: '', |
return { |
||||
label: '', |
id: '', |
||||
open: true, |
label: '', |
||||
attributes: {} |
open: true, |
||||
|
attributes: {} |
||||
|
}; |
||||
} |
} |
||||
}); |
} |
||||
|
|||||
Loading…
Reference in new issue