| | |
| | | <script setup> |
| | | import {useI18n} from "vue-i18n" |
| | | import {computed} from "vue"; |
| | | const { t } = useI18n() |
| | | let props = defineProps({ |
| | | craftObj:null, |
| | | process:null, |
| | | oldCraftComputed:null, |
| | | newCraftComputed:null |
| | | }) |
| | | const resetCraft = () => { |
| | | props.craftObj.newCraft = [] |
| | |
| | | emit('saveCraft') |
| | | } |
| | | |
| | | const newCraftComputed = computed(() =>{ |
| | | return props.craftObj.newCraft.join('->') || null |
| | | }) |
| | | const oldCraftComputed = computed(() =>{ |
| | | return props.craftObj.oldCraft.join('->') || null |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | craftVisible.value= false |
| | | } |
| | | |
| | | const newCraftComputed = computed(() =>{ |
| | | return craftObj.newCraft.join('->') |
| | | }) |
| | | const oldCraftComputed = computed(() =>{ |
| | | return craftObj.oldCraft.join('->') |
| | | }) |
| | | |
| | | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | |
| | | |
| | | <update-order-craft |
| | | :craftObj="craftObj" |
| | | :new-craft-computed="newCraftComputed" |
| | | :old-craft-computed="oldCraftComputed" |
| | | :process="process" |
| | | @saveCraft="saveCraft" |
| | | /> |