Vue 学习笔记(十一):插槽 Slots

插槽 Slots

Slots 美[slɑːts]

插槽:简单理解就是组件内部留一个或多个的插槽位置,可供组件传对应的模板代码进去。插槽的出现,让组件变的更加灵活。

首先要明白插槽是使用在子组件中的,插槽是为了将父组件中的子组件模板数据正常显示。

Read More

Google Best Practices for Java Libraries(转载)

Google Best Practices for Java Libraries are rules that minimize problems for consumers of interconnected Java libraries. These practices come from decades of aggregated experience in maintaining open source Java libraries and are informed by many hard-learned lessons from mistakes that have been made. We have found that following these rules results in higher quality Java libraries with fewer dependency conflicts and other kinds of problems. The list is open-ended, so new ones may be added from time to time.

Read More

终于把博客找回来了,继续运营

  因coding.net被腾讯收购,需手动升级才能继续使用,一直忙于琐事没去更新,导致博客境内站点挂了很久。拖延到这个周末终于搞定,把博客找回来了。(为优化境外境内访问速度,博客同时在GitHub和coding.net分别托管,配置DNS境外访问解析到GitHub,境内访问解析到coding.net)

Read More

java多重继承和java 8 接口默认方法

Java的class是不支持多重继承的,一个子类只能继承一个父类,(可以实现多个接口),原因就是为避免菱形继承问题(钻石问题),而interface可以继承多个interface,因为接口没有实现,不存在菱形继承问题。

Java 8 的新特性,接口方法可以有默认实现,如果接口A、B有同样默认方法,为避免菱形继承问题,当类同时实现A、B,或者当其它接口同时继承A、B时,就必须重写这个冲突的方法。

Read More