agilebuilder-ui 1.1.31 → 1.1.33-sit1

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
- import { _ as s } from "./index-0ffdab4a.js";
2
+ import { _ as s } from "./index-cb620716.js";
3
3
  const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
4
4
  this.src = this.$route.query.src;
5
5
  } }, mounted() {
@@ -1,4 +1,4 @@
1
- import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-0ffdab4a.js";
1
+ import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-cb620716.js";
2
2
  import { resolveComponent as u, openBlock as d, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
3
3
  const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
4
4
  return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
2
- import { _ as I } from "./index-0ffdab4a.js";
2
+ import { _ as I } from "./index-cb620716.js";
3
3
  const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
4
4
  const o = this.$route.query.workflowId;
5
5
  o && (this.workflowId = parseInt(o));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.31",
3
+ "version": "1.1.33-sit1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -15,66 +15,44 @@
15
15
  @chooseFile="pickBrowserFiles"
16
16
  @remove="removeFile"
17
17
  />
18
- <!-- <template v-if="openCameraOrChoosePhoto && openCameraOrChoosePhoto === 'openCamera'"> -->
19
- <!-- 由于直接打开capture相机属性的设置为空或者不是user/environment其中的任意一项时会打开的本地捕获音频 麦克风-->
20
- <!-- 所有使用 template 可查看 https://w3c.github.io/html-media-capture/#introduction -->
18
+ <template
19
+ v-if="openCameraOrChoosePhoto === 'openChoosePhoto' || openCameraOrChoosePhoto === 'openCameraAndChoosePhoto'"
20
+ >
21
21
  <input
22
- v-if="multiple && !disabled"
23
22
  ref="fileRef"
24
23
  type="file"
25
- multiple="multiple"
26
- :capture="'environment'"
24
+ :multiple="multipleUpload"
27
25
  name="file"
28
26
  :accept="myAccept"
29
27
  style="display: none"
30
28
  @change="uploadFiles"
31
29
  />
32
- <input
33
- v-else-if="!disabled"
34
- ref="fileRef"
35
- type="file"
36
- :capture="'environment'"
37
- name="file"
38
- style="display: none"
39
- :accept="myAccept"
40
- @change="uploadFiles"
41
- />
42
- <!-- </template>
30
+ </template>
43
31
  <template v-else>
32
+ <!-- 由于直接打开capture相机属性的设置为空或者不是user/environment其中的任意一项时会打开的本地捕获音频 麦克风-->
33
+ <!-- 所有使用 template 可查看 https://w3c.github.io/html-media-capture/#introduction -->
44
34
  <input
45
- v-if="multiple && !disabled"
46
35
  ref="fileRef"
47
36
  type="file"
48
- multiple="multiple"
37
+ :multiple="multipleUpload"
38
+ capture="environment"
49
39
  name="file"
50
40
  :accept="myAccept"
51
41
  style="display: none"
52
42
  @change="uploadFiles"
53
43
  />
54
- <input
55
- v-else-if="!disabled"
56
- ref="fileRef"
57
- type="file"
58
- name="file"
59
- style="display: none"
60
- :accept="myAccept"
61
- @change="uploadFiles"
62
- />
63
- </template> -->
44
+ </template>
64
45
  <el-drawer v-model="fileTypeFlag" direction="btt" @close="fileTypeFlag = false">
65
- <div><el-button
66
- link
67
- @click="confirmFileType('image')"
68
- >
69
- {{ $t('fsUpload.image') }}
70
- </el-button></div>
71
46
  <div>
72
- <el-button
73
- link
74
- @click="confirmFileType('video')"
75
- >
76
- {{ $t('fsUpload.video') }}
77
- </el-button></div>
47
+ <el-button link @click="confirmFileType('image')">
48
+ {{ $t('fsUpload.image') }}
49
+ </el-button>
50
+ </div>
51
+ <div>
52
+ <el-button link @click="confirmFileType('video')">
53
+ {{ $t('fsUpload.video') }}
54
+ </el-button>
55
+ </div>
78
56
  </el-drawer>
79
57
  </div>
80
58
  </template>
@@ -203,6 +181,15 @@ const props = defineProps({
203
181
  default: () => {}
204
182
  }
205
183
  })
184
+ const multipleUpload = ref<string | null>(null)
185
+ if (props.multiple) {
186
+ multipleUpload.value = 'multiple'
187
+ }
188
+ const isDingTalk = ref(false)
189
+ const authSource = window.localStorage.getItem('auth_source')
190
+ if (authSource && authSource === 'dingtalk') {
191
+ isDingTalk.value = true
192
+ }
206
193
 
207
194
  const fileListResult = ref(props.fileList)
208
195
 
@@ -230,11 +217,11 @@ if (props.action) {
230
217
 
231
218
  defaultAction.value = getReplaceUrlDomain(defaultAction.value)
232
219
 
233
- let myAccept = ref(props.accept ? props.accept : '')
220
+ let myAccept = ref(props.accept ? props.accept : 'image/*')
234
221
  let tempFileList = ref([])
235
222
  let isUploading = ref(false)
236
223
  let isFile = ref(false)
237
- const fileRef = ref(null)
224
+ const fileRef = ref()
238
225
  const fileTypeFlag = ref(false)
239
226
  const emits = defineEmits(['remove', 'uploadend'])
240
227
  const { t } = useI18n()
@@ -256,17 +243,21 @@ function isImg(file) {
256
243
  function removeFile(param) {
257
244
  console.log('removeFile----param=', param)
258
245
  const file = param.file
259
- if(file){
246
+ if (file) {
260
247
  emits('remove', { rmFiles: [file], serverFiles: fileListResult.value, index: param.index })
261
248
  }
262
249
  }
263
250
  function pickBrowserFiles() {
264
251
  // if (props.openCameraOrChoosePhoto && props.openCameraOrChoosePhoto === 'openCamera') {
265
- // 只打开相机
266
- myAccept.value = 'image/*'
267
- setTimeout(() => {
268
- fileRef.value.click()
269
- })
252
+ // 只打开相机
253
+ myAccept.value = 'image/*'
254
+ // if (isDingTalk.value) {
255
+ // dingtalkChooseImage()
256
+ // } else {
257
+ setTimeout(() => {
258
+ fileRef.value.click()
259
+ })
260
+ // }
270
261
  // } else {
271
262
  // // 相机和文件都可以选
272
263
  // myAccept.value = '*'
@@ -299,7 +290,7 @@ async function uploadBrowserFile() {
299
290
  limitFileSize = 30
300
291
  }
301
292
  let isCanUpload = false
302
- const files = fileRef.value.files
293
+ const files = fileRef.value.files
303
294
  for (let i = 0; i < files.length; i++) {
304
295
  const newFile = files[i]
305
296
  isCanUpload = validateCanUploadFile(newFile, limitFileSize)
@@ -309,18 +300,24 @@ async function uploadBrowserFile() {
309
300
  break
310
301
  }
311
302
  }
312
- console.error('isCanUpload=', isCanUpload)
303
+ console.error('isCanUpload=', isCanUpload)
313
304
  if (isCanUpload) {
314
305
  for (let i = 0; i < files.length; i++) {
315
306
  const fileObj = files[i]
316
- console.error('fileObj.name=', fileObj.name, 'fileNames=', fileNames)
307
+ console.error('fileObj.name=', fileObj.name, 'fileNames=', fileNames)
317
308
  if (fileNames.indexOf(fileObj.name) >= 0) {
318
309
  selectFiles.push(fileObj)
319
310
  }
320
311
  if (props.beforeUpload && typeof props.beforeUpload === 'function') {
321
312
  const isMobile = true
322
313
  // eslint-disable-next-line no-useless-call
323
- isCanUpload = props.beforeUpload({fileObj, files:selectFiles, isMobile, pageContext: props.pageContext, configureObj: props.configure})
314
+ isCanUpload = props.beforeUpload({
315
+ fileObj,
316
+ files: selectFiles,
317
+ isMobile,
318
+ pageContext: props.pageContext,
319
+ configureObj: props.configure
320
+ })
324
321
  }
325
322
  }
326
323
  }
@@ -353,7 +350,6 @@ async function uploadBrowserFile() {
353
350
  }
354
351
  param.append('systemCode', props.systemCode)
355
352
 
356
- console.log('上传文件111-----defaultAction.value=',defaultAction.value, 'param=', param, 'uploadFiles=', uploadFiles)
357
353
  window.$vueApp.config.globalProperties.$http
358
354
  .post(defaultAction.value, param, { headers: { 'Content-Type': 'multipart/form-data', Authorization: getToken() } })
359
355
  .then((result) => {
@@ -381,14 +377,13 @@ async function uploadBrowserFile() {
381
377
  }
382
378
  function validateCanUploadFile(file, limitFileSize) {
383
379
  let isCanUpload = true
384
- console.log('上传文件--验证文件大小--file.size=', file.size, '文件线状大小,单位是M,limitFileSize=', limitFileSize)
385
380
  if (file.size > limitFileSize * 1024 * 1024) {
386
381
  // 超过最大限制
387
382
  ElMessage({
388
- showClose: true,
389
- type: 'warning',
390
- message: t('fileUpload.exceedFileSize', { fileName: file.name, fileSize: limitFileSize })
391
- })
383
+ showClose: true,
384
+ type: 'warning',
385
+ message: t('fileUpload.exceedFileSize', { fileName: file.name, fileSize: limitFileSize })
386
+ })
392
387
  // 返回false停止上传
393
388
  isCanUpload = false
394
389
  }
@@ -396,35 +391,23 @@ function validateCanUploadFile(file, limitFileSize) {
396
391
  }
397
392
  // 所有文件上传完毕后
398
393
  function uploadComplete(result) {
399
- console.log('uploadComplete=开始')
400
- if(!fileListResult.value){
394
+ if (!fileListResult.value) {
401
395
  fileListResult.value = []
402
396
  }
403
397
  if (props.multiple) {
404
- console.log(
405
- 'uploadComplete====fileListResult.value111=',
406
- JSON.stringify(fileListResult.value),
407
- 'result=',
408
- result
409
- )
410
398
  fileListResult.value = fileListResult.value.concat(result)
411
- console.log('uploadComplete====fileListResult.value222=', fileListResult.value)
412
399
  } else {
413
400
  // 单选时将已选文件移除,然后再替换为新上传的文件
414
- console.log('uploadComplete====fileListResult.value333=', JSON.stringify(fileListResult.value))
415
401
  const rmFiles = JSON.parse(JSON.stringify(fileListResult.value))
416
402
  fileListResult.value.push(result)
417
403
  emits('remove', { rmFiles, serverFiles: fileListResult.value, index: 0 })
418
- console.log('uploadComplete====fileListResult.value444=', fileListResult.value)
419
404
  }
420
- console.log('uploadComplete====fileListResult.value555=', fileListResult.value)
421
405
 
422
406
  fileRef.value.value = null
423
407
  isUploading.value = false
424
408
  fileUploadRef.value.changeFileList(fileListResult.value)
425
409
  // 表示上传完成
426
410
  emits('uploadend', fileListResult.value)
427
- console.log('uploadComplete====上传完成=')
428
411
  }
429
412
  function uploadFiles() {
430
413
  uploadBrowserFiles()
@@ -433,8 +416,19 @@ function uploadBrowserFiles() {
433
416
  console.log('uploadBrowserFiles=====上传开始=')
434
417
  const files = fileRef.value.files
435
418
  if (files && files.length > 0) {
436
- isUploading.value = true
437
- uploadBrowserFile()
419
+ if (isDingTalk.value && !props.multiple && files.length > 1) {
420
+ // 清除文件列表
421
+ ElMessage({
422
+ showClose: true,
423
+ type: 'warning',
424
+ message: '文件最大上传数量: 1'
425
+ })
426
+ fileRef.value.value = null
427
+ return
428
+ } else {
429
+ isUploading.value = true
430
+ uploadBrowserFile()
431
+ }
438
432
  } else {
439
433
  uploadNoNewFiles()
440
434
  }
@@ -475,6 +469,34 @@ function compressionImg(selectFiles) {
475
469
  }
476
470
  return Promise.all(uploadFilesPromises)
477
471
  }
472
+
473
+ function dingtalkChooseImage() {
474
+ let sourceType = ['album']
475
+ if (props.openCameraOrChoosePhoto === 'openCameraAndChoosePhoto') {
476
+ sourceType = ['album', 'camera']
477
+ } else if (props.openCameraOrChoosePhoto === 'openChoosePhoto') {
478
+ sourceType = ['album']
479
+ } else if (props.openCameraOrChoosePhoto === 'openCamera') {
480
+ sourceType = ['camera']
481
+ }
482
+ let count = 1
483
+ if (props.multiple) {
484
+ count = 20
485
+ if (props.limit) {
486
+ count = props.limit
487
+ }
488
+ }
489
+ window.top.$dd.biz.util
490
+ .chooseImage({
491
+ sourceType: sourceType,
492
+ count: count
493
+ })
494
+ .then((res) => {
495
+ //
496
+ if (res && res.filePaths && res.filePaths.length > 0) {
497
+ }
498
+ })
499
+ }
478
500
  </script>
479
501
 
480
502
  <style lang="scss" scoped></style>
@@ -1,54 +1,54 @@
1
1
  <template>
2
2
  <div>
3
3
  <el-input
4
- ref="item"
4
+ ref="item"
5
+ :disabled="disabled"
6
+ v-model="fileNames"
7
+ :placeholder="$t('imatrixUIMessage.fileUpload')"
8
+ :readonly="true"
9
+ >
10
+ <template v-slot:append>
11
+ <el-button :icon="Upload" size="default" @click="openAnnexUpload" />
12
+ </template>
13
+ </el-input>
14
+
15
+ <el-dialog
16
+ v-model="annexUploadFlag"
17
+ :append-to-body="true"
18
+ :show-close="true"
19
+ :title="$t('imatrixUIMessage.upload')"
20
+ width="80%"
21
+ @close="annexUploadFlag = false"
22
+ >
23
+ <FileUploadMobile
24
+ ref="fileUploadRef"
5
25
  :disabled="disabled"
6
- v-model="fileNames"
7
- :placeholder="$t('imatrixUIMessage.fileUpload')"
8
- :readonly="true"
9
- >
10
- <template v-slot:append>
11
- <el-button :icon="Upload" size="default" @click="openAnnexUpload" />
12
- </template>
13
- </el-input>
14
-
15
- <el-dialog
16
- v-model="annexUploadFlag"
17
- :append-to-body="true"
18
- :show-close="true"
19
- :title="$t('imatrixUIMessage.upload')"
20
- width="80%"
21
- @close="annexUploadFlag=false"
22
- >
23
- <FileUploadMobile
24
- ref="fileUploadRef"
25
- :disabled="disabled"
26
- :fileInfo="fileInfo"
27
- :systemCode="systemCode"
28
- :accept="accept"
29
- :multiple="multiple"
30
- :limit="limit"
31
- :limitFileSize="limitFileSize"
32
- :placeholder="placeholder"
33
- :action="action"
34
- :headers="headers"
35
- :file-list="fileList"
36
- :beforeUpload="beforeUpload"
37
- :onSuccess="onSuccess"
38
- :beforeRemove="beforeRemove"
39
- :onRemove="onRemove"
40
- :beforeDownload="beforeDownload"
41
- :pageContext="pageContext"
42
- :configure="configure"
43
- :openFsUpload="openFsUpload"
44
- :componentId="componentId"
45
- :componentName="componentName"
46
- :listCode="listCode"
47
- :openCameraOrChoosePhoto="openCameraOrChoosePhoto"
48
- @uploadend="uploadendMobile"
49
- @remove="removeMobileFile"
50
- />
51
- </el-dialog>
26
+ :fileInfo="fileInfo"
27
+ :systemCode="systemCode"
28
+ :accept="accept"
29
+ :multiple="multiple"
30
+ :limit="limit"
31
+ :limitFileSize="limitFileSize"
32
+ :placeholder="placeholder"
33
+ :action="action"
34
+ :headers="headers"
35
+ :file-list="fileList"
36
+ :beforeUpload="beforeUpload"
37
+ :onSuccess="onSuccess"
38
+ :beforeRemove="beforeRemove"
39
+ :onRemove="onRemove"
40
+ :beforeDownload="beforeDownload"
41
+ :pageContext="pageContext"
42
+ :configure="configure"
43
+ :openFsUpload="openFsUpload"
44
+ :componentId="componentId"
45
+ :componentName="componentName"
46
+ :listCode="listCode"
47
+ :openCameraOrChoosePhoto="openCameraOrChoosePhoto"
48
+ @uploadend="uploadendMobile"
49
+ @remove="removeMobileFile"
50
+ />
51
+ </el-dialog>
52
52
  </div>
53
53
  </template>
54
54
 
@@ -56,9 +56,7 @@
56
56
  import { ref, defineEmits } from 'vue'
57
57
  import { ElMessage } from 'element-plus'
58
58
  import FileUploadMobile from './file-upload.vue'
59
- import {
60
- Upload
61
- } from '@element-plus/icons-vue'
59
+ import { Upload } from '@element-plus/icons-vue'
62
60
 
63
61
  const props = defineProps({
64
62
  openFsUpload: {
@@ -179,43 +177,57 @@ const props = defineProps({
179
177
  const emits = defineEmits(['remove', 'uploadend'])
180
178
  const annexUploadFlag = ref(false)
181
179
  const fileNames = ref(null)
182
- fileNames.value = props.fileList && props.fileList.length > 0 ? props.fileList.map((item: any) => item.showName).join(','): null
180
+ fileNames.value =
181
+ props.fileList && props.fileList.length > 0 ? props.fileList.map((item: any) => item.showName).join(',') : null
183
182
 
184
- const openAnnexUpload = ()=>{
183
+ const openAnnexUpload = () => {
185
184
  console.log('点击选择文件按钮---')
186
185
  annexUploadFlag.value = true
187
186
  }
188
187
 
189
188
  function uploadendMobile(fileList) {
190
- const fileServerPaths = Array.from(props.fileList,({serverPath})=>serverPath)
191
- console.log('uploadendMobile---props.fileList=', JSON.stringify(props.fileList),'fileServerPaths=',fileServerPaths, 'fileList=', JSON.stringify(fileList))
192
- fileList.forEach(file=>{
189
+ const fileServerPaths = Array.from(props.fileList, ({ serverPath }) => serverPath)
190
+ console.log(
191
+ 'uploadendMobile---props.fileList=',
192
+ JSON.stringify(props.fileList),
193
+ 'fileServerPaths=',
194
+ fileServerPaths,
195
+ 'fileList=',
196
+ JSON.stringify(fileList)
197
+ )
198
+ fileList.forEach((file) => {
193
199
  // 如果已经存在就不要重复添加到fileList中了
194
- if(fileServerPaths.indexOf(file.serverPath) < 0){
200
+ if (fileServerPaths.indexOf(file.serverPath) < 0) {
195
201
  props.fileList.push({
196
202
  showName: file.name,
197
203
  serverPath: file.serverPath
198
204
  })
199
205
  }
200
206
  })
201
- console.log('uploadendMobile2222---props.fileList=', JSON.stringify(props.fileList),'fileServerPaths=',fileServerPaths, 'fileList=', JSON.stringify(fileList))
202
- fileNames.value =props.fileList.map((item: any) => item.showName).join(',')
207
+ console.log(
208
+ 'uploadendMobile2222---props.fileList=',
209
+ JSON.stringify(props.fileList),
210
+ 'fileServerPaths=',
211
+ fileServerPaths,
212
+ 'fileList=',
213
+ JSON.stringify(fileList)
214
+ )
215
+ fileNames.value = props.fileList.map((item: any) => item.showName).join(',')
203
216
  console.log('uploadendMobile3333---fileNames.value=', fileNames.value)
204
217
  props.onSuccess()
205
218
  }
206
219
 
207
-
208
220
  function removeMobileFile(param) {
209
221
  // console.log('removeMobileFile---props.fileList=', props.fileList, 'param=', param)
210
222
  const deleteFile = param.rmFiles && param.rmFiles.length > 0 ? param.rmFiles[0] : null
211
- if(deleteFile){
223
+ if (deleteFile) {
212
224
  let index = props.fileList.findIndex((item: any) => item.serverPath === deleteFile.serverPath)
213
225
  if (index > -1) {
214
226
  // eslint-disable-next-line vue/no-mutating-props
215
227
  props.fileList.splice(index, 1)
216
228
  }
217
229
  }
218
- fileNames.value =props.fileList.map((item: any) => item.showName).join(',')
230
+ fileNames.value = props.fileList.map((item: any) => item.showName).join(',')
219
231
  props.onRemove()
220
232
  }
221
233
 
@@ -241,7 +253,7 @@ function uploadFileDone(data) {
241
253
  fileUploadRef.value.uploadFileDone(data)
242
254
  }
243
255
  }
244
- defineExpose({pickFileDone,uploadFileDone})
256
+ defineExpose({ pickFileDone, uploadFileDone })
245
257
  </script>
246
258
 
247
259
  <style lang="scss" scoped></style>
@@ -224,7 +224,7 @@ function removeFile({ rmFiles, serverFiles, newFiles }) {
224
224
  // 更新字段的值
225
225
  ElMessage({
226
226
  showClose: true,
227
- message: t('fileUpload.updateSuccess'),
227
+ message: t('fsUpload.updateSuccess'),
228
228
  type: 'success'
229
229
  })
230
230
  })
@@ -96,6 +96,7 @@
96
96
  :is-show="operation.isShow"
97
97
  :label="operation.props.label ? operation.props.label : row[column.prop]"
98
98
  :on-click="operation.onClick"
99
+ :operation="operation"
99
100
  :operation-index="operationIndex"
100
101
  :operation-setting="operation.props"
101
102
  :row-index="rowIndex"
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
- <span :style="myStyle">
4
+ <span class="table-operation-row-btn" :style="myStyle">
5
5
  <template v-if="isShowButton()">
6
6
  <el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
7
- <template v-if="operationSettingData.permission">
7
+ <template v-if="operationSettingData?.permission">
8
8
  <component
9
9
  v-bind="operationSettingData"
10
10
  :is="isElementType"
@@ -77,9 +77,13 @@ export default {
77
77
  type: String,
78
78
  default: null,
79
79
  },
80
+ operation: {
81
+ type: Object,
82
+ default: () => ({}),
83
+ },
80
84
  operationSetting: {
81
85
  type: Object,
82
- default: null,
86
+ default: () => ({}),
83
87
  },
84
88
  operationIndex: {
85
89
  type: Number,
@@ -104,24 +108,28 @@ export default {
104
108
  ...mapGetters(['preventReclick']),
105
109
  // 是否是保存按钮
106
110
  isSaveRow() {
107
- return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
111
+ return ['lineEditSave', 'saveRow'].includes(this.operation?.eventName)
112
+ // return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
108
113
  },
109
114
  // 是否是删除按钮
110
115
  isDeleteRow() {
111
- return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
116
+ return ['lineEditDelete', 'deleteRow'].includes(this.operation?.eventName)
117
+ // return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
112
118
  },
113
119
  // 是否是修改按钮
114
120
  isEditRow() {
115
- return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
121
+ return ['lineEditUpdate', 'editRow'].includes(this.operation?.eventName)
122
+ // return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
116
123
  },
117
124
  // 是否是取消按钮
118
125
  isRestoreRow() {
119
- return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
126
+ return ['restoreEdit', 'restoreRow'].includes(this.operation?.eventName)
127
+ // return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
120
128
  },
121
129
  // 前置图标
122
130
  prefixIcon() {
123
131
  if (this.suffixIcon) return undefined
124
- if(['left', true].includes(this.operationSettingData.iconPosition) || this.operationSetting.iconValue) return this.operationSetting.iconValue
132
+ if(['left', true, ''].includes(this.operationSetting.iconPosition) || this.operationSetting.iconValue) return this.operationSetting.iconValue
125
133
  if (this.isTextIcon) {
126
134
  // 当没有初始图标,根据事件类型 绑定图标
127
135
  if(this.isSaveRow) return 'amb-icon-save'
@@ -133,16 +141,16 @@ export default {
133
141
  },
134
142
  // 后置图标
135
143
  suffixIcon() {
136
- if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
144
+ if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
137
145
  return undefined
138
146
  },
139
147
  // 是否显示文字按钮 > 图标模式
140
148
  isTextIcon() {
141
149
  if (this.isTableBtnLinkShow) {
142
- if (this.operationSettingData.isTextIcon === undefined) {
150
+ if (this.operationSetting.isTextIcon === undefined) {
143
151
  return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
144
152
  }
145
- return this.operationSettingData.isTextIcon
153
+ return this.operationSetting.isTextIcon
146
154
  } else {
147
155
  return false
148
156
  }
@@ -157,14 +165,14 @@ export default {
157
165
  },
158
166
  // 是否自动开启表格 按钮 转 文字按钮
159
167
  isTableBtnLinkShow() {
160
- if (this.operationSetting.text) return true
168
+ if (this.operationSetting?.text) return true
161
169
  if (this.isTableBtnLink && this.elementType === 'el-button') {
162
- return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
170
+ return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
163
171
  }
164
172
  return false
165
173
  },
166
174
  operationSettingData() {
167
- const dataList = { ...this.operationSetting }
175
+ const dataList = { ...(this.operationSetting ?? {}) }
168
176
  if (this.isTableBtnLinkShow) {
169
177
  dataList.underline = false
170
178
  delete dataList.text
@@ -276,7 +276,8 @@ const cn = {
276
276
  uploadSucceeded: '上传成功',
277
277
  theNumberOfUploadsExceedsTheLimitTheLimitIs: '上传数量超过限制,限制数量为',
278
278
  image: '图片',
279
- video: '视频'
279
+ video: '视频',
280
+ updateSuccess: '更新成功'
280
281
  },
281
282
  messageVideo: {
282
283
  attemptingToIdentify: '正在尝试识别....',
@@ -275,7 +275,8 @@ const en = {
275
275
  uploadSucceeded: 'Upload succeeded',
276
276
  theNumberOfUploadsExceedsTheLimitTheLimitIs: 'The number of uploads exceeds the limit. The limit is',
277
277
  image: 'Image',
278
- video: 'Video'
278
+ video: 'Video',
279
+ updateSuccess: 'Update success'
279
280
  },
280
281
  messageVideo: {
281
282
  attemptingToIdentify: 'Attempting to identify',