gm-printer 10.14.1-alpha.2 → 10.14.1-alpha.5

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/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js":"1","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js":"2","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js":"3","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js":"4","/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js":"5","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js":"6","/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js":"7","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js":"8","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js":"9","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js":"10","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js":"11","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js":"12","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js":"13","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js":"14","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js":"15","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js":"16","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js":"17","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js":"18","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js":"19","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js":"20","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js":"21","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js":"22"},{"size":9379,"mtime":1643448762149,"results":"23","hashOfConfig":"24"},{"size":13982,"mtime":1646901703877,"results":"25","hashOfConfig":"24"},{"size":4244,"mtime":1635494969691,"results":"26","hashOfConfig":"24"},{"size":4208,"mtime":1646901683615,"results":"27","hashOfConfig":"24"},{"size":616,"mtime":1621235314060,"results":"28","hashOfConfig":"29"},{"size":9693,"mtime":1621242097206,"results":"30","hashOfConfig":"29"},{"size":7258,"mtime":1639037857730,"results":"31","hashOfConfig":"24"},{"size":9854,"mtime":1646901455835,"results":"32","hashOfConfig":"24"},{"size":3119,"mtime":1634191808754,"results":"33","hashOfConfig":"24"},{"size":1113,"mtime":1635407660514,"results":"34","hashOfConfig":"24"},{"size":4349,"mtime":1646815933499,"results":"35","hashOfConfig":"24"},{"size":861,"mtime":1635246075403,"results":"36","hashOfConfig":"24"},{"size":3260,"mtime":1635334661529,"results":"37","hashOfConfig":"24"},{"size":26134,"mtime":1646901675308,"results":"38","hashOfConfig":"24"},{"size":1907,"mtime":1635492860490,"results":"39","hashOfConfig":"24"},{"size":3548,"mtime":1635409410379,"results":"40","hashOfConfig":"24"},{"size":2989,"mtime":1635495718901,"results":"41","hashOfConfig":"24"},{"size":3399,"mtime":1646816404368,"results":"42","hashOfConfig":"24"},{"size":2456,"mtime":1646721857196,"results":"43","hashOfConfig":"24"},{"size":1408,"mtime":1646884084630,"results":"44","hashOfConfig":"24"},{"size":13280,"mtime":1646901618757,"results":"45","hashOfConfig":"24"},{"size":14804,"mtime":1646895235712,"results":"46","hashOfConfig":"24"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":3,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"71","messages":"72","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"89","messages":"90","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js",["91","92","93"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js",["94","95","96","97","98","99","100","101","102","103","104","105","106"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js",["107","108","109"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js",[],{"ruleId":"110","severity":2,"message":"111","line":10,"column":29,"nodeType":"112","endLine":10,"endColumn":35},{"ruleId":"110","severity":2,"message":"113","line":10,"column":43,"nodeType":"112","endLine":10,"endColumn":51},{"ruleId":"110","severity":2,"message":"113","line":147,"column":63,"nodeType":"112","endLine":147,"endColumn":71},{"ruleId":"110","severity":2,"message":"114","line":47,"column":13,"nodeType":"115","messageId":"116","endLine":47,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":48,"column":30,"nodeType":"112","messageId":"116","endLine":48,"endColumn":36},{"ruleId":"110","severity":2,"message":"118","line":49,"column":31,"nodeType":"112","messageId":"116","endLine":49,"endColumn":47},{"ruleId":"110","severity":2,"message":"118","line":50,"column":21,"nodeType":"112","messageId":"116","endLine":50,"endColumn":37},{"ruleId":"110","severity":2,"message":"114","line":56,"column":13,"nodeType":"115","messageId":"116","endLine":56,"endColumn":22},{"ruleId":"110","severity":2,"message":"119","line":59,"column":20,"nodeType":"112","messageId":"116","endLine":59,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":61,"column":23,"nodeType":"112","messageId":"116","endLine":61,"endColumn":29},{"ruleId":"110","severity":2,"message":"120","line":61,"column":30,"nodeType":"112","messageId":"116","endLine":61,"endColumn":34},{"ruleId":"110","severity":2,"message":"121","line":63,"column":15,"nodeType":"112","messageId":"116","endLine":63,"endColumn":19},{"ruleId":"110","severity":2,"message":"114","line":67,"column":23,"nodeType":"115","messageId":"116","endLine":67,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":70,"column":32,"nodeType":"112","messageId":"116","endLine":70,"endColumn":38},{"ruleId":"110","severity":2,"message":"114","line":78,"column":13,"nodeType":"115","messageId":"116","endLine":78,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":84,"column":42,"nodeType":"112","messageId":"116","endLine":84,"endColumn":48},{"ruleId":"122","severity":1,"message":"123","line":265,"column":13,"nodeType":"124","endLine":265,"endColumn":49},{"ruleId":"122","severity":1,"message":"123","line":283,"column":13,"nodeType":"124","endLine":283,"endColumn":56},{"ruleId":"125","severity":2,"message":"126","line":436,"column":22,"nodeType":"127","messageId":"128","endLine":436,"endColumn":31},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","'editStore.config.batchPrintConfig' is missing in props validation","'editStore.originConfig' is missing in props validation","'editStore.config.name' is missing in props validation","'editStore.init' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
1
+ [{"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js":"1","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js":"2","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js":"3","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js":"4","/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js":"5","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js":"6","/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js":"7","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js":"8","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js":"9","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js":"10","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js":"11","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js":"12","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js":"13","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js":"14","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js":"15","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js":"16","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js":"17","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js":"18","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js":"19","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js":"20","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js":"21","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js":"22","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/panel.js":"23"},{"size":9379,"mtime":1643448762149,"results":"24","hashOfConfig":"25"},{"size":15108,"mtime":1646982806457,"results":"26","hashOfConfig":"25"},{"size":4244,"mtime":1635494969691,"results":"27","hashOfConfig":"25"},{"size":4501,"mtime":1646970942704,"results":"28","hashOfConfig":"25"},{"size":616,"mtime":1621235314060,"results":"29","hashOfConfig":"30"},{"size":9693,"mtime":1621242097206,"results":"31","hashOfConfig":"30"},{"size":7258,"mtime":1639037857730,"results":"32","hashOfConfig":"25"},{"size":10283,"mtime":1646979851812,"results":"33","hashOfConfig":"25"},{"size":3119,"mtime":1634191808754,"results":"34","hashOfConfig":"25"},{"size":1113,"mtime":1635407660514,"results":"35","hashOfConfig":"25"},{"size":4349,"mtime":1646815933499,"results":"36","hashOfConfig":"25"},{"size":861,"mtime":1635246075403,"results":"37","hashOfConfig":"25"},{"size":3260,"mtime":1635334661529,"results":"38","hashOfConfig":"25"},{"size":26475,"mtime":1646982227981,"results":"39","hashOfConfig":"25"},{"size":1907,"mtime":1635492860490,"results":"40","hashOfConfig":"25"},{"size":3548,"mtime":1635409410379,"results":"41","hashOfConfig":"25"},{"size":2989,"mtime":1635495718901,"results":"42","hashOfConfig":"25"},{"size":3399,"mtime":1646816404368,"results":"43","hashOfConfig":"25"},{"size":2456,"mtime":1646721857196,"results":"44","hashOfConfig":"25"},{"size":1159,"mtime":1646970893747,"results":"45","hashOfConfig":"25"},{"size":13280,"mtime":1646901618757,"results":"46","hashOfConfig":"25"},{"size":14804,"mtime":1646895235712,"results":"47","hashOfConfig":"25"},{"size":3005,"mtime":1647228414919,"results":"48","hashOfConfig":"25"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","errorCount":3,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"71","messages":"72","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"89","messages":"90","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"91","messages":"92","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js",["95","96","97"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js",["98","99","100","101","102","103","104","105","106","107","108","109","110"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js",["111","112","113"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/panel.js",[],{"ruleId":"114","severity":2,"message":"115","line":10,"column":29,"nodeType":"116","endLine":10,"endColumn":35},{"ruleId":"114","severity":2,"message":"117","line":10,"column":43,"nodeType":"116","endLine":10,"endColumn":51},{"ruleId":"114","severity":2,"message":"117","line":147,"column":63,"nodeType":"116","endLine":147,"endColumn":71},{"ruleId":"114","severity":2,"message":"118","line":47,"column":13,"nodeType":"119","messageId":"120","endLine":47,"endColumn":22},{"ruleId":"114","severity":2,"message":"121","line":48,"column":30,"nodeType":"116","messageId":"120","endLine":48,"endColumn":36},{"ruleId":"114","severity":2,"message":"122","line":49,"column":31,"nodeType":"116","messageId":"120","endLine":49,"endColumn":47},{"ruleId":"114","severity":2,"message":"122","line":50,"column":21,"nodeType":"116","messageId":"120","endLine":50,"endColumn":37},{"ruleId":"114","severity":2,"message":"118","line":56,"column":13,"nodeType":"119","messageId":"120","endLine":56,"endColumn":22},{"ruleId":"114","severity":2,"message":"123","line":59,"column":20,"nodeType":"116","messageId":"120","endLine":59,"endColumn":32},{"ruleId":"114","severity":2,"message":"121","line":61,"column":23,"nodeType":"116","messageId":"120","endLine":61,"endColumn":29},{"ruleId":"114","severity":2,"message":"124","line":61,"column":30,"nodeType":"116","messageId":"120","endLine":61,"endColumn":34},{"ruleId":"114","severity":2,"message":"125","line":63,"column":15,"nodeType":"116","messageId":"120","endLine":63,"endColumn":19},{"ruleId":"114","severity":2,"message":"118","line":67,"column":23,"nodeType":"119","messageId":"120","endLine":67,"endColumn":32},{"ruleId":"114","severity":2,"message":"121","line":70,"column":32,"nodeType":"116","messageId":"120","endLine":70,"endColumn":38},{"ruleId":"114","severity":2,"message":"118","line":78,"column":13,"nodeType":"119","messageId":"120","endLine":78,"endColumn":22},{"ruleId":"114","severity":2,"message":"121","line":84,"column":42,"nodeType":"116","messageId":"120","endLine":84,"endColumn":48},{"ruleId":"126","severity":1,"message":"127","line":265,"column":13,"nodeType":"128","endLine":265,"endColumn":49},{"ruleId":"126","severity":1,"message":"127","line":283,"column":13,"nodeType":"128","endLine":283,"endColumn":56},{"ruleId":"129","severity":2,"message":"130","line":436,"column":22,"nodeType":"131","messageId":"132","endLine":436,"endColumn":31},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","'editStore.config.batchPrintConfig' is missing in props validation","'editStore.originConfig' is missing in props validation","'editStore.config.name' is missing in props validation","'editStore.init' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.14.1-alpha.2",
3
+ "version": "10.14.1-alpha.5",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -13,14 +13,12 @@ class EditorCutomizedConfig extends React.Component {
13
13
  }
14
14
 
15
15
  render() {
16
- /** !!!注: 不要删除config, 否则会影响mobx的动态监听(PS: 感觉像是mobx的bug?) */
17
16
  const {
18
17
  editStore,
19
18
  editStore: { isAutoFilling }
20
19
  } = this.props
21
- const { dataKey } = editStore.computedTableSpecialConfig
22
- // 是table且具有specialConfig的附属table
23
- if (editStore.computedRegionIsTable && dataKey === 'orders_category') {
20
+ // 是table
21
+ if (editStore.computedRegionIsTable) {
24
22
  return (
25
23
  <>
26
24
  <Flex alignCenter className='gm-padding-top-5'>
@@ -108,7 +108,8 @@ class EditorStore {
108
108
 
109
109
  @action
110
110
  getFilledTableData(tableData) {
111
- if (!this.selectedRegion) return []
111
+ const { autoFillConfig } = this.config
112
+ if (!this.selectedRegion && !autoFillConfig?.checked) return []
112
113
  const tr_count = Math.floor(
113
114
  this.remainPageHeihgt / this.computedTableCustomerRowHeight
114
115
  )
@@ -124,8 +125,10 @@ class EditorStore {
124
125
 
125
126
  @action.bound
126
127
  handleChangeTableData(isAutoFilling = false) {
127
- if (!this.selectedRegion) return
128
- const { dataKey } = this.computedTableSpecialConfig
128
+ const { autoFillConfig } = this.config
129
+ if (!this.selectedRegion && !autoFillConfig?.checked) return
130
+ const dataKey =
131
+ this.computedTableSpecialConfig?.dataKey || autoFillConfig?.dataKey
129
132
  const table = this.mockData._table[dataKey]
130
133
  this.setAutoFillingConfig(isAutoFilling)
131
134
 
@@ -135,6 +138,13 @@ class EditorStore {
135
138
  this.clearExtraTableData(dataKey)
136
139
  return
137
140
  }
141
+ set(this.config, {
142
+ autoFillConfig: {
143
+ region: this.selectedRegion,
144
+ dataKey,
145
+ checked: isAutoFilling
146
+ }
147
+ })
138
148
  this.mockData._table[dataKey] = table
139
149
  }
140
150
 
@@ -779,6 +789,7 @@ class EditorStore {
779
789
  return height === undefined ? 23 : height
780
790
  }
781
791
  }
792
+ return 23
782
793
  }
783
794
 
784
795
  @action.bound
@@ -22,6 +22,22 @@ const blockTypeList = [
22
22
  @inject('editStore')
23
23
  @observer
24
24
  class ContextMenu extends React.Component {
25
+ componentDidMount() {
26
+ const {
27
+ editStore,
28
+ editStore: {
29
+ config: { autoFillConfig }
30
+ }
31
+ } = this.props
32
+
33
+ if (autoFillConfig?.checked) {
34
+ editStore.handleChangeTableData(
35
+ autoFillConfig?.checked,
36
+ autoFillConfig?.dataKey
37
+ )
38
+ }
39
+ }
40
+
25
41
  /**
26
42
  * 是否存在每页合计按钮,非异常明细才有按钮
27
43
  * @param name => ContextMenu 的 this.state.name
@@ -28,6 +28,12 @@ class Panel extends React.Component {
28
28
  }
29
29
 
30
30
  handleDragStart = ({ clientY }) => {
31
+ // 这里在拖拽也要选择区域,不然选中A的区域,拉的B的区域,就导致错误
32
+ const { name } = this.props
33
+ dispatchMsg('gm-printer-select-region', {
34
+ selected: name
35
+ })
36
+
31
37
  this.setState({
32
38
  clientY
33
39
  })
@@ -94,6 +94,13 @@ class Printer extends React.Component {
94
94
  // 开始计算,获取各种数据
95
95
  printerStore.computedPages()
96
96
 
97
+ if (config.autoFillConfig?.checked) {
98
+ this.props.printerStore.setAutofillConfig(
99
+ config.autoFillConfig?.checked || false
100
+ )
101
+ this.props.printerStore.changeTableData()
102
+ }
103
+
97
104
  // 获取剩余空白高度,传到editor
98
105
  getremainpageHeight && getremainpageHeight(printerStore.remainPageHeight)
99
106
  }
@@ -164,18 +171,24 @@ class Printer extends React.Component {
164
171
  <Header config={config.header} pageIndex={i} />
165
172
 
166
173
  {_.map(page, (panel, ii) => {
167
- const end =
168
- isLastPage && isAutoFilling && panel.end
169
- ? panel.end + Math.floor(remainPageHeight / TR_BASE_HEIGHT)
170
- : panel.end
174
+ const content = config.contents[panel.index]
175
+ const autoFillConfig = config?.autoFillConfig || {}
176
+ const isAutofillConfig =
177
+ isLastPage &&
178
+ isAutoFilling &&
179
+ panel.end &&
180
+ content?.dataKey === autoFillConfig?.dataKey
171
181
 
182
+ const end = isAutofillConfig
183
+ ? panel.end + Math.floor(remainPageHeight / TR_BASE_HEIGHT)
184
+ : panel.end
172
185
  switch (panel.type) {
173
186
  case 'table':
174
187
  return (
175
188
  <Table
176
189
  key={`contents.table.${panel.index}.${ii}`}
177
190
  name={`contents.table.${panel.index}`}
178
- config={config.contents[panel.index]}
191
+ config={content}
179
192
  range={{
180
193
  begin: panel.begin,
181
194
  end: end
@@ -323,7 +336,6 @@ class WithStorePrinter extends React.Component {
323
336
  }
324
337
 
325
338
  render() {
326
- console.log('this.props', { ...this.props })
327
339
  return (
328
340
  <Provider printerStore={this.printerStore}>
329
341
  <Printer {...this.props} />
@@ -1,5 +1,5 @@
1
1
  import i18next from '../../locales'
2
- import { action, observable } from 'mobx'
2
+ import { action, observable, computed } from 'mobx'
3
3
  import {
4
4
  getSumTrHeight,
5
5
  isMultiTable,
@@ -44,10 +44,6 @@ class PrinterStore {
44
44
  @observable
45
45
  isAutoFilling = false
46
46
 
47
- // 用于缓存更新前后的remainPageHeight,两个长度的数组
48
- @observable
49
- remainPageHeightCacheArr = []
50
-
51
47
  @action
52
48
  init(config, data) {
53
49
  this.ready = false
@@ -111,6 +107,21 @@ class PrinterStore {
111
107
  return filledData.length
112
108
  }
113
109
 
110
+ // 获得表格自定义行高
111
+ @computed
112
+ get computedTableCustomerRowHeight() {
113
+ const _defaultRegion = this.config?.autoFillConfig?.region
114
+ if (this.selectedRegion || _defaultRegion) {
115
+ const _selectedRegion = this.selectedRegion || _defaultRegion
116
+ const arr = _selectedRegion.split('.')
117
+ if (arr.includes('table')) {
118
+ const height = this.config.contents[arr[2]].customerRowHeight
119
+ return height === undefined ? 23 : height
120
+ }
121
+ }
122
+ return 23
123
+ }
124
+
114
125
  @action
115
126
  setSelected(selected) {
116
127
  this.selected = selected || null
@@ -121,9 +132,9 @@ class PrinterStore {
121
132
  this.selectedRegion = selected || null
122
133
  }
123
134
 
124
- getNormalTableBodyHeights(heights, dataKey = 'orders_category') {
135
+ getNormalTableBodyHeights(heights, dataKey) {
125
136
  const hasEmptyData = this.tableData.some(x => x._isEmptyData)
126
- const isOrderCategroy = dataKey === 'orders_category'
137
+ const isOrderCategroy = dataKey === this.config?.autoFillConfig?.dataKey
127
138
  const { customerRowHeight = TR_BASE_HEIGHT } = this.tableConfig
128
139
 
129
140
  if (hasEmptyData && !this.isAutoFilling && isOrderCategroy) {
@@ -368,7 +379,6 @@ class PrinterStore {
368
379
  this.pages.push(page)
369
380
 
370
381
  this.remainPageHeight = +Big(this.pageHeight - currentPageHeight).toFixed(0)
371
- this.remainPageHeightCacheArr.push(this.remainPageHeight)
372
382
  }
373
383
 
374
384
  template(text, pageIndex) {
@@ -437,6 +447,34 @@ class PrinterStore {
437
447
  return text
438
448
  }
439
449
  }
450
+
451
+ // 用于初始化的计算
452
+ getFilledTableData(tableData) {
453
+ const { autoFillConfig } = this.config
454
+ if (!this.selectedRegion && !autoFillConfig?.checked) return []
455
+ const tr_count = Math.floor(
456
+ this.remainPageHeight / this.computedTableCustomerRowHeight
457
+ )
458
+
459
+ const filledData = {
460
+ _isEmptyData: true // 表示是填充的空白数据
461
+ }
462
+ _.map(tableData[0], (val, key) => {
463
+ filledData[key] = ''
464
+ })
465
+ return Array(tr_count).fill(filledData)
466
+ }
467
+
468
+ @action.bound
469
+ changeTableData() {
470
+ const { autoFillConfig } = this.config
471
+ if (!autoFillConfig?.checked) return
472
+ const dataKey = autoFillConfig?.dataKey
473
+ const table = this.data._table[dataKey]
474
+
475
+ table.push(...this.getFilledTableData(table))
476
+ this.data._table[dataKey] = table
477
+ }
440
478
  }
441
479
 
442
480
  export default PrinterStore