zhouwenbin
zhouwenbin
@yisibl 直接读css也可以,第一次写插件,api还不熟悉
@yisibl 已经提交了,参考了很多插件,照猫画虎弄了一个,还是要多练练手。
@shikelong 编译出了问题
## 0.10.102800版更新 1、可以通过[getImageInfo](https://mp.weixin.qq.com/debug/wxadoc/dev/api/media-picture.html?t=1477579750721#wxgetimageinfoobject)获取图片宽高了,但是却不能跳转页面了。 2、onload事件里面setData没效果了,换成`this.data.tempFilePaths = app.globalData.tempFilePaths`。 3、上传图片后图片地址不能显示,需要`this.globalData.tempFilePaths = res.tempFilePaths[0].split('wxfile://')[1];`截掉`wxfile://`才能显示。 4、canvas导出图片[canvasToTempFilePath](https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-canvas.html#wxcanvastotempfilepathobject),没法获取图片,坑坑坑。
1、本地图片无法在css的background显示,只能设在``的src 2、[canvasToTempFilePath](https://mp.weixin.qq.com/debug/wxadoc/dev/api/canvas/temp-file.html?t=201714)报错`canvasToTempFilePath: fail canvas is empty`
@cristaltina 不知道官方解决了没有
@cristaltina 我试看看,感谢
@yutingzhao1991 对了,polymer默认用了shady dom,是会对样式做隔离的,用了shadow dom就更不用了。angular这里有一个demo,https://github.com/jonathaningram/angular-cssmodules-example-app/tree/master/src 。vue明天看下
@yutingzhao1991 https://www.polymer-project.org/1.0/docs/devguide/styling.html 这里有一篇文章讲了样式的隔离和共享,而且polymer本身就支持变量,mixin这些东西,引入都统一在html一个入口,我觉得这种方式比css modules更胜一筹,维护起来会更好维护。http://www.html5rocks.com/zh/tutorials/webcomponents/shadowdom-201/ 这里有一篇讲shadow dom的。
@yutingzhao1991 赞,vue的[demo](https://github.com/vuejs/vue-loader-example)也找到了,使用了[Scoped CSS](http://vuejs.github.io/vue-loader/features/scoped-css.html)