gm-printer 10.29.1-beta.0 → 10.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.29.1-beta.0",
3
+ "version": "10.29.2",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -12,16 +12,17 @@ import { inject, observer } from 'mobx-react'
12
12
  class TableDetailEditor extends Component {
13
13
  handleSwitchChange = val => {
14
14
  const { editStore } = this.props
15
- editStore.doSomething(val)
15
+ editStore.switchCustomerTag(val)
16
16
  }
17
17
 
18
18
  render() {
19
19
  const { editStore } = this.props
20
- console.log(this.props)
21
20
  const {
22
21
  addFields: { sumTableConfig }
23
22
  } = this.props
24
23
  if (editStore.computedRegionIsTable) {
24
+ const arr = editStore.selectedRegion.split('.')
25
+ const tableConfig = editStore.config.contents[arr[2]]
25
26
  return (
26
27
  <div className='gm-margin-top-5'>
27
28
  <Flex>
@@ -29,7 +30,7 @@ class TableDetailEditor extends Component {
29
30
  {sumTableConfig.label || i18next.t('配置')}
30
31
  </div>
31
32
  <Switch
32
- checked={editStore.customerTag}
33
+ checked={tableConfig.customerTag}
33
34
  onChange={this.handleSwitchChange}
34
35
  />
35
36
  </Flex>
@@ -6,10 +6,6 @@ class Store extends EditorStore {
6
6
  constructor({ defaultTableDataKey }) {
7
7
  super()
8
8
  this.defaultTableDataKey = defaultTableDataKey // 修改默认dataKey
9
- const arr = this.selectedRegion?.split('.')
10
- if (arr?.length > 2) {
11
- this.customerTag = this.config.contents[arr[2]].customerTag
12
- }
13
9
  }
14
10
 
15
11
  @observable
@@ -107,10 +103,9 @@ class Store extends EditorStore {
107
103
 
108
104
  /* end---------设置采购明细相关--------- */
109
105
  @action.bound
110
- doSomething(val) {
106
+ switchCustomerTag(val) {
111
107
  const arr = this.selectedRegion.split('.')
112
108
  this.config.contents[arr[2]].customerTag = val
113
- this.customerTag = val
114
109
  }
115
110
  }
116
111