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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dolphin-weex-ui",
3
- "version": "2.1.9",
3
+ "version": "2.2.0",
4
4
  "description": "inteligense cross platform frame",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -149,6 +149,8 @@ export default {
149
149
  this.bodyHeight = res.size.height
150
150
  if (this.collapsed_) {
151
151
  this.collapseBody(0)
152
+ } else {
153
+ this.expandeBody()
152
154
  }
153
155
  })
154
156
  })
@@ -213,7 +213,7 @@
213
213
  flex-direction: columns;
214
214
  align-items: center;
215
215
  justify-content: center;
216
- flex: 1;
216
+ /* flex: 1; */
217
217
  height: 90px;
218
218
  /* border-top-color: #c8c7cc; */
219
219
  border-top-width: 1px;
@@ -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
- getBoundingClientRect(
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)`