|
|
@@ -30,13 +30,27 @@ |
|
|
|
</n-icon> |
|
|
|
</div> |
|
|
|
<div class="square__panel"> |
|
|
|
<n-icon size="24" color="#fff"> |
|
|
|
<PlusOutlined /> |
|
|
|
</n-icon> |
|
|
|
<div |
|
|
|
class="panel__button" |
|
|
|
@mousedown="handleEvent('down',{yuntai:'05'})" |
|
|
|
@mouseup="handleEvent('up',{yuntai:'05'})" |
|
|
|
@mouseleave="handleEvent('leave',{yuntai:'05'})" |
|
|
|
> |
|
|
|
<n-icon size="24" color="#fff"> |
|
|
|
<PlusOutlined /> |
|
|
|
</n-icon> |
|
|
|
</div> |
|
|
|
<p>焦距</p> |
|
|
|
<n-icon size="24" color="#fff"> |
|
|
|
<LineOutlined /> |
|
|
|
</n-icon> |
|
|
|
<div |
|
|
|
class="panel__button" |
|
|
|
@mousedown="handleEvent('down',{yuntai:'06'})" |
|
|
|
@mouseup="handleEvent('up',{yuntai:'06'})" |
|
|
|
@mouseleave="handleEvent('leave',{yuntai:'06'})" |
|
|
|
> |
|
|
|
<n-icon size="24" color="#fff"> |
|
|
|
<LineOutlined /> |
|
|
|
</n-icon> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="panel__title">云台控制</div> |
|
|
|
</div> |
|
|
@@ -72,10 +86,15 @@ |
|
|
|
</n-icon> |
|
|
|
</div> |
|
|
|
<div class="crcle__panel"> |
|
|
|
<div class="pannel__item item-1" @click="handleClick(1)" /> |
|
|
|
<div class="pannel__item item-2" @click="handleClick(1)" /> |
|
|
|
<div class="pannel__item item-3" @click="handleClick(1)" /> |
|
|
|
<div class="pannel__item item-4" @click="handleClick(1)" /> |
|
|
|
<div |
|
|
|
v-for="(item,index) in moveList" |
|
|
|
:key="index" |
|
|
|
class="pannel__item" |
|
|
|
:class="`item-${index+1}`" |
|
|
|
@mousedown="handleEvent('down',item.list,item.key)" |
|
|
|
@mouseup="handleEvent('up',item.list,item.key)" |
|
|
|
@mouseleave="handleEvent('leave',item.list,item.key)" |
|
|
|
/> |
|
|
|
<n-icon class="top" size="24" color="#fff"> |
|
|
|
<UpOutlined /> |
|
|
|
</n-icon> |
|
|
@@ -127,7 +146,7 @@ export default defineComponent({ |
|
|
|
default: () => ['camera', 'locus'] |
|
|
|
} |
|
|
|
}, |
|
|
|
emits: ['start', 'reset'], |
|
|
|
emits: ['instruct'], |
|
|
|
setup(props, { emit }) { |
|
|
|
const data = reactive({ |
|
|
|
cameraShow: true, |
|
|
@@ -173,24 +192,24 @@ export default defineComponent({ |
|
|
|
let reset = {} |
|
|
|
if (key) { |
|
|
|
params.pwm = data.config[key] |
|
|
|
reset = { yaogan: '12', pwm: '200' } |
|
|
|
reset = { yaogan: '12', pwm: data.config.move } |
|
|
|
} else { |
|
|
|
reset = { yuntai: '09' } |
|
|
|
} |
|
|
|
switch (event) { |
|
|
|
case 'down': |
|
|
|
data.hasEvent = true |
|
|
|
emit('start', params) |
|
|
|
emit('instruct', params) |
|
|
|
break |
|
|
|
case 'up': |
|
|
|
if (data.hasEvent) { |
|
|
|
emit('reset', reset) |
|
|
|
emit('instruct', reset) |
|
|
|
data.hasEvent = false |
|
|
|
} |
|
|
|
break |
|
|
|
case 'leave': |
|
|
|
if (data.hasEvent) { |
|
|
|
emit('reset', reset) |
|
|
|
emit('instruct', reset) |
|
|
|
data.hasEvent = false |
|
|
|
} |
|
|
|
break |
|
|
@@ -272,6 +291,15 @@ export default defineComponent({ |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-around; |
|
|
|
align-items: center; |
|
|
|
.panel__button{ |
|
|
|
width: 100%; |
|
|
|
text-align: center; |
|
|
|
cursor: pointer; |
|
|
|
.n-icon{ |
|
|
|
pointer-events: none; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
&.open{ |
|
|
|
transition: width 1s; |