king
2022-12-06 91e232bb0b910f3670bdbccd65cc218d55e1eda9
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,10 +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']},
      ]
    },
    {
@@ -134,6 +143,7 @@
      label: '关联菜单',
      initval: setting.menu || (appType ? '' : []),
      required: true,
      extendName: 'MenuNo',
      options: menulist,
    },
    {
@@ -146,16 +156,31 @@
      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: '打开方式',
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
        {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ],
      forbid: appType !== 'pc'
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: 'radio',
@@ -178,6 +203,18 @@
    },
    {
      type: 'radio',
      field: 'clickType',
      label: '触发方式',
      initval: setting.clickType || 'normal',
      required: false,
      options: [
        {value: 'normal', label: '单击'},
        {value: 'multi', label: '双击'},
      ],
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
      field: 'btnControl',
      label: '按钮控制',
      initval: setting.btnControl || 'show',
@@ -196,6 +233,7 @@
      initval: menus,
      required: true,
      span: 24,
      actions: ['view'],
      columns: [
        {
          title: '标识',