Skip to content

Commit 5822031

Browse files
committed
update: iBeacon 增加搜索 loading
1 parent 798f2a6 commit 5822031

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pages/API/ibeacon/ibeacon.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<view class="uni-btn-v">
66
<button type="primary" :disabled="isOpen" @click="openBluetoothAdapter">打开蓝牙模块</button>
77
<button type="primary" :disabled="!isOpen" @click="closeBluetoothAdapter">关闭蓝牙模块</button>
8-
<button type="primary" :disabled="!isOpen || isStarted" @click="startBeaconDiscovery">开始搜索附近的iBeacon设备</button>
8+
<button type="primary" :disabled="!isOpen || isStarted" :loading="isStarted" @click="startBeaconDiscovery">开始搜索附近的iBeacon设备</button>
99
<button type="primary" :disabled="!isStarted" @click="stopBeaconDiscovery">停止搜索附近的iBeacon设备</button>
1010
</view>
1111
</view>
@@ -64,6 +64,7 @@
6464
});
6565
},
6666
closeBluetoothAdapter(OBJECT) {
67+
this.stopBeaconDiscovery();
6768
uni.closeBluetoothAdapter({
6869
success: (res) => {
6970
this.isOpen = false;

0 commit comments

Comments
 (0)