rember-i

Results 9 comments of rember-i

```html {{title}} h2{ font-size:30px; margin-bottom: 35px; font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif; } .imgList{ position: relative; width: 1227px; min-height: 580px; margin-top: 15px; } .imgList li{ float: left; margin-right: 30px; margin-bottom: 30px; width: 160px;...

watch:{ src(){ console.log("data-src 已经更新"); console.log(this.$refs.target); this.$lazyImages.addImage(this.$refs.target); this.$refs.target.onload = () => { this.show = true; }; this.$nextTick(function () { this.$lazyImages.loadImage(); }) } } 增加一个watch 然后在LazyImage.js里面增加一个removeAllimage的方法就可以了

然后我调用的时候发现,每增加一个image都会去执行一次loadImage事件,这样感觉不是很好。。。不知道楼主有没有更优化的方法,比如等push完再去做遍历是否更好,然后事件触发的时候再去调用,比较符合按需加载的概念

=。=怎么判断push已经完成,感觉不管怎么样push完了,每个实例都是会去调一下loadImage

解决了。。。在父组件的updated里面 this.$nextTick(function() { this.$lazyImages.loadImage(); })

``` # 返回特定shape图片 def wrap_gen_captcha_text_and_image(shape=(CAPTCHA_HEIGHT, CAPTCHA_WIDTH, 3)): t_list = [] t = file_name("./yzm") for i in t: index = i.rfind('-') name = i[:index] t_list.append(name) # print(t_list) im = load_allimg() im_list...

确认是读取图片地址的问题,还有请问下这个训练得多久呀

后面解决了,之前用的是 a.插件构建期配置子应用,就是在config.ts里面配置,后面切换到b.运行时动态配置子应用(src/app.ts 里开启)就可以了,这2者的区别官网上没有详细说,但是从例子中可以看到,b方式是通过异步的方式加入配置的。

我也遇到了一样的问题,在消除水果的时候卡住了