|
@@ -1,16 +1,9 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <app-view class="market-detail">
|
|
|
|
|
- <template v-if="isShow">
|
|
|
|
|
- <component :is="Price" v-bind="{ goodsCode }" />
|
|
|
|
|
- <component :is="Chart" v-bind="{ goodsCode }" />
|
|
|
|
|
- <component :is="Tik" v-bind="{ goodsCode }" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </app-view>
|
|
|
|
|
|
|
+ <component v-if="isShow" :is="Chart" v-bind="{ goodsCode }" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { defineAsyncComponent, onMounted, PropType, shallowRef, watch,nextTick } from 'vue'
|
|
|
|
|
-import { useNavigation } from '@mobile/router/navigation'
|
|
|
|
|
|
|
+import { defineAsyncComponent, PropType, shallowRef, watch,nextTick } from 'vue'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
quote: {
|
|
quote: {
|
|
@@ -19,14 +12,9 @@ const props = defineProps({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
|
|
|
|
|
const Chart = defineAsyncComponent(() => import('@mobile/components/modules/hqchart/index.vue'))
|
|
const Chart = defineAsyncComponent(() => import('@mobile/components/modules/hqchart/index.vue'))
|
|
|
-const Tik = defineAsyncComponent(() => import('@mobile/components/modules/quote/tik/index.vue'))
|
|
|
|
|
-
|
|
|
|
|
-const { getQueryString } = useNavigation()
|
|
|
|
|
const isShow = shallowRef(true)
|
|
const isShow = shallowRef(true)
|
|
|
-
|
|
|
|
|
-const goodsCode = shallowRef('')
|
|
|
|
|
|
|
+const goodsCode = shallowRef(props.quote.goodscode)
|
|
|
|
|
|
|
|
watch(() => props.quote, (val) => {
|
|
watch(() => props.quote, (val) => {
|
|
|
isShow.value=false
|
|
isShow.value=false
|
|
@@ -36,13 +24,4 @@ watch(() => props.quote, (val) => {
|
|
|
})
|
|
})
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- const code = getQueryString('goodscode')
|
|
|
|
|
- if ( code != '' && code != undefined ) {
|
|
|
|
|
- goodsCode.value = code ?? ''
|
|
|
|
|
- } else {
|
|
|
|
|
- goodsCode.value = props.quote.goodscode
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|