Comments (6)
我看一下啊, 你是[email protected]
初始化的vue3+ts
吗
from lucky-canvas.
很抱歉, 目前短时间内无法支持ts项目, 当新版本支持ts之后, 我会第一时间在这里回复你
from lucky-canvas.
我看一下啊,你是
[email protected]
初始化的vue3+ts
吗
@vue/cli 4.5.7 谢谢~
from lucky-canvas.
<script>
export default {
data() {
return {
flag: true,
prizes: [],
button: {
x: 1,
y: 1,
background: "#ff3a59",
shadow: "0 5 0 #ea0125",
fonts: [
{ text: "抽奖", fontColor: "#fff", top: "15%", fontSize: "30px" },
{
text: "消耗10积分",
fontColor: "#fff",
top: "65%",
fontSize: "12px",
},
],
},
blocks: [
{ padding: "10px", background: "rgba(0, 0, 0, 0)", borderRadius: 10 },
],
defaultStyle: {
gutter: 10,
borderRadius: 8,
fontColor: "#708abf",
fontSize: "13px",
textAlign: "center",
background: "#ffffff",
shadow: "0 5 0 #9cd2ff",
speed: 10,
},
activeStyle: {
fontColor: "#fff",
background: "#ff3a59",
shadow: "0 5 0 #ea0125",
},
};
},
mounted() {
this.getPrizeList();
setInterval((_) => {
this.flag = !this.flag;
}, 500);
},
methods: {
getPrizeList() {
// 模拟接口请求奖品列表
setTimeout(() => {
const data = [
{ name: "谢谢参与" },
{ name: "红包" },
{ name: "谢谢参与" },
{ name: "红包" },
{ name: "谢谢参与" },
{ name: "红包" },
{ name: "谢谢参与" },
{ name: "红包" },
];
this.prizes = [];
const axis = [
[0, 0],
[1, 0],
[2, 0],
[2, 1],
[2, 2],
[1, 2],
[0, 2],
[0, 1],
];
for (let i = 0; i < 8; i++) {
const item = data[i];
this.prizes.push({
name: item.name,
index: i,
x: axis[i][0],
y: axis[i][1],
fonts: [{ text: item.name, top: "63%" }],
imgs: [{ src: item.img, width: "50%", top: "13%" }],
});
}
}, 0);
},
startCallBack() {
this.$refs.LuckDraw.play();
setTimeout(() => {
this.$refs.LuckDraw.stop((Math.random() * 8) >> 0);
}, 2000);
},
endCallBack(prize) {
alert(`恭喜你获得大奖: ${prize.name}`);
},
},
};
</script>
尝试关闭了TS,但还是相同的报错
from lucky-canvas.
尝试关闭了TS,但还是相同的报错
非常感谢反馈, 目前最新版v3.1.9
已修复该问题, 是因为porps里面写成ts语法了, 竟然vue2.x可以兼容该语法
from lucky-canvas.
尝试关闭了TS,但还是相同的报错
非常感谢反馈,目前最新版本
v3.1.9
已修复该问题,是因为porps里面写成ts语法了,竟然vue2.x可以兼容该语法
大佬给力!会在下次尝试使用~
from lucky-canvas.
Related Issues (20)
- 有没有交流群,建个交流群更方便
- 微信小程序请教 HOT 1
- 扇形奖品图比较模糊,优化建议
- 老虎机旋转过程中突然加速 HOT 1
- Vue gutter不生效
- 大转盘点击抽奖后背景图片消失 HOT 3
- react,老虎机用图片没显示
- 建议!可以给 buttons 添加 点击动画吗?
- 项目安装依赖不成功 HOT 1
- range属性用法不太明白 HOT 5
- 作者你好,@lucky-canvas/vue 不支持按需引入吗?
- 运行环境为Taro v3.6.8,报错
- 九宫格uniapp小程序体验版真机报错 HOT 1
- 怎样让 `LuckyWheel` 组件的 prizes 文字径向显示而非换行 HOT 2
- @lucky-canvas/react 版本0.1.13不支持2k和4k屏中背景图片满屏铺吗?
- 希望uni-app 的版本支持下自定义转盘的rpxCalcMaxDeviceWidth HOT 1
- vue升级2.7的时候此组件不能用了,会报@vue/composition-api 2.7警告 HOT 1
- TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D' HOT 4
- 老虎机奖品图片有高度限制
- 在swiper中,effect(切换效果)设置为‘fade’,点击大转盘开始按钮,事件不会触发 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucky-canvas.