@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.mjs 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
  'use strict';
@@ -60853,6 +60853,19 @@ var PageDataUtils = /*#__PURE__*/ function() {
60853
60853
  }).call(this);
60854
60854
  };
60855
60855
  /**
60856
+ * @description 设置元素extension字段
60857
+ */ _proto.setItemExtension = function setItemExtension(itemId, extension) {
60858
+ var item = this.getSDKItem(itemId);
60859
+ if (!item) {
60860
+ console.warn('setItemExtension: item not found');
60861
+ return;
60862
+ }
60863
+ for(var _iterator = _create_for_of_iterator_helper_loose(Object.entries(extension)), _step; !(_step = _iterator()).done;){
60864
+ var _step_value = _step.value, key = _step_value[0], value = _step_value[1];
60865
+ item.extension.set(key, value);
60866
+ }
60867
+ };
60868
+ /**
60856
60869
  * @description 场景 1: 设置单个元素的单个属性
60857
60870
  */ _proto.setSingleItemSingleProperty = function setSingleItemSingleProperty(param) {
60858
60871
  return _async_to_generator(function() {
@@ -62603,6 +62616,10 @@ var PageDataUtils = /*#__PURE__*/ function() {
62603
62616
  }
62604
62617
  break;
62605
62618
  }
62619
+ case 'cardType':
62620
+ {
62621
+ break;
62622
+ }
62606
62623
  default:
62607
62624
  {
62608
62625
  console.warn("Target property " + propertyName + " can not be changed.");
@@ -65675,7 +65692,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
65675
65692
  _this = this;
65676
65693
  changeProeprty = function changeProeprty(targetCreateInfo) {
65677
65694
  return _async_to_generator(function() {
65678
- var currentCreateInfo;
65695
+ var currentCreateInfo, itemId;
65679
65696
  return _ts_generator(this, function(_state) {
65680
65697
  switch(_state.label){
65681
65698
  case 0:
@@ -65686,16 +65703,20 @@ var PageDataUtils = /*#__PURE__*/ function() {
65686
65703
  2
65687
65704
  ];
65688
65705
  }
65706
+ itemId = targetCreateInfo.id;
65689
65707
  return [
65690
65708
  4,
65691
65709
  this.setItemProperty({
65692
- itemId: currentCreateInfo.id,
65710
+ itemId: itemId,
65693
65711
  type: currentCreateInfo.type,
65694
65712
  property: targetCreateInfo.property
65695
65713
  })
65696
65714
  ];
65697
65715
  case 1:
65698
65716
  _state.sent();
65717
+ if (targetCreateInfo.extension) {
65718
+ this.setItemExtension(itemId, targetCreateInfo.extension);
65719
+ }
65699
65720
  return [
65700
65721
  2
65701
65722
  ];