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/lib/grid.js CHANGED
@@ -206,7 +206,7 @@ module.exports = require("vuedraggable");
206
206
  // ESM COMPAT FLAG
207
207
  __webpack_require__.r(__webpack_exports__);
208
208
 
209
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/grid/src/main.vue?vue&type=template&id=1f9590ec&
209
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/grid/src/main.vue?vue&type=template&id=453263cc&
210
210
  var render = function () {
211
211
  var _vm = this
212
212
  var _h = _vm.$createElement
@@ -226,7 +226,7 @@ var render = function () {
226
226
  "van-grid",
227
227
  _vm._g(
228
228
  _vm._b(
229
- { attrs: { "column-num": _vm.columnNum } },
229
+ { attrs: { border: _vm.border, "column-num": _vm.columnNum } },
230
230
  "van-grid",
231
231
  _vm.$attrs,
232
232
  false
@@ -428,172 +428,162 @@ var render = function () {
428
428
  1
429
429
  )
430
430
  : _vm._e(),
431
- _vm._l(_vm.newData, function (item) {
431
+ _vm._l(_vm.newData, function (item, index) {
432
432
  return _c(
433
- "div",
434
- {
435
- directives: [
436
- {
437
- name: "show",
438
- rawName: "v-show",
439
- value:
440
- _vm.newData && _vm.newData.length > 0 && !_vm.draggable,
441
- expression: "newData && newData.length > 0 && !draggable",
442
- },
443
- ],
444
- key: item.id,
445
- staticClass: "van-grid-item",
446
- style:
447
- "display: inline-block;width:" + 100 / _vm.columnNum + "%",
448
- on: {
449
- mousedown: function ($event) {
450
- $event.stopPropagation()
451
- _vm.onMouseDown(item)
452
- },
453
- mouseup: function ($event) {
454
- $event.stopPropagation()
455
- _vm.onMouseUp($event, item)
433
+ "van-grid-item",
434
+ _vm._b(
435
+ {
436
+ directives: [
437
+ {
438
+ name: "show",
439
+ rawName: "v-show",
440
+ value:
441
+ _vm.newData && _vm.newData.length > 0 && !_vm.draggable,
442
+ expression: "newData && newData.length > 0 && !draggable",
443
+ },
444
+ ],
445
+ key: index,
446
+ class: { "em-grid-ellipsis": _vm.textEllipsis },
447
+ style: "width:" + 100 / _vm.columnNum + "%;",
448
+ on: {
449
+ click: function ($event) {
450
+ $event.stopPropagation()
451
+ _vm.goView($event, item)
452
+ },
456
453
  },
457
454
  },
458
- },
455
+ "van-grid-item",
456
+ item,
457
+ false
458
+ ),
459
459
  [
460
460
  _c(
461
- "div",
461
+ "i",
462
462
  {
463
- staticClass:
464
- "van-grid-item__content van-grid-item__content--center van-hairline",
463
+ staticClass: "van-icon van-grid-item__icon",
464
+ class:
465
+ item.icon.startsWith("http") &&
466
+ item.icon.indexOf("/") != -1
467
+ ? ""
468
+ : "van-icon-" + item.icon,
469
+ style: {
470
+ fontSize:
471
+ item.iconSize || _vm.$attrs["icon-size"]
472
+ ? item.iconSize || _vm.$attrs["icon-size"]
473
+ : "",
474
+ },
465
475
  },
466
476
  [
477
+ item.icon.startsWith("http") || item.icon.indexOf("/") != -1
478
+ ? _c("img", {
479
+ staticClass: "van-icon__image",
480
+ style: {
481
+ width:
482
+ item.iconSize || _vm.$attrs["icon-size"]
483
+ ? item.iconSize || _vm.$attrs["icon-size"]
484
+ : "",
485
+ height:
486
+ item.iconSize || _vm.$attrs["icon-size"]
487
+ ? item.iconSize || _vm.$attrs["icon-size"]
488
+ : "",
489
+ },
490
+ attrs: { src: item.icon },
491
+ })
492
+ : _vm._e(),
493
+ _c("div", {
494
+ directives: [
495
+ {
496
+ name: "show",
497
+ rawName: "v-show",
498
+ value: item.dot,
499
+ expression: "item.dot",
500
+ },
501
+ ],
502
+ staticClass: "van-info van-info--dot",
503
+ style: { background: item.dotColor || "" },
504
+ }),
467
505
  _c(
468
- "i",
506
+ "div",
469
507
  {
470
- staticClass: "van-icon van-grid-item__icon",
471
- class:
472
- item.icon.startsWith("http") &&
473
- item.icon.indexOf("/") != -1
474
- ? ""
475
- : "van-icon-" + item.icon,
476
- style: {
477
- fontSize:
478
- item.iconSize || _vm.$attrs["icon-size"]
479
- ? item.iconSize || _vm.$attrs["icon-size"]
480
- : "",
481
- },
482
- },
483
- [
484
- item.icon.startsWith("http") ||
485
- item.icon.indexOf("/") != -1
486
- ? _c("img", {
487
- staticClass: "van-icon__image",
488
- style: {
489
- width:
490
- item.iconSize || _vm.$attrs["icon-size"]
491
- ? item.iconSize || _vm.$attrs["icon-size"]
492
- : "",
493
- height:
494
- item.iconSize || _vm.$attrs["icon-size"]
495
- ? item.iconSize || _vm.$attrs["icon-size"]
496
- : "",
497
- },
498
- attrs: { src: item.icon },
499
- })
500
- : _vm._e(),
501
- _c("div", {
502
- directives: [
503
- {
504
- name: "show",
505
- rawName: "v-show",
506
- value: item.dot,
507
- expression: "item.dot",
508
- },
509
- ],
510
- staticClass: "van-info van-info--dot",
511
- style: { background: item.dotColor || "" },
512
- }),
513
- _c(
514
- "div",
508
+ directives: [
515
509
  {
516
- directives: [
517
- {
518
- name: "show",
519
- rawName: "v-show",
520
- value: item.badge,
521
- expression: "item.badge",
522
- },
523
- ],
524
- staticClass: "van-info",
525
- style: { background: _vm.badgeColor || "" },
510
+ name: "show",
511
+ rawName: "v-show",
512
+ value: item.badge,
513
+ expression: "item.badge",
526
514
  },
527
- [
528
- _vm._v(
529
- "\n " +
530
- _vm._s(
531
- _vm.maxBadge &&
532
- !isNaN(item.badge) &&
533
- Number(_vm.maxBadge) < Number(item.badge)
534
- ? _vm.maxBadge + "+"
535
- : item.badge
536
- ) +
537
- "\n "
538
- ),
539
- ]
515
+ ],
516
+ staticClass: "van-info",
517
+ style: { background: _vm.badgeColor || "" },
518
+ },
519
+ [
520
+ _vm._v(
521
+ "\n " +
522
+ _vm._s(
523
+ _vm.maxBadge &&
524
+ !isNaN(item.badge) &&
525
+ Number(_vm.maxBadge) < Number(item.badge)
526
+ ? _vm.maxBadge + "+"
527
+ : item.badge
528
+ ) +
529
+ "\n "
540
530
  ),
541
531
  ]
542
532
  ),
543
- _c("em-popover", {
544
- attrs: {
545
- placement: _vm.placement,
546
- theme: _vm.popoverTheme,
547
- actions: _vm.popoverActions,
548
- },
533
+ ]
534
+ ),
535
+ _c("em-popover", {
536
+ attrs: {
537
+ placement: _vm.placement,
538
+ theme: _vm.popoverTheme,
539
+ actions: _vm.popoverActions,
540
+ },
541
+ on: {
542
+ select: function ($event) {
543
+ _vm.popoverSelect($event, item)
544
+ },
545
+ },
546
+ model: {
547
+ value: item.showPopover,
548
+ callback: function ($$v) {
549
+ _vm.$set(item, "showPopover", $$v)
550
+ },
551
+ expression: "item.showPopover",
552
+ },
553
+ }),
554
+ _c("span", { staticClass: "van-grid-item__text" }, [
555
+ _vm._v(_vm._s(item.text)),
556
+ ]),
557
+ _vm.showHide && item.menuType != "add"
558
+ ? _c("van-icon", {
559
+ staticClass: "em-grid-del",
560
+ attrs: { name: "clear", size: "20px" },
549
561
  on: {
550
- select: function ($event) {
551
- _vm.popoverSelect($event, item)
552
- },
553
- },
554
- model: {
555
- value: item.showPopover,
556
- callback: function ($$v) {
557
- _vm.$set(item, "showPopover", $$v)
562
+ click: function ($event) {
563
+ $event.stopPropagation()
564
+ _vm.handleHide(item)
558
565
  },
559
- expression: "item.showPopover",
560
566
  },
561
- }),
562
- _c("span", { staticClass: "van-grid-item__text" }, [
563
- _vm._v(_vm._s(item.text)),
564
- ]),
565
- _vm.showHide && item.menuType != "add"
566
- ? _c("van-icon", {
567
- staticClass: "em-grid-del",
568
- attrs: { name: "clear", size: "20px" },
569
- on: {
570
- click: function ($event) {
571
- $event.stopPropagation()
572
- _vm.handleHide(item)
573
- },
567
+ })
568
+ : _vm._e(),
569
+ item.showMenu
570
+ ? _c(
571
+ "div",
572
+ { staticClass: "em-grid-select-box" },
573
+ [
574
+ _c("van-icon", {
575
+ attrs: {
576
+ size: "30px",
577
+ color: "#fff",
578
+ name: "success",
574
579
  },
575
- })
576
- : _vm._e(),
577
- item.showMenu
578
- ? _c(
579
- "div",
580
- { staticClass: "em-grid-select-box" },
581
- [
582
- _c("van-icon", {
583
- attrs: {
584
- size: "30px",
585
- color: "#fff",
586
- name: "success",
587
- },
588
- }),
589
- ],
590
- 1
591
- )
592
- : _vm._e(),
593
- ],
594
- 1
595
- ),
596
- ]
580
+ }),
581
+ ],
582
+ 1
583
+ )
584
+ : _vm._e(),
585
+ ],
586
+ 1
597
587
  )
598
588
  }),
599
589
  _vm._t("default"),
@@ -681,7 +671,7 @@ var staticRenderFns = []
681
671
  render._withStripped = true
682
672
 
683
673
 
684
- // CONCATENATED MODULE: ./packages/grid/src/main.vue?vue&type=template&id=1f9590ec&
674
+ // CONCATENATED MODULE: ./packages/grid/src/main.vue?vue&type=template&id=453263cc&
685
675
 
686
676
  // EXTERNAL MODULE: external "vuedraggable"
687
677
  var external_vuedraggable_ = __webpack_require__(10);
@@ -904,6 +894,7 @@ var external_vuedraggable_default = /*#__PURE__*/__webpack_require__.n(external_
904
894
  //
905
895
  //
906
896
  //
897
+ //
907
898
 
908
899
 
909
900
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -980,6 +971,10 @@ var external_vuedraggable_default = /*#__PURE__*/__webpack_require__.n(external_
980
971
  popoverTheme: {
981
972
  type: String,
982
973
  default: 'dark'
974
+ },
975
+ border: {
976
+ type: Boolean,
977
+ default: true
983
978
  }
984
979
  },
985
980
  data: function data() {
@@ -1132,30 +1127,32 @@ var external_vuedraggable_default = /*#__PURE__*/__webpack_require__.n(external_
1132
1127
  });
1133
1128
  },
1134
1129
  goView: function goView(event, val) {
1130
+ var _this6 = this;
1131
+
1135
1132
  if (val.menuType === 'add') {
1136
1133
  this.show = true;
1137
1134
  return;
1138
1135
  }
1139
- // const currentTime = new Date().getTime();
1140
- // const tapLength = currentTime - this.lastTapTime;
1141
- // this.lastTapTime = currentTime;
1136
+ var currentTime = new Date().getTime();
1137
+ var tapLength = currentTime - this.lastTapTime;
1138
+ this.lastTapTime = currentTime;
1142
1139
  // if (tapLength > 300) {
1143
1140
  // return;
1144
1141
  // }
1145
1142
  if (this.isHideMenu) {
1146
- // if (tapLength < 300) {
1147
- // this.handleDoubleClick(val);
1148
- // clearTimeout(this.timer);
1149
- // return;
1150
- // }
1151
- // if (this.showHide) {
1152
- // this.showHide = false;
1153
- // return;
1154
- // }
1155
- // this.timer = setTimeout(() => {
1156
- this.$emit('click', val, event);
1157
- this.targetStop && event.stopPropagation();
1158
- // }, 300);
1143
+ if (tapLength < 300) {
1144
+ this.handleDoubleClick(val);
1145
+ clearTimeout(this.timer);
1146
+ return;
1147
+ }
1148
+ if (this.showHide) {
1149
+ this.showHide = false;
1150
+ return;
1151
+ }
1152
+ this.timer = setTimeout(function () {
1153
+ _this6.$emit('click', val, event);
1154
+ _this6.targetStop && event.stopPropagation();
1155
+ }, 300);
1159
1156
  } else {
1160
1157
  this.$emit('click', val, event);
1161
1158
  this.targetStop && event.stopPropagation();