container: refactor strip using panel as base
This commit is contained in:
parent
1f858cc205
commit
67eae0ef84
11 changed files with 1965 additions and 668 deletions
|
|
@ -37,6 +37,8 @@ module.exports = class Modal extends _widgets_base {
|
|||
|
||||
_chidlren:'children',
|
||||
|
||||
variables:{},
|
||||
|
||||
widgets:[],
|
||||
tabs:[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
var _widgets_base = require('../common/_widgets_base')
|
||||
var Panel = require('./panel')
|
||||
|
||||
module.exports = class Strip extends _widgets_base {
|
||||
module.exports = class Strip extends Panel {
|
||||
|
||||
static defaults() {
|
||||
|
||||
|
|
@ -15,12 +15,18 @@ module.exports = class Strip extends _widgets_base {
|
|||
top:'auto',
|
||||
width:'auto',
|
||||
height:'auto',
|
||||
horizontal:false,
|
||||
color:'auto',
|
||||
css:'',
|
||||
|
||||
_strip: 'strip',
|
||||
|
||||
horizontal:false,
|
||||
stretch:false,
|
||||
|
||||
_children:'children',
|
||||
|
||||
variables:{},
|
||||
|
||||
widgets:[]
|
||||
}
|
||||
|
||||
|
|
@ -28,18 +34,13 @@ module.exports = class Strip extends _widgets_base {
|
|||
|
||||
constructor(options) {
|
||||
|
||||
super({...options, html: '<div class="strip"></div>'})
|
||||
options.props = {...Panel.defaults(), ...options.props}
|
||||
|
||||
super(options)
|
||||
|
||||
var parsewidgets = require('../../parser').widgets
|
||||
this.container.addClass(this.getProp('horizontal') ? 'horizontal' : 'vertical')
|
||||
this.container.addClass(this.getProp('stretch') ? 'stretch' : '')
|
||||
|
||||
if (this.getProp('horizontal')) {
|
||||
this.container.addClass('horizontal')
|
||||
} else {
|
||||
this.container.addClass('vertical')
|
||||
}
|
||||
|
||||
parsewidgets(this.props.widgets, this.widget, this)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue