dolphin-weex-ui 2.4.21 → 2.4.23

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 升级日志
2
2
 
3
+ ## 2.4.23
4
+
5
+ - [ ! ] 缺省页使用原生协议地址(app ^11.4.15)
6
+ - [ ! ] date: 2026/04/27
7
+
8
+ ## 2.4.22
9
+
10
+ - [ ! ] colmo鸿蒙化适配
11
+ - [ ! ] date: 2026/04/16
12
+
3
13
  ## 2.4.21
4
14
 
5
15
  - [ ! ] dof-popup组件colmo默认背景色修改
@@ -497,6 +497,21 @@ var Utils = {
497
497
  }
498
498
  return false;
499
499
  },
500
+ toNum: function toNum(a) {
501
+ a = a.toString();
502
+ var c = a.split('.');
503
+ var r = ['0000', '000', '00', '0', ''];
504
+ for (var i = 0; i < c.length; i++) {
505
+ var len = c[i].length;
506
+ c[i] = r[len] + c[i];
507
+ }
508
+ var res = c.join('');
509
+ return res;
510
+ },
511
+ compareVersionNew: function compareVersionNew(a) {
512
+ // 判断当前版本是否大于等于比较的版本
513
+ return this.toNum(weex.config.env.appVersion) >= this.toNum(a);
514
+ },
500
515
 
