@opentiny/vue-renderless 3.1.0-alpha.0 → 3.4.7

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.
Files changed (177) hide show
  1. package/action-menu/index.js +10 -0
  2. package/action-menu/vue.js +26 -0
  3. package/amount/index.js +334 -0
  4. package/amount/vue.js +206 -0
  5. package/area/index.js +162 -0
  6. package/area/vue.js +68 -0
  7. package/autonavi-map/index.js +28 -0
  8. package/avatar/index.js +5 -1
  9. package/avatar/vue.js +2 -1
  10. package/baidu-map/index.js +28 -0
  11. package/breadcrumb/index.js +9 -0
  12. package/breadcrumb/vue.js +25 -3
  13. package/breadcrumb-item/index.js +26 -0
  14. package/breadcrumb-item/vue.js +20 -11
  15. package/bulletin-board/index.js +4 -1
  16. package/button-group/vue.js +1 -1
  17. package/calendar/index.js +14 -14
  18. package/card-template/index.js +1 -1
  19. package/cascader/index.js +21 -7
  20. package/cascader/vue.js +1 -2
  21. package/cascader-node/index.js +3 -1
  22. package/cascader-panel/index.js +12 -4
  23. package/cascader-panel/vue.js +1 -2
  24. package/chart-bar/index.js +533 -0
  25. package/chart-boxplot/index.js +270 -0
  26. package/chart-candle/index.js +428 -0
  27. package/chart-core/deps/constants.js +65 -0
  28. package/chart-core/deps/numerify.js +286 -0
  29. package/chart-core/deps/utils.js +205 -0
  30. package/chart-core/index.js +541 -0
  31. package/chart-core/modules/animation.js +10 -0
  32. package/chart-core/modules/extend.js +36 -0
  33. package/chart-core/modules/mark.js +7 -0
  34. package/chart-core/vue.js +128 -0
  35. package/chart-funnel/index.js +155 -0
  36. package/chart-gauge/index.js +153 -0
  37. package/chart-graph/index.js +38 -0
  38. package/chart-heatmap/index.js +407 -0
  39. package/chart-line/index.js +358 -0
  40. package/chart-liquidfill/index.js +119 -0
  41. package/chart-map/index.js +261 -0
  42. package/chart-pie/index.js +327 -0
  43. package/chart-radar/index.js +181 -0
  44. package/chart-sankey/index.js +166 -0
  45. package/chart-scatter/index.js +360 -0
  46. package/chart-sunburst/index.js +36 -0
  47. package/chart-tree/index.js +107 -0
  48. package/chart-waterfall/index.js +231 -0
  49. package/chart-wordcloud/index.js +109 -0
  50. package/checkbox/index.js +4 -4
  51. package/checkbox-button/index.js +3 -1
  52. package/common/bigInt.js +5 -2
  53. package/common/date.js +17 -17
  54. package/common/deps/date-util.js +15 -5
  55. package/common/deps/date.js +6 -6
  56. package/common/deps/dom.js +18 -6
  57. package/common/deps/eSpaceCtrl.js +286 -0
  58. package/common/deps/fullscreen/apis.js +22 -22
  59. package/common/deps/memorize.js +3 -3
  60. package/common/deps/modal-queue.js +2 -0
  61. package/common/deps/popper.js +12 -10
  62. package/common/deps/popup-manager.js +16 -5
  63. package/common/deps/resize-event.js +6 -2
  64. package/common/deps/scrollbar-width.js +6 -2
  65. package/common/deps/tree-model/node.js +30 -10
  66. package/common/deps/tree-model/tree-store.js +33 -21
  67. package/common/deps/tree-model/util.js +6 -2
  68. package/common/deps/upload-ajax.js +7 -1
  69. package/common/deps/vue-popper.js +2 -2
  70. package/common/string.js +1 -1
  71. package/company/index.js +56 -0
  72. package/company/vue.js +35 -0
  73. package/country/index.js +54 -0
  74. package/country/vue.js +35 -0
  75. package/credit-card-form/index.js +1 -0
  76. package/currency/index.js +78 -0
  77. package/currency/vue.js +39 -0
  78. package/date-panel/index.js +16 -6
  79. package/date-picker/index.js +9 -5
  80. package/date-range/index.js +28 -9
  81. package/date-table/index.js +3 -1
  82. package/dept/index.js +318 -0
  83. package/dept/vue.js +163 -0
  84. package/detail-page/index.js +4 -1
  85. package/dialog-box/index.js +14 -4
  86. package/dialog-box/vue.js +7 -3
  87. package/drop-roles/index.js +73 -0
  88. package/drop-roles/vue.js +38 -0
  89. package/dropdown/index.js +5 -4
  90. package/dropdown/vue.js +5 -3
  91. package/dropdown-item/index.js +15 -0
  92. package/dropdown-item/vue.js +27 -13
  93. package/espace/index.js +129 -0
  94. package/espace/vue.js +52 -0
  95. package/file-upload/index.js +336 -291
  96. package/form/index.js +3 -1
  97. package/form/vue.js +15 -0
  98. package/form-item/index.js +15 -5
  99. package/fullscreen/index.js +4 -4
  100. package/fullscreen/vue.js +3 -3
  101. package/grid/core/interceptor.js +4 -7
  102. package/grid/plugins/export.js +2 -2
  103. package/grid/plugins/exportExcel.js +28 -10
  104. package/grid/static/array/findTree.js +1 -1
  105. package/grid/static/base/helperCreateGetObjects.js +1 -1
  106. package/grid/static/base/helperEqualCompare.js +2 -2
  107. package/grid/static/base/helperGetHGSKeys.js +1 -1
  108. package/grid/static/base/uniqueId.js +1 -1
  109. package/grid/static/object/assign.js +3 -3
  110. package/grid/static/string/toString.js +3 -3
  111. package/hrapprover/index.js +118 -0
  112. package/hrapprover/vue.js +102 -0
  113. package/locales/index.js +116 -0
  114. package/locales/vue.js +46 -0
  115. package/logon-user/index.js +23 -0
  116. package/logon-user/vue.js +22 -0
  117. package/logout/index.js +118 -0
  118. package/logout/vue.js +22 -0
  119. package/milestone/index.js +2 -1
  120. package/mini-picker/index.js +1 -1
  121. package/mini-picker/vue.js +1 -1
  122. package/modal/index.js +4 -2
  123. package/month-table/index.js +2 -2
  124. package/nav-menu/index.js +2 -2
  125. package/numeric/index.js +4 -2
  126. package/package.json +33 -136
  127. package/pager-item/vue.js +6 -2
  128. package/picker/index.js +43 -17
  129. package/picker/timezone.js +2 -2
  130. package/picker-column/index.js +7 -3
  131. package/pop-upload/index.js +5 -3
  132. package/popeditor/index.js +15 -7
  133. package/popover/index.js +87 -54
  134. package/popover/vue.js +13 -9
  135. package/rate/index.js +2 -2
  136. package/rich-text/clipboard.js +77 -0
  137. package/rich-text/index.js +176 -0
  138. package/rich-text/module/file-upload.js +118 -0
  139. package/rich-text/module/image-drop.js +54 -0
  140. package/rich-text/module/image-upload.js +84 -0
  141. package/rich-text/options.js +187 -0
  142. package/rich-text/table-module.js +557 -0
  143. package/rich-text/vue.js +149 -0
  144. package/roles/index.js +87 -0
  145. package/roles/vue.js +39 -0
  146. package/search/index.js +32 -27
  147. package/search/vue.js +7 -2
  148. package/select/index.js +328 -304
  149. package/select/vue.js +19 -9
  150. package/select-dropdown/index.js +1 -1
  151. package/slider/index.js +9 -11
  152. package/slider/vue.js +3 -3
  153. package/split/vue.js +1 -1
  154. package/tab-nav/index.js +0 -6
  155. package/tab-nav/vue.js +0 -14
  156. package/table/index.js +1 -1
  157. package/text-popup/index.js +6 -4
  158. package/time/index.js +3 -1
  159. package/time-range/index.js +6 -2
  160. package/time-spinner/index.js +15 -5
  161. package/toggle-menu/index.js +11 -0
  162. package/toggle-menu/vue.js +2 -1
  163. package/tooltip/index.js +46 -35
  164. package/tooltip/vue.js +5 -1
  165. package/tree/index.js +57 -21
  166. package/tree-menu/index.js +3 -1
  167. package/tree-node/index.js +7 -3
  168. package/upload/index.js +14 -5
  169. package/user/index.js +634 -0
  170. package/user/vue.js +113 -0
  171. package/user-account/index.js +23 -0
  172. package/user-account/vue.js +25 -0
  173. package/user-contact/index.js +1 -4
  174. package/user-head/index.js +9 -11
  175. package/user-head/vue.js +2 -6
  176. package/user-link/index.js +43 -0
  177. package/user-link/vue.js +60 -0
