@mdsfe/mds-ui 0.2.8 → 0.2.9

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/dist/input.js CHANGED
@@ -389,8 +389,14 @@ var SIZEMAP = {
389
389
  type: 'line-close-circle'
390
390
  },
391
391
  'class': this.prefixCls + '-clearable',
392
+ key: this.prefixCls + '-clearable-key',
392
393
  nativeOn: {
393
- click: this.clear
394
+ click: function click(e) {
395
+ if (e.target.className.includes('search')) {
396
+ return;
397
+ }
398
+ _this.clear(e);
399
+ }
394
400
  }
395
401
  });
396
402
  var renderLabeledInput = function renderLabeledInput(children) {
@@ -25607,7 +25607,7 @@ module.exports = { "default": __webpack_require__(296), __esModule: true };
25607
25607
  "use strict";
25608
25608
  /* WEBPACK VAR INJECTION */(function(global) {/**!
25609
25609
  * @fileOverview Kickass library to create and place poppers near their reference elements.
25610
- * @version 1.16.1
25610
+ * @version 1.14.7
25611
25611
  * @license
25612
25612
  * Copyright (c) 2016 Federico Zivolo and contributors
25613
25613
  *
@@ -25629,17 +25629,16 @@ module.exports = { "default": __webpack_require__(296), __esModule: true };
25629
25629
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25630
25630
  * SOFTWARE.
25631
25631
  */
25632
- var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
25633
-
25634
- var timeoutDuration = function () {
25635
- var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
25636
- for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
25637
- if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
25638
- return 1;
25639
- }
25632
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
25633
+
25634
+ var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
25635
+ var timeoutDuration = 0;
25636
+ for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
25637
+ if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
25638
+ timeoutDuration = 1;
25639
+ break;
25640
25640
  }
25641
- return 0;
25642
- }();
25641
+ }
25643
25642
 
