dolphin-weex-ui 2.4.20 → 2.4.22
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 +10 -0
- package/dist/index.native.js +62 -17
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +70 -25
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-card/index.vue +14 -1
- package/packages/dof-checkbox/index.vue +12 -0
- package/packages/dof-collapse-item/index.vue +14 -0
- package/packages/dof-gear/index.vue +2 -1
- package/packages/dof-popup/index.vue +1 -1
- package/packages/dof-slider-scale/index.vue +2 -1
- package/packages/utils/dom.js +4 -5
- package/packages/dof-actionsheet/dist/index.dev.js +0 -15
package/CHANGELOG.md
CHANGED
package/dist/index.native.js
CHANGED
|
@@ -2262,21 +2262,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2262
2262
|
exports.getBoundingClientRectBase = getBoundingClientRectBase;
|
|
2263
2263
|
exports.getBoundingClientRect = getBoundingClientRect;
|
|
2264
2264
|
exports.getBoundingClientRectAsync = getBoundingClientRectAsync;
|
|
2265
|
-
var
|
|
2266
|
-
|
|
2267
|
-
function getBoundingClientRectBase(element, func) {
|
|
2265
|
+
var domModule = weex.requireModule('dom');
|
|
2266
|
+
function getBoundingClientRectBase(dom, element, func) {
|
|
2268
2267
|
dom && dom.getComponentRect(element, func);
|
|
2269
2268
|
}
|
|
2270
2269
|
|
|
2271
|
-
function getBoundingClientRect(element, func) {
|
|
2272
|
-
var delay = arguments.length >
|
|
2270
|
+
function getBoundingClientRect(dom, element, func) {
|
|
2271
|
+
var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 50;
|
|
2273
2272
|
|
|
2274
2273
|
setTimeout(function () {
|
|
2275
2274
|
return dom && dom.getComponentRect(element, func);
|
|
2276
2275
|
}, delay);
|
|
2277
2276
|
}
|
|
2278
2277
|
|
|
2279
|
-
function getBoundingClientRectAsync(element) {
|
|
2278
|
+
function getBoundingClientRectAsync(dom, element) {
|
|
2280
2279
|
return new Promise(function (resolve) {
|
|
2281
2280
|
setTimeout(function () {
|
|
2282
2281
|
return dom && dom.getComponentRect(element, function (res) {
|
|
@@ -19307,6 +19306,9 @@ exports.default = {
|
|
|
19307
19306
|
_tagBg: function _tagBg() {
|
|
19308
19307
|
if (this.tagBg) return this.tagBg;
|
|
19309
19308
|
return this._isColmo ? '#B35336' : '#00A4F2';
|
|
19309
|
+
},
|
|
19310
|
+
isHarmony: function isHarmony() {
|
|
19311
|
+
return weex.config.env.platform == 'harmony';
|
|
19310
19312
|
}
|
|
19311
19313
|
},
|
|
19312
19314
|
mounted: function mounted() {
|
|
@@ -19321,7 +19323,8 @@ exports.default = {
|
|
|
19321
19323
|
return;
|
|
19322
19324
|
}
|
|
19323
19325
|
this.$nextTick(function () {
|
|
19324
|
-
|
|
19326
|
+
var dom = weex.requireModule('dom');
|
|
19327
|
+
(0, _dom.getBoundingClientRect)(dom, _this.$refs.body, function (res) {
|
|
19325
19328
|
_this.bodyHeight = res.size.height;
|
|
19326
19329
|
if (_this.collapsed_) {
|
|
19327
19330
|
_this.collapseBody(0);
|
|
@@ -19341,6 +19344,12 @@ exports.default = {
|
|
|
19341
19344
|
this.$emit('clicked', this.clicked_ = !this.clicked_);
|
|
19342
19345
|
},
|
|
19343
19346
|
onCollapse: function onCollapse() {
|
|
19347
|
+
var _this2 = this;
|
|
19348
|
+
|
|
19349
|
+
if (this.isHarmony) {
|
|
19350
|
+
if (this.clickLock) return;
|
|
19351
|
+
this.clickLock = true;
|
|
19352
|
+
}
|
|
19344
19353
|
this.collapsed_ = !this.collapsed_;
|
|
19345
19354
|
this.$emit('collapse', this.collapsed_);
|
|
19346
19355
|
if (this.collapsed_) {
|
|
@@ -19350,6 +19359,11 @@ exports.default = {
|
|
|
19350
19359
|
this.expandeBody();
|
|
19351
19360
|
this.expandeArrow();
|
|
19352
19361
|
}
|
|
19362
|
+
if (this.isHarmony) {
|
|
19363
|
+
setTimeout(function () {
|
|
19364
|
+
_this2.clickLock = false;
|
|
19365
|
+
}, 100);
|
|
19366
|
+
}
|
|
19353
19367
|
},
|
|
19354
19368
|
collapseBody: function collapseBody() {
|
|
19355
19369
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
|
|
@@ -21590,11 +21604,20 @@ exports.default = {
|
|
|
21590
21604
|
};
|
|
21591
21605
|
}
|
|
21592
21606
|
return {};
|
|
21607
|
+
},
|
|
21608
|
+
isHarmony: function isHarmony() {
|
|
21609
|
+
return weex.config.env.platform == 'harmony';
|
|
21593
21610
|
}
|
|
21594
21611
|
},
|
|
21595
21612
|
|
|
21596
21613
|
methods: {
|
|
21597
21614
|
dofCellClick: function dofCellClick() {
|
|
21615
|
+
var _this2 = this;
|
|
21616
|
+
|
|
21617
|
+
if (this.isHarmony) {
|
|
21618
|
+
if (this.clickLock) return;
|
|
21619
|
+
this.clickLock = true;
|
|
21620
|
+
}
|
|
21598
21621
|
var disabled = this.disabled,
|
|
21599
21622
|
innerChecked = this.innerChecked,
|
|
21600
21623
|
value = this.value;
|
|
@@ -21603,18 +21626,23 @@ exports.default = {
|
|
|
21603
21626
|
this.innerChecked = !innerChecked;
|
|
21604
21627
|
this.$emit('dofCheckBoxItemChecked', { value: value, checked: this.innerChecked });
|
|
21605
21628
|
}
|
|
21629
|
+
if (this.isHarmony) {
|
|
21630
|
+
setTimeout(function () {
|
|
21631
|
+
_this2.clickLock = false;
|
|
21632
|
+
}, 100);
|
|
21633
|
+
}
|
|
21606
21634
|
},
|
|
21607
21635
|
dynamicIsOverflow: function dynamicIsOverflow() {
|
|
21608
|
-
var
|
|
21636
|
+
var _this3 = this;
|
|
21609
21637
|
|
|
21610
21638
|
// ios下面 对于这个动态的设置flex=1,或者max-width都会 偶现不生效。
|
|
21611
21639
|
this.$nextTick(function () {
|
|
21612
21640
|
setTimeout(function () {
|
|
21613
|
-
var result = dom.getComponentRect(
|
|
21614
|
-
var result2 = dom.getComponentRect(
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21641
|
+
var result = dom.getComponentRect(_this3.$refs.tagBox, function (option) {
|
|
21642
|
+
var result2 = dom.getComponentRect(_this3.$refs.titleBox, function (titleResult) {
|
|
21643
|
+
_this3.titleWidth = titleResult.size && titleResult.size.width;
|
|
21644
|
+
_this3.tagWidth = option.size && option.size.width;
|
|
21645
|
+
_this3.isOverflow = _this3.titleWidth + _this3.tagWidth > WIDTH;
|
|
21618
21646
|
});
|
|
21619
21647
|
});
|
|
21620
21648
|
}, 60);
|
|
@@ -22296,7 +22324,8 @@ exports.default = {
|
|
|
22296
22324
|
var _this = this;
|
|
22297
22325
|
|
|
22298
22326
|
this.$nextTick(function () {
|
|
22299
|
-
|
|
22327
|
+
var dom = weex.requireModule('dom');
|
|
22328
|
+
(0, _dom.getBoundingClientRect)(dom, _this.$refs.slotBody, function (res) {
|
|
22300
22329
|
if (res.result) {
|
|
22301
22330
|
_this.bodyHeight = res.size.height;
|
|
22302
22331
|
}
|
|
@@ -22313,6 +22342,9 @@ exports.default = {
|
|
|
22313
22342
|
computed: {
|
|
22314
22343
|
accordion: function accordion() {
|
|
22315
22344
|
return this._activeData.accordion;
|
|
22345
|
+
},
|
|
22346
|
+
isHarmony: function isHarmony() {
|
|
22347
|
+
return weex.config.env.platform == 'harmony';
|
|
22316
22348
|
}
|
|
22317
22349
|
},
|
|
22318
22350
|
watch: {
|
|
@@ -22349,6 +22381,12 @@ exports.default = {
|
|
|
22349
22381
|
},
|
|
22350
22382
|
methods: {
|
|
22351
22383
|
onCollapseHandler: function onCollapseHandler() {
|
|
22384
|
+
var _this2 = this;
|
|
22385
|
+
|
|
22386
|
+
if (this.isHarmony) {
|
|
22387
|
+
if (this.clickLock) return;
|
|
22388
|
+
this.clickLock = true;
|
|
22389
|
+
}
|
|
22352
22390
|
this.collapsed_ = !this.collapsed_;
|
|
22353
22391
|
//手风琴-发送通知
|
|
22354
22392
|
this.$parent.collapseClick({ collapsed: this.collapsed_, name: this.name });
|
|
@@ -22361,6 +22399,11 @@ exports.default = {
|
|
|
22361
22399
|
this.expandeArrow();
|
|
22362
22400
|
}
|
|
22363
22401
|
}
|
|
22402
|
+
if (this.isHarmony) {
|
|
22403
|
+
setTimeout(function () {
|
|
22404
|
+
_this2.clickLock = false;
|
|
22405
|
+
}, 100);
|
|
22406
|
+
}
|
|
22364
22407
|
},
|
|
22365
22408
|
collapseBody: function collapseBody() {
|
|
22366
22409
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
|
|
@@ -24598,9 +24641,10 @@ exports.default = {
|
|
|
24598
24641
|
initRect: function initRect() {
|
|
24599
24642
|
var _this3 = this;
|
|
24600
24643
|
|
|
24644
|
+
var dom = weex.requireModule('dom');
|
|
24601
24645
|
this.ranges.forEach(function (range, i) {
|
|
24602
24646
|
if (range.gear) {
|
|
24603
|
-
(0, _dom.getBoundingClientRectBase)(_this3.$refs['bar'][i], function (res) {
|
|
24647
|
+
(0, _dom.getBoundingClientRectBase)(dom, _this3.$refs['bar'][i], function (res) {
|
|
24604
24648
|
_this3.rects.push(_extends({}, range, {
|
|
24605
24649
|
left: res.size.left,
|
|
24606
24650
|
dis: res.size.left + res.size.width
|
|
@@ -31954,7 +31998,7 @@ exports.default = {
|
|
|
31954
31998
|
},
|
|
31955
31999
|
_popupColor: function _popupColor() {
|
|
31956
32000
|
if (this.popupColor) return this.popupColor;
|
|
31957
|
-
return this._isColmo ? '#
|
|
32001
|
+
return this._isColmo ? '#232529' : this._isDiablo ? '#1e2326' : '#fff';
|
|
31958
32002
|
},
|
|
31959
32003
|
padStyle: function padStyle() {
|
|
31960
32004
|
var pos = this.pos,
|
|
@@ -37097,8 +37141,9 @@ exports.default = {
|
|
|
37097
37141
|
initElWidth: function initElWidth() {
|
|
37098
37142
|
var _this = this;
|
|
37099
37143
|
|
|
37144
|
+
var dom = weex.requireModule('dom');
|
|
37100
37145
|
var el = this.$refs['dof-slider-scale'];
|
|
37101
|
-
(0, _dom.getBoundingClientRect)(el, function (res) {
|
|
37146
|
+
(0, _dom.getBoundingClientRect)(dom, el, function (res) {
|
|
37102
37147
|
res.result && (_this.elWidth = res.size.width);
|
|
37103
37148
|
});
|
|
37104
37149
|
}
|