imeik-bizui 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  <!-- 加载中状态显示loading -->
11
11
  <ImLoading v-else />
12
12
  <!-- 预览图操作按钮区域 -->
13
- <div v-if="screenshotUrl" class="preview-actions">
13
+ <div class="preview-actions">
14
14
  <!-- 删除按钮 -->
15
15
  <span class="close-btn" @click="removeScreenshot(index)">
16
16
  <img src="https://udstatic.imeik.com/pcUploads/1732247355378/delete-icon.png" alt="删除" />
@@ -139,7 +139,6 @@ export default {
139
139
  this.screenshots.push('') // 添加空占位
140
140
 
141
141
  // 上传文件
142
- this.$emit('fileUploading', true)
143
142
  fnUploadRequest({
144
143
  file,
145
144
  onSuccess: (res) => {
@@ -150,12 +149,10 @@ export default {
150
149
  this.onUpdate()
151
150
  // 停止屏幕共享
152
151
  track.stop()
153
- this.$emit('fileUploading', false)
154
152
  },
155
153
  onError: (err) => {
156
154
  this.error = err.message || '截屏失败,请重试'
157
155
  track.stop()
158
- this.$emit('fileUploading', false)
159
156
  }
160
157
  })
161
158
  } catch (err) {
@@ -196,20 +193,17 @@ export default {
196
193
  this.screenshots.push('') // 添加空占位
197
194
 
198
195
  // 上传文件
199
- this.$emit('fileUploading', true)
200
196
  fnUploadRequest({
201
197
  file,
202
198
  onSuccess: (res) => {
203
199
  this.$set(this.screenshots, this.screenshots.length - 1, res.url)
204
200
  this.onUpdate()
205
201
  this.$refs.fileInput.value = '' // 清空文件输入框
206
- this.$emit('fileUploading', false)
207
202
  },
208
203
  onError: (err) => {
209
204
  this.error = err.message || '上传失败,请重试'
210
205
  this.screenshots.pop() // 移除空占位
211
206
  this.$refs.fileInput.value = ''
212
- this.$emit('fileUploading', false)
213
207
  }
214
208
  })
215
209
  }
@@ -171,7 +171,6 @@ export default {
171
171
 
172
172
  this.recordings.push('') // 添加空占位
173
173
  // 上传文件
174
- this.$emit('fileUploading', true)
175
174
  fnUploadRequest({
176
175
  file,
177
176
  onSuccess: (res) => {
@@ -181,13 +180,11 @@ export default {
181
180
  this.onUpdate()
182
181
  // 停止所有媒体轨道
183
182
  stream.getTracks().forEach((track) => track.stop())
184
- this.$emit('fileUploading', false)
185
183
  },
186
184
  onError: (err) => {
187
185
  this.error = err.message || '截屏失败,请重试'
188
186
  stream.getTracks().forEach((track) => track.stop())
189
187
  this.recordings.pop()
190
- this.$emit('fileUploading', false)
191
188
  }
192
189
  })
193
190
  }
@@ -268,18 +265,15 @@ export default {
268
265
  this.recordings.push('') // 添加空占位
269
266
 
270
267
  // 使用现有的上传方法
271
- this.$emit('fileUploading', true)
272
268
  fnUploadRequest({
273
269
  file,
274
270
  onSuccess: (res) => {
275
271
  this.$set(this.recordings, this.recordings.length - 1, res.url)
276
272
  this.onUpdate()
277
- this.$emit('fileUploading', false)
278
273
  },
279
274
  onError: (err) => {
280
275
  this.error = err.message || '上传失败,请重试'
281
276
  this.recordings.pop() // 移除空占位
282
- this.$emit('fileUploading', false)
283
277
  }
284
278
  })
285
279
 
@@ -23,7 +23,8 @@ export async function fnUploadRequest(options) {
23
23
  stsToken: resData.securityToken,
24
24
  bucket: resData.bucket, // 你的 OSS bucket 名称
25
25
  region: 'oss-cn-beijing', // bucket 所在地址,我的是 华北2 北京
26
- endpoint: 'oss-cn-beijing.aliyuncs.com' // 自己的域名
26
+ endpoint: 'oss-cn-beijing.aliyuncs.com', // 自己的域名
27
+ timeout: 600000
27
28
  // cname: 'udstatic.imeik.com'
28
29
  })
29
30
  const file = options.file // 拿到 file
@@ -26,7 +26,6 @@
26
26
  v-model="formConfig.props.requirementImageUrlList"
27
27
  @startCapture="closeDialog"
28
28
  @endCapture="showDialog"
29
- @fileUploading="onFileUploading"
30
29
  />
31
30
  <!-- 录屏组件插槽,双向绑定上传视频数据,监听开始和结束录制事件 -->
32
31
  <RecordScreen
@@ -35,7 +34,6 @@
35
34
  v-model="formConfig.props.requirementVideoUrlList"
36
35
  @startRecord="onStartRecord"
37
36
  @endRecord="onEndRecord"
38
- @fileUploading="onFileUploading"
39
37
  />
40
38
  </ImForm>
41
39
  </ImDialog>
@@ -63,9 +61,6 @@ export default {
63
61
  // 组件数据
64
62
  data() {
65
63
  return {
66
- // 文件上传状态标识
67
- isFileUploading: false,
68
-
69
64
  // 录制状态标识
70
65
  isRecording: false,
71
66
 
@@ -141,8 +136,7 @@ export default {
141
136
  attrs: {
142
137
  fileSize: 500, // 文件大小限制,单位MB
143
138
  limit: 3, // 文件数量限制
144
- tipText: '请上传附件,每个附件不超过500M,最多上传3个附件',
145
- getUploadStatus: this.onFileUploading
139
+ tipText: '请上传附件,每个附件不超过500M,最多上传3个附件'
146
140
  }
147
141
  }
148
142
  ]
@@ -181,11 +175,6 @@ export default {
181
175
  * @param {Object} form - 表单数据
182
176
  */
183
177
  handleSubmit(form) {
184
- if (this.isFileUploading) {
185
- this.$message.warning('文件还在上传,请稍等')
186
- return
187
- }
188
-
189
178
  this.$refs.ImForm.validate((valid) => {
190
179
  // 表单校验不通过,提示用户
191
180
  if (!valid) {
@@ -251,10 +240,6 @@ export default {
251
240
  })
252
241
  },
253
242
 
254
- onFileUploading(status) {
255
- this.isFileUploading = status
256
- },
257
-
258
243
  /**
259
244
  * 清空表单数据
260
245
  */