25644
25643
  function microtaskDebounce(fn) {
25645
25644
  var called = false;
@@ -25759,17 +25758,6 @@ function getScrollParent(element) {
25759
25758
  return getScrollParent(getParentNode(element));
25760
25759
  }
25761
25760
 
25762
- /**
25763
- * Returns the reference node of the reference object, or the reference object itself.
25764
- * @method
25765
- * @memberof Popper.Utils
25766
- * @param {Element|Object} reference - the reference element (the popper will be relative to this)
25767
- * @returns {Element} parent
25768
- */
25769
- function getReferenceNode(reference) {
25770
- return reference && reference.referenceNode ? reference.referenceNode : reference;
25771
- }
25772
-
25773
25761
  var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
25774
25762
  var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
25775
25763
 
@@ -25953,7 +25941,7 @@ function getBordersSize(styles, axis) {
25953
25941
  var sideA = axis === 'x' ? 'Left' : 'Top';
25954
25942
  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
25955
25943
 
25956
- return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
25944
+ return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
25957
25945
  }
25958
25946
 
25959
25947
  function getSize(axis, body, html, computedStyle) {
@@ -26078,8 +26066,8 @@ function getBoundingClientRect(element) {
26078
26066
 
26079
26067
  // subtract scrollbar size from sizes
26080
26068
  var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
26081
- var width = sizes.width || element.clientWidth || result.width;
26082
- var height = sizes.height || element.clientHeight || result.height;
26069
+ var width = sizes.width || element.clientWidth || result.right - result.left;
26070
+ var height = sizes.height || element.clientHeight || result.bottom - result.top;
26083
26071
 
26084
26072
  var horizScrollbar = element.offsetWidth - width;
26085
26073
  var vertScrollbar = element.offsetHeight - height;
@@ -26108,8 +26096,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
26108
26096
  var scrollParent = getScrollParent(children);
26109
26097
 
26110
26098
  var styles = getStyleComputedProperty(parent);
26111
- var borderTopWidth = parseFloat(styles.borderTopWidth);
26112
- var borderLeftWidth = parseFloat(styles.borderLeftWidth);
26099
+ var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
26100
+ var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
26113
26101
 
26114
26102
  // In cases where the parent is fixed, we must ignore negative scroll in offset calc
26115
26103
  if (fixedPosition && isHTML) {
@@ -26130,8 +26118,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
26130
26118
  // differently when margins are applied to it. The margins are included in
26131
26119
  // the box of the documentElement, in the other cases not.
26132
26120
  if (!isIE10 && isHTML) {
26133
- var marginTop = parseFloat(styles.marginTop);
26134
- var marginLeft = parseFloat(styles.marginLeft);
26121
+ var marginTop = parseFloat(styles.marginTop, 10);
26122
+ var marginLeft = parseFloat(styles.marginLeft, 10);
26135
26123
 
26136
26124
  offsets.top -= borderTopWidth - marginTop;
26137
26125
  offsets.bottom -= borderTopWidth - marginTop;
@@ -26231,7 +26219,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
26231
26219
  // NOTE: 1 DOM access here
26232
26220
 
26233
26221
  var boundaries = { top: 0, left: 0 };
26234
- var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
26222
+ var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
26235
26223
 
26236
26224
  // Handle viewport case
26237
26225
  if (boundariesElement === 'viewport') {
@@ -26359,7 +26347,7 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
26359
26347
  function getReferenceOffsets(state, popper, reference) {
26360
26348
  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
26361
26349
 
26362
- var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
26350
+ var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
26363
26351
  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
26364
26352
  }
26365
26353
 
@@ -26621,7 +26609,7 @@ function destroy() {
26621
26609
 
26622
26610
  this.disableEventListeners();
26623
26611
 
26624
- // remove the popper if user explicitly asked for the deletion on destroy
26612
+ // remove the popper if user explicity asked for the deletion on destroy
26625
26613
  // do not use `remove` because IE11 doesn't support it
26626
26614
  if (this.options.removeOnDestroy) {
26627
26615
  this.popper.parentNode.removeChild(this.popper);
@@ -27070,8 +27058,8 @@ function arrow(data, options) {
27070
27058
  // Compute the sideValue using the updated popper offsets
27071
27059
  // take popper margin in account because we don't have this info available
27072
27060
  var css = getStyleComputedProperty(data.instance.popper);
27073
- var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
27074
- var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
27061
+ var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
27062
+ var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
27075
27063
  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
27076
27064
 
27077
27065
  // prevent arrowElement from being placed not contiguously to its popper
@@ -27223,14 +27211,7 @@ function flip(data, options) {
27223
27211
 
27224
27212
  // flip the variation if required
27225
27213
  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
27226
-
27227
- // flips variation if reference element overflows boundaries
27228
- var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
27229
-
27230
- // flips variation if popper content overflows boundaries
27231
- var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
27232
-
27233
- var flippedVariation = flippedVariationByRef || flippedVariationByContent;
27214
+ var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
27234
27215
 
27235
27216
  if (overlapsRef || overflowsBoundaries || flippedVariation) {
27236
27217
  // this boolean to detect any flip loop
@@ -27837,23 +27818,7 @@ var modifiers = {
27837
27818
  * The popper will never be placed outside of the defined boundaries
27838
27819
  * (except if `keepTogether` is enabled)
27839
27820
  */
27840
- boundariesElement: 'viewport',
27841
- /**
27842
- * @prop {Boolean} flipVariations=false
27843
- * The popper will switch placement variation between `-start` and `-end` when
27844
- * the reference element overlaps its boundaries.
27845
- *
27846
- * The original placement should have a set variation.
27847
- */
27848
- flipVariations: false,
27849
- /**
27850
- * @prop {Boolean} flipVariationsByContent=false
27851
- * The popper will switch placement variation between `-start` and `-end` when
27852
- * the popper element overlaps its reference boundaries.
27853
- *
27854
- * The original placement should have a set variation.
27855
- */
27856
- flipVariationsByContent: false
27821
+ boundariesElement: 'viewport'
27857
27822
  },
27858
27823
 
27859
27824
  /**
@@ -28070,8 +28035,8 @@ var Popper = function () {
28070
28035
  /**
28071
28036
  * Creates a new Popper.js instance.
28072
28037
  * @class Popper
28073
- * @param {Element|referenceObject} reference - The reference element used to position the popper
28074
- * @param {Element} popper - The HTML / XML element used as the popper
28038
+ * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
28039
+ * @param {HTMLElement} popper - The HTML element used as the popper
28075
28040
  * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
28076
28041
  * @return {Object} instance - The generated Popper.js instance
28077
28042
  */
@@ -34583,8 +34548,8 @@ card.install = function (Vue) {
34583
34548
  Vue.component(grid.name, grid);
34584
34549
  };
34585
34550
  /* harmony default export */ var components_card = (card);
34586
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/cascader/cascader.vue?vue&type=template&id=fbeed906&
34587
- var cascadervue_type_template_id_fbeed906_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClose),expression:"handleClose"}],ref:"reference",class:_vm.classes},[(_vm.multiple || _vm.treeMode)?[_c('div',{staticClass:"mds-cascader-multi-wrapper",attrs:{"tabindex":"0"},on:{"click":_vm.handleClick,"mouseenter":function($event){_vm.inputHovering = true},"mouseleave":function($event){_vm.inputHovering = false},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.blur()},"focus":_vm.handleFocus,"blur":_vm.handleBlur}},[_c('mds-input',{directives:[{name:"show",rawName:"v-show",value:(!_vm.filterMode),expression:"!filterMode"}],ref:"multipleInput",attrs:{"size":_vm.size,"disabled":_vm.disabled,"readonly":"","placeholder":_vm.displayPlaceHolder},model:{value:(_vm.multiLabel),callback:function ($$v) {_vm.multiLabel=$$v},expression:"multiLabel"}},[_c('template',{slot:"suffix"},[(_vm.clearable && _vm.inputHovering && _vm.multiLabel && !_vm.disabled)?_c('mds-icon',{attrs:{"type":"line-close"},nativeOn:{"click":function($event){$event.stopPropagation();return _vm.handleClear($event)}}}):_c('mds-icon',{attrs:{"type":"fill-solid-down"}})],1)],2),_vm._v(" "),_c('div',{staticClass:"mds-cascader-tags",class:{
34551
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/cascader/cascader.vue?vue&type=template&id=d4a8f10e&
34552
+ var cascadervue_type_template_id_d4a8f10e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClose),expression:"handleClose"}],ref:"reference",class:_vm.classes},[(_vm.multiple || _vm.treeMode)?[_c('div',{staticClass:"mds-cascader-multi-wrapper",attrs:{"tabindex":"0"},on:{"click":_vm.handleClick,"mouseenter":function($event){_vm.inputHovering = true},"mouseleave":function($event){_vm.inputHovering = false},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.blur()},"focus":_vm.handleFocus,"blur":_vm.handleBlur}},[_c('mds-input',{directives:[{name:"show",rawName:"v-show",value:(!_vm.filterMode),expression:"!filterMode"}],ref:"multipleInput",attrs:{"size":_vm.size,"disabled":_vm.disabled,"readonly":"","placeholder":_vm.displayPlaceHolder},model:{value:(_vm.multiLabel),callback:function ($$v) {_vm.multiLabel=$$v},expression:"multiLabel"}},[_c('template',{slot:"suffix"},[(_vm.clearable && _vm.inputHovering && _vm.multiLabel && !_vm.disabled)?_c('mds-icon',{attrs:{"type":"line-close"},nativeOn:{"click":function($event){$event.stopPropagation();return _vm.handleClear($event)}}}):_c('mds-icon',{staticStyle:{"color":"#ccd2db","font-size":"14px"},attrs:{"type":"fill-solid-down"}})],1)],2),_vm._v(" "),_c('div',{staticClass:"mds-cascader-tags",class:{
34588
34553
  'tree-tags': _vm.treeMode,
34589
34554
  },on:{"click":_vm.focusMultiFilter}},[_vm._l((_vm.multiTags),function(tag){return _c('mds-tag',{key:tag.key,class:_vm.disabled ? 'mds-cascader-tags-disabled' : '',attrs:{"type":"info","closable":"","useTransition":false},on:{"close":function($event){return _vm.deleteTag(tag)}}},[_c('span',[_vm._v(_vm._s(_vm.showAllLevels ? tag.totalLabel : tag.label))])])}),_vm._v(" "),_c('div',{staticClass:"mds-cascader-multi-filter-wrapper",style:({ width: _vm.multiFilterWidth })},[(_vm.treeMode)?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.multiFilterValue),expression:"multiFilterValue"}],ref:"multiFilter",staticClass:"mds-cascader-multi-filter",attrs:{"type":"search","autocomplete":"off"},domProps:{"value":(_vm.multiFilterValue)},on:{"input":[function($event){if($event.target.composing){ return; }_vm.multiFilterValue=$event.target.value},function($event){return _vm.handleMultiFilterChange($event.target.value)}],"keydown":_vm.handleMiltiFilterBackspace}}):_vm._e(),_vm._v(" "),_c('span',{ref:"multiFilterFake",staticClass:"mds-cascader-multi-filter-faker"})])],2)],1)]:[_c('mds-input',{directives:[{name:"show",rawName:"v-show",value:(_vm.filterMode),expression:"filterMode"}],ref:"filterInput",attrs:{"placeholder":_vm.filterPlaceholder},on:{"input":function($event){return _vm.handleInput($event, 'filter')}},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.blur()}},model:{value:(_vm.filterLabel),callback:function ($$v) {_vm.filterLabel=$$v},expression:"filterLabel"}},[_c('template',{slot:"suffix"},[_c('mds-icon',{attrs:{"type":"fill-solid-down"}})],1)],2),_vm._v(" "),_c('mds-input',{directives:[{name:"show",rawName:"v-show",value:(!_vm.filterMode),expression:"!filterMode"}],ref:"input",attrs:{"size":_vm.size,"placeholder":_vm.placeholder,"disabled":_vm.disabled,"readonly":""},on:{"focus":_vm.handleFocus,"blur":_vm.handleBlur,"input":function($event){return _vm.handleInput($event, 'display')}},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.blur()},"click":function($event){return _vm.handleClick($event)},"mouseenter":function($event){_vm.inputHovering = true},"mouseleave":function($event){_vm.inputHovering = false}},model:{value:(_vm.displayLabel),callback:function ($$v) {_vm.displayLabel=$$v},expression:"displayLabel"}},[_c('template',{slot:"suffix"},[(
34590
34555
  _vm.clearable &&
@@ -34593,10 +34558,10 @@ var cascadervue_type_template_id_fbeed906_render = function () {var _vm=this;var
34593
34558
  _vm.displayLabel.length &&
34594
34559
  !_vm.disabled
34595
34560
  )?_c('mds-icon',{attrs:{"type":"line-close"},nativeOn:{"click":function($event){$event.stopPropagation();return _vm.handleClear($event)}}}):_c('mds-icon',{attrs:{"type":"fill-solid-down"}})],1)],2)],_vm._v(" "),(!_vm.treeMode)?_c('transition',{attrs:{"name":"mds-cascader-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.expand),expression:"expand"}],ref:"popper",class:['mds-cascader-dropdown', _vm.popperClass]},[_c('mds-cascader-panel',{directives:[{name:"show",rawName:"v-show",value:(!_vm.filtering),expression:"!filtering"}],ref:"panel",class:_vm.panelClass,attrs:{"prefixCls":_vm.prefixCls,"options":_vm.options,"prop":_vm.panelProps,"border":false,"filterable":_vm.filterable,"separator":_vm.separator,"maxHeight":_vm.maxHeight,"expandTrigger":_vm.expandTrigger,"emitPath":_vm.emitPath,"showAllLevels":_vm.showAllLevels,"loadData":_vm.loadData,"multiple":_vm.multiple,"checkStrictly":_vm.checkStrictly},on:{"change":_vm.handleChange,"expand-change":_vm.handleExpandChange,"click":function($event){$event.stopPropagation();return _vm.panelClick($event)},"init-filter-options":_vm.initfilterOptions,"clearInput":function($event){_vm.displayLabel = ''},"set-multi-tags":_vm.setMultiTags,"reset-panel-max-width":_vm.resetPanelMaxWidth},model:{value:(_vm.panelValue),callback:function ($$v) {_vm.panelValue=$$v},expression:"panelValue"}}),_vm._v(" "),(_vm.filterable)?_c('search-panel',{directives:[{name:"show",rawName:"v-show",value:(_vm.filtering),expression:"filtering"}],attrs:{"calMinWidth":_vm.calMinWidth,"maxHeight":_vm.maxHeight,"displayFilterOptions":_vm.displayFilterOptions,"value":_vm.value},on:{"filterChange":_vm.handleFilterChange}}):_vm._e()],1)]):_c('transition',{attrs:{"name":"mds-cascader-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.expand),expression:"expand"}],ref:"popper",class:['mds-cascader-dropdown', _vm.popperClass]},[_c('tree-panel',_vm._b({ref:"panel",attrs:{"filterValue":_vm.multiFilterValue}},'tree-panel',_vm.$props,false))],1)])],2)}
