vant 3.5.0-beta.1 → 3.5.0
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/es/dialog/Dialog.d.ts +8 -0
- package/es/dialog/Dialog.mjs +6 -0
- package/es/dialog/function-call.d.ts +10 -0
- package/es/dialog/function-call.mjs +2 -0
- package/es/dialog/types.d.ts +3 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/picker/Picker.mjs +1 -1
- package/es/picker/PickerColumn.mjs +2 -0
- package/es/switch/Switch.mjs +2 -1
- package/lib/dialog/Dialog.d.ts +8 -0
- package/lib/dialog/Dialog.js +6 -0
- package/lib/dialog/function-call.d.ts +10 -0
- package/lib/dialog/function-call.js +2 -0
- package/lib/dialog/types.d.ts +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/picker/Picker.js +1 -1
- package/lib/picker/PickerColumn.js +2 -0
- package/lib/switch/Switch.js +2 -1
- package/lib/vant.cjs.js +14 -3
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +14 -3
- package/lib/vant.es.min.js +14 -3
- package/lib/vant.js +14 -3
- package/lib/vant.min.js +1 -1
- package/package.json +3 -3
- package/vetur/attributes.json +238 -230
- package/vetur/tags.json +81 -79
- package/vetur/web-types.json +977 -953
package/lib/vant.es.js
CHANGED
@@ -1653,6 +1653,7 @@ var stdin_default$1q = defineComponent({
|
|
1653
1653
|
}
|
1654
1654
|
};
|
1655
1655
|
const getValue = () => state.options[state.index];
|
1656
|
+
const hasOptions = () => state.options.length;
|
1656
1657
|
setIndex(state.index);
|
1657
1658
|
useParent(PICKER_KEY);
|
1658
1659
|
useExpose({
|
@@ -1661,6 +1662,7 @@ var stdin_default$1q = defineComponent({
|
|
1661
1662
|
getValue,
|
1662
1663
|
setValue,
|
1663
1664
|
setOptions,
|
1665
|
+
hasOptions,
|
1664
1666
|
stopMomentum
|
1665
1667
|
});
|
1666
1668
|
watch(() => props.initialOptions, setOptions);
|
@@ -1780,7 +1782,7 @@ var stdin_default$1p = defineComponent({
|
|
1780
1782
|
} else {
|
1781
1783
|
formattedColumns.value = columns;
|
1782
1784
|
}
|
1783
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
1785
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
1784
1786
|
};
|
1785
1787
|
const getIndexes = () => children.map((child) => child.state.index);
|
1786
1788
|
const setColumnValues = (index, options) => {
|
@@ -3327,6 +3329,7 @@ var stdin_default$1j = defineComponent({
|
|
3327
3329
|
};
|
3328
3330
|
useCustomFieldValue(() => props.modelValue);
|
3329
3331
|
return () => {
|
3332
|
+
var _a;
|
3330
3333
|
const {
|
3331
3334
|
size,
|
3332
3335
|
loading,
|
@@ -3352,7 +3355,7 @@ var stdin_default$1j = defineComponent({
|
|
3352
3355
|
"onClick": onClick
|
3353
3356
|
}, [createVNode("div", {
|
3354
3357
|
"class": bem$18("node")
|
3355
|
-
}, [renderLoading()])]);
|
3358
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3356
3359
|
};
|
3357
3360
|
}
|
3358
3361
|
});
|
@@ -8601,8 +8604,10 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8601
8604
|
showCancelButton: Boolean,
|
8602
8605
|
cancelButtonText: String,
|
8603
8606
|
cancelButtonColor: String,
|
8607
|
+
cancelButtonDisabled: Boolean,
|
8604
8608
|
confirmButtonText: String,
|
8605
8609
|
confirmButtonColor: String,
|
8610
|
+
confirmButtonDisabled: Boolean,
|
8606
8611
|
showConfirmButton: truthProp,
|
8607
8612
|
closeOnClickOverlay: Boolean
|
8608
8613
|
});
|
@@ -8723,6 +8728,7 @@ var stdin_default$F = defineComponent({
|
|
8723
8728
|
color: props.cancelButtonColor
|
8724
8729
|
},
|
8725
8730
|
"loading": loading.cancel,
|
8731
|
+
"disabled": props.cancelButtonDisabled,
|
8726
8732
|
"onClick": onCancel
|
8727
8733
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8728
8734
|
"size": "large",
|
@@ -8734,6 +8740,7 @@ var stdin_default$F = defineComponent({
|
|
8734
8740
|
color: props.confirmButtonColor
|
8735
8741
|
},
|
8736
8742
|
"loading": loading.confirm,
|
8743
|
+
"disabled": props.confirmButtonDisabled,
|
8737
8744
|
"onClick": onConfirm
|
8738
8745
|
}, null)]);
|
8739
8746
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
@@ -8745,6 +8752,7 @@ var stdin_default$F = defineComponent({
|
|
8745
8752
|
"class": bem$A("cancel"),
|
8746
8753
|
"color": props.cancelButtonColor,
|
8747
8754
|
"loading": loading.cancel,
|
8755
|
+
"disabled": props.cancelButtonDisabled,
|
8748
8756
|
"onClick": onCancel
|
8749
8757
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8750
8758
|
"type": "danger",
|
@@ -8752,6 +8760,7 @@ var stdin_default$F = defineComponent({
|
|
8752
8760
|
"class": bem$A("confirm"),
|
8753
8761
|
"color": props.confirmButtonColor,
|
8754
8762
|
"loading": loading.confirm,
|
8763
|
+
"disabled": props.confirmButtonDisabled,
|
8755
8764
|
"onClick": onConfirm
|
8756
8765
|
}, null)]
|
8757
8766
|
});
|
@@ -8836,8 +8845,10 @@ Dialog.defaultOptions = {
|
|
8836
8845
|
messageAlign: "",
|
8837
8846
|
cancelButtonText: "",
|
8838
8847
|
cancelButtonColor: null,
|
8848
|
+
cancelButtonDisabled: false,
|
8839
8849
|
confirmButtonText: "",
|
8840
8850
|
confirmButtonColor: null,
|
8851
|
+
confirmButtonDisabled: false,
|
8841
8852
|
showConfirmButton: true,
|
8842
8853
|
showCancelButton: false,
|
8843
8854
|
closeOnPopstate: true,
|
@@ -14545,7 +14556,7 @@ const Lazyload = {
|
|
14545
14556
|
});
|
14546
14557
|
}
|
14547
14558
|
};
|
14548
|
-
const version = "3.5.0
|
14559
|
+
const version = "3.5.0";
|
14549
14560
|
function install(app) {
|
14550
14561
|
const components = [
|
14551
14562
|
ActionBar,
|
package/lib/vant.es.min.js
CHANGED
@@ -1653,6 +1653,7 @@ var stdin_default$1q = defineComponent({
|
|
1653
1653
|
}
|
1654
1654
|
};
|
1655
1655
|
const getValue = () => state.options[state.index];
|
1656
|
+
const hasOptions = () => state.options.length;
|
1656
1657
|
setIndex(state.index);
|
1657
1658
|
useParent(PICKER_KEY);
|
1658
1659
|
useExpose({
|
@@ -1661,6 +1662,7 @@ var stdin_default$1q = defineComponent({
|
|
1661
1662
|
getValue,
|
1662
1663
|
setValue,
|
1663
1664
|
setOptions,
|
1665
|
+
hasOptions,
|
1664
1666
|
stopMomentum
|
1665
1667
|
});
|
1666
1668
|
watch(() => props.initialOptions, setOptions);
|
@@ -1780,7 +1782,7 @@ var stdin_default$1p = defineComponent({
|
|
1780
1782
|
} else {
|
1781
1783
|
formattedColumns.value = columns;
|
1782
1784
|
}
|
1783
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
1785
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
1784
1786
|
};
|
1785
1787
|
const getIndexes = () => children.map((child) => child.state.index);
|
1786
1788
|
const setColumnValues = (index, options) => {
|
@@ -3327,6 +3329,7 @@ var stdin_default$1j = defineComponent({
|
|
3327
3329
|
};
|
3328
3330
|
useCustomFieldValue(() => props.modelValue);
|
3329
3331
|
return () => {
|
3332
|
+
var _a;
|
3330
3333
|
const {
|
3331
3334
|
size,
|
3332
3335
|
loading,
|
@@ -3352,7 +3355,7 @@ var stdin_default$1j = defineComponent({
|
|
3352
3355
|
"onClick": onClick
|
3353
3356
|
}, [createVNode("div", {
|
3354
3357
|
"class": bem$18("node")
|
3355
|
-
}, [renderLoading()])]);
|
3358
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3356
3359
|
};
|
3357
3360
|
}
|
3358
3361
|
});
|
@@ -8601,8 +8604,10 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8601
8604
|
showCancelButton: Boolean,
|
8602
8605
|
cancelButtonText: String,
|
8603
8606
|
cancelButtonColor: String,
|
8607
|
+
cancelButtonDisabled: Boolean,
|
8604
8608
|
confirmButtonText: String,
|
8605
8609
|
confirmButtonColor: String,
|
8610
|
+
confirmButtonDisabled: Boolean,
|
8606
8611
|
showConfirmButton: truthProp,
|
8607
8612
|
closeOnClickOverlay: Boolean
|
8608
8613
|
});
|
@@ -8723,6 +8728,7 @@ var stdin_default$F = defineComponent({
|
|
8723
8728
|
color: props.cancelButtonColor
|
8724
8729
|
},
|
8725
8730
|
"loading": loading.cancel,
|
8731
|
+
"disabled": props.cancelButtonDisabled,
|
8726
8732
|
"onClick": onCancel
|
8727
8733
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8728
8734
|
"size": "large",
|
@@ -8734,6 +8740,7 @@ var stdin_default$F = defineComponent({
|
|
8734
8740
|
color: props.confirmButtonColor
|
8735
8741
|
},
|
8736
8742
|
"loading": loading.confirm,
|
8743
|
+
"disabled": props.confirmButtonDisabled,
|
8737
8744
|
"onClick": onConfirm
|
8738
8745
|
}, null)]);
|
8739
8746
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
@@ -8745,6 +8752,7 @@ var stdin_default$F = defineComponent({
|
|
8745
8752
|
"class": bem$A("cancel"),
|
8746
8753
|
"color": props.cancelButtonColor,
|
8747
8754
|
"loading": loading.cancel,
|
8755
|
+
"disabled": props.cancelButtonDisabled,
|
8748
8756
|
"onClick": onCancel
|
8749
8757
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8750
8758
|
"type": "danger",
|
@@ -8752,6 +8760,7 @@ var stdin_default$F = defineComponent({
|
|
8752
8760
|
"class": bem$A("confirm"),
|
8753
8761
|
"color": props.confirmButtonColor,
|
8754
8762
|
"loading": loading.confirm,
|
8763
|
+
"disabled": props.confirmButtonDisabled,
|
8755
8764
|
"onClick": onConfirm
|
8756
8765
|
}, null)]
|
8757
8766
|
});
|
@@ -8836,8 +8845,10 @@ Dialog.defaultOptions = {
|
|
8836
8845
|
messageAlign: "",
|
8837
8846
|
cancelButtonText: "",
|
8838
8847
|
cancelButtonColor: null,
|
8848
|
+
cancelButtonDisabled: false,
|
8839
8849
|
confirmButtonText: "",
|
8840
8850
|
confirmButtonColor: null,
|
8851
|
+
confirmButtonDisabled: false,
|
8841
8852
|
showConfirmButton: true,
|
8842
8853
|
showCancelButton: false,
|
8843
8854
|
closeOnPopstate: true,
|
@@ -14545,7 +14556,7 @@ const Lazyload = {
|
|
14545
14556
|
});
|
14546
14557
|
}
|
14547
14558
|
};
|
14548
|
-
const version = "3.5.0
|
14559
|
+
const version = "3.5.0";
|
14549
14560
|
function install(app) {
|
14550
14561
|
const components = [
|
14551
14562
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -2007,6 +2007,7 @@
|
|
2007
2007
|
}
|
2008
2008
|
};
|
2009
2009
|
const getValue = () => state.options[state.index];
|
2010
|
+
const hasOptions = () => state.options.length;
|
2010
2011
|
setIndex(state.index);
|
2011
2012
|
useParent(PICKER_KEY);
|
2012
2013
|
useExpose({
|
@@ -2015,6 +2016,7 @@
|
|
2015
2016
|
getValue,
|
2016
2017
|
setValue,
|
2017
2018
|
setOptions,
|
2019
|
+
hasOptions,
|
2018
2020
|
stopMomentum
|
2019
2021
|
});
|
2020
2022
|
vue.watch(() => props.initialOptions, setOptions);
|
@@ -2134,7 +2136,7 @@
|
|
2134
2136
|
} else {
|
2135
2137
|
formattedColumns.value = columns;
|
2136
2138
|
}
|
2137
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
2139
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
2138
2140
|
};
|
2139
2141
|
const getIndexes = () => children.map((child) => child.state.index);
|
2140
2142
|
const setColumnValues = (index, options) => {
|
@@ -3681,6 +3683,7 @@
|
|
3681
3683
|
};
|
3682
3684
|
useCustomFieldValue(() => props.modelValue);
|
3683
3685
|
return () => {
|
3686
|
+
var _a;
|
3684
3687
|
const {
|
3685
3688
|
size,
|
3686
3689
|
loading,
|
@@ -3706,7 +3709,7 @@
|
|
3706
3709
|
"onClick": onClick
|
3707
3710
|
}, [vue.createVNode("div", {
|
3708
3711
|
"class": bem$18("node")
|
3709
|
-
}, [renderLoading()])]);
|
3712
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3710
3713
|
};
|
3711
3714
|
}
|
3712
3715
|
});
|
@@ -8955,8 +8958,10 @@
|
|
8955
8958
|
showCancelButton: Boolean,
|
8956
8959
|
cancelButtonText: String,
|
8957
8960
|
cancelButtonColor: String,
|
8961
|
+
cancelButtonDisabled: Boolean,
|
8958
8962
|
confirmButtonText: String,
|
8959
8963
|
confirmButtonColor: String,
|
8964
|
+
confirmButtonDisabled: Boolean,
|
8960
8965
|
showConfirmButton: truthProp,
|
8961
8966
|
closeOnClickOverlay: Boolean
|
8962
8967
|
});
|
@@ -9077,6 +9082,7 @@
|
|
9077
9082
|
color: props.cancelButtonColor
|
9078
9083
|
},
|
9079
9084
|
"loading": loading.cancel,
|
9085
|
+
"disabled": props.cancelButtonDisabled,
|
9080
9086
|
"onClick": onCancel
|
9081
9087
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
9082
9088
|
"size": "large",
|
@@ -9088,6 +9094,7 @@
|
|
9088
9094
|
color: props.confirmButtonColor
|
9089
9095
|
},
|
9090
9096
|
"loading": loading.confirm,
|
9097
|
+
"disabled": props.confirmButtonDisabled,
|
9091
9098
|
"onClick": onConfirm
|
9092
9099
|
}, null)]);
|
9093
9100
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
@@ -9099,6 +9106,7 @@
|
|
9099
9106
|
"class": bem$A("cancel"),
|
9100
9107
|
"color": props.cancelButtonColor,
|
9101
9108
|
"loading": loading.cancel,
|
9109
|
+
"disabled": props.cancelButtonDisabled,
|
9102
9110
|
"onClick": onCancel
|
9103
9111
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
9104
9112
|
"type": "danger",
|
@@ -9106,6 +9114,7 @@
|
|
9106
9114
|
"class": bem$A("confirm"),
|
9107
9115
|
"color": props.confirmButtonColor,
|
9108
9116
|
"loading": loading.confirm,
|
9117
|
+
"disabled": props.confirmButtonDisabled,
|
9109
9118
|
"onClick": onConfirm
|
9110
9119
|
}, null)]
|
9111
9120
|
});
|
@@ -9190,8 +9199,10 @@
|
|
9190
9199
|
messageAlign: "",
|
9191
9200
|
cancelButtonText: "",
|
9192
9201
|
cancelButtonColor: null,
|
9202
|
+
cancelButtonDisabled: false,
|
9193
9203
|
confirmButtonText: "",
|
9194
9204
|
confirmButtonColor: null,
|
9205
|
+
confirmButtonDisabled: false,
|
9195
9206
|
showConfirmButton: true,
|
9196
9207
|
showCancelButton: false,
|
9197
9208
|
closeOnPopstate: true,
|
@@ -15793,7 +15804,7 @@
|
|
15793
15804
|
});
|
15794
15805
|
}
|
15795
15806
|
};
|
15796
|
-
const version = "3.5.0
|
15807
|
+
const version = "3.5.0";
|
15797
15808
|
function install(app) {
|
15798
15809
|
const components = [
|
15799
15810
|
ActionBar,
|