From 4dff74a20349cd48dbb41e20717203f10f1d0332 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Wed, 10 Jan 2024 08:19:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=BB=84=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/lowcodevideo.ts | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/store/modules/lowcodevideo.ts 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