import { shortcut, Widget, createWidget, random, bind } from "@/core"; @shortcut() export class Func extends Widget { static xtype = "demo.navigation"; props = { baseCls: "demo-func" }; _createNav(v) { return createWidget({ type: "bi.label", cls: `layout-bg${random(1, 8)}`, text: `第${v}页`, }); } render() { return { type: "bi.navigation", showIndex: 0, tab: { height: 30, items: [ { once: false, text: "后退", value: -1, cls: "mvc-button layout-bg3", }, { once: false, text: "前进", value: 1, cls: "mvc-button layout-bg4", } ], }, cardCreator: bind(this._createNav, this), }; } }