eoss-mobiles 0.2.46 → 0.2.47

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": "eoss-mobiles",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="em-grid" @click="showHide = false">
3
- <van-grid v-bind="$attrs" v-on="$listeners" :column-num="columnNum">
3
+ <van-grid v-bind="$attrs" v-on="$listeners" :border="border" :column-num="columnNum">
4
4
  <draggable
5
5
  v-if="draggable"
6
6
  v-model="newData"
@@ -101,12 +101,14 @@
101
101
  @mouseup.stop="onMouseUp($event, item)"
102
102
  v-show="newData && newData.length > 0 && !draggable"
103
103
  > -->
104
+ <!-- @mousedown.stop="onMouseDown(item)"
105
+ @mouseup.stop="onMouseUp($event, item)" -->
104
106
  <div
105
107
  :style="`display: inline-block;width:${100 / columnNum}%`"
106
108
  class="van-grid-item"
109
+ :class="{'border-none':!border}"
107
110
  v-for="item of newData"
108
- @mousedown.stop="onMouseDown(item)"
109
- @mouseup.stop="onMouseUp($event, item)"
111
+ @click.stop="goView($event, item)"
110
112
  v-show="newData && newData.length > 0 && !draggable"
111
113
  :key="item.id"
112
114
  >
@@ -284,6 +286,10 @@ export default {
284
286
  popoverTheme:{
285
287
  type:String,
286
288
  default:'dark'
289
+ },
290
+ border:{
291
+ type:Boolean,
292
+ default:true
287
293
  }
288
294
  },
289
295
  data() {
@@ -435,26 +441,26 @@ export default {
435
441
  this.show = true;
436
442
  return;
437
443
  }
438
- // const currentTime = new Date().getTime();
439
- // const tapLength = currentTime - this.lastTapTime;
440
- // this.lastTapTime = currentTime;
444
+ const currentTime = new Date().getTime();
445
+ const tapLength = currentTime - this.lastTapTime;
446
+ this.lastTapTime = currentTime;
441
447
  // if (tapLength > 300) {
442
448
  // return;
443
449
  // }
444
450
  if (this.isHideMenu) {
445
- // if (tapLength < 300) {
446
- // this.handleDoubleClick(val);
447
- // clearTimeout(this.timer);
448
- // return;
449
- // }
450
- // if (this.showHide) {
451
- // this.showHide = false;
452
- // return;
453
- // }
454
- // this.timer = setTimeout(() => {
451
+ if (tapLength < 300) {
452
+ this.handleDoubleClick(val);
453
+ clearTimeout(this.timer);
454
+ return;
455
+ }
456
+ if (this.showHide) {
457
+ this.showHide = false;
458
+ return;
459
+ }
460
+ this.timer = setTimeout(() => {
455
461
  this.$emit('click', val, event);
456
462
  this.targetStop && event.stopPropagation();
457
- // }, 300);
463
+ }, 300);
458
464
  } else {
459
465
  this.$emit('click', val, event);
460
466
  this.targetStop && event.stopPropagation();
@@ -1 +1 @@
1
- .em-grid-popup,.em-grid-popup-button{display:-webkit-box;display:-ms-flexbox}.em-grid-del{position:absolute;top:5px;right:5px}.em-grid-popup{padding:10px;height:100%;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.em-grid-popup-label{text-align:center;font-size:16px;color:#000;font-weight:700;margin-bottom:10px}.em-grid-popup-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;overflow-x:hidden}.em-grid-popup-button{display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:10px}.em-grid-select-box{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.em-grid .van-popup{border-radius:5px}
1
+ .em-grid-popup,.em-grid-popup-button{display:-webkit-box;display:-ms-flexbox}.em-grid-del{position:absolute;top:5px;right:5px}.em-grid-popup{padding:10px;height:100%;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.em-grid-popup-label{text-align:center;font-size:16px;color:#000;font-weight:700;margin-bottom:10px}.em-grid-popup-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;overflow-x:hidden}.em-grid-popup-button{display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:10px}.em-grid-select-box{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.em-grid .van-popup{border-radius:5px}.em-grid .border-none .van-grid-item__content::after{border:none}