1

我有以下代码:

var modelForm=[
  {
    type: 'fieldset',
    title: 'Component',
    items: [
      {
        type: 'tabs',
        tabs: [
          {
            title: 'Product',
            items: [
              'productName',
              'releaseVersion',
              'distroName',
              'stackCategory',
.....
.....
{ type: 'submit', title: 'Update', condition: 'model.id && ! confirmDelete' },
  { type: 'submit', title: 'Create', condition: '!model.id && !confirmDelete' },
  { type: 'button', title: 'Cancel', onClick: 'cancel()', condition: '!confirmDelete' },
  { type: 'button', title: 'Delete', onClick: 'confirmDelete=true' , condition: 'model.id && ! confirmDelete'},
  { type: 'help', helpvalue: '<h1 class=\'\'>Are you sure you want to delete?<h1>', condition: 'confirmDelete' },
  { type: 'button', title: 'Don\'t delete', onClick: 'confirmDelete=false',condition: 'confirmDelete' },
  { type: 'button', title: 'Confirm delete', onClick: 'deleteModel()' , condition: 'confirmDelete'}

由于使用了 fieldset,所有的元素都是垂直的。我希望最后描述的按钮 - 创建、取消和删除在一行中。

我怎样才能做到这一点?

4

1 回答 1

0

我们通过添加以下 bootstrapless 样式仅通过两个按钮(“取消”、“保存”)解决了这个问题:

.schema-form-submit {
  display: inline;
}

.schema-form-submit input {
  .pull-right;
}
于 2015-08-13T21:57:33.700 回答