fix: base 退化为等待2s后执行
This commit is contained in:
parent
bf0538a396
commit
b340469468
|
|
@ -36,17 +36,17 @@ const props = defineProps({
|
|||
const workflow = ref(null);
|
||||
const transitions = ref([]);
|
||||
onMounted(async () => {
|
||||
// setTimeout(()=>{init()}, 500)
|
||||
await init();
|
||||
watch(
|
||||
() => props.ticket_,
|
||||
async (newVal) => {
|
||||
if (newVal && Object.keys(newVal).length > 0) {
|
||||
await init();
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
setTimeout(()=>{init()}, 2000)
|
||||
// await init();
|
||||
// watch(
|
||||
// () => props.ticket_,
|
||||
// async (newVal) => {
|
||||
// if (newVal && Object.keys(newVal).length > 0) {
|
||||
// await init();
|
||||
// }
|
||||
// },
|
||||
// { deep: true }
|
||||
// )
|
||||
})
|
||||
const actionShow = ref(false);
|
||||
const suggestion = ref("")
|
||||
|
|
@ -54,7 +54,7 @@ const isOwn = ref(false)
|
|||
const init = async () => {
|
||||
transitions.value = [];
|
||||
actionShow.value = false;
|
||||
if (props.ticket_ && Object.keys(props.ticket_).length > 0) {
|
||||
if (props.ticket_ && props.ticket_.id) {
|
||||
isOwn.value = props.ticket_.create_by === currentUser.value;
|
||||
const isParticipant =
|
||||
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue