@vvfx/sdk 0.2.2-beta.8 → 0.2.2-beta.9

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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: TODO
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 赤芍,何即,不择,意绮
6
- * Version: v0.2.2-beta.8
6
+ * Version: v0.2.2-beta.9
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -60834,6 +60834,19 @@ var PageDataUtils = /*#__PURE__*/ function() {
60834
60834
  }).call(this);
60835
60835
  };
60836
60836
  /**
60837
+ * @description 设置元素extension字段
60838
+ */ _proto.setItemExtension = function setItemExtension(itemId, extension) {
60839
+ var item = this.getSDKItem(itemId);
60840
+ if (!item) {
60841
+ console.warn('setItemExtension: item not found');
60842
+ return;
60843
+ }
60844
+ for(var _iterator = _create_for_of_iterator_helper_loose(Object.entries(extension)), _step; !(_step = _iterator()).done;){
60845
+ var _step_value = _step.value, key = _step_value[0], value = _step_value[1];
60846
+ item.extension.set(key, value);
60847
+ }
60848
+ };
60849
+ /**
60837
60850
  * @description 场景 1: 设置单个元素的单个属性
60838
60851
  */ _proto.setSingleItemSingleProperty = function setSingleItemSingleProperty(param) {
60839
60852
  return _async_to_generator(function() {
@@ -62584,6 +62597,10 @@ var PageDataUtils = /*#__PURE__*/ function() {
62584
62597
  }
62585
62598
  break;
62586
62599
  }
62600
+ case 'cardType':
62601
+ {
62602
+ break;
62603
+ }
62587
62604
  default:
62588
62605
  {
62589
62606
  console.warn("Target property " + propertyName + " can not be changed.");
@@ -65656,7 +65673,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
65656
65673
  _this = this;
65657
65674
  changeProeprty = function changeProeprty(targetCreateInfo) {
65658
65675
  return _async_to_generator(function() {
65659
- var currentCreateInfo;
65676
+ var currentCreateInfo, itemId;
65660
65677
  return _ts_generator(this, function(_state) {
65661
65678
  switch(_state.label){
65662
65679
  case 0:
@@ -65667,16 +65684,20 @@ var PageDataUtils = /*#__PURE__*/ function() {
65667
65684
  2
65668
65685
  ];
65669
65686
  }
65687
+ itemId = targetCreateInfo.id;
65670
65688
  return [
65671
65689
  4,
65672
65690
  this.setItemProperty({
65673
- itemId: currentCreateInfo.id,
65691
+ itemId: itemId,
65674
65692
  type: currentCreateInfo.type,
65675
65693
  property: targetCreateInfo.property
65676
65694
  })
65677
65695
  ];
65678
65696
  case 1:
65679
65697
  _state.sent();
65698
+ if (targetCreateInfo.extension) {
65699
+ this.setItemExtension(itemId, targetCreateInfo.extension);
65700
+ }
65680
65701
  return [
65681
65702
  2
65682
65703
  ];