feat:use local data

This commit is contained in:
pengfei.zhou
2020-03-03 18:58:53 +08:00
committed by osborn
parent ef77d5ec95
commit 15ce9cb6ba
4 changed files with 1826 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import { Group, text, gravity, Color, LayoutSpec, vlayout, hlayout, layoutConfig, scroller, Text, ViewHolder, VMPanel, ViewModel, network, loge, HLayout, stack, image, Gravity, takeNonNull, Scroller, Image } from "doric";
import { colors } from "./utils";
import MovieData from './movie.json'
interface DoubanModel {
count: number
@@ -16,7 +17,7 @@ interface DoubanModel {
"4": number,
"5": number,
},
stars: number
stars: string
min: number,
}
genres: string[],
@@ -204,7 +205,7 @@ class SliderPanel extends VMPanel<MovieModel, MovieVH>{
}
getState() {
return { selectedIdx: 0 }
return { selectedIdx: 0, doubanModel: MovieData }
}
}

1819
doric-demo/src/movie.json Normal file

File diff suppressed because it is too large Load Diff