501
516
  /**
502
517
  * 分割数组
@@ -2262,21 +2277,20 @@ Object.defineProperty(exports, "__esModule", {
2262
2277
  exports.getBoundingClientRectBase = getBoundingClientRectBase;
2263
2278
  exports.getBoundingClientRect = getBoundingClientRect;
2264
2279
  exports.getBoundingClientRectAsync = getBoundingClientRectAsync;
2265
- var dom = weex.requireModule('dom');
2266
-
2267
- function getBoundingClientRectBase(element, func) {
2280
+ var domModule = weex.requireModule('dom');
2281
+ function getBoundingClientRectBase(dom, element, func) {
2268
2282
  dom && dom.getComponentRect(element, func);
2269
2283
  }
2270
2284
 
2271
- function getBoundingClientRect(element, func) {
2272
- var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 50;
2285
+ function getBoundingClientRect(dom, element, func) {
2286
+ var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 50;
2273
2287
 
2274
2288
  setTimeout(function () {
2275
2289
  return dom && dom.getComponentRect(element, func);
2276
2290
  }, delay);
2277
2291
  }
2278
2292
 
2279
- function getBoundingClientRectAsync(element) {
2293
+ function getBoundingClientRectAsync(dom, element) {
2280
2294
  return new Promise(function (resolve) {
2281
2295
  setTimeout(function () {
2282
2296
  return dom && dom.getComponentRect(element, function (res) {
@@ -19307,6 +19321,9 @@ exports.default = {
19307
19321
  _tagBg: function _tagBg() {
19308
19322
  if (this.tagBg) return this.tagBg;
19309
19323
  return this._isColmo ? '#B35336' : '#00A4F2';
19324
+ },
19325
+ isHarmony: function isHarmony() {
19326
+ return weex.config.env.platform == 'harmony';
19310
19327
  }
19311
19328
  },
19312
19329
  mounted: function mounted() {
@@ -19321,7 +19338,8 @@ exports.default = {
19321
19338
  return;
19322
19339
  }
19323
19340
  this.$nextTick(function () {
19324
- (0, _dom.getBoundingClientRect)(_this.$refs.body, function (res) {
19341
+ var dom = weex.requireModule('dom');
19342
+ (0, _dom.getBoundingClientRect)(dom, _this.$refs.body, function (res) {
19325
19343
  _this.bodyHeight = res.size.height;
19326
19344
  if (_this.collapsed_) {
19327
19345
  _this.collapseBody(0);
@@ -19341,6 +19359,12 @@ exports.default = {
19341
19359
  this.$emit('clicked', this.clicked_ = !this.clicked_);
19342
19360
  },
19343
19361
  onCollapse: function onCollapse() {
19362
+ var _this2 = this;
19363
+
19364
+ if (this.isHarmony) {
19365
+ if (this.clickLock) return;
19366
+ this.clickLock = true;
19367
+ }
19344
19368
  this.collapsed_ = !this.collapsed_;
19345
19369
  this.$emit('collapse', this.collapsed_);
19346
19370
  if (this.collapsed_) {
@@ -19350,6 +19374,11 @@ exports.default = {
19350
19374
  this.expandeBody();
19351
19375
  this.expandeArrow();
19352
19376
  }
19377
+ if (this.isHarmony) {
19378
+ setTimeout(function () {
19379
+ _this2.clickLock = false;
19380
+ }, 100);
19381
+ }
19353
19382
  },
19354
19383
  collapseBody: function collapseBody() {
19355
19384
  var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
@@ -21590,11 +21619,20 @@ exports.default = {
21590
21619
  };
21591
21620
  }
21592
21621
  return {};
21622
+ },
21623
+ isHarmony: function isHarmony() {
21624
+ return weex.config.env.platform == 'harmony';
21593
21625
  }
21594
21626
  },
21595
21627
 
21596
21628
  methods: {
21597
21629
  dofCellClick: function dofCellClick() {
21630
+ var _this2 = this;
21631
+
21632
+ if (this.isHarmony) {
21633
+ if (this.clickLock) return;
21634
+ this.clickLock = true;
21635
+ }
21598
21636
  var disabled = this.disabled,
21599
21637
  innerChecked = this.innerChecked,
21600
21638
  value = this.value;
@@ -21603,18 +21641,23 @@ exports.default = {
21603
21641
  this.innerChecked = !innerChecked;
21604
21642
  this.$emit('dofCheckBoxItemChecked', { value: value, checked: this.innerChecked });
21605
21643
  }
21644
+ if (this.isHarmony) {
21645
+ setTimeout(function () {
21646
+ _this2.clickLock = false;
21647
+ }, 100);
21648
+ }
21606
21649
  },
21607
21650
  dynamicIsOverflow: function dynamicIsOverflow() {
21608
- var _this2 = this;
21651
+ var _this3 = this;
21609
21652
 
21610
21653
  // ios下面 对于这个动态的设置flex=1,或者max-width都会 偶现不生效。
21611
21654
  this.$nextTick(function () {
21612
21655
  setTimeout(function () {
21613
- var result = dom.getComponentRect(_this2.$refs.tagBox, function (option) {
21614
- var result2 = dom.getComponentRect(_this2.$refs.titleBox, function (titleResult) {
21615
- _this2.titleWidth = titleResult.size && titleResult.size.width;
21616
- _this2.tagWidth = option.size && option.size.width;
21617
- _this2.isOverflow = _this2.titleWidth + _this2.tagWidth > WIDTH;
21656
+ var result = dom.getComponentRect(_this3.$refs.tagBox, function (option) {
21657
+ var result2 = dom.getComponentRect(_this3.$refs.titleBox, function (titleResult) {
21658
+ _this3.titleWidth = titleResult.size && titleResult.size.width;
21659
+ _this3.tagWidth = option.size && option.size.width;
21660
+ _this3.isOverflow = _this3.titleWidth + _this3.tagWidth > WIDTH;
21618
21661
  });
21619
21662
  });
21620
21663
  }, 60);
@@ -22296,7 +22339,8 @@ exports.default = {
22296
22339
  var _this = this;
22297
22340
 
22298
22341
  this.$nextTick(function () {
22299
- (0, _dom.getBoundingClientRect)(_this.$refs.slotBody, function (res) {
22342
+ var dom = weex.requireModule('dom');
22343
+ (0, _dom.getBoundingClientRect)(dom, _this.$refs.slotBody, function (res) {
22300
22344
  if (res.result) {
22301
22345
  _this.bodyHeight = res.size.height;
22302
22346
  }
@@ -22313,6 +22357,9 @@ exports.default = {
22313
22357
  computed: {
22314
22358
  accordion: function accordion() {
22315
22359
  return this._activeData.accordion;
22360
+ },
22361
+ isHarmony: function isHarmony() {
22362
+ return weex.config.env.platform == 'harmony';
22316
22363
  }
22317
22364
  },
22318
22365
  watch: {
@@ -22349,6 +22396,12 @@ exports.default = {
22349
22396
  },
22350
22397
  methods: {
22351
22398
  onCollapseHandler: function onCollapseHandler() {
22399
+ var _this2 = this;
22400
+
22401
+ if (this.isHarmony) {
22402
+ if (this.clickLock) return;
22403
+ this.clickLock = true;
22404
+ }
22352
22405
  this.collapsed_ = !this.collapsed_;
22353
22406
  //手风琴-发送通知
22354
22407
  this.$parent.collapseClick({ collapsed: this.collapsed_, name: this.name });
@@ -22361,6 +22414,11 @@ exports.default = {
22361
22414
  this.expandeArrow();
22362
22415
  }
22363
22416
  }
22417
+ if (this.isHarmony) {
22418
+ setTimeout(function () {
22419
+ _this2.clickLock = false;
22420
+ }, 100);
22421
+ }
22364
22422
  },
22365
22423
  collapseBody: function collapseBody() {
22366
22424
  var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
@@ -24598,9 +24656,10 @@ exports.default = {
24598
24656
  initRect: function initRect() {
24599
24657
  var _this3 = this;
24600
24658
 
24659
+ var dom = weex.requireModule('dom');
24601
24660
  this.ranges.forEach(function (range, i) {
24602
24661
  if (range.gear) {
24603
- (0, _dom.getBoundingClientRectBase)(_this3.$refs['bar'][i], function (res) {
24662
+ (0, _dom.getBoundingClientRectBase)(dom, _this3.$refs['bar'][i], function (res) {
24604
24663
  _this3.rects.push(_extends({}, range, {
24605
24664
  left: res.size.left,
24606
24665
  dis: res.size.left + res.size.width
@@ -33420,6 +33479,16 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
33420
33479
  //
33421
33480
  //
33422
33481
  //
33482
+ //
33483
+ //
33484
+ //
33485
+ //
33486
+ //
33487
+ //
33488
+ //
33489
+ //
33490
+ //
33491
+ //
33423
33492
 
33424
33493
  var _dofButton = __webpack_require__(18);
33425
33494
 
@@ -33437,21 +33506,29 @@ var _diablo = __webpack_require__(1);
33437
33506
 
33438
33507
  var _diablo2 = _interopRequireDefault(_diablo);
33439
33508
 
33509
+ var _index = __webpack_require__(2);
33510
+
33511
+ var _index2 = _interopRequireDefault(_index);
33512
+
33440
33513
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33441
33514
 
33515
+ var defaultPicBaseUrl = function defaultPicBaseUrl(imageName) {
33516
+ return 'meiju://common/emptyImage?imageName=' + imageName;
33517
+ };
33518
+ var isNewVersion = _index2.default.compareVersionNew('11.4.15');
33442
33519
  var Types = {
33443
33520
  noNetwork: {
33444
- pic: _imgs2.default['noNetwork'],
33521
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_02_disconnection') : _imgs2.default['noNetwork'],
33445
33522
  content: '网络异常,请检查您的网络设置'
33446
33523
  // button: '刷新'
33447
33524
  },
33448
33525
  noUpdate: {
33449
- pic: _imgs2.default['noUpdate'],
33526
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_03_update') : _imgs2.default['noUpdate'],
33450
33527
  content: '当前版本较低',
33451
33528
  desc: '请更新到最新版APP'
33452
33529
  },
33453
33530
  noPage: {
33454
- pic: _imgs2.default['noPage'],
33531
+ pic: isNewVersion ? defaultPicBaseUrl('img_empty_04_content') : _imgs2.default['noPage'],
33455
33532
  content: '找不到页面'
33456
33533
  },
33457
33534
  colmo: {
@@ -33495,6 +33572,9 @@ exports.default = {
33495
33572
  }
33496
33573
  },
33497
33574
  computed: {
33575
+ isNewVersion: function isNewVersion() {
33576
+ return _index2.default.compareVersionNew('11.4.15');
33577
+ },
33498
33578
  type_: function type_() {
33499
33579
  if (this.type) return this.type;
33500
33580
  return this._isColmo ? 'colmo' : 'noPage';
@@ -37097,8 +37177,9 @@ exports.default = {
37097
37177
  initElWidth: function initElWidth() {
37098
37178
  var _this = this;
37099
37179
 
37180
+ var dom = weex.requireModule('dom');
37100
37181
  var el = this.$refs['dof-slider-scale'];
37101
- (0, _dom.getBoundingClientRect)(el, function (res) {
37182
+ (0, _dom.getBoundingClientRect)(dom, el, function (res) {
37102
37183
  res.result && (_this.elWidth = res.size.width);
37103
37184
  });
37104
37185
  }
@@ -46293,6 +46374,10 @@ module.exports = {
46293
46374
  "width": "320",
46294
46375
  "height": "320"
46295
46376
  },
46377
+ "result-image-new": {
46378
+ "width": 460,
46379
+ "height": "384"
46380
+ },
46296
46381
  "result-content": {
46297
46382
  "marginTop": "0",
46298
46383
  "alignItems": "center"
@@ -52109,7 +52194,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
52109
52194
  backgroundColor: _vm.bgColor_
52110
52195
  }
52111
52196
  }, [_c('image', {
52112
- staticClass: ["result-image"],
52197
+ class: [_vm.isNewVersion ? 'result-image-new' : 'result-image'],
52113
52198
  style: _vm.imgStyle,
52114
52199
  attrs: {
52115
52200
  "ariaHidden": true,