lh-ui-next 0.2.1-beta.4 → 0.2.1-beta.5

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/README.md CHANGED
@@ -5,7 +5,7 @@ alpha version is use to self-test; beta version is use to public survey.for exam
5
5
  1.0.0-alpha.1
6
6
  1.0.0-test.2
7
7
  ## Official version : "0.2.0",
8
- ## test version : "0.2.1-beta.4,
8
+ ## test version : "0.2.1-beta.5,
9
9
  ## npmmirror
10
10
  When cnpm sync execution is unsuccessful,you can go the website(http://www.npmmirror.com/package/lh-ui-next) and press sync button to
11
11
  manual trigger the sync event
@@ -8916,7 +8916,7 @@ Se.install = function(e) {
8916
8916
  const _r = {
8917
8917
  name: "lhSlider",
8918
8918
  componentName: "lhSlider",
8919
- emits: ["update:modelValue"],
8919
+ emits: ["update:modelValue", "dragEndCallback"],
8920
8920
  props: {
8921
8921
  modelValue: {
8922
8922
  type: [Number, Array],
@@ -9022,6 +9022,7 @@ const _r = {
9022
9022
  this.$refs.sliderButtonWrapper1.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper1.classList.remove("grabbing");
9023
9023
  for (let t = 0; t < this.$refs.sliderButtonWrapper2.classList.length; t++)
9024
9024
  this.$refs.sliderButtonWrapper2.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper2.classList.remove("grabbing");
9025
+ this.dragEndCallback();
9025
9026
  },
9026
9027
  //点击轨道移动滑块
9027
9028
  clickRunway() {
@@ -9031,10 +9032,16 @@ const _r = {
9031
9032
  this.moveSlider(i, 1);
9032
9033
  else {
9033
9034
  let s = this.vertical ? this.drag1.style.bottom.substring(0, this.drag1.style.bottom.length - 2) * 1 : this.drag1.style.left.substring(0, this.drag1.style.left.length - 2) * 1, l = this.vertical ? this.drag2.style.bottom.substring(0, this.drag2.style.bottom.length - 2) * 1 : this.drag2.style.left.substring(0, this.drag2.style.left.length - 2) * 1, n = Math.abs(s - i), a = Math.abs(l - i);
9034
- n <= a ? this.moveSlider(i, 1) : this.moveSlider(i, 2);
9035
+ n <= a ? (this.moveSlider(i, 1), this.dragEndCallback()) : (this.moveSlider(i, 2), this.dragEndCallback());
9035
9036
  }
9036
9037
  }
9037
9038
  },
9039
+ //拖拽以及点击结束之后的回调事件
9040
+ dragEndCallback() {
9041
+ setTimeout(() => {
9042
+ this.$emit("dragEndCallback", this.modelValue);
9043
+ }, 0);
9044
+ },
9038
9045
  //移动滑块
9039
9046
  moveSlider(e, t) {
9040
9047
  let i = "";