|
@@ -50,7 +50,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { PropType, shallowRef, defineAsyncComponent } from 'vue'
|
|
|
|
|
|
|
+import { PropType, shallowRef, defineAsyncComponent, onUnmounted } from 'vue'
|
|
|
import { Button } from 'vant'
|
|
import { Button } from 'vant'
|
|
|
import { formatDate, formatDecimal } from '@/filters'
|
|
import { formatDate, formatDecimal } from '@/filters'
|
|
|
import { getBuyOrSellName,getBuildTypeName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
|
|
import { getBuyOrSellName,getBuildTypeName, getWRTradeOrderStatusName, getGoodsCurrencyItemName } from '@/constants/order'
|
|
@@ -58,6 +58,7 @@ import { useRequest } from '@/hooks/request'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { queryTradeOrderDetail } from '@/services/api/order'
|
|
import { queryTradeOrderDetail } from '@/services/api/order'
|
|
|
import { useFuturesStore } from '@/stores'
|
|
import { useFuturesStore } from '@/stores'
|
|
|
|
|
+import eventBus from '@/services/bus'
|
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -110,10 +111,19 @@ const onRefresh = () => {
|
|
|
run(props.params)
|
|
run(props.params)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 接收委托回应通知
|
|
|
|
|
+const orderRspNotify = eventBus.$on('OrderRsp', () => pullRefreshRef.value?.refresh())
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 暴露组件属性给父组件调用
|
|
// 暴露组件属性给父组件调用
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
refresh: () => {
|
|
refresh: () => {
|
|
|
pullRefreshRef.value?.refresh()
|
|
pullRefreshRef.value?.refresh()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+onUnmounted(() => {
|
|
|
|
|
+ orderRspNotify.cancel()
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|