diff --git a/src/store/modules/lowcodevideo.ts b/src/store/modules/lowcodevideo.ts new file mode 100644 index 000000000..4b5d70079 --- /dev/null +++ b/src/store/modules/lowcodevideo.ts @@ -0,0 +1,52 @@ +//定义组合式API仓库 +import { defineStore } from "pinia"; +import { ref, computed,watch,reactive} from 'vue'; +type VideoMsg = { + CreatedAt: string + UpdatedAt: string + fileSize: bigint + id: bigint + key: string + name: string + physicspath: string + size: string + tag: string + type: number + url: string + } + /* type VideoObj = {} */ + + +//创建小仓库 +let uselowcodevideoStore = defineStore('lowcodevideo', () => { + + //视频地址 + const videoResource = ref(); + //是否上传成功 + const videoReady = ref(false); + //成功后接受的视频详细信息 + const videoMsg = reactive({ + CreatedAt: '', + UpdatedAt: '', + fileSize: 0n, + id: 0n, + key: '', + name: '', + physicspath: '', + size: '', + tag: '', + type: 0, + url: '' + }); + //表单视频信息数组 + /* const videoArr = reactive<> */ + + //务必要返回一个对象:属性与方法可以提供给组件使用 + return { + videoReady, + videoResource, + videoMsg, + } +}); + +export default uselowcodevideoStore; \ No newline at end of file