View unanswered posts | View active topics It is currently 2021-12-03 7:20



Reply to topic  [ 4 posts ] 
 node节点更换图片的问题 
Author Message
新手上路

Joined: 2013-10-31 16:08
Posts: 12
Post node节点更换图片的问题
按官方文档 注册了图片
但是node.setImage 节点不显示图片
求大神指点

图片和js文件同级目录
registerNormalImage('dev', './device.png'); registerNormalImage按文档写的
难道是路径问题么?

另外问一下 如果图片都放在/src/assets/images文件夹下
registerNormalImage('dev', '@/assets/images/device.png') 有问题么 我这样写图片也不显示


2021-10-21 15:56
Profile
新手上路

Joined: 2013-10-31 16:08
Posts: 12
Post Re: node节点更换图片的问题
通过console.log(node)发现
在get _images: f reactiveGetter()中的arguments和caller报异常
Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.invokeGetter(<anonymous>:1:142)]
项目是通过vuecli4创建的 网上查了说是要关闭严格模式
但是在babel.config.js中添加了关闭配置 还是不行
求解 有大神在vue项目中使用twaver碰到过类似的问题么


2021-10-21 17:51
Profile
新手上路

Joined: 2013-10-31 16:08
Posts: 12
Post Re: node节点更换图片的问题
今天在单html页面试过了 更换图片没问题
那可能是因为vue项目配置导致的问题么
有大神解释下没


2021-10-22 9:28
Profile
TWaver开发组
User avatar

Joined: 2017-02-22 10:01
Posts: 485
Post Re: node节点更换图片的问题
可以提供个demo,我们这边测试下。


2021-10-28 9:21
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron