feat install
Some checks failed
Check / lint (18.x, macos-latest) (push) Has been cancelled
Check / lint (18.x, ubuntu-latest) (push) Has been cancelled
Check / lint (18.x, windows-latest) (push) Has been cancelled
Check / lint (20.x, macos-latest) (push) Has been cancelled
Check / lint (20.x, ubuntu-latest) (push) Has been cancelled
Check / lint (20.x, windows-latest) (push) Has been cancelled
Check / lint (22.x, macos-latest) (push) Has been cancelled
Check / lint (22.x, ubuntu-latest) (push) Has been cancelled
Check / lint (22.x, windows-latest) (push) Has been cancelled
Check / typecheck (18.x, macos-latest) (push) Has been cancelled
Check / typecheck (18.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (18.x, windows-latest) (push) Has been cancelled
Check / typecheck (20.x, macos-latest) (push) Has been cancelled
Check / typecheck (20.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (20.x, windows-latest) (push) Has been cancelled
Check / typecheck (22.x, macos-latest) (push) Has been cancelled
Check / typecheck (22.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (22.x, windows-latest) (push) Has been cancelled
Check / build (build app, 18.x, macos-latest) (push) Has been cancelled
Check / build (build app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build app, 20.x, macos-latest) (push) Has been cancelled
Check / build (build app, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build app, 20.x, windows-latest) (push) Has been cancelled
Check / build (build app, 22.x, macos-latest) (push) Has been cancelled
Check / build (build app, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build app, 22.x, windows-latest) (push) Has been cancelled
Check / build (build wx, 18.x, macos-latest) (push) Has been cancelled
Check / build (build wx, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build wx, 18.x, windows-latest) (push) Has been cancelled
Check / build (build wx, 20.x, macos-latest) (push) Has been cancelled
Check / build (build wx, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build wx, 20.x, windows-latest) (push) Has been cancelled
Check / build (build wx, 22.x, macos-latest) (push) Has been cancelled
Check / build (build wx, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build wx, 22.x, windows-latest) (push) Has been cancelled
Check / build (build, 18.x, macos-latest) (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build, 20.x, macos-latest) (push) Has been cancelled
Check / build (build, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 20.x, windows-latest) (push) Has been cancelled
Check / build (build, 22.x, macos-latest) (push) Has been cancelled
Check / build (build, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 22.x, windows-latest) (push) Has been cancelled

This commit is contained in:
Ironsp
2026-08-21 11:11:54 +08:00
parent 27c5275d83
commit e27042a0d7
3 changed files with 159 additions and 42 deletions

30
src/store/index.js Normal file
View File

@@ -0,0 +1,30 @@
import { defineStore } from 'pinia'
// import { computed, ref } from 'vue'
// import { getDevicetList } from '@/api/equipmentList/index'
export const useDeviceStore = defineStore('devices', () => {
// --- State (状态) ---
// 相当于 Vuex 中的 state用 ref 或 reactive 定义
// const deviceList = ref();
// --- Getters (计算属性) ---
// 相当于 Vuex 中的 getters直接用 computed 定义
// --- Actions (动作) ---
// 相当于 Vuex 中的 actions/mutations直接写同步或异步函数
// async function getdeviceList(query?: any) {
// try {
// const response = await getDevicetList(query);
// console.log('获取设备列表:', response);
// deviceList.value = response.rows;
// } catch (error) {
// console.error('获取设备列表失败', error);
// }
// }
// ⚠️ 核心点:必须把需要暴露出去的变量和方法 return 出去!
return {
// deviceList,
// getdeviceList
}
})