eoss-mobiles 0.2.46 → 0.2.48

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.48",
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"
@@ -91,28 +91,29 @@
91
91
  </div>
92
92
  </transition-group>
93
93
  </draggable>
94
- <!-- <van-grid-item
94
+ <van-grid-item
95
95
  v-bind="item"
96
96
  v-for="(item, index) of newData"
97
97
  :key="index"
98
98
  :class="{ 'em-grid-ellipsis': textEllipsis }"
99
99
  :style="`width:${100 / columnNum}%;`"
100
- @mousedown.stop="onMouseDown(item)"
101
- @mouseup.stop="onMouseUp($event, item)"
100
+ @click.stop="goView($event, item)"
102
101
  v-show="newData && newData.length > 0 && !draggable"
103
- > -->
104
- <div
102
+ >
103
+ <!-- @mousedown.stop="onMouseDown(item)"
104
+ @mouseup.stop="onMouseUp($event, item)" -->
105
+ <!-- <div
105
106
  :style="`display: inline-block;width:${100 / columnNum}%`"
106
107
  class="van-grid-item"
108
+ :class="{'border-none':!border}"
107
109
  v-for="item of newData"
108
- @mousedown.stop="onMouseDown(item)"
109
- @mouseup.stop="onMouseUp($event, item)"
110
+ @click.stop="goView($event, item)"
110
111
  v-show="newData && newData.length > 0 && !draggable"
111
112
  :key="item.id"
112
113
  >
113
114
  <div
114
115
  class="van-grid-item__content van-grid-item__content--center van-hairline"
115
- >
116
+ > -->
116
117
  <i
117
118
  class="van-icon van-grid-item__icon"
118
119
  :class="
@@ -181,9 +182,9 @@
181
182
  <div v-if="item.showMenu" class="em-grid-select-box">
182
183
  <van-icon size="30px" color="#fff" name="success" />
183
184
  </div>
184
- </div>
185
- </div>
186
- <!-- </van-grid-item> -->
185
+ <!-- </div>
186
+ </div> -->
187
+ </van-grid-item>
187
188
  <slot v-show="newData && newData.length == 0" />
188
189
  </van-grid>
189
190
  <em-popup style="width:80%;height:50%" v-if="show" v-model="show">
@@ -284,6 +285,10 @@ export default {
284
285
  popoverTheme:{
285
286
  type:String,
286
287
  default:'dark'
288
+ },
289
+ border:{
290
+ type:Boolean,
291
+ default:true
287
292
  }
288
293
  },
289
294
  data() {
@@ -435,26 +440,26 @@ export default {
435
440
  this.show = true;
436
441
  return;
437
442
  }
438
- // const currentTime = new Date().getTime();
439
- // const tapLength = currentTime - this.lastTapTime;
440
- // this.lastTapTime = currentTime;
443
+ const currentTime = new Date().getTime();
444
+ const tapLength = currentTime - this.lastTapTime;
445
+ this.lastTapTime = currentTime;
441
446
  // if (tapLength > 300) {
442
447
  // return;
443
448
  // }
444
449
  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(() => {
450
+ if (tapLength < 300) {
451
+ this.handleDoubleClick(val);
452
+ clearTimeout(this.timer);
453
+ return;
454
+ }
455
+ if (this.showHide) {
456
+ this.showHide = false;
457
+ return;
458
+ }
459
+ this.timer = setTimeout(() => {
455
460
  this.$emit('click', val, event);
456
461
  this.targetStop && event.stopPropagation();
457
- // }, 300);
462
+ }, 300);
458
463
  } else {
459
464
  this.$emit('click', val, event);
460
465
  this.targetStop && event.stopPropagation();
@@ -328,10 +328,10 @@ export default {
328
328
  },
329
329
  methods: {
330
330
  handleClick(val) {
331
- if (this.disabled || this.readonly) return;
332
331
  if (this.linkTag) {
333
332
  this.$emit('tagClick', val);
334
333
  } else {
334
+ if (this.disabled || this.readonly) return;
335
335
  this.showPicker = true;
336
336
  }
337
337
  },
@@ -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}