34596
- var cascadervue_type_template_id_fbeed906_staticRenderFns = []
34561
+ var cascadervue_type_template_id_d4a8f10e_staticRenderFns = []
34597
34562
 
34598
34563
 
34599
- // CONCATENATED MODULE: ./components/cascader/cascader.vue?vue&type=template&id=fbeed906&
34564
+ // CONCATENATED MODULE: ./components/cascader/cascader.vue?vue&type=template&id=d4a8f10e&
34600
34565
 
34601
34566
  // EXTERNAL MODULE: ./components/input/style/index.less
34602
34567
  var input_style = __webpack_require__(364);
@@ -34898,8 +34863,14 @@ var inputvue_type_script_lang_js_SIZEMAP = {
34898
34863
  type: 'line-close-circle'
34899
34864
  },
34900
34865
  'class': this.prefixCls + '-clearable',
34866
+ key: this.prefixCls + '-clearable-key',
34901
34867
  nativeOn: {
34902
- click: this.clear
34868
+ click: function click(e) {
34869
+ if (e.target.className.includes('search')) {
34870
+ return;
34871
+ }
34872
+ _this.clear(e);
34873
+ }
34903
34874
  }
34904
34875
  });
34905
34876
  var renderLabeledInput = function renderLabeledInput(children) {
@@ -43077,8 +43048,8 @@ var treeSelect_component = normalizeComponent(
43077
43048
 
43078
43049
  var cascader_component = normalizeComponent(
43079
43050
  cascader_cascadervue_type_script_lang_js_,
43080
- cascadervue_type_template_id_fbeed906_render,
43081
- cascadervue_type_template_id_fbeed906_staticRenderFns,
43051
+ cascadervue_type_template_id_d4a8f10e_render,
43052
+ cascadervue_type_template_id_d4a8f10e_staticRenderFns,
43082
43053
  false,
43083
43054
  null,
43084
43055
  null,
@@ -45407,12 +45378,12 @@ var time_component = normalizeComponent(
45407
45378
  )
45408
45379
 
45409
45380
  /* harmony default export */ var picker_time = (time_component.exports);
45410
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/datepicker/base/year-table.vue?vue&type=template&id=1f098517&
45411
- var year_tablevue_type_template_id_1f098517_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:(_vm.prefixCls + "-year-table-box")},[_c('table',{class:(_vm.prefixCls + "-table " + _vm.prefixCls + "-year-table"),on:{"click":_vm.handleYearTableClick}},[_c('tbody',[_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 0)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 1)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 1))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 2)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 2))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 3)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 3))])])])]),_vm._v(" "),_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 4)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 4))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 5)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 5))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 6)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 6))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 7)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 7))])])])]),_vm._v(" "),_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 8)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 8))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 9)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 9))])])]),_vm._v(" "),_c('td'),_vm._v(" "),_c('td')])])])])}
45412
- var year_tablevue_type_template_id_1f098517_staticRenderFns = []
45381
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/datepicker/base/year-table.vue?vue&type=template&id=4e42f730&
45382
+ var year_tablevue_type_template_id_4e42f730_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:(_vm.prefixCls + "-year-table-box")},[_c('table',{class:(_vm.prefixCls + "-table " + _vm.prefixCls + "-year-table"),on:{"click":_vm.handleYearTableClick}},[_c('tbody',[_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 0)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 1)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 1))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 2)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 2))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 3)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 3))])])])]),_vm._v(" "),_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 4)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 4))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 5)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 5))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 6)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 6))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 7)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 7))])])])]),_vm._v(" "),_c('tr',[_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 8)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 8))])])]),_vm._v(" "),_c('td',{staticClass:"available year-td",class:_vm.getCellStyle(_vm.startYear + 9)},[_c('div',[_c('a',{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear + 9))])])]),_vm._v(" "),_c('td'),_vm._v(" "),_c('td')])])])])}
45383
+ var year_tablevue_type_template_id_4e42f730_staticRenderFns = []
45413
45384
 