package/select/vue.js CHANGED
@@ -2,17 +2,18 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- import { debouncRquest, nodeCollapse, nodeExpand, getChildValue, nodeCheckClick, treeNodeClick, getTreeData, radioChange, getcheckedData, selectChange, calcOverFlow, toggleCheckAll, handleCopyClick, showTip, handleComposition, handleQueryChange, scrollToOption, handleMenuEnter, emitChange, getOption, setSelected, handleFocus, focus, blur, handleBlur, handleClearClick, doDestroy, handleClose, toggleLastOptionHitState, deletePrevTag, managePlaceholder, resetInputState, resetInputHeight, resetHoverIndex, handleOptionSelect, setSoftFocus, getValueIndex, toggleMenu, selectOption, deleteSelected, deleteTag, onInputChange, onOptionDestroy, resetInputWidth, handleResize, checkDefaultFirstOption, getValueKey, emptyText, watchValue, watchVisible, watchOptions, navigateOptions, getPluginOption, watchPropsOption, buildSelectConfig, buildRadioConfig, onMouseenterNative, onMouseleaveNative, onCopying, gridOnQueryChange, defaultOnQueryChange, toVisible, toHide, mounted, unMount, watchHoverIndex, computeOptimizeOpts, watchOptimizeOpts, getScrollListener, computeCollapseTags, computeMultipleLimit } from './index';
5
+ import { debouncRquest, nodeCollapse, nodeExpand, getChildValue, nodeCheckClick, treeNodeClick, getTreeData, radioChange, getcheckedData, selectChange, calcOverFlow, toggleCheckAll, handleCopyClick, showTip, handleComposition, handleQueryChange, scrollToOption, handleMenuEnter, emitChange, getOption, setSelected, handleFocus, focus, blur, handleBlur, handleClearClick, doDestroy, handleClose, toggleLastOptionHitState, deletePrevTag, managePlaceholder, resetInputState, resetInputHeight, resetHoverIndex, handleOptionSelect, setSoftFocus, getValueIndex, toggleMenu, selectOption, deleteSelected, deleteTag, onInputChange, onOptionDestroy, resetInputWidth, handleResize, checkDefaultFirstOption, getValueKey, emptyText, watchValue, watchVisible, watchOptions, navigateOptions, getPluginOption, watchPropsOption, buildSelectConfig, buildRadioConfig, onMouseenterNative, onMouseleaveNative, onCopying, gridOnQueryChange, defaultOnQueryChange, toVisible, toHide, mounted, unMount, watchHoverIndex, computeOptimizeOpts, watchOptimizeOpts, getScrollListener, computeCollapseTags, computeMultipleLimit, resetFilter } from './index';
6
6
  import { BROWSER_NAME } from '@opentiny/vue-renderless/common';
