king
2024-03-15 05eada1e66951fbb4d388518206c6f5adc93841c
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -60,6 +60,7 @@
  let linkTypes = [
    { value: 'tel', text: '电话' },
    { value: 'email', text: '邮箱' },
    { value: 'linkmenu', text: '关联菜单' },
    { value: 'download', text: '下载' },
    { value: 'other', text: '其他' }
  ]
@@ -89,13 +90,25 @@
      card.linkType = ''
      card.linkurl = ''
    }
  } else if (card.linkType === 'linkmenu') {
    if (appType !== 'mob' && appType !== 'pc') {
      card.link = ''
      card.linkType = ''
      card.linkurl = ''
      card.linkmenu = ''
  // } else if (card.linkType === 'linkmenu') {
  //   if (appType !== 'mob' && appType !== 'pc') {
  //     card.link = ''
  //     card.linkType = ''
  //     card.linkurl = ''
  //     card.linkmenu = ''
  //   }
    }
  let menulist = sessionStorage.getItem('fstMenuList')
  if (appType === '' && menulist) {
    try {
      menulist = JSON.parse(menulist)
    } catch (e) {
      menulist = []
    }
  } else {
    menulist = []
  }
  let appMenus = sessionStorage.getItem('appMenus')
@@ -589,7 +602,7 @@
      forbid: isHeader
    },
    {
      type: linkTypes.length > 4 ? 'select' : 'radio',
      type: 'select',
      key: 'linkType',
      label: '链接类型',
      initVal: card.linkType || 'other',
@@ -617,6 +630,15 @@
      forbid: !['pc', 'mob'].includes(appType)
    },
    {
      type: 'cascader',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || [],
      required: true,
      options: menulist,
      forbid: ['pc', 'mob'].includes(appType)
    },
    {
      type: 'select',
      key: 'linkurl',
      label: '链接地址',