Required properties

The baseClass property is required. It is the CSS class name of the widget's root element. Use the name, jimu-widget-widgetname. The code is as follows:

define(['dojo/_base/declare', 'jimu/BaseWidget'],
function(declare, BaseWidget) {
  //To create a widget, you need to derive from BaseWidget.
  return declare([BaseWidget], {
    // DemoWidget code goes here 
    baseClass: 'jimu-widget-demo'
  });
});

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.