diff --git a/pages/API/action-sheet/action-sheet.uvue b/pages/API/action-sheet/action-sheet.uvue
index 6062b99f710ed25c2d25488e82547414294756e6..74b483553da566e3dc5e9a0b5096223bbbf8cbd7 100644
--- a/pages/API/action-sheet/action-sheet.uvue
+++ b/pages/API/action-sheet/action-sheet.uvue
@@ -13,7 +13,7 @@
自定义itemColor
-
+
@@ -70,27 +70,54 @@
}
}
},
+ itemColorChange: function (e : SwitchChangeEvent) {
+ this.itemColorCustom = e.detail.value
+ },
actionSheetTap() {
- console.log("itemColorCustom === " + this.itemColorCustom)
- const that = this
- uni.showActionSheet({
- title: this.items[this.current].value,
- itemList: ['item1', 'item2', 'item3', 'item4'],
- // #ifdef H5
- popover: {
- // 104: navbar + topwindow 高度,暂时 fix createSelectorQuery 在 pc 上获取 top 不准确的 bug
- top: that.buttonRect.top + 104 + that.buttonRect.height,
- left: that.buttonRect.left + that.buttonRect.width / 2
- },
- // #endif
- success: (e) => {
- console.log(e.tapIndex);
- uni.showToast({
- title: "点击了第" + e.tapIndex + "个选项",
- icon: "none"
- })
- }
- })
+
+ const that = this
+ if(this.itemColorCustom){
+ uni.showActionSheet({
+ title: this.items[this.current].value,
+ itemList: ['item1', 'item2', 'item3', 'item4'],
+ itemColor:"#ff00ff",
+ // #ifdef H5
+ popover: {
+ // 104: navbar + topwindow 高度,暂时 fix createSelectorQuery 在 pc 上获取 top 不准确的 bug
+ top: that.buttonRect.top + 104 + that.buttonRect.height,
+ left: that.buttonRect.left + that.buttonRect.width / 2
+ },
+ // #endif
+ success: (e) => {
+ console.log(e.tapIndex);
+ uni.showToast({
+ title: "点击了第" + e.tapIndex + "个选项",
+ icon: "none"
+ })
+ }
+ })
+ }else{
+ uni.showActionSheet({
+ title: this.items[this.current].value,
+ itemList: ['item1', 'item2', 'item3', 'item4'],
+ // #ifdef H5
+ popover: {
+ // 104: navbar + topwindow 高度,暂时 fix createSelectorQuery 在 pc 上获取 top 不准确的 bug
+ top: that.buttonRect.top + 104 + that.buttonRect.height,
+ left: that.buttonRect.left + that.buttonRect.width / 2
+ },
+ // #endif
+ success: (e) => {
+ console.log(e.tapIndex);
+ uni.showToast({
+ title: "点击了第" + e.tapIndex + "个选项",
+ icon: "none"
+ })
+ }
+ })
+ }
+
+
},
// #ifdef H5
diff --git a/pages/API/get-location/get-location.uvue b/pages/API/get-location/get-location.uvue
index be9784b2ec500d91a9a364f02131e47103a61027..3cce29e7b1dfdad4c37832c76d694e8b255af703 100644
--- a/pages/API/get-location/get-location.uvue
+++ b/pages/API/get-location/get-location.uvue
@@ -60,7 +60,7 @@
this.altitudeSelect = e.detail.value
},
geocodeChange: function (e : SwitchChangeEvent) {
- this.geocodeChange = e.detail.value
+ this.geocodeSelect = e.detail.value
},
highAccuracySelectChange: function (e : SwitchChangeEvent) {
this.isHighAccuracySelect = e.detail.value
@@ -82,6 +82,7 @@
type: this.items[this.current].value,
altitude:this.altitudeSelect,
isHighAccuracy:this.isHighAccuracySelect,
+ geocode:this.geocodeSelect,
success: function (res:any) {
uni.hideLoading()
console.log(res);