add loop property & fix bug caused by renderPage cache
This commit is contained in:
13
doric-web/dist/index.js
vendored
13
doric-web/dist/index.js
vendored
@@ -2974,12 +2974,9 @@ class Slider extends Superview {
|
||||
return this.cachedViews.values();
|
||||
}
|
||||
getItem(itemIdx) {
|
||||
let view = this.cachedViews.get(`${itemIdx}`);
|
||||
if (view === undefined) {
|
||||
view = this.renderPage(itemIdx);
|
||||
view.superview = this;
|
||||
this.cachedViews.set(`${itemIdx}`, view);
|
||||
}
|
||||
let view = this.renderPage(itemIdx);
|
||||
view.superview = this;
|
||||
this.cachedViews.set(`${itemIdx}`, view);
|
||||
return view;
|
||||
}
|
||||
isDirty() {
|
||||
@@ -3020,6 +3017,10 @@ __decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Function)
|
||||
], Slider.prototype, "onPageSlided", void 0);
|
||||
__decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Boolean)
|
||||
], Slider.prototype, "loop", void 0);
|
||||
function slider(config) {
|
||||
const ret = new Slider;
|
||||
for (let key in config) {
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user