Explorar el Código

修改组件自定义容器

tags/1.10.1
Caven Chen hace 5 años
padre
commit
c368bcf70e
Se han modificado 2 ficheros con 13 adiciones y 3 borrados
  1. 4
    3
      src/core/widget/Popup.js
  2. 9
    0
      src/core/widget/Widget.js

+ 4
- 3
src/core/widget/Popup.js Ver fichero

@@ -46,13 +46,14 @@ class Popup extends Widget {
}

/**
* Setting custom wrapper
* Setting wrapper
* @param wrapper
* @returns {Popup}
* @returns {Widget}
*/
setCustomWrapper(wrapper) {
setWrapper(wrapper) {
if (wrapper && wrapper instanceof Element) {
this._wrapper = wrapper
DomUtil.addClass(this._wrapper, 'dc-popup')
}
return this
}

+ 9
- 0
src/core/widget/Widget.js Ver fichero

@@ -105,6 +105,15 @@ class Widget {
this._installHook && this._installHook()
}

/**
* Setting wrapper
* @param wrapper
* @returns {Widget}
*/
setWrapper(wrapper) {
return this
}

/**
* Setting widget content
* @param content

Cargando…
Cancelar
Guardar