Skip to content

Commit

Permalink
修改监听
Browse files Browse the repository at this point in the history
  • Loading branch information
caidefeng committed Jan 23, 2024
1 parent 395266c commit 98e6855
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElOption: typeof import('element-plus/es')['ElOption']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
Expand Down
4 changes: 1 addition & 3 deletions src/views/flowDesign/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ const $props = defineProps<FlowDesignProps>()
const $emits = defineEmits(['update:process', 'update:fields'])
const {fields} = useVModels($props, $emits)
const process = ref<FlowNode>($props.process)
const { undo, redo, canUndo, canRedo} = useRefHistory(process,
{deep: true, clone: cloneDeep }
)
const { undo, redo, canUndo, canRedo} = useRefHistory(process, {deep: true, clone: cloneDeep })
const nodePenalRef = ref<InstanceType<typeof NodePenal>>()
const zoom = ref(100)
const getScale = computed(() => zoom.value / 100)
Expand Down
4 changes: 2 additions & 2 deletions src/views/flowDesign/penal/ApprovalAttr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Segmented from '~/components/Segmented'
import {useVModels} from '@vueuse/core'
import {ApprovalNode} from '../nodes/Approval/index'
import {computed, inject, Ref, ref, watchEffect} from "vue";
import {computed, inject, Ref, ref, onMounted} from "vue"
import {CircleCheck, CircleClose, Switch, Plus, Minus} from "@element-plus/icons-vue";
import {Field} from "~/components/Render/interface";
import {FormProperty} from "~/views/flowDesign/index";
Expand Down Expand Up @@ -125,7 +125,7 @@ const changeHidden = (row: FormProperty) => {
row.required = false
}
}
watchEffect(() => {
onMounted(() => {
const formProperties = node.value.formProperties
node.value.formProperties = fields.value.filter(e => e.value !== undefined).map(e => ({
id: e.id,
Expand Down
4 changes: 2 additions & 2 deletions src/views/flowDesign/penal/CcAttr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Segmented from '~/components/Segmented'
import {useVModels} from '@vueuse/core'
import {CcNode} from '../nodes/Cc/index'
import {computed, inject, Ref, ref, watchEffect} from "vue";
import {computed, inject, Ref, ref, onMounted} from "vue"
import {Field} from "~/components/Render/interface";
const activeName = ref('properties')
Expand Down Expand Up @@ -38,7 +38,7 @@ const allHidden = computed({
}
})
watchEffect(() => {
onMounted(() => {
const formProperties = node.value.formProperties
node.value.formProperties = fields.value.filter(e => e.value !== undefined).map(e => ({
id: e.id,
Expand Down
4 changes: 2 additions & 2 deletions src/views/flowDesign/penal/StartAttr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Segmented from '~/components/Segmented'
import {useVModels} from '@vueuse/core'
import {StartNode} from '../nodes/Start/index'
import {computed, inject, Ref, ref, watchEffect} from "vue";
import {computed, inject, onMounted, Ref, ref} from "vue"
import {Field} from "~/components/Render/interface";
import {FormProperty} from "~/views/flowDesign/index";
Expand Down Expand Up @@ -122,7 +122,7 @@ const changeRequired = (row: FormProperty) => {
row.hidden = false
}
}
watchEffect(() => {
onMounted(() => {
const formProperties = node.value.formProperties
node.value.formProperties = fields.value.filter(e => e.value !== undefined).map(e => ({
id: e.id,
Expand Down

0 comments on commit 98e6855

Please sign in to comment.