Skip to content

Commit bedeaad

Browse files
author
spark
committed
添加按钮位置修改
1 parent 4f05820 commit bedeaad

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

frontend/src/components/stock.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ onMounted(() => {
6464
if(isTradingTime()){
6565
monitor()
6666
}
67-
}, 1000)
67+
}, 1500)
6868
6969
})
7070
@@ -126,7 +126,7 @@ function getStockList(){
126126
})
127127
}
128128
129-
function monitor() {
129+
async function monitor() {
130130
for (let code of stocks.value) {
131131
// console.log(code)
132132
Greet(code).then(result => {
@@ -227,7 +227,7 @@ function fullscreen(){
227227
</script>
228228

229229
<template>
230-
<n-grid :x-gap="8" :cols="3" :y-gap="8">
230+
<n-grid :x-gap="8" :cols="3" :y-gap="8" ref="containerRef">
231231
<n-gi v-for="result in results" >
232232
<n-card size="small" style="min-height: 240px" :data-code="result['股票代码']" :bordered="false" :title="result['股票名称']" closable @close="removeMonitor(result['股票代码'],result['股票名称'])">
233233
<n-grid :cols="1" :y-gap="6">
@@ -270,17 +270,22 @@ function fullscreen(){
270270
</template>
271271
</n-card >
272272
</n-gi>
273+
<n-gi>
274+
<n-card size="small" style="min-height: 240px;vertical-align: center;padding-top: 100px">
275+
<n-button-group>
276+
<n-auto-complete v-model:value="data.name" type="text"
277+
:input-props="{
278+
autocomplete: 'disabled',
279+
}"
280+
:options="options"
281+
placeholder="输入股票名称或者代码"
282+
clearable class="input" @input="getStockList" :on-select="onSelect"/>
283+
<n-button type="info" @click="AddStock">添加 </n-button>&nbsp;&nbsp;
284+
<n-button type="warning" @click="fullscreen"> {{data.fullscreen?'退出全屏':'全屏'}} </n-button>
285+
</n-button-group>
286+
</n-card>
287+
</n-gi>
273288
</n-grid>
274-
<n-auto-complete v-model:value="data.name" type="text"
275-
:input-props="{
276-
autocomplete: 'disabled',
277-
}"
278-
:options="options"
279-
placeholder="股票名称或者代码"
280-
clearable class="input" @input="getStockList" :on-select="onSelect"/>
281-
<n-button type="info" @click="AddStock"> 添加 </n-button>
282-
<n-button type="warning" @click="fullscreen"> {{data.fullscreen?'退出全屏':'全屏'}} </n-button>
283-
284289
<n-modal transform-origin="center" size="small" v-model:show="modalShow" :title="formModel.name" style="width: 400px" :preset="'card'">
285290
<n-form :model="formModel" :rules="{ costPrice: { required: true, message: '请输入成本'}, volume: { required: true, message: '请输入数量'} }" label-placement="left" label-width="80px">
286291
<n-form-item label="成本(元)" path="costPrice">

0 commit comments

Comments
 (0)