From 5d912947c883b162026939a367bfe81cc35d2bbc Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期二, 22 三月 2022 17:13:55 +0800 Subject: [PATCH] UA 整理提交 --- src/main/demo/src/views/selectFile.vue | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/demo/src/views/selectFile.vue b/src/main/demo/src/views/selectFile.vue index 90f7570..c8794a9 100644 --- a/src/main/demo/src/views/selectFile.vue +++ b/src/main/demo/src/views/selectFile.vue @@ -7,11 +7,13 @@ :auto-upload="false" :on-change="change" @drop.native="drop" - accept=".fbx" + accept=".fbx,.fbxc" > <!-- <i class="icon el-icon-plus"></i> --> - <div class="el-upload__text">灏�.fbx鏂囦欢鎷栧埌姝ゅ锛屾垨鐐瑰嚮姝ゅ閫夋嫨鏂囦欢</div> - <div class="el-upload__tip" slot="tip">鍙兘瑙f瀽.fbx鏂囦欢</div> + <div ref="tt" class="el-upload__text"> + 灏�.fbx鎴�.fbxc鏂囦欢鎷栧埌姝ゅ锛屾垨鐐瑰嚮姝ゅ閫夋嫨鏂囦欢 + </div> + <div class="el-upload__tip" slot="tip">鍙兘瑙f瀽.fbx鍜�.fbxc鏂囦欢</div> </el-upload> </div> </template> @@ -23,8 +25,10 @@ name: "", data() { + let reselect = !!this.$route.query.reselect; return { URL: "", + reselect, }; }, components: {}, @@ -39,10 +43,11 @@ this.loadFile(file.raw); }, loadFile(file) { - if (!/\.fbx$/.test(file.name.toLowerCase().trim())) { - this.$layer.msg("绫诲瀷閿欒"); + if (!/\.fbxc?$/.test(file.name.toLowerCase().trim())) { + this.$layer.msg("鏂囦欢绫诲瀷閿欒"); return false; } + let loading = this.$layer.loading(1); axios({ url: "readFboFile", method: "POST", @@ -51,7 +56,8 @@ }, }).then((res) => { res = res.data; - console.log(res, res.code, "=========res"); + // console.log(res, res.code, "=========res"); + this.$layer.close(loading); if (res.code) { let data = res.data; data.filePath = file.path; @@ -81,7 +87,11 @@ }, }, - mounted() {}, + mounted() { + if (this.reselect) { + this.$refs.tt.click(); + } + }, }; </script> @@ -114,4 +124,7 @@ >>> .el-upload-list { display: none; } +>>> .el-upload__tip { + color: #fff; +} </style> \ No newline at end of file -- Gitblit v1.9.1