45414
45385
 
45415
- // CONCATENATED MODULE: ./components/datepicker/base/year-table.vue?vue&type=template&id=1f098517&
45386
+ // CONCATENATED MODULE: ./components/datepicker/base/year-table.vue?vue&type=template&id=4e42f730&
45416
45387
 
45417
45388
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory=true!./node_modules/vue-loader/lib??vue-loader-options!./components/datepicker/base/year-table.vue?vue&type=script&lang=js&
45418
45389
  //
@@ -45535,8 +45506,10 @@ var year_tablevue_type_script_lang_js_datesInYear = function datesInYear(year) {
45535
45506
  },
45536
45507
  handleYearTableClick: function handleYearTableClick(event) {
45537
45508
  var target = event.target;
45509
+
45538
45510
  if (target.tagName === 'A') {
45539
- if (hasClass(target.parentNode, 'disabled')) return;
45511
+ target = target.parentNode.parentNode;
45512
+ if (hasClass(target, 'disabled')) return;
45540
45513
  var year = target.textContent || target.innerText;
45541
45514
  this.$emit('pick', Number(year));
45542
45515
  }
@@ -45555,8 +45528,8 @@ var year_tablevue_type_script_lang_js_datesInYear = function datesInYear(year) {
45555
45528
 
45556
45529
  var year_table_component = normalizeComponent(
45557
45530
  base_year_tablevue_type_script_lang_js_,
45558
- year_tablevue_type_template_id_1f098517_render,
45559
- year_tablevue_type_template_id_1f098517_staticRenderFns,
45531
+ year_tablevue_type_template_id_4e42f730_render,
45532
+ year_tablevue_type_template_id_4e42f730_staticRenderFns,
45560
45533
  false,
45561
45534
  null,
45562
45535
  null,
@@ -66645,12 +66618,12 @@ var loaders = __webpack_require__(465);
66645
66618
 
66646
66619
 
66647
66620
 
66648
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/drawer/drawer.vue?vue&type=template&id=74590296&
66649
- var drawervue_type_template_id_74590296_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visibility),expression:"visibility"}],ref:"root",class:_vm.contentClasses},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.mask),expression:"mask"}],class:_vm.prefixClsMask,on:{"click":function (e) { return _vm.onMaskClick(e); }}}),_vm._v(" "),_c('div',{class:_vm.prefixClsWrap,attrs:{"role":"document"},on:{"click":function (e) { return _vm.onMaskClick(e); }}},[_c('div',{class:[_vm.prefixCls, _vm.prefixCls + '-' + _vm.position],style:(_vm.isHorizontal ? ("width: " + _vm.size) : ("height: " + _vm.size))},[(_vm.loading)?_c('div',{class:_vm.prefixCls + '-loading',on:{"click":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:"ball-spin-fade-loader"})]):_vm._e(),_vm._v(" "),_c('div',{class:_vm.prefixClsHeader},[_c('div',{class:_vm.prefixClsTitle},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2),_vm._v(" "),_c('mds-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.showClose),expression:"showClose"}],class:_vm.prefixClsClose,attrs:{"type":"line-close"},nativeOn:{"click":function($event){return _vm.handleClose($event)}}})],1),_vm._v(" "),_c('div',{class:_vm.prefixClsBody},[_vm._t("default")],2),_vm._v(" "),(_vm.$slots.footer)?_c('div',{staticClass:"mds-drawer-footer"},[_vm._t("footer")],2):_vm._e()])])])}
66650
- var drawervue_type_template_id_74590296_staticRenderFns = []
66621
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/drawer/drawer.vue?vue&type=template&id=6461c5ad&
66622
+ var drawervue_type_template_id_6461c5ad_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visibility),expression:"visibility"}],ref:"root",class:_vm.contentClasses},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.mask),expression:"mask"}],class:_vm.prefixClsMask,on:{"click":function (e) { return _vm.onMaskClick(e); }}}),_vm._v(" "),_c('div',{class:_vm.prefixClsWrap,attrs:{"role":"document"},on:{"click":function (e) { return _vm.onMaskClick(e); }}},[_c('div',{class:[_vm.prefixCls, _vm.prefixCls + '-' + _vm.position],style:(_vm.isHorizontal ? ("width: " + _vm.size) : ("height: " + _vm.size))},[(_vm.loading)?_c('div',{class:_vm.prefixCls + '-loading',on:{"click":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:"ball-spin-fade-loader"})]):_vm._e(),_vm._v(" "),_c('div',{class:_vm.prefixClsHeader},[_c('div',{class:_vm.prefixClsTitle},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2),_vm._v(" "),_c('mds-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.showClose),expression:"showClose"}],class:_vm.prefixClsClose,attrs:{"type":"line-close"},nativeOn:{"click":function($event){return _vm.handleClose($event)}}})],1),_vm._v(" "),_c('div',{class:_vm.prefixClsBody},[_vm._t("default")],2),_vm._v(" "),(_vm.$slots.footer)?_c('div',{staticClass:"mds-drawer-footer"},[_vm._t("footer")],2):_vm._e()])])])}
66623
+ var drawervue_type_template_id_6461c5ad_staticRenderFns = []
66651
66624
 
66652
66625
 
66653
- // CONCATENATED MODULE: ./components/drawer/drawer.vue?vue&type=template&id=74590296&
66626
+ // CONCATENATED MODULE: ./components/drawer/drawer.vue?vue&type=template&id=6461c5ad&
66654
66627
 
66655
66628
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib?cacheDirectory=true!./node_modules/vue-loader/lib??vue-loader-options!./components/drawer/drawer.vue?vue&type=script&lang=js&
66656
66629
  //
@@ -66780,7 +66753,7 @@ var drawervue_type_script_lang_js_PREFIXCLS = 'mds-drawer';
66780
66753
  visibility: function visibility(val) {
66781
66754
  var _this = this;
66782
66755
 
66783
- if (val) {
66756
+ if (val && this.closed === true) {
66784
66757
  this.closed = false;
66785
66758
  this.$emit('open');
66786
66759
  if (this.appendToBody) {
@@ -66791,8 +66764,10 @@ var drawervue_type_script_lang_js_PREFIXCLS = 'mds-drawer';
66791
66764
  if (this.preFocus) {
66792
66765
  this.prevActiveElement = document.activeElement;
66793
66766
  }
66794
- } else {
66795
- if (!this.closed) this.$emit('close');
66767
+ } else if (!val) {
66768
+ if (!this.closed) {
66769
+ this.handleClose();
66770
+ }
66796
66771
  this.move();
66797
66772
  if (this.prevActiveElement) {
66798
66773
  this.$nextTick(function () {
@@ -66813,9 +66788,11 @@ var drawervue_type_script_lang_js_PREFIXCLS = 'mds-drawer';
66813
66788
  methods: {
66814
66789
  hide: function hide(cancel) {
66815
66790
  if (cancel !== false) {
66816
- this.$emit('update:visibility', false);
66791
+ this.visibility && this.$emit('update:visibility', false);
66817
66792
  this.$emit('close');
66818
66793
  this.closed = true;
66794
+ } else {
66795
+ this.$emit('update:visibility', true);
66819
66796
  }
66820
66797
  },
66821
66798
  handleClose: function handleClose() {
@@ -66875,8 +66852,8 @@ var drawervue_type_script_lang_js_PREFIXCLS = 'mds-drawer';
66875
66852
 
66876
66853
  var drawer_component = normalizeComponent(
66877
66854
  drawer_drawervue_type_script_lang_js_,
66878
- drawervue_type_template_id_74590296_render,
66879
- drawervue_type_template_id_74590296_staticRenderFns,
66855
+ drawervue_type_template_id_6461c5ad_render,
66856
+ drawervue_type_template_id_6461c5ad_staticRenderFns,
66880
66857
  false,
66881
66858
  null,
66882
66859
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdsfe/mds-ui",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "A set of enterprise-class Vue UI components.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {