将类添加到Backbone中的对象

时间:2018-08-16 09:19:57

标签: javascript html backbone.js

我想在“文本”而不​​是“按钮”中添加类“ w3-container” ...

我如何重构下面的代码来做到这一点?

RiskDisclosure: {
          headline: 'Risk Disclosure Overlay',
          text: 'Are you sure to format your hard drive blah blah',
          type: 'dialog',
          closeButton: true,
          actions: {
            cssClass: 'w3-container',
            content: [
              {
                type: 'button',
                style: 'primary',
                label: 'okay',
                action: 'Callback'
              },
              {
                type: 'button',
                style: 'secondary',
                label: 'cancel',
                action: 'Callback'
              }
            ]
          }
        },

谢谢!

0 个答案:

没有答案