[improvement] Cell: functional (#2729)

This commit is contained in:
neverland
2019-02-13 15:37:11 +08:00
committed by GitHub
parent a08666947f
commit 4aad9add9c
19 changed files with 162 additions and 129 deletions
+3 -4
View File
@@ -1,14 +1,13 @@
import { use } from '../utils';
import Icon from '../icon';
import Info from '../info';
import RouterLink from '../mixins/router-link';
import { route, routeProps } from '../mixins/router-link';
const [sfc, bem] = use('tabbar-item');
export default sfc({
mixins: [RouterLink],
props: {
...routeProps,
icon: String,
dot: Boolean,
info: [String, Number]
@@ -32,7 +31,7 @@ export default sfc({
onClick(event) {
this.$parent.onChange(this.$parent.items.indexOf(this));
this.$emit('click', event);
this.routerLink();
route(this.$router, this);
}
},