king
2022-09-22 c33ac9ddcdbed91bd2267bed2a96199441806a04
2022-09-22
10个文件已修改
131 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/dragaction/action.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/options.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/options.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -53,8 +53,10 @@
  if (card.OpenType === 'form') {
    if (card.formType === 'switch') {
      btnElement = (<Switch style={_style} className={card.size === 'large' ? 'ant-switch-large' : ''} size={card.size} checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''}/>)
    } else {
    } else if (card.formType === 'radio') {
      btnElement = (<Checkbox style={_style}></Checkbox>)
    } else {
      btnElement = (<Button style={_style} type="link"><MkIcon type="scan"/></Button>)
    }
  } else if (card.show === 'icon') {
    btnElement = (<Button style={_style} type="link"><MkIcon type={card.icon}/>{warning}</Button>)
src/menu/components/card/cardcellcomponent/index.jsx
@@ -149,7 +149,7 @@
    let options = ['font', 'border', 'padding', 'margin', 'background']
    if (element.eleType === 'button') {
      if (element.OpenType === 'form') {
      if (element.OpenType === 'form' && element.formType !== 'scan') {
        options = ['margin', 'float']
      } else {
        options.push('width', 'minHeight', 'float')
src/menu/components/card/cardcomponent/options.jsx
@@ -40,6 +40,12 @@
  if (hasMenus) {
    ops = [{value: 'menus', label: '菜单组'}]
  }
  let adapters = sessionStorage.getItem('adapter') || ''
  if (adapters.indexOf('wxmini') > -1) {
    ops.push({value: 'miniprogram', label: '小程序'})
  } else if (setting.click === 'miniprogram') {
    setting.click = ''
  }
  const cardSettingForm = [
    {
@@ -97,11 +103,11 @@
      forbid: subtype !== 'propcard'
    },
    {
      type: !hasMenus ? 'radio' : 'select',
      type: ops.length === 0 ? 'radio' : 'select',
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
      tooltip: '当绑定点击事件时,卡片的切换功能将失效。',
      // tooltip: '当绑定点击事件时,卡片的切换功能将失效。',
      required: false,
      options: [
        {value: '', label: '无'},
@@ -114,11 +120,13 @@
        {field: 'menu', values: ['menu']},
        {field: 'linkurl', values: ['link']},
        {field: 'open', values: ['menu', 'link', 'menus']},
        {field: 'joint', values: ['menu', 'link', 'menus']},
        {field: 'joint', values: ['menu', 'link', 'menus', 'miniprogram']},
        {field: 'linkbtn', values: ['button']},
        {field: 'clickType', values: ['button']},
        {field: 'menuType', values: ['menus']},
        {field: 'menus', values: ['menus']},
        {field: 'miniAppId', values: ['miniprogram']},
        {field: 'miniPath', values: ['miniprogram']},
      ]
    },
    {
@@ -148,6 +156,21 @@
      span: 24
    },
    {
      type: 'text',
      field: 'miniAppId',
      label: '小程序AppID',
      initval: setting.miniAppId || '',
      required: true
    },
    {
      type: 'text',
      field: 'miniPath',
      label: '页面路径',
      initval: setting.miniPath || '',
      tooltip: '可指定跳转小程序页面,为空时打开首页,注:参数拼接在指定页面时有效。',
      required: false
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
src/menu/components/card/cardsimplecomponent/options.jsx
@@ -83,7 +83,7 @@
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
      tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。',
      // tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。',
      required: false,
      options: [
        {value: '', label: '无'},
@@ -198,6 +198,14 @@
    }
  }
  let ops = []
  let adapters = sessionStorage.getItem('adapter') || ''
  if (adapters.indexOf('wxmini') > -1) {
    ops.push({value: 'miniprogram', label: '小程序'})
  } else if (setting.click === 'miniprogram') {
    setting.click = ''
  }
  const cardSettingForm = [
    {
      type: 'text',
@@ -218,12 +226,15 @@
        {value: '', label: '无'},
        {value: 'menu', label: '菜单'},
        {value: 'link', label: '链接'},
        ...ops
      ],
      controlFields: [
        {field: 'menu', values: ['menu']},
        {field: 'linkurl', values: ['link']},
        {field: 'open', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link', 'miniprogram']},
        {field: 'miniAppId', values: ['miniprogram']},
        {field: 'miniPath', values: ['miniprogram']},
      ]
    },
    {
@@ -248,6 +259,21 @@
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: 'text',
      field: 'miniAppId',
      label: '小程序AppID',
      initval: setting.miniAppId || '',
      required: true
    },
    {
      type: 'text',
      field: 'miniPath',
      label: '页面路径',
      initval: setting.miniPath || '',
      tooltip: '可指定跳转小程序页面,为空时打开首页,注:参数拼接在指定页面时有效。',
      required: false
    },
    {
      type: 'radio',
      field: 'joint',
      label: '参数拼接',
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -236,8 +236,10 @@
      if (this.record.formType === 'switch') {
        shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
      } else {
      } else if (this.record.formType === 'radio') {
        shows.push('field', 'openVal', 'closeVal')
      } else {
        shows.push('field')
      }
      reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
@@ -881,10 +883,15 @@
          values.modal = card.modal || null
          if (values.OpenType === 'form') {
            if (values.formType !== 'scan') {
            if (/^(0|[1-9]\d*)$/.test(values.openVal) && /^(0|[1-9]\d*)$/.test(values.closeVal)) {
              values.openVal = +values.openVal
              values.closeVal = +values.closeVal
            }
            } else {
              values.show = 'icon'
              values.icon = 'scan'
            }
          } else if (values.OpenType === 'excelOut') {
            values.Ot = 'notRequired'
          } else if (['pop', 'prompt', 'exec'].includes(values.OpenType) && values.verify) {
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -173,7 +173,7 @@
  if (type === 'card') {
    opentypes.push({
      value: 'form',
      text: '表单(开关或勾选框)'
      text: '表单'
    })
  } else if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
@@ -197,6 +197,16 @@
      value: 'closetab',
      text: '关闭标签'
    }]
  }
  let formTypes = []
  if (appType === 'mob') {
    formTypes = [{
      value: 'scan',
      text: '扫描'
    }]
  } else if (card.formType === 'scan') {
    card.formType = 'switch'
  }
  let forms = [
@@ -245,7 +255,8 @@
      }, {
        value: 'radio',
        text: '勾选框'
      }]
      },
      ...formTypes]
    },
    {
      type: 'select',
@@ -908,6 +919,21 @@
      required: false
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
      tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'splitLine',
      key: 'title',
      label: '表单',
@@ -966,21 +992,6 @@
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false,
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
      tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'radio',
src/menu/modulecell/index.jsx
@@ -38,7 +38,7 @@
          { value: 'tab', text: '标签页', type: 'action', class: 'button', $init: true },
          { value: 'innerpage', text: '新页面', type: 'action', class: 'button', $init: true },
          { value: 'funcbutton', text: '功能按钮', type: 'action', class: 'button', $init: true },
          { value: 'form', text: '表单(开关)', type: 'action', class: 'button', $init: true }
          { value: 'form', text: '表单', type: 'action', class: 'button', $init: true }
        ]
      },
      {
src/mob/modulesource/index.jsx
@@ -23,6 +23,10 @@
      options = fromJS(components).toJS()
    } else {
      options = fromJS(menuOptions).toJS()
      let adapters = sessionStorage.getItem('adapter') || ''
      if (adapters.indexOf('wxmini') === -1) {
        options = options.filter(item => item.adapter !== 'mini')
      }
    }
    this.setState({
src/mob/modulesource/option.jsx
@@ -60,5 +60,5 @@
  { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24 },
  { type: 'menu', url: Login, component: 'login', subtype: 'normallogin', title: '注册/登录', width: 24 },
  { type: 'menu', url: officialAccount, component: 'officialAccount', subtype: 'officialAccount', title: '关注公众号(小程序中)', width: 24 },
  { type: 'menu', url: officialAccount, component: 'officialAccount', subtype: 'officialAccount', title: '关注公众号(小程序中)', width: 24, adapter: 'mini' },
]
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2565,8 +2565,10 @@
    if (btn.OpenType === 'form') {
      if (btn.formType === 'switch') {
        return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style} className={btn.size === 'large' ? 'ant-switch-large' : ''} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/>
      } else {
      } else if (btn.formType === 'radio') {
        return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={btn.style}></Checkbox>
      } else {
        return <Button type="link" icon="scan" disabled={true} style={btn.style} onClick={(e) => {e.stopPropagation()}}></Button>
      }
    }