king
2021-12-19 9e322cf8ed0d62124fcd017d6066ecfc50950196
2021-12-19
7个文件已修改
1个文件已添加
106 ■■■■ 已修改文件
src/assets/mobimg/singlesearch.png 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/search/single-search/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/search/single-search/index.scss 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/search/single-search/options.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/option.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/mobimg/singlesearch.png
src/menu/components/card/cardcellcomponent/index.jsx
@@ -591,6 +591,25 @@
    let btn = cards.action[index]
    btn.eleType = 'button'
    if (!btn.width) {
      btn.width = 12
    }
    if (btn.color) {
      btn.style = btn.style || {}
      btn.style.color = '#ffffff'
      if (btn.color === 'primary') {
        btn.style.backgroundColor = '#1677ff'
      } else if (btn.color === 'danger') {
        btn.style.backgroundColor = '#ff3141'
      } else if (btn.color === 'warning') {
        btn.style.backgroundColor = '#ff8f1f'
      } else if (btn.color === 'success') {
        btn.style.backgroundColor = '#00b578'
      } else if (btn.color === 'light') {
        btn.style.backgroundColor = '#cccccc'
      }
    }
    let _elements = [...this.state.elements, btn]
    this.setState({
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -11,15 +11,15 @@
const { TextArea } = Input
const MkIcon = asyncComponent(() => import('@/components/mkIcon'))
const actionTypeOptions = {
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'],
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'color', 'width', 'open'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'color', 'width']
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width']
}
class ActionForm extends Component {
@@ -219,9 +219,6 @@
      if (_control) {
        _options.push('controlField', 'controlVal')
      }
    }
    if (_Ot === 'requiredSgl' && ['pop', 'prompt', 'exec'].includes(_opentype)) {
      _options.push('swipe')
    }
    return _options
src/mob/components/search/single-search/index.jsx
@@ -136,9 +136,9 @@
    return (
      <div className="single-search-edit-list" onClick={this.clickComponent} id={card.uuid} style={_style}>
        <div className="search-wrap" style={{borderRadius: card.wrap.borderRadius || 0}}>
          <Input placeholder={card.wrap.label} value={card.initval} />
          {card.wrap.scan === 'show' ? <Icon type="scan" /> : null}
        <div className="search-wrap" style={{borderRadius: card.wrap.borderRadius || 0, height: card.wrap.height || 32}}>
          <Input placeholder={card.wrap.label} value={card.wrap.initval || ''} />
          {card.wrap.scan === 'show' ? <Icon type="scan" style={{lineHeight: `${card.wrap.height || 32}px`}} /> : null}
          {card.wrap.show === 'text' ? <Button type="primary">搜索</Button> : <Button icon="search" type="primary"></Button>}
        </div>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
src/mob/components/search/single-search/index.scss
@@ -25,10 +25,11 @@
    .ant-input {
      flex: 1;
      border-radius: 0;
      height: 100%;
    }
    .anticon-scan {
      font-size: 18px;
      padding: 5px;
      padding: 0px 10px;
      color: #959595;
    }
    .ant-btn {
@@ -36,6 +37,7 @@
      position: relative;
      right: -1px;
      min-width: 45px;
      height: 100%;
    }
  }
}
src/mob/components/search/single-search/options.jsx
@@ -38,6 +38,36 @@
      required: false
    },
    {
      type: 'text',
      field: 'initval',
      label: '初始值',
      initval: wrap.initval || '',
      required: false
    },
    {
      type: 'radio',
      field: 'required',
      label: '必填',
      initval: wrap.required || 'false',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ]
    },
    {
      type: 'radio',
      field: 'match',
      label: '匹配方式',
      initval: wrap.match || 'like',
      required: true,
      options: [
        {value: 'like', label: 'like'},
        {value: 'not like', label: 'not like'},
        {value: '=', label: '='},
      ]
    },
    {
      type: 'radio',
      field: 'show',
      label: '搜索样式',
@@ -68,6 +98,16 @@
      precision: 0,
      initval: wrap.borderRadius || 0,
      required: false
    },
    {
      type: 'number',
      field: 'height',
      label: '高度',
      min: 28,
      max: 150,
      precision: 0,
      initval: wrap.height || 32,
      required: false
    }
  ]
src/mob/modulesource/option.jsx
@@ -13,7 +13,7 @@
import SandBox from '@/assets/mobimg/sandbox.png'
import Pie1 from '@/assets/mobimg/ring.png'
import Pie2 from '@/assets/mobimg/nightingale.png'
import Mainsearch from '@/assets/mobimg/mainsearch.png'
import singlesearch from '@/assets/mobimg/singlesearch.png'
import Navbar from '@/assets/mobimg/navbar-mob.png'
import Carousel from '@/assets/mobimg/carousel.png'
import Carousel1 from '@/assets/mobimg/carousel1.png'
@@ -32,7 +32,7 @@
  { type: 'menu', url: Navbar, component: 'navbar', subtype: 'tabbar', title: '菜单栏' },
  { type: 'menu', url: MenuBar, component: 'menubar', subtype: 'menubar', title: '菜单' },
  { type: 'menu', url: tabs, component: 'tabs', subtype: 'tabs', title: '标签页', width: 24 },
  { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24 },
  { type: 'menu', url: singlesearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24 },
  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '数据卡', width: 24 },
  { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', width: 24 },
  { type: 'menu', url: card2, component: 'balcony', subtype: 'balcony', title: '浮动卡', width: 24 },
src/views/mobdesign/index.jsx
@@ -1210,6 +1210,8 @@
  verifyConfig = (show) => {
    const { config } = this.state
    let error = ''
    let searchSum = 0
    let swipes = []
    let check = (components) => {
      components.forEach(item => {
@@ -1224,6 +1226,18 @@
          return
        } else if (item.type === 'navbar' && !item.wrap.MenuNo) {
          error = `导航栏《${item.name}》未设置菜单参数!`
        } else if (item.type === 'topbar') {
          if (item.wrap.type === 'search' || item.wrap.type === 'searchIcon' || (item.wrap.type === 'navbar' && item.wrap.search === 'true')) {
            searchSum += 1
          }
        } else if (item.type === 'search') {
          searchSum += 1
          if (!item.wrap.field) {
            error = `搜索条件《${item.name}》未设置搜索字段!`
          }
        }
        if (item.wrap && item.wrap.pagestyle === 'slide') {
          swipes.push(item.name)
        }
        if (['propcard', 'brafteditor', 'sandbox', 'tabbar', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return
@@ -1255,6 +1269,12 @@
    check(config.components)
    if (!error && searchSum > 1) {
      error = '搜索组件与导航栏的搜索功能不可同时使用。'
    } else if (!error && swipes.length > 1) {
      error = `页面中不可同时使用多个滑动加载组件。(${swipes.join('、')})`
    }
    if (show && error) {
      notification.warning({
        top: 92,