@opentiny/vue-renderless 3.10.2 → 3.10.3

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.
@@ -65,17 +65,14 @@ const getStyleComputedProperty = (el, property) => {
65
65
  let css = window.getComputedStyle(el, null);
66
66
  return css[property];
67
67
  };
68
- const isFixed = (el, offsetParent) => {
68
+ const isFixed = (el) => {
69
69
  if (el === window.document.body) {
70
70
  return false;
71
71
  }
72
72
  if (getStyleComputedProperty(el, "position") === "fixed") {
73
73
  return true;
74
74
  }
75
- if (el === offsetParent) {
76
- return false;
77
- }
78
- return el.parentNode ? isFixed(el.parentNode, offsetParent) : false;
75
+ return el.parentNode ? isFixed(el.parentNode) : false;
79
76
  };
80
77
  const getBoundingClientRect = (el) => {
81
78
  let rectObj = el.getBoundingClientRect();
@@ -293,11 +290,10 @@ Popper.prototype.parse = function(config) {
293
290
  return popper;
294
291
  };
295
292
  Popper.prototype._getPosition = function(popper, reference) {
296
- let offsetParent = getOffsetParent(reference);
297
293
  if (this._options.forceAbsolute) {
298
294
  return "absolute";
299
295
  }
300
- let isParentFixed = isFixed(reference, offsetParent);
296
+ let isParentFixed = isFixed(reference);
301
297
  return isParentFixed ? "fixed" : "absolute";
302
298
  };
303
299
  Popper.prototype._getOffsets = function(popper, reference, placement) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.10.2",
3
+ "version": "3.10.3",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "homepage": "https://opentiny.design/tiny-vue",
6
6
  "keywords": [
package/slider/index.js CHANGED
@@ -175,18 +175,22 @@ const calcCurrentValue = ({ currentValue, props, state }) => {
175
175
  return currentValue;
176
176
  };
177
177
  const setActiveButtonValue = ({ api, emit, props, state }) => (value) => {
178
- let currentValue = value;
179
- currentValue = calcCurrentValue({ currentValue, props, state });
180
- if (!state.isDouble) {
181
- state.leftBtnValue = currentValue;
178
+ if (Array.isArray(value)) {
179
+ ;
180
+ [state.leftBtnValue, state.rightBtnValue] = value;
182
181
  } else {
183
- if (state.activeIndex === 0) {
182
+ let currentValue = calcCurrentValue({ currentValue: value, props, state });
183
+ if (!state.isDouble) {
184
184
  state.leftBtnValue = currentValue;
185
185
  } else {
186
- state.rightBtnValue = currentValue;
186
+ if (state.activeIndex === 0) {
187
+ state.leftBtnValue = currentValue;
188
+ } else {
189
+ state.rightBtnValue = currentValue;
190
+ }
187
191
  }
192
+ state.activeValue = currentValue;
188
193
  }
189
- state.activeValue = currentValue;
190
194
  state.innerTrigger = true;
191
195
  emit("update:modelValue", api.getActiveButtonValue());
192
196
  };