widget.rst 533 B

123456789101112131415161718192021222324252627282930313233
  1. Widget API
  2. ========================================================
  3. .. contents::
  4. :depth: 2
  5. .. index:: widget
  6. .. _K.widget:
  7. K.widget(options)
  8. --------------------------------------------------------
  9. 创建widget。
  10. * 参数:
  11. * object options: 配置信息
  12. * 返回: KWidget
  13. 示例:
  14. .. sourcecode:: js
  15. var widget = K.widget({
  16. z : 100,
  17. width : 200,
  18. height : 100,
  19. html : '<strong>abc</strong>123<strong>abc</strong><strong>abc</strong>',
  20. css : {
  21. border : '1px solid #A0A0A0',
  22. background : '#F0F0F0'
  23. }
  24. });