9 changed files with 256 additions and 117 deletions
-
1src/assets/style/mixin.scss
-
4src/router/index.ts
-
94src/views/Test.vue
-
4src/views/addLiquid/index.vue
-
4src/views/components/Footer.vue
-
43src/views/components/Header.vue
-
206src/views/graphite/components/AddLiquid.vue
-
3src/views/graphite/components/index.ts
-
10src/views/graphite/index.vue
@ -1,2 +1 @@ |
|||||
$textGray: #333; |
$textGray: #333; |
||||
$addLiquidWidth: 410px;//加液配置 card宽度 |
|
@ -1,82 +1,38 @@ |
|||||
<template> |
<template> |
||||
<div class="test_return"> |
|
||||
<van-nav-bar |
|
||||
title="测试页面" |
|
||||
left-text="返回" |
|
||||
left-arrow |
|
||||
@click-left="onReturn" |
|
||||
/> |
|
||||
<div class="card"> |
|
||||
<div v-for="(item, index) in 6" :key="index" class="test_card"> |
|
||||
{{ item }} |
|
||||
<div class="test_status"> |
|
||||
<div class="test_font">开始加样</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
<div class="ball"> |
||||
|
|
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||
import { ref } from 'vue' |
|
||||
import { useRouter } from 'vue-router' |
|
||||
import {eventBus} from '@/eventBus' |
|
||||
|
|
||||
let menuId = ref(1) |
|
||||
const router = useRouter() |
|
||||
|
import { onMounted } from 'vue'; |
||||
|
|
||||
const onReturn = () => { |
|
||||
menuId.value = 0 |
|
||||
router.go(-1) |
|
||||
} |
|
||||
|
|
||||
const list = [6] |
|
||||
const cardList = ref(list) |
|
||||
const simpleCard = ref(cardList) |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
.test_return{ |
|
||||
background: #ECF2FF; |
|
||||
.return{ |
|
||||
display: flex; |
|
||||
} |
|
||||
span{ |
|
||||
font-size: 12px; |
|
||||
} |
|
||||
|
onMounted(()=>{ |
||||
|
canvasFn() |
||||
|
}) |
||||
|
|
||||
.card{ |
|
||||
display: flex; |
|
||||
justify-content: flex-start; |
|
||||
flex-wrap: wrap; |
|
||||
flex-direction: row; |
|
||||
} |
|
||||
|
const canvasFn = () => { |
||||
|
const canvas = document.createElement('canvas') |
||||
|
canvas.width = 600; |
||||
|
canvas.height = 400; |
||||
|
document.body.append(canvas) |
||||
|
|
||||
.test_card{ |
|
||||
width: 30%; |
|
||||
height: 110px; |
|
||||
background: #ffffff; |
|
||||
margin-top:10px; |
|
||||
margin-left: 10px; |
|
||||
text-align: center; |
|
||||
padding-top:10px; |
|
||||
border-radius: 5px; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
const context = canvas.getContext('2d'); |
||||
|
context?.moveTo(100,100); |
||||
|
context?.arcTo(200,100, 400,800, 50); |
||||
|
context?.font |
||||
|
context?.fillText('Hello, Canvas!', 50, 100); |
||||
|
|
||||
.test_status{ |
|
||||
height: 50px; |
|
||||
background: #1871F8; |
|
||||
border-radius: 5px; |
|
||||
margin: 17px 6px; |
|
||||
.test_font{ |
|
||||
font-size: 15px; |
|
||||
color: #FFFFFF; |
|
||||
padding-top: 14px; |
|
||||
padding-left: 3px; |
|
||||
|
context?.stroke() |
||||
} |
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.ball{ |
||||
|
animation: x 1s linear forwards; |
||||
} |
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
@keyframes x { |
||||
|
to{ |
||||
|
transform: translateX(100px) |
||||
} |
} |
||||
|
|
||||
|
} |
||||
</style> |
</style> |
@ -1,4 +1,5 @@ |
|||||
|
|
||||
export {default as HeatPosition} from './HeatPosition.vue' |
export {default as HeatPosition} from './HeatPosition.vue' |
||||
export {default as TakePickture} from './TakePickture.vue' |
export {default as TakePickture} from './TakePickture.vue' |
||||
export { default as AddLiquid} from './AddLiquid.vue' |
|
||||
|
//@ts-ignore
|
||||
|
export {default as AddLiquid} from './AddLiquid.vue' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue