king
2025-02-19 4038bd70d2b48e68c5b897a98198d18f9e6da79e
src/menu/components/editor/braft-editor/options.jsx
@@ -37,6 +37,13 @@
    tbStyle = tbStyle.filter(n => n !== 'deep-split')
    splitLine = 'true'
  }
  let loads = []
  if (wrap.loaded === 'true') {
    loads.push('loaded')
  }
  if (wrap.preload === 'true') {
    loads.push('preload')
  }
  const cardWrapForm = [
    {
@@ -166,23 +173,33 @@
      ],
    },
    {
      type: 'radio',
      field: 'loaded',
      type: 'checkbox',
      field: 'loads',
      label: '布局调整',
      initval: wrap.loaded || 'false',
      initval: loads,
      required: false,
      tooltip: '预处理入参html、data,返回修改后的html;后处理入参为html,可通过页面元素的样式调整并返回处理后的html。',
      options: [
        {value: 'false', label: '关闭'},
        {value: 'true', label: '开启'},
        {value: 'preload', label: '预处理'},
        {value: 'loaded', label: '后处理'},
      ],
      controlFields: [
        {field: 'loadedfunc', values: ['true']},
        {field: 'prefunc', values: ['preload']},
        {field: 'loadedfunc', values: ['loaded']},
      ]
    },
    {
      type: 'codemirror',
      field: 'prefunc',
      label: '预处理脚本',
      initval: wrap.prefunc || '',
      required: true,
      span: 24
    },
    {
      type: 'codemirror',
      field: 'loadedfunc',
      label: '处理脚本',
      label: '后处理脚本',
      initval: wrap.loadedfunc || '',
      required: true,
      span: 24