|
|
@@ -8,12 +8,12 @@
|
|
|
<app-icon icon="PictureFilled" v-if="item.pictureurl" />
|
|
|
</h3>
|
|
|
<section @click="onRowClick(item)">
|
|
|
- <dl>
|
|
|
+ <dl @click="formData.orderBuyOrSell = 0">
|
|
|
<dt>{{ t('quote.ask') }}</dt>
|
|
|
<dd :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}
|
|
|
</dd>
|
|
|
</dl>
|
|
|
- <dl>
|
|
|
+ <dl @click="formData.orderBuyOrSell = 1">
|
|
|
<dt>{{ t('quote.bid') }}</dt>
|
|
|
<dd :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}
|
|
|
</dd>
|
|
|
@@ -28,17 +28,19 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
|
|
|
+import { shallowRef, onMounted, onUnmounted, defineAsyncComponent, ref } from 'vue'
|
|
|
import { getFileUrl } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { handleNumberValue, formatDecimal } from '@/filters'
|
|
|
-import { useUserStore, useFuturesStore, useGlobalStore, i18n } from '@/stores'
|
|
|
+import { useUserStore, useFuturesStore, useGlobalStore, useSettingStore, i18n } from '@/stores'
|
|
|
import AppIcon from '@pc/components/base/icon/index.vue'
|
|
|
|
|
|
const t = i18n.global.t
|
|
|
const futuresStore = useFuturesStore()
|
|
|
const globalStore = useGlobalStore()
|
|
|
const userStore = useUserStore()
|
|
|
+const settingStore = useSettingStore()
|
|
|
+const formData = ref({ ...settingStore.userSetting })
|
|
|
const showViewer = shallowRef(false)
|
|
|
const viewerList = shallowRef<string[]>([])
|
|
|
|
|
|
@@ -51,10 +53,13 @@ const componentMap = new Map<string, unknown>([
|
|
|
['detail', defineAsyncComponent(() => import('@pc/components/modules/goods-detail/index.vue'))], // 详情
|
|
|
])
|
|
|
|
|
|
-const onRowClick = (row: Model.GoodsQuote) => {
|
|
|
+const onRowClick = (row: Model.GoodsQuote, ) => {
|
|
|
if (param1012 !== '0') {
|
|
|
futuresStore.selectedGoodsId = row.goodsid
|
|
|
openComponent('detail')
|
|
|
+ } else {
|
|
|
+ futuresStore.selectedGoodsId = row.goodsid
|
|
|
+ settingStore.updateSettings(formData.value)
|
|
|
}
|
|
|
}
|
|
|
|