货无忧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
740 B

import {
defineStore
} from 'pinia';
import {
reactive,
ref,
shallowRef
} from 'vue';
export const usePdaStore = defineStore('usePdaStore', () => {
// 是否在onShow刷新
const isRefresh = ref(true)
// 是否显示扫描按钮
const isShowScanBtn = ref(uni.getStorageSync('isShowScanBtn') || false)
/**
* 选择Pda的广播标签和广播动作
*/
const HANDLE_REFRESH = (state = !isRefresh.value) => {
isRefresh.value = state
}
/** 是否显示扫描按钮 */
const HANDLE_SETSCANBTN = (isShow) => {
isShowScanBtn.value = isShow
uni.setStorageSync('isShowScanBtn', isShow)
}
return {
isRefresh,
isShowScanBtn,
HANDLE_REFRESH,
HANDLE_SETSCANBTN
}
})
// 暴露仓库实例
export default usePdaStore