adtec-core-package 1.3.1 → 1.3.2
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.
package/package.json
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
<template>
|
|
6
6
|
<div
|
|
7
7
|
@click.stop.prevent="displayClick"
|
|
8
|
-
style="width: 100%; min-height: 35px"
|
|
8
|
+
style="width: 100%; min-height: 35px;cursor: pointer;display: flex;align-items: center;"
|
|
9
9
|
ref="ref_divView"
|
|
10
10
|
:id="guid"
|
|
11
|
-
:class="getClass"
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
:class="getClass" >
|
|
12
|
+
<!-- <FocusLock v-if="display" :no-focus-guards="false" class="foucs-lock">-->
|
|
13
|
+
<!-- <slot name="edit" v-if="display" tabindex="9"></slot>-->
|
|
14
|
+
<!-- </FocusLock>-->
|
|
15
|
+
<slot name="edit" v-if="display" tabindex="9"></slot>
|
|
16
16
|
<slot v-else name="view"></slot>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="box" v-if="required" v-show="getRequiredComp"></div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
import { computed, getCurrentInstance, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
22
22
|
import { useActiveElement, useEventBus, useFocus, watchPausable } from '@vueuse/core'
|
|
23
|
-
import FocusLock from 'vue-focus-lock'
|
|
23
|
+
// import FocusLock from 'vue-focus-lock'
|
|
24
24
|
const ref_divView = ref()
|
|
25
25
|
import { v4 as uuidv4 } from 'uuid'
|
|
26
26
|
// const { focused } = useFocusWithin(ref_divView)
|
|
@@ -203,13 +203,12 @@ function listener() {
|
|
|
203
203
|
const displayClick = () => {
|
|
204
204
|
if (props.isEdit) {
|
|
205
205
|
bus.emit()
|
|
206
|
-
console.log(guid)
|
|
207
206
|
bus.on(listener)
|
|
208
207
|
bus1.on(listener)
|
|
209
208
|
resume()
|
|
210
209
|
display.value = true
|
|
211
|
-
nextTick(()
|
|
212
|
-
|
|
210
|
+
nextTick(()=>{
|
|
211
|
+
ref_divView.value.querySelector('input')?.focus()
|
|
213
212
|
})
|
|
214
213
|
}
|
|
215
214
|
}
|
|
@@ -252,6 +252,7 @@ const handleComplete = async () => {
|
|
|
252
252
|
userId: userInfoStore().getUserInfo.id,
|
|
253
253
|
comment: task.value.comment,
|
|
254
254
|
targetKey: selectActivity.value,
|
|
255
|
+
isFirstActivity: returnData.value.find(x => x.taskKey === selectActivity.value)?.isFirstActivity
|
|
255
256
|
}
|
|
256
257
|
if (taskOperate.value?.backFunction) {
|
|
257
258
|
await taskOperate.value.backFunction(askVo)
|
package/src/hooks/useFileView.ts
CHANGED
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import FileView from '../components/upload/FileViewComponents.vue'
|
|
3
|
-
|
|
1
|
+
import WujieVue from 'wujie-vue3'
|
|
4
2
|
const useFileView = () => {
|
|
5
|
-
const ref_fileView = ref(null)
|
|
6
|
-
|
|
7
3
|
const fileView = (id: string) => {
|
|
8
|
-
|
|
9
|
-
//@ts-ignore
|
|
10
|
-
ref_fileView.value?.viewFile(id)
|
|
11
|
-
}
|
|
4
|
+
WujieVue.bus.$emit('viewFile', id)
|
|
12
5
|
}
|
|
13
|
-
|
|
14
|
-
onMounted(() => {
|
|
15
|
-
const container = document.createElement('div')
|
|
16
|
-
document.body.appendChild(container)
|
|
17
|
-
//@ts-ignore
|
|
18
|
-
ref_fileView.value = createApp(FileView).mount(container)
|
|
19
|
-
onUnmounted(() => {
|
|
20
|
-
try {
|
|
21
|
-
//@ts-ignore
|
|
22
|
-
ref_fileView?.value.$destroy()
|
|
23
|
-
} catch {
|
|
24
|
-
/* empty */
|
|
25
|
-
}
|
|
26
|
-
document.body.removeChild(container)
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
6
|
return {
|
|
30
7
|
fileView,
|
|
31
8
|
}
|