lh-ui-next 0.2.1-beta.3 → 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 +1 -1
- package/lib/lh-ui-next.mjs +10 -3
- package/lib/lh-ui-next.umd.js +1 -1
- package/package.json +1 -1
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.
|
|
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
|
package/lib/lh-ui-next.mjs
CHANGED
|
@@ -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,19 +9022,26 @@ 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() {
|
|
9028
9029
|
if (!this.disabled) {
|
|
9029
|
-
let e =
|
|
9030
|
+
let e = window.event, t = this.$refs.sliderRunway, i = this.vertical ? this.height.substring(0, this.height.length - 2) * 1 - e.clientY + t.getBoundingClientRect().top : e.clientX - t.getBoundingClientRect().left;
|
|
9030
9031
|
if (typeof this.modelValue == "number")
|
|
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 = "";
|