@luck-design-biz/luckda 0.0.7-2 → 0.0.8-1

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.
@@ -63,17 +63,16 @@ var LdFormList = function LdFormList(_ref) {
63
63
  useImperativeHandle(wrapperRef, function () {
64
64
  return _objectSpread(_objectSpread({}, formListRef.current), {}, {
65
65
  onLdQuery: function onLdQuery() {
66
+ var _getDvaApp;
66
67
  var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
67
- if (props.formMode !== 'add') {
68
- var _getDvaApp;
69
- (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.dispatch({
70
- type: "".concat(namespace, "/setTicketData"),
71
- payload: {
72
- ticketData: _objectSpread(_objectSpread({}, props.ticketData), _params)
73
- }
74
- });
75
- formListRef.current.doQuery();
76
- }
68
+ (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.dispatch({
69
+ type: "".concat(namespace, "/setTicketData"),
70
+ payload: {
71
+ ticketData: _objectSpread(_objectSpread({}, props.ticketData), _params)
72
+ }
73
+ }).then(function () {
74
+ formListRef.current.doQuery(null, _objectSpread(_objectSpread({}, props.ticketData), _params));
75
+ });
77
76
  }
78
77
  });
79
78
  });
@@ -122,25 +121,34 @@ var LdFormList = function LdFormList(_ref) {
122
121
  } else {
123
122
  var _formListRef$current;
124
123
  props.parentModelName && ((_formListRef$current = formListRef.current) === null || _formListRef$current === void 0 ? void 0 : _formListRef$current.doParentsQuery());
125
- if (!formWindow && formMode === 'add' && window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN) {
126
- var _history$location = history.location,
127
- pathname = _history$location.pathname,
128
- query = _history$location.query;
129
- var _pathname = pathname.replace(/\/0(?=[?]|[\/]$|$)/g, "/".concat(indocno, "?"));
130
- window.openUrl("layer:".concat(_pathname).concat(stringify(_objectSpread(_objectSpread({}, query), {}, {
131
- title: window.__INJECTED_APP_NAME_BY_QIANKUN__
132
- }))));
133
- } else {
134
- formListRef.current.onQuery(null, _defineProperty({}, mainFormLdId, {
135
- indocno: indocno
136
- }), function () {
137
- return formListRef.current.setFormMode('edit');
138
- });
139
- }
124
+ // if (
125
+ // !formWindow &&
126
+ // formMode === 'add' &&
127
+ // window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN
128
+ // ) {
129
+ // const { pathname, query } = history.location;
130
+ // const _pathname = pathname.replace(
131
+ // /\/0(?=[?]|[\/]$|$)/g,
132
+ // `/${indocno}?`,
133
+ // );
134
+ // window.openUrl(
135
+ // `layer:${_pathname}${stringify({
136
+ // ...query,
137
+ // title: window.__INJECTED_APP_NAME_BY_QIANKUN__,
138
+ // })}`,
139
+ // );
140
+ // } else {
141
+ formListRef.current.onQuery(null, _defineProperty({}, mainFormLdId, {
142
+ indocno: indocno
143
+ }), function () {
144
+ return formListRef.current.setFormMode('edit');
145
+ });
146
+ // }
140
147
  }
141
148
  }
142
149
  });
143
150
  };
151
+
144
152
  var formConfig = _objectSpread(_objectSpread({
145
153
  formState: formState,
146
154
  formMode: formMode,
@@ -70,17 +70,16 @@ var LdFormList = function LdFormList(_ref) {
70
70
  (0, _react.useImperativeHandle)(wrapperRef, function () {
71
71
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, formListRef.current), {}, {
72
72
  onLdQuery: function onLdQuery() {
73
+ var _getDvaApp;
73
74
  var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
74
- if (props.formMode !== 'add') {
75
- var _getDvaApp;
76
- (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.dispatch({
77
- type: "".concat(namespace, "/setTicketData"),
78
- payload: {
79
- ticketData: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.ticketData), _params)
80
- }
81
- });
82
- formListRef.current.doQuery();
83
- }
75
+ (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.dispatch({
76
+ type: "".concat(namespace, "/setTicketData"),
77
+ payload: {
78
+ ticketData: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.ticketData), _params)
79
+ }
80
+ }).then(function () {
81
+ formListRef.current.doQuery(null, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.ticketData), _params));
82
+ });
84
83
  }
85
84
  });
86
85
  });
@@ -129,25 +128,34 @@ var LdFormList = function LdFormList(_ref) {
129
128
  } else {
130
129
  var _formListRef$current;
131
130
  props.parentModelName && ((_formListRef$current = formListRef.current) === null || _formListRef$current === void 0 ? void 0 : _formListRef$current.doParentsQuery());
132
- if (!formWindow && formMode === 'add' && window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN) {
133
- var _history$location = _umi.history.location,
134
- pathname = _history$location.pathname,
135
- query = _history$location.query;
136
- var _pathname = pathname.replace(/\/0(?=[?]|[\/]$|$)/g, "/".concat(indocno, "?"));
137
- window.openUrl("layer:".concat(_pathname).concat((0, _querystring.stringify)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, query), {}, {
138
- title: window.__INJECTED_APP_NAME_BY_QIANKUN__
139
- }))));
140
- } else {
141
- formListRef.current.onQuery(null, (0, _defineProperty2.default)({}, mainFormLdId, {
142
- indocno: indocno
143
- }), function () {
144
- return formListRef.current.setFormMode('edit');
145
- });
146
- }
131
+ // if (
132
+ // !formWindow &&
133
+ // formMode === 'add' &&
134
+ // window.__INJECTED_FLOAT_MICRO_APP_BY_QIANKUN
135
+ // ) {
136
+ // const { pathname, query } = history.location;
137
+ // const _pathname = pathname.replace(
138
+ // /\/0(?=[?]|[\/]$|$)/g,
139
+ // `/${indocno}?`,
140
+ // );
141
+ // window.openUrl(
142
+ // `layer:${_pathname}${stringify({
143
+ // ...query,
144
+ // title: window.__INJECTED_APP_NAME_BY_QIANKUN__,
145
+ // })}`,
146
+ // );
147
+ // } else {
148
+ formListRef.current.onQuery(null, (0, _defineProperty2.default)({}, mainFormLdId, {
149
+ indocno: indocno
150
+ }), function () {
151
+ return formListRef.current.setFormMode('edit');
152
+ });
153
+ // }
147
154
  }
148
155
  }
149
156
  });
150
157
  };
158
+
151
159
  var formConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)({
152
160
  formState: formState,
153
161
  formMode: formMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "0.0.7-2",
3
+ "version": "0.0.8-1",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",