dolphin-weex-ui 2.1.9 → 2.2.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/CHANGELOG.md +5 -0
- package/dist/index.native.js +25 -12
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +33 -19
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-card/index.vue +2 -0
- package/packages/dof-modal/index.vue +1 -1
- package/packages/dof-popover2/colmo.css +2 -1
- package/packages/dof-popover2/index.vue +0 -1
- package/packages/dof-slider/index.vue +22 -11
- package/packages/dof-switch/index.vue +3 -0
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
@media screen and (weex-theme: colmo) {
|
|
2
2
|
.g-popover {
|
|
3
|
-
box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.4);
|
|
3
|
+
/* box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.4); */
|
|
4
4
|
}
|
|
5
5
|
.content-inner {
|
|
6
6
|
border-radius: 0px;
|
|
7
7
|
padding: 32px;
|
|
8
|
+
box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.4);
|
|
8
9
|
}
|
|
9
10
|
.u-popover-arrow {
|
|
10
11
|
background-color: #292b2f;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
<div ref="dof-popover" class="g-popover" v-if="show && buttons.length" :style="contentStyle">
|
|
11
11
|
<div :class="['u-popover-arrow', theme !== 'white' && 'u-popover-theme-dark']" :style="arrowStyle"></div>
|
|
12
12
|
<scroller
|
|
13
|
-
scroll-direction="horizontal"
|
|
14
13
|
show-scrollbar="false"
|
|
15
14
|
:class="['u-popover-inner', theme !== 'white' && 'u-popover-theme-dark']"
|
|
16
15
|
:style="popoverInnerStyle"
|
|
@@ -140,7 +140,8 @@ export default {
|
|
|
140
140
|
startRight: null,
|
|
141
141
|
prevScreenX: null,
|
|
142
142
|
isTouching: false,
|
|
143
|
-
isShow: false
|
|
143
|
+
isShow: false,
|
|
144
|
+
getWidthRectTime: 0
|
|
144
145
|
}
|
|
145
146
|
},
|
|
146
147
|
watch: {
|
|
@@ -292,18 +293,28 @@ export default {
|
|
|
292
293
|
}
|
|
293
294
|
},
|
|
294
295
|
mounted() {
|
|
295
|
-
|
|
296
|
-
this.$refs.track,
|
|
297
|
-
res => {
|
|
298
|
-
if (res.result) {
|
|
299
|
-
// 实际可滑动长度(可变化范围)= bar宽度 - btn宽度
|
|
300
|
-
this.width = res.size.width - this._trackHeight
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
this.delay
|
|
304
|
-
)
|
|
296
|
+
this.getRect()
|
|
305
297
|
},
|
|
306
298
|
methods: {
|
|
299
|
+
getRect() {
|
|
300
|
+
getBoundingClientRect(
|
|
301
|
+
this.$refs.track,
|
|
302
|
+
res => {
|
|
303
|
+
if (res.result && res.size.width !== 0) {
|
|
304
|
+
// 实际可滑动长度(可变化范围)= bar宽度 - btn宽度
|
|
305
|
+
this.width = res.size.width - this._trackHeight
|
|
306
|
+
} else {
|
|
307
|
+
this.getWidthRectTime < 6
|
|
308
|
+
? setTimeout(() => {
|
|
309
|
+
this.getWidthRectTime++
|
|
310
|
+
this.getRect()
|
|
311
|
+
}, 50)
|
|
312
|
+
: (this.width = res.size.width - this._trackHeight)
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
this.delay
|
|
316
|
+
)
|
|
317
|
+
},
|
|
307
318
|
async onTouchStart(e) {
|
|
308
319
|
if (!this.interactive) {
|
|
309
320
|
return
|
|
@@ -98,6 +98,8 @@ import { throttle } from '../../helper/utils'
|
|
|
98
98
|
import ColmoMixin from '../../mixins/colmo'
|
|
99
99
|
import { STYLE_MAP } from './style'
|
|
100
100
|
import DofSpinner from '../dof-spinner'
|
|
101
|
+
import Utils from '../utils'
|
|
102
|
+
|
|
101
103
|
export default {
|
|
102
104
|
components: { DofSpinner },
|
|
103
105
|
mixins: [ColmoMixin],
|
|
@@ -212,6 +214,7 @@ export default {
|
|
|
212
214
|
rightDotStyle() {
|
|
213
215
|
let offset = 46
|
|
214
216
|
if ((this._isColmo && this.type === 'default') || this.type === 'colmo') offset = 50
|
|
217
|
+
if (Utils.env.isWeb()) offset = 46
|
|
215
218
|
return {
|
|
216
219
|
backgroundColor: this._dotColor,
|
|
217
220
|
transform: `translateX(${offset}px) scale(2.25)`
|