7
7
  import browserInfo from '@opentiny/vue-renderless/common/browser';
8
8
  import debounce from '@opentiny/vue-renderless/common/deps/debounce';
9
9
  import { isNumber, isNull } from '@opentiny/vue-renderless/common/type';
10
- export var api = ['state', 'nodeCollapse', 'nodeExpand', 'toggleCheckAll', 'handleCopyClick', 'focus', 'blur', 'showTip', 'doDestroy', 'getOption', 'emitChange', 'handleBlur', 'toggleMenu', 'getValueKey', 'handleFocus', 'handleClose', 'setSoftFocus', 'getValueIndex', 'scrollToOption', 'resetHoverIndex', 'onOptionDestroy', 'resetInputWidth', 'resetInputHeight', 'managePlaceholder', 'checkDefaultFirstOption', 'toggleLastOptionHitState', 'deleteTag', 'setSelected', 'selectOption', 'handleResize', 'deletePrevTag', 'onInputChange', 'deleteSelected', 'handleMenuEnter', 'resetInputState', 'handleClearClick', 'handleComposition', 'handleQueryChange', 'handleOptionSelect', 'debouncedOnInputChange', 'debouncedQueryChange', 'navigateOptions', 'selectChange', 'radioChange', 'treeNodeClick', 'nodeCheckClick', 'buildSelectConfig', 'buildRadioConfig', 'onMouseenterNative', 'onMouseleaveNative', 'onCopying'];
10
+ export var api = ['state', 'nodeCollapse', 'nodeExpand', 'toggleCheckAll', 'handleCopyClick', 'focus', 'blur', 'showTip', 'doDestroy', 'getOption', 'emitChange', 'handleBlur', 'toggleMenu', 'getValueKey', 'handleFocus', 'handleClose', 'setSoftFocus', 'getValueIndex', 'scrollToOption', 'resetHoverIndex', 'onOptionDestroy', 'resetInputWidth', 'resetInputHeight', 'managePlaceholder', 'checkDefaultFirstOption', 'toggleLastOptionHitState', 'deleteTag', 'setSelected', 'selectOption', 'handleResize', 'deletePrevTag', 'onInputChange', 'deleteSelected', 'handleMenuEnter', 'resetInputState', 'handleClearClick', 'handleComposition', 'handleQueryChange', 'handleOptionSelect', 'debouncedOnInputChange', 'debouncedQueryChange', 'navigateOptions', 'selectChange', 'radioChange', 'treeNodeClick', 'nodeCheckClick', 'buildSelectConfig', 'buildRadioConfig', 'onMouseenterNative', 'onMouseleaveNative', 'onCopying', 'resetFilter'];
11
11
  var initStateAdd = function initStateAdd(_ref) {
12
12
  var computed = _ref.computed,
13
13
  props = _ref.props,
14
14
  api = _ref.api,
15
- parent = _ref.parent;
15
+ parent = _ref.parent,
16
+ emitter = _ref.emitter;
16
17
  return {
17
18
  selectedTags: [],
18
19
  tips: '',
@@ -29,12 +30,12 @@ var initStateAdd = function initStateAdd(_ref) {
29
30
  inputLength: 20,
30
31
  optionsCount: 0,
31
32
  selectFiexd: {},
32
- createdLabel: null,
33
33
  isSilentBlur: false,
34
34
  cachedOptions: [],
35
35
  selectedLabel: '',
36
36
  previousQuery: null,
37
37
  inputHovering: false,
38
+ createdLabel: null,
38
39
  createdSelected: false,
39
40
  isOnComposition: false,
40
41
  cachedPlaceHolder: props.placeholder,
@@ -47,6 +48,7 @@ var initStateAdd = function initStateAdd(_ref) {
47
48
  currentKey: props.modelValue,
48
49
  updateId: '',
49
50
  popperElm: null,
51
+ selectEmitter: emitter(),
50
52
  debounce: computed(function () {
51
53
  return isNumber(props.queryDebounce) ? props.queryDebounce : props.remote ? 300 : 0;
52
54
  }),
@@ -67,6 +69,9 @@ var initStateAdd = function initStateAdd(_ref) {
67
69
  }),
68
70
  searchSingleCopy: computed(function () {
69
71
  return props.allowCopy && !props.multiple && props.filterable;
72
+ }),
73
+ filterOrSearch: computed(function () {
74
+ return props.filterable || props.searchable;
70
75
  })
71
76
  };
72
77
  };
@@ -82,10 +87,10 @@ var initState = function initState(_ref2) {
82
87
  computed: computed,
83
88
  props: props,
84
89
  api: api,
85
- parent: parent
90
+ parent: parent,
91
+ emitter: emitter
86
92
  });
87
93
  var state = reactive(_objectSpread(_objectSpread({}, stateAdd), {}, {
88
- selectEmitter: emitter(),
89
94
  datas: [],
90
95
  query: '',
91
96
  options: [],
@@ -105,7 +110,7 @@ var initState = function initState(_ref2) {
105
110
  };
106
111
  }),
107
112
  readonly: computed(function () {
108
- return props.readonly || !props.filterable || props.multiple || browserInfo.name !== BROWSER_NAME.IE && browserInfo.name !== BROWSER_NAME.Edge && !state.visible;
113
+ return props.readonly || !props.filterable || props.searchable || props.multiple || browserInfo.name !== BROWSER_NAME.IE && browserInfo.name !== BROWSER_NAME.Edge && !state.visible;
109
114
  }),
110
115
  iconClass: computed(function () {
111
116
  return state.visible ? '' : constants.CLASS.IsReverse;
@@ -351,6 +356,10 @@ var addApi = function addApi(_ref3) {
351
356
  props: props,
352
357
  refs: refs,
353
358
  state: state
359
+ }),
360
+ resetFilter: resetFilter({
361
+ state: state,
362
+ api: api
354
363
  })
355
364
  });
356
365
  };
@@ -612,8 +621,9 @@ var initWatch = function initWatch(_ref6) {
612
621
  watch(function () {
613
622
  return state.visible;
614
623
  }, function (value) {
615
- if ((props.filterable || props.remote) && !value) {
616
- refs.reference.blur();
624
+ if ((state.filterOrSearch || props.remote) && !value) {
625
+ var _refs$reference;
626
+ (_refs$reference = refs.reference) === null || _refs$reference === void 0 ? void 0 : _refs$reference.blur();
617
627
  }
618
628
  api.watchVisible(value);
619
629
  });
@@ -10,7 +10,7 @@ export var mounted = function mounted(_ref) {
10
10
  selectEmitter.on(constants.EVENT_NAME.updatePopper, function (keepZIndex) {
11
11
  var hideDrop = false;
12
12
  if (!state.referenceElm || state.referenceElm.nodeType !== 1) {
13
- state.referenceElm = selectVm.$refs.reference && selectVm.$refs.reference.$el;
13
+ state.referenceElm = selectVm.$refs.reference ? selectVm.$refs.reference.$el : selectVm.$refs.select;
14
14
  selectVm.popperElm = selectVm.state.popperElm = state.popperElm = parent.$el;
15
15
  }
16
16
  if (parent.select.state.visible && !hideDrop) {
package/slider/index.js CHANGED
@@ -79,7 +79,7 @@ export var bindMouseDown = function bindMouseDown(_ref3) {
79
79
  }
80
80
  var handleEl = event.target;
81
81
  var isClickBar = hasClass(handleEl, constants.sliderCls(mode)) || hasClass(handleEl, constants.rangeCls(mode));
82
- var isClickBtn = hasClass(handleEl, constants.buttonCls(mode));
82
+ var isClickBtn = hasClass(handleEl, constants.buttonCls(mode)) || hasClass(handleEl, constants.leftSvgCls(mode)) || hasClass(handleEl, constants.rightSvgCls(mode));
83
83
  if (state.disabled || !isClickBtn && !isClickBar) {
84
84
  state.activeIndex = -1;
85
85
  return;
@@ -194,7 +194,7 @@ var getActiveButtonIndexFlag = function getActiveButtonIndexFlag(_ref8) {
194
194
  mode = _ref8.mode;
195
195
  var cls = constants.buttonCls(mode);
196
196
  var previousElementSibling = event.target.previousElementSibling;
197
- return state.isDouble && hasClass(previousElementSibling, cls);
197
+ return state.isDouble && (hasClass(previousElementSibling, cls) || event.target.className.baseVal === 'tiny-slider-right-svg');
198
198
  };
199
199
  export var getActiveButtonIndex = function getActiveButtonIndex(_ref9) {
200
200
  var constants = _ref9.constants,
@@ -223,7 +223,7 @@ var calcCurrentValue = function calcCurrentValue(_ref10) {
223
223
  var stepValue = (currentValue - props.min) % step;
224
224
  if (stepValue) {
225
225
  currentValue -= stepValue;
226
- currentValue += stepValue * 2 > step ? +step : 0;
226
+ currentValue += stepValue * 2 > step ? Number(step) : 0;
227
227
  }
228
228
  if (state.isDouble) {
229
229
  if (state.activeIndex === 0 && currentValue >= state.rightBtnValue) {
@@ -305,14 +305,17 @@ export var initSlider = function initSlider(_ref14) {
305
305
  sliders.length > 2 && (sliders.length = 2);
306
306
  sliders.forEach(function (item, index) {
307
307
  if (index === 0) {
308
- state.leftBtnValue = Math.max(+item, props.min);
308
+ state.leftBtnValue = Math.max(Number(item), props.min);
309
309
  } else {
310
- state.rightBtnValue = Math.min(+item, props.max);
310
+ state.rightBtnValue = Math.min(Number(item), props.max);
311
311
  state.rightBtnShow = true;
312
312
  }
313
- api.changeActiveValue(index === 0);
313
+ if (state.isInit) {
314
+ api.changeActiveValue(index === 0);
315
+ }
314
316
  api.setButtonStyle();
315
317
  });
318
+ state.isInit = false;
316
319
  api.setBarStyle();
317
320
  };
318
321
  };
@@ -372,11 +375,6 @@ export var customBeforeAppearHook = function customBeforeAppearHook(props) {
372
375
  }
373
376
  };
374
377
  };
375
- export var customAppearHook = function customAppearHook() {
376
- return function (el) {
377
- el.style.transition = 'all 0.5s';
378
- };
379
- };
380
378
  export var customAfterAppearHook = function customAfterAppearHook(_ref16) {
381
379
  var state = _ref16.state,
382
380
  props = _ref16.props;
package/slider/vue.js CHANGED
@@ -1,5 +1,5 @@
1
- import { bindKeyDown, bindMouseDown, bindMouseMove, bindMouseUp, bindEvent, unBindEvent, bindResize, setTipStyle, getActiveButtonIndex, setActiveButtonValue, setBarStyle, setButtonStyle, initSlider, calculateValue, changeActiveValue, formatTipValue, getActiveButtonValue, displayTip, hideTip, autoSlider, customBeforeAppearHook, customAppearHook, customAfterAppearHook, watchActiveValue, watchModelValue } from './index';
2
- export var api = ['state', 'bindKeyDown', 'bindMouseDown', 'bindMouseMove', 'bindMouseUp', 'bindEvent', 'unBindEvent', 'bindResize', 'setTipStyle', 'getActiveButtonIndex', 'setActiveButtonValue', 'setBarStyle', 'setButtonStyle', 'initSlider', 'calculateValue', 'changeActiveValue', 'formatTipValue', 'getActiveButtonValue', 'displayTip', 'hideTip', 'autoSlider', 'customBeforeAppearHook', 'customAppearHook', 'customAfterAppearHook'];
1
+ import { bindKeyDown, bindMouseDown, bindMouseMove, bindMouseUp, bindEvent, unBindEvent, bindResize, setTipStyle, getActiveButtonIndex, setActiveButtonValue, setBarStyle, setButtonStyle, initSlider, calculateValue, changeActiveValue, formatTipValue, getActiveButtonValue, displayTip, hideTip, autoSlider, customBeforeAppearHook, customAfterAppearHook, watchActiveValue, watchModelValue } from './index';
2
+ export var api = ['state', 'bindKeyDown', 'bindMouseDown', 'bindMouseMove', 'bindMouseUp', 'bindEvent', 'unBindEvent', 'bindResize', 'setTipStyle', 'getActiveButtonIndex', 'setActiveButtonValue', 'setBarStyle', 'setButtonStyle', 'initSlider', 'calculateValue', 'changeActiveValue', 'formatTipValue', 'getActiveButtonValue', 'displayTip', 'hideTip', 'autoSlider', 'customBeforeAppearHook', 'customAfterAppearHook'];
3
3
  var initState = function initState(_ref) {
4
4
  var reactive = _ref.reactive,
5
5
  computed = _ref.computed,
@@ -10,6 +10,7 @@ var initState = function initState(_ref) {
10
10
  tipStyle: {},
11
11
  barStyle: {},
12
12
  moveStyle: [],
13
+ isInit: true,
13
14
  isDrag: false,
14
15
  sliderSize: 0,
15
16
  showTip: false,
@@ -103,7 +104,6 @@ export var renderless = function renderless(props, _ref2, _ref3) {
103
104
  props: props
104
105
  }),
105
106
  customBeforeAppearHook: customBeforeAppearHook(props),
106
- customAppearHook: customAppearHook(),
107
107
  bindEvent: bindEvent(api),
108
108
  autoSlider: autoSlider(api),
109
109
  unBindEvent: unBindEvent(api),
package/split/vue.js CHANGED
@@ -85,7 +85,7 @@ export var renderless = function renderless(props, hooks, _ref2) {
85
85
  return api.getComputedThresholdValue('rightBottomMin');
86
86
  }),
87
87
  wrapperClasses: computed(function () {
88
- return ["".concat(state.prefix, "-wrapper"), state.isMoving ? 'no-select' : ''];
88
+ return [state.prefix, "".concat(state.prefix, "-wrapper"), state.isMoving ? 'no-select' : ''];
89
89
  }),
90
90
  paneClasses: computed(function () {
91
91
  return ["".concat(state.prefix, "-pane"), _defineProperty({}, "".concat(state.prefix, "-pane-moving"), state.isMoving)];
package/tab-nav/index.js CHANGED
@@ -78,12 +78,6 @@ export var updated = function updated(_ref2) {
78
78
  }
79
79
  }
80
80
  state.isActive && api.scrollIntoView();
81
- if (refs.tabBar) {
82
- refs.tabBar.state.barStyle = refs.tabBar.computedBarStyle(refs.tabBar, state);
83
- } else {
84
- var line = refs.nav.querySelector('tiny-mobile-tabs__line');
85
- line && line.style && (line.style.transform = api.computedNavStyle().transform);
86
- }
87
81
  };
88
82
  };
89
83
  export var mounted = function mounted(_ref3) {
package/tab-nav/vue.js CHANGED
@@ -2,7 +2,6 @@ import { computedNavStyle, computedSizeName, updated, visibilityChangeHandler, w
2
2
  export var api = ['state', 'setFocus', 'removeFocus', 'scrollPrev', 'scrollNext', 'changeTab', 'scrollToActiveTab', 'scrollIntoView', 'moreTabShow', 'swiperHandle'];
3
3
  export var renderless = function renderless(props, _ref, _ref2) {
4
4
  var computed = _ref.computed,
5
- watch = _ref.watch,
6
5
  inject = _ref.inject,
7
6
  onBeforeUnmount = _ref.onBeforeUnmount,
8
7
  onMounted = _ref.onMounted,
@@ -10,7 +9,6 @@ export var renderless = function renderless(props, _ref, _ref2) {
10
9
  reactive = _ref.reactive;
11
10
  var parent = _ref2.parent,
12
11
  refs = _ref2.refs,
13
- nextTick = _ref2.nextTick,
14
12
  tinyMode = _ref2.mode;
15
13
  var api = {
16
14
  mounted: mounted,
@@ -66,18 +64,6 @@ export var renderless = function renderless(props, _ref, _ref2) {
66
64
  state: state
67
65
  })
68
66
  });
69
- watch(function () {
70
- return props.currentName;
71
- }, function () {
72
- nextTick(function () {
73
- var tabBarVnode = refs.tabBar;
74
- if (tabBarVnode) {
75
- tabBarVnode.state.barStyle = tabBarVnode.computedBarStyle(tabBarVnode, state);
76
- }
77
- });
78
- }, {
79
- immediate: true
80
- });
81
67
  Object.assign(api, {
82
68
  updated: updated({
83
69
  api: api,
package/table/index.js CHANGED
@@ -2,7 +2,7 @@ export var computedCheckableData = function computedCheckableData(_ref) {
2
2
  var props = _ref.props;
3
3
  return function () {
4
4
  return props.data.filter(function (item) {
5
- return !item['disabled'];
5
+ return !item.disabled;
6
6
  });
7
7
  };
8
8
  };
@@ -1,7 +1,7 @@
1
1
  export var computedWidth = function computedWidth(_ref) {
2
2
  var props = _ref.props;
3
3
  return function () {
4
- if (typeof props.width === 'number' || !Number.isNaN(+props.width)) {
4
+ if (typeof props.width === 'number' || !Number.isNaN(Number(props.width))) {
5
5
  return props.width + 'px';
6
6
  }
7
7
  return props.width;
@@ -25,8 +25,8 @@ export var mounted = function mounted(_ref3) {
25
25
  refs = _ref3.refs,
26
26
  state = _ref3.state;
27
27
  return function () {
28
- state.text = refs['text'];
29
- state.popup = refs['popup'];
28
+ state.text = refs.text;
29
+ state.popup = refs.popup;
30
30
  state.text.value = props.modelValue.toString();
31
31
  };
32
32
  };
@@ -70,6 +70,8 @@ export var separteText = function separteText(str, separtor) {
70
70
  return str.replace(/\n/g, separtor);
71
71
  };
72
72
  export var jointText = function jointText(str, separtor) {
73
- if (separtor === ']') separtor = '\\' + separtor;
73
+ if (separtor === ']') {
74
+ separtor = '\\' + separtor;
75
+ }
74
76
  return str.replace(new RegExp("[".concat(separtor, "]"), 'g'), '\n');
75
77
  };
package/time/index.js CHANGED
@@ -68,7 +68,9 @@ export var handleConfirm = function handleConfirm(_ref6) {
68
68
  return function () {
69
69
  var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
70
70
  var first = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
71
- if (first) return;
71
+ if (first) {
72
+ return;
73
+ }
72
74
  var date = clearMilliseconds(limitTimeRange(state.date, state.selectableRange, state.format));
73
75
  emit('pick', date, visible, first);
74
76
  };
@@ -18,8 +18,12 @@ export var advanceTime = function advanceTime(api) {
18
18
  };
19
19
  export var compuAmPmMode = function compuAmPmMode(state) {
20
20
  return function () {
21
- if ((state.format || '').indexOf('A') !== -1) return 'A';
22
- if ((state.format || '').indexOf('a') !== -1) return 'a';
21
+ if ((state.format || '').indexOf('A') !== -1) {
22
+ return 'A';
23
+ }
24
+ if ((state.format || '').indexOf('a') !== -1) {
25
+ return 'a';
26
+ }
23
27
  return '';
24
28
  };
25
29
  };
@@ -33,7 +33,9 @@ export var modifyDateField = function modifyDateField(_ref) {
33
33
  props = _ref.props,
34
34
  state = _ref.state;
35
35
  return function (type, value) {
36
- if (state[type] === value) return;
36
+ if (state[type] === value) {
37
+ return;
38
+ }
37
39
  switch (type) {
38
40
  case 'hours':
39
41
  emit('change', modifyTime(props.date, value, state.minutes, state.seconds));
@@ -117,7 +119,9 @@ export var adjustSpinner = function adjustSpinner(_ref8) {
117
119
  props = _ref8.props,
118
120
  refs = _ref8.refs;
119
121
  return function (type, value) {
120
- if (props.arrowControl) return;
122
+ if (props.arrowControl) {
123
+ return;
124
+ }
121
125
  var el = refs[type].$refs.wrap;
122
126
  if (el) {
123
127
  el.scrollTop = Math.max(0, value * api.typeItemHeight(type));
@@ -144,7 +148,9 @@ export var scrollDown = function scrollDown(_ref9) {
144
148
  total--;
145
149
  }
146
150
  }
147
- if (hoursArr[now]) return;
151
+ if (hoursArr[now]) {
152
+ return;
153
+ }
148
154
  } else {
149
155
  now = (now + step + 60) % 60;
150
156
  }
@@ -155,10 +161,14 @@ export var scrollDown = function scrollDown(_ref9) {
155
161
  export var amPm = function amPm(props) {
156
162
  return function (hour) {
157
163
  var shouldShowAmPm = props.amPmMode.toLowerCase() === 'a';
158
- if (!shouldShowAmPm) return '';
164
+ if (!shouldShowAmPm) {
165
+ return '';
166
+ }
159
167
  var isCapital = props.amPmMode === 'A';
160
168
  var content = hour < 12 ? ' am' : ' pm';
161
- if (isCapital) content = content.toUpperCase();
169
+ if (isCapital) {
170
+ content = content.toUpperCase();
171
+ }
162
172
  return content;
163
173
  };
164
174
  };
@@ -1,4 +1,5 @@
1
1
  import { xss } from '@opentiny/vue-renderless/common/xss.js';
2
+ import { isObject } from '@opentiny/vue-renderless/common/type';
2
3
  export var filterNode = function filterNode(props) {
3
4
  return function (value, data) {
4
5
  var node = data[props.props.label || 'label'] || '';
@@ -42,6 +43,16 @@ export var initData = function initData(_ref2) {
42
43
  newData: [],
43
44
  menuData: menuData
44
45
  });
46
+ } else if (typeof service.getMenuDataAsync === 'function') {
47
+ var asyncMenuData = service.getMenuDataAsync();
48
+ if (isObject(asyncMenuData) && asyncMenuData.then) {
49
+ asyncMenuData.then(function (data) {
50
+ state.datas = api.setMenuKey({
51
+ newData: [],
52
+ menuData: data
53
+ });
54
+ });
55
+ }
45
56
  }
46
57
  };
47
58
  };
@@ -26,7 +26,8 @@ export var renderless = function renderless(props, _ref, _ref2) {
26
26
  base: {}
27
27
  };
28
28
  service = {
29
- getMenuDataSync: props.getMenuDataSync || service.base.getMenuDataSync
29
+ getMenuDataSync: props.getMenuDataSync || service.base.getMenuDataSync,
30
+ getMenuDataAsync: props.getMenuDataAsync
30
31
  };
31
32
  Object.assign(api, {
32
33
  state: state,
package/tooltip/index.js CHANGED
@@ -1,7 +1,18 @@
1
1
  import debounce from '@opentiny/vue-renderless/common/deps/debounce';
2
2
  import { on, off, addClass, removeClass } from '@opentiny/vue-renderless/common/deps/dom';
3
- export var show = function show(api) {
3
+ export var show = function show(_ref) {
4
+ var api = _ref.api,
5
+ state = _ref.state,
6
+ props = _ref.props;
4
7
  return function () {
8
+ if (props.visible === 'auto') {
9
+ var _state$referenceElm = state.referenceElm,
10
+ clientWidth = _state$referenceElm.clientWidth,
11
+ scrollWidth = _state$referenceElm.scrollWidth;
12
+ if (scrollWidth <= clientWidth) {
13
+ return;
14
+ }
15
+ }
5
16
  api.setExpectedState(true);
6
17
  api.handleShowPopper();
7
18
  };
@@ -12,17 +23,17 @@ export var hide = function hide(api) {
12
23
  api.debounceClose();
13
24
  };
14
25
  };
15
- export var handleFocus = function handleFocus(_ref) {
16
- var api = _ref.api,
17
- state = _ref.state;
26
+ export var handleFocus = function handleFocus(_ref2) {
27
+ var api = _ref2.api,
28
+ state = _ref2.state;
18
29
  return function () {
19
30
  state.focusing = true;
20
31
  api.show();
21
32
  };
22
33
  };
23
- export var handleBlur = function handleBlur(_ref2) {
24
- var api = _ref2.api,
25
- state = _ref2.state;
34
+ export var handleBlur = function handleBlur(_ref3) {
35
+ var api = _ref3.api,
36
+ state = _ref3.state;
26
37
  return function () {
27
38
  state.focusing = false;
28
39
  api.hide();
@@ -33,9 +44,9 @@ export var removeFocusing = function removeFocusing(state) {
33
44
  state.focusing = false;
34
45
  };
35
46
  };
36
- export var handleShowPopper = function handleShowPopper(_ref3) {
37
- var props = _ref3.props,
38
- state = _ref3.state;
47
+ export var handleShowPopper = function handleShowPopper(_ref4) {
48
+ var props = _ref4.props,
49
+ state = _ref4.state;
39
50
  return function () {
40
51
  if (!state.expectedState || props.manual) {
41
52
  return;
@@ -51,10 +62,10 @@ export var handleShowPopper = function handleShowPopper(_ref3) {
51
62
  }
52
63
  };
53
64
  };
54
- export var handleClosePopper = function handleClosePopper(_ref4) {
55
- var api = _ref4.api,
56
- props = _ref4.props,
57
- state = _ref4.state;
65
+ export var handleClosePopper = function handleClosePopper(_ref5) {
66
+ var api = _ref5.api,
67
+ props = _ref5.props,
68
+ state = _ref5.state;
58
69
  return function () {
59
70
  if (props.enterable && state.expectedState || props.manual) {
60
71
  return;
@@ -69,9 +80,9 @@ export var handleClosePopper = function handleClosePopper(_ref4) {
69
80
  }
70
81
  };
71
82
  };
72
- export var setExpectedState = function setExpectedState(_ref5) {
73
- var api = _ref5.api,
74
- state = _ref5.state;
83
+ export var setExpectedState = function setExpectedState(_ref6) {
84
+ var api = _ref6.api,
85
+ state = _ref6.state;
75
86
  return function (value) {
76
87
  if (state.expectedState === false) {
77
88
  clearTimeout(api.timeoutPending);
@@ -79,9 +90,9 @@ export var setExpectedState = function setExpectedState(_ref5) {
79
90
  state.expectedState = value;
80
91
  };
81
92
  };
82
- export var destroyed = function destroyed(_ref6) {
83
- var state = _ref6.state,
84
- api = _ref6.api;
93
+ export var destroyed = function destroyed(_ref7) {
94
+ var state = _ref7.state,
95
+ api = _ref7.api;
85
96
  return function () {
86
97
  var reference = state.referenceElm;
87
98
  state.showPopper = false;
@@ -94,9 +105,9 @@ export var destroyed = function destroyed(_ref6) {
94
105
  }
95
106
  };
96
107
  };
97
- export var debounceClose = function debounceClose(_ref7) {
98
- var api = _ref7.api,
99
- props = _ref7.props;
108
+ export var debounceClose = function debounceClose(_ref8) {
109
+ var api = _ref8.api,
110
+ props = _ref8.props;
100
111
  return debounce(props.closeDelay, function () {
101
112
  api.handleClosePopper();
102
113
  });
@@ -110,9 +121,9 @@ export var watchFocusing = function watchFocusing(state) {
110
121
  }
111
122
  };
112
123
  };
113
- export var focusHandler = function focusHandler(_ref8) {
114
- var slots = _ref8.slots,
115
- api = _ref8.api;
124
+ export var focusHandler = function focusHandler(_ref9) {
125
+ var slots = _ref9.slots,
126
+ api = _ref9.api;
116
127
  return function () {
117
128
  if (!slots["default"] || !slots["default"]().length) {
118
129
  api.handleFocus();
@@ -127,10 +138,10 @@ export var focusHandler = function focusHandler(_ref8) {
127
138
  }
128
139
  };
129
140
  };
130
- export var bindEvent = function bindEvent(_ref9) {
131
- var api = _ref9.api,
132
- state = _ref9.state,
133
- vm = _ref9.vm;
141
+ export var bindEvent = function bindEvent(_ref10) {
142
+ var api = _ref10.api,
143
+ state = _ref10.state,
144
+ vm = _ref10.vm;
134
145
  return function (reference) {
135
146
  var referenceElm = null;
136
147
  if (vm.$el.nodeType === 8) {
@@ -151,16 +162,16 @@ export var bindEvent = function bindEvent(_ref9) {
151
162
  on(referenceElm, 'click', api.removeFocusing);
152
163
  };
153
164
  };
154
- export var bindPopper = function bindPopper(_ref10) {
155
- var vm = _ref10.vm,
156
- refs = _ref10.refs,
157
- nextTick = _ref10.nextTick;
165
+ export var bindPopper = function bindPopper(_ref11) {
166
+ var vm = _ref11.vm,
167
+ refs = _ref11.refs,
168
+ nextTick = _ref11.nextTick;
158
169
  return function (el) {
159
170
  nextTick(function () {
160
171
  return vm.bindEvent(el);
161
172
  });
162
173
  if (vm.popperVM) {
163
- refs['popper'] || (refs['popper'] = vm.popperVM.$el);
174
+ refs.popper || (refs.popper = vm.popperVM.$el);
164
175
  nextTick(function () {
165
176
  if (vm.modelValue) {
166
177
  vm.updatePopper();
package/tooltip/vue.js CHANGED
@@ -67,7 +67,11 @@ export var renderless = function renderless(props, _ref2, _ref3) {
67
67
  state: state,
68
68
  doDestroy: doDestroy,
69
69
  updatePopper: updatePopper,
70
- show: show(api),
70
+ show: show({
71
+ api: api,
72
+ state: state,
73
+ props: props
74
+ }),
71
75
  hide: hide(api),
72
76
  destroyed: destroyed({
73
77
  state: state,