lh-ui-next 0.2.1-beta.4 → 0.2.1-beta.6
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 +21 -4
- package/lib/lh-ui-next.umd.js +1 -1
- package/package.json +1 -1
- package/static/css/package/date.less +9 -0
- package/static/css/theme-compact-blue/main.css +1 -1
- package/static/css/theme-compact-dark/main.css +1 -1
- package/static/css/theme-loose-blue/main.css +1 -1
- package/static/css/theme-loose-orange/main.css +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.6,
|
|
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
|
@@ -6419,11 +6419,21 @@ const ra = {
|
|
|
6419
6419
|
},
|
|
6420
6420
|
//改变年份
|
|
6421
6421
|
yearClick(e) {
|
|
6422
|
-
this.type === "year"
|
|
6422
|
+
if (this.type === "year") {
|
|
6423
|
+
if (this.yearDisable(e))
|
|
6424
|
+
return;
|
|
6425
|
+
this.showDate.year = e, this.selectDate = e.toString(), this.$emit("yearClick", this.selectDate);
|
|
6426
|
+
} else
|
|
6427
|
+
this.showDate.year = e, this.dateType = "month";
|
|
6428
|
+
this.headerValueChange();
|
|
6423
6429
|
},
|
|
6424
6430
|
//改变月份
|
|
6425
6431
|
monthClick(e) {
|
|
6426
6432
|
this.type === "month" ? (this.selectDate = this.showDate.year.toString() + "-" + (e > 9 ? e : "0" + e.toString()), this.$emit("monthClick", this.selectDate)) : (this.showDate.month = e, this.dateType = "date"), this.headerValueChange();
|
|
6433
|
+
},
|
|
6434
|
+
//年份是否是disabled的状态
|
|
6435
|
+
yearDisable(e) {
|
|
6436
|
+
return typeof this.pickerOptions.disabledDate == "function" ? this.pickerOptions.disabledDate(e) : !1;
|
|
6427
6437
|
}
|
|
6428
6438
|
},
|
|
6429
6439
|
computed: {
|
|
@@ -6541,7 +6551,7 @@ function Ma(e, t, i, s, l, n) {
|
|
|
6541
6551
|
h("tbody", null, [
|
|
6542
6552
|
(r(!0), d(g, null, y(n.decadesList, (a) => (r(), d("tr", null, [
|
|
6543
6553
|
(r(!0), d(g, null, y(a, (o) => (r(), d("td", {
|
|
6544
|
-
class: f({ selected: o === e.showDate.year }),
|
|
6554
|
+
class: f({ selected: o === e.showDate.year, disabled: n.yearDisable(o) }),
|
|
6545
6555
|
onClick: E((c) => n.yearClick(o), ["stop"])
|
|
6546
6556
|
}, [
|
|
6547
6557
|
h("a", za, b(o), 1)
|
|
@@ -8916,7 +8926,7 @@ Se.install = function(e) {
|
|
|
8916
8926
|
const _r = {
|
|
8917
8927
|
name: "lhSlider",
|
|
8918
8928
|
componentName: "lhSlider",
|
|
8919
|
-
emits: ["update:modelValue"],
|
|
8929
|
+
emits: ["update:modelValue", "dragEndCallback"],
|
|
8920
8930
|
props: {
|
|
8921
8931
|
modelValue: {
|
|
8922
8932
|
type: [Number, Array],
|
|
@@ -9022,6 +9032,7 @@ const _r = {
|
|
|
9022
9032
|
this.$refs.sliderButtonWrapper1.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper1.classList.remove("grabbing");
|
|
9023
9033
|
for (let t = 0; t < this.$refs.sliderButtonWrapper2.classList.length; t++)
|
|
9024
9034
|
this.$refs.sliderButtonWrapper2.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper2.classList.remove("grabbing");
|
|
9035
|
+
this.dragEndCallback();
|
|
9025
9036
|
},
|
|
9026
9037
|
//点击轨道移动滑块
|
|
9027
9038
|
clickRunway() {
|
|
@@ -9031,10 +9042,16 @@ const _r = {
|
|
|
9031
9042
|
this.moveSlider(i, 1);
|
|
9032
9043
|
else {
|
|
9033
9044
|
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);
|
|
9045
|
+
n <= a ? (this.moveSlider(i, 1), this.dragEndCallback()) : (this.moveSlider(i, 2), this.dragEndCallback());
|
|
9035
9046
|
}
|
|
9036
9047
|
}
|
|
9037
9048
|
},
|
|
9049
|
+
//拖拽以及点击结束之后的回调事件
|
|
9050
|
+
dragEndCallback() {
|
|
9051
|
+
setTimeout(() => {
|
|
9052
|
+
this.$emit("dragEndCallback", this.modelValue);
|
|
9053
|
+
}, 0);
|
|
9054
|
+
},
|
|
9038
9055
|
//移动滑块
|
|
9039
9056
|
moveSlider(e, t) {
|
|
9040
9057
|
let i = "";
|