Coder Social home page Coder Social logo

移动端适配问题 about lucky-canvas HOT 9 CLOSED

buuing avatar buuing commented on May 14, 2024
移动端适配问题

from lucky-canvas.

Comments (9)

buuing avatar buuing commented on May 14, 2024

代码和插件版本贴一下

from lucky-canvas.

haoranZ996 avatar haoranZ996 commented on May 14, 2024

插件版本 "vue-luck-draw": "^3.3.1",
`







<div class="questionBtn" @click="goProblem">



<div class="myPrizeBtn" @click="goMyprize">

<div class="campRuleBtn" @click="goCampRule">


<script> import headComponents from '../components/headComponents' export default { components: { headComponents, }, data () { return { blocks: [ { padding: '10px', background: '#ffc27a' }, { padding: '10px', background: '#ff4a4c' }, { padding: '0px', background: '#fff' } ] } }, methods:{ // 跳转中奖记录页 goMyprize(){ this.$router.push({name:"myPrizeRecord"}) }, // 跳转规则页 goCampRule(){ this.$router.push({name:"campRule"}) }, // 跳转问题反馈页 goProblem(){ this.$router.push({name:"problemFeedback"}) }, } } </script> <style lang="less" scoped> .content{ width: 100%; min-height: 14.5rem; background: #fb4c72; .main{ width: 100%; height: 10.46rem; background-image: url("../image/hzIndexBg.png"); background-size: 100%; background-repeat: no-repeat; display: flex; flex-direction: column; align-items: center; .wheel{ margin-top: 3.04rem; width: 6.3rem; height: 6.3rem; } .questionBtn{ width:0.52rem; height: 1.82rem; background-image: url("../image/sideBtn.png"); background-size: 100%; background-repeat: no-repeat; position: absolute; right: 0; top:2.02rem } } .btnRow{ width: 100%; height: 0.78rem; margin-top: 0.2rem; display: flex; justify-content: center; .myPrizeBtn{ width: 2.6rem; height: 0.78rem; background-image: url("../image/myPrizeBtn.png"); background-size: 100%; background-repeat: no-repeat; margin-right: 0.5rem; } .campRuleBtn{ width: 2.6rem; height: 0.78rem; background-image: url("../image/campRuleBtn.png"); background-size: 100%; background-repeat: no-repeat; } } } </style>`

from lucky-canvas.

buuing avatar buuing commented on May 14, 2024

我没有看到你有在插件内使用rem属性啊?

from lucky-canvas.

haoranZ996 avatar haoranZ996 commented on May 14, 2024

<template> <div class="content"> <headComponents></headComponents> <div class="main"> <div class="wheel"> <LuckyWheel width="6.3rem" height="6.3rem" :blocks="blocks" /> </div> <div class="questionBtn" @click="goProblem"> </div> </div> <div class="btnRow"> <div class="myPrizeBtn" @click="goMyprize"></div> <div class="campRuleBtn" @click="goCampRule"></div> </div> </div> </template>

from lucky-canvas.

buuing avatar buuing commented on May 14, 2024

好的, 我去看一下源码, 稍等

from lucky-canvas.

haoranZ996 avatar haoranZ996 commented on May 14, 2024

嗯呢 辛苦了

from lucky-canvas.

xjccc avatar xjccc commented on May 14, 2024

可以问个问题吗。vue2的全局组件,怎么在vue3中注册。

from lucky-canvas.

buuing avatar buuing commented on May 14, 2024

可以问个问题吗。vue2的全局组件,怎么在vue3中注册。

// vue2.x
import LuckDraw from 'vue-luck-draw'
Vue.use(LuckDraw)

// vue3.x
import LuckDraw from 'vue-luck-draw/vue3'
createApp(App).use(LuckDraw).mount('#app')

from lucky-canvas.

haoranZ996 avatar haoranZ996 commented on May 14, 2024

好的 我试一下

from lucky-canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.