@byteluck-fe/model-driven-core-all 4.41.0-lx0 → 5.5.0-1-beta1
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/README.md +11 -11
- package/dist/esm/registerByteluckControls.js +3 -2
- package/dist/esm/registerCustomControls.js +2 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/getHackerControl.d.ts +23 -23
- package/dist/types/index.d.ts +9 -9
- package/dist/types/loadRemoteScripts.d.ts +7 -7
- package/dist/types/registerByteluckControls.d.ts +7 -6
- package/dist/types/registerCustomControls.d.ts +23 -22
- package/dist/types/upgradeCustomControlSchema.d.ts +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# `runtime-all`
|
|
2
|
-
|
|
3
|
-
> TODO: description
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
const runtimeAll = require('runtime-all');
|
|
9
|
-
|
|
10
|
-
// TODO: DEMONSTRATE API
|
|
11
|
-
```
|
|
1
|
+
# `runtime-all`
|
|
2
|
+
|
|
3
|
+
> TODO: description
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
const runtimeAll = require('runtime-all');
|
|
9
|
+
|
|
10
|
+
// TODO: DEMONSTRATE API
|
|
11
|
+
```
|
|
@@ -120,6 +120,7 @@ function _ts_generator(thisArg, body) {
|
|
|
120
120
|
}
|
|
121
121
|
import { getHackerControl } from './getHackerControl';
|
|
122
122
|
import { nativeFetch, loadRemoteControl } from './loadRemoteScripts';
|
|
123
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
123
124
|
export function registerByteluckControls(url, payload) {
|
|
124
125
|
return _async_to_generator(function() {
|
|
125
126
|
var version, byteluckControls, componentsStr, components, controls;
|
|
@@ -145,7 +146,7 @@ export function registerByteluckControls(url, payload) {
|
|
|
145
146
|
components = JSON.parse(componentsStr);
|
|
146
147
|
return [
|
|
147
148
|
4,
|
|
148
|
-
loadRemoteControl("".concat(url, "/").concat(payload.type, ".js?v=").concat(version), payload.globalModules)
|
|
149
|
+
loadRemoteControl("".concat(url, "/").concat(payload.type, ".js?v=").concat(version, "&").concat(payload.isPc === false ? 'mobile' : 'desktop'), payload.globalModules)
|
|
149
150
|
];
|
|
150
151
|
case 2:
|
|
151
152
|
controls = _state.sent();
|
|
@@ -158,7 +159,7 @@ export function registerByteluckControls(url, payload) {
|
|
|
158
159
|
}
|
|
159
160
|
});
|
|
160
161
|
if (control === undefined) {
|
|
161
|
-
control = getHackerControl(item.id, payload.type, '内置组件加载错误');
|
|
162
|
+
control = getHackerControl(item.id, payload.type, getLocaleText('CMD.loadCtrlError', null, '内置组件加载错误'));
|
|
162
163
|
}
|
|
163
164
|
byteluckControls.set(item.id, {
|
|
164
165
|
props: item,
|
|
@@ -205,7 +205,7 @@ export function registerCustomControls(componentList, components, refLibs, paylo
|
|
|
205
205
|
} else {
|
|
206
206
|
url = item.designer;
|
|
207
207
|
}
|
|
208
|
-
url += '?v=' + item.version;
|
|
208
|
+
url += '?v=' + item.version + '&' + (payload.isPc === false ? 'mobile' : 'desktop');
|
|
209
209
|
return [
|
|
210
210
|
4,
|
|
211
211
|
loadRemoteControl(url, refLibs)
|
|
@@ -225,6 +225,7 @@ export function registerCustomControls(componentList, components, refLibs, paylo
|
|
|
225
225
|
case 3:
|
|
226
226
|
e = _state.sent();
|
|
227
227
|
isLoaded = false;
|
|
228
|
+
// @i18n-translate-ignore
|
|
228
229
|
warn('加载自定义控件异常,会影响到的控件:' + item.id, e);
|
|
229
230
|
control = getHackerControl(item.id, payload.type, payload.tipMessage);
|
|
230
231
|
return [
|