@lvce-editor/renderer-process 13.10.0 → 13.11.0
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/dist/rendererProcessMain.js +16 -2
- package/package.json +1 -1
|
@@ -10300,7 +10300,7 @@ const focusElementByName = (viewletId, name) => {
|
|
|
10300
10300
|
}
|
|
10301
10301
|
$Element.focus();
|
|
10302
10302
|
};
|
|
10303
|
-
const
|
|
10303
|
+
const setElementProperty = (viewletId, name, key, value) => {
|
|
10304
10304
|
const selector = `[name="${name}"]`;
|
|
10305
10305
|
const instance = state$6.instances[viewletId];
|
|
10306
10306
|
if (!instance) {
|
|
@@ -10313,7 +10313,13 @@ const setValueByName = (viewletId, name, value) => {
|
|
|
10313
10313
|
if (!$Element) {
|
|
10314
10314
|
return;
|
|
10315
10315
|
}
|
|
10316
|
-
$Element
|
|
10316
|
+
$Element[key] = value;
|
|
10317
|
+
};
|
|
10318
|
+
const setValueByName = (viewletId, name, value) => {
|
|
10319
|
+
setElementProperty(viewletId, name, 'value', value);
|
|
10320
|
+
};
|
|
10321
|
+
const setCheckBoxValue = (viewletId, name, value) => {
|
|
10322
|
+
setElementProperty(viewletId, name, 'checked', value);
|
|
10317
10323
|
};
|
|
10318
10324
|
const setSelectionByName = (viewletId, name, start, end) => {
|
|
10319
10325
|
const selector = `[name="${name}"]`;
|
|
@@ -10546,11 +10552,16 @@ const sendMultiple = commands => {
|
|
|
10546
10552
|
// @ts-ignore
|
|
10547
10553
|
setValueByName(viewletId, method, ...args);
|
|
10548
10554
|
break;
|
|
10555
|
+
case 'Viewlet.setCheckBoxValue':
|
|
10556
|
+
// @ts-ignore
|
|
10557
|
+
setCheckBoxValue(viewletId, method, ...args);
|
|
10558
|
+
break;
|
|
10549
10559
|
case 'Viewlet.setSelectionByName':
|
|
10550
10560
|
// @ts-ignore
|
|
10551
10561
|
setSelectionByName(viewletId, method, ...args);
|
|
10552
10562
|
break;
|
|
10553
10563
|
case 'Viewlet.registerEventListeners':
|
|
10564
|
+
// @ts-ignore
|
|
10554
10565
|
registerEventListeners(viewletId, method, ...args);
|
|
10555
10566
|
break;
|
|
10556
10567
|
case 'Viewlet.setUid':
|
|
@@ -10728,6 +10739,8 @@ const getFn = command => {
|
|
|
10728
10739
|
return focusElementByName;
|
|
10729
10740
|
case 'Viewlet.setValueByName':
|
|
10730
10741
|
return setValueByName;
|
|
10742
|
+
case 'Viewlet.setCheckBoxValue':
|
|
10743
|
+
return setCheckBoxValue;
|
|
10731
10744
|
case 'Viewlet.registerEventListeners':
|
|
10732
10745
|
return registerEventListeners;
|
|
10733
10746
|
case 'Viewlet.setPatches':
|
|
@@ -10745,6 +10758,7 @@ const getFn = command => {
|
|
|
10745
10758
|
const executeCommands = commands => {
|
|
10746
10759
|
for (const [command, ...args] of commands) {
|
|
10747
10760
|
const fn = getFn(command);
|
|
10761
|
+
// @ts-ignore
|
|
10748
10762
|
fn(...args);
|
|
10749
10763
|
}
|
|
10750
10764
|
};
|