@phoenix-cg/v-tabs 0.1.32 → 0.1.34

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.
@@ -5812,15 +5812,15 @@ if (typeof window !== 'undefined') {
5812
5812
  // Indicate to webpack that this file can be concatenated
5813
5813
  /* harmony default export */ var setPublicPath = (null);
5814
5814
 
5815
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3c2a0523-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VTabs.vue?vue&type=template&id=2f7c9911&
5816
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-tabs-wrap"},[_c('div',{ref:"tabsEl",staticClass:"v-tabs",class:[("__" + _vm.direction)]},[_c('div',{staticClass:"v-tabs_inner"},_vm._l((_vm.list),function(tab){return _c('div',{key:tab[_vm.trackBy],ref:"tabs",refInFor:true,staticClass:"v-tabs_tab",class:{
5815
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"93691d22-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VTabs.vue?vue&type=template&id=c6822a6a&
5816
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-tabs-wrap"},[_c('div',{ref:"tabsEl",staticClass:"v-tabs",class:[("__" + _vm.direction)]},[_c('div',{staticClass:"v-tabs_inner"},_vm._l((_vm.list),function(tab){return _c(_vm.tabComponent,_vm._b({key:tab[_vm.trackBy],ref:"tabs",refInFor:true,tag:"component",staticClass:"v-tabs_tab",class:{
5817
5817
  __active: _vm.value && _vm.value[_vm.trackBy] === tab[_vm.trackBy],
5818
5818
  _disabled: tab && tab._disabled
5819
- },attrs:{"data-id":tab[_vm.trackBy]},on:{"click":function($event){return _vm.handleTabSelect(tab, $event)}}},[_vm._t("single-tab",function(){return [(_vm.wrapTitle)?[_c('div',{staticClass:"v-tabs_tab_title"},[_vm._v(" "+_vm._s(tab[_vm.label] || "")+" ")])]:[_vm._v(" "+_vm._s(tab[_vm.label] || "")+" ")]]},{"tab":tab})],2)}),0),(_vm.withSlider)?_c('div',{staticClass:"v-tabs_slider",style:(_vm.sliderStyle)}):_vm._e()]),_c(_vm.mobileHintComponent,{tag:"component",staticClass:"v-tabs-hint",class:{ __visible: _vm.isHintVisible }})],1)}
5819
+ },attrs:{"data-id":tab[_vm.trackBy]},on:{"click":function($event){return _vm.handleTabSelect(tab, $event)}}},'component',_vm.tabProps(tab),false),[_vm._t("single-tab",function(){return [(_vm.wrapTitle)?[_c('div',{staticClass:"v-tabs_tab_title"},[_vm._v(" "+_vm._s(tab[_vm.label] || "")+" ")])]:[_vm._v(" "+_vm._s(tab[_vm.label] || "")+" ")]]},{"tab":tab})],2)}),1),(_vm.withSlider)?_c('div',{staticClass:"v-tabs_slider",style:(_vm.sliderStyle)}):_vm._e()]),_c(_vm.mobileHintComponent,{tag:"component",staticClass:"v-tabs-hint",class:{ __visible: _vm.isHintVisible }})],1)}
5820
5820
  var staticRenderFns = []
5821
5821
 
5822
5822
 
5823
- // CONCATENATED MODULE: ./src/components/VTabs.vue?vue&type=template&id=2f7c9911&
5823
+ // CONCATENATED MODULE: ./src/components/VTabs.vue?vue&type=template&id=c6822a6a&
5824
5824
 
5825
5825
  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
5826
5826
  function _arrayWithHoles(arr) {
@@ -6039,6 +6039,7 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6039
6039
  //
6040
6040
  //
6041
6041
  //
6042
+ //
6042
6043
  /* harmony default export */ var VTabsvue_type_script_lang_js_ = ({
6043
6044
  props: {
6044
6045
  direction: {
@@ -6086,6 +6087,16 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6086
6087
  mobileHintHideDelay: {
6087
6088
  type: Number,
6088
6089
  default: 2000
6090
+ },
6091
+ tabComponent: {
6092
+ type: String,
6093
+ default: 'div'
6094
+ },
6095
+ tabProps: {
6096
+ type: Function,
6097
+ default: function _default() {
6098
+ return {};
6099
+ }
6089
6100
  }
6090
6101
  },
6091
6102
  data: function data() {
@@ -6096,6 +6107,11 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6096
6107
  hintObserver: null
6097
6108
  };
6098
6109
  },
6110
+ computed: {
6111
+ hintShowCondition: function hintShowCondition() {
6112
+ return this.mobileHintComponent;
6113
+ }
6114
+ },
6099
6115
  watch: {
6100
6116
  value: function value() {
6101
6117
  this.withSlider && this.calcSlider();
@@ -6107,11 +6123,6 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6107
6123
  this.createHintObserver();
6108
6124
  }
6109
6125
  },
6110
- computed: {
6111
- hintShowCondition: function hintShowCondition() {
6112
- return this.mobileHintComponent;
6113
- }
6114
- },
6115
6126
  mounted: function mounted() {
6116
6127
  var _this = this;
6117
6128
 
@@ -6141,20 +6152,18 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6141
6152
  var _this2 = this;
6142
6153
 
6143
6154
  if (this.hintShowCondition) {
6144
- this.hintObserver = new IntersectionObserver(function (entries) {
6155
+ this.hintObserver = new IntersectionObserver(function (entries, observer) {
6145
6156
  entries.forEach(function (entry) {
6146
6157
  if (entry.isIntersecting) {
6147
6158
  _this2.queueShowHint();
6148
6159
 
6149
- _this2.hintObserver.disconnect();
6150
-
6160
+ observer.disconnect();
6151
6161
  _this2.hintObserver = null;
6152
6162
  }
6153
6163
  });
6154
6164
  }, {
6155
6165
  threshold: 1.0
6156
- });
6157
- this.hintObserver.observe(this.$el);
6166
+ }); // this.hintObserver.observe(this.$el)
6158
6167
  }
6159
6168
  },
6160
6169
  queueShowHint: function queueShowHint() {
@@ -6181,7 +6190,9 @@ var web_dom_collections_for_each = __webpack_require__("159b");
6181
6190
  _this5.calcSlider();
6182
6191
  });
6183
6192
  this.$refs.tabs.forEach(function (tabEl) {
6184
- _this5.resizeObserver.observe(tabEl);
6193
+ var el = tabEl.$el || tabEl;
6194
+
6195
+ _this5.resizeObserver.observe(el);
6185
6196
  });
6186
6197
  }
6187
6198
  },