iapyang
3 years ago
137 changed files with 13235 additions and 9243 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 381 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,29 @@
|
||||
export declare class Router { |
||||
constructor(op: { |
||||
[key: string]: any; |
||||
}); |
||||
route(route: string, callback: Function): this; |
||||
route(route: string, name: string, callback?: Function): this; |
||||
execute(callback?: Function, args?: any[]): void; |
||||
navigate(fragment: string, options?: { |
||||
[key: string]: any; |
||||
} | boolean): this; |
||||
} |
||||
export declare class History { |
||||
atRoot(): boolean; |
||||
getSearch(): string; |
||||
getHash(window?: Window): string; |
||||
getPath(): string; |
||||
getFragment(fragment?: string): string; |
||||
start(op?: { |
||||
[key: string]: any; |
||||
}): void; |
||||
stop(): void; |
||||
route(route: string, callback: Function): void; |
||||
unRoute(route: string): void; |
||||
checkUrl(e?: Event): void; |
||||
loadUrl(fragment: string): boolean; |
||||
navigate(fragment: string, options?: { |
||||
[key: string]: any; |
||||
} | boolean): void; |
||||
} |
@ -0,0 +1,9 @@
|
||||
import { Single } from '../../base/single/single'; |
||||
export declare class DateTimeCombo extends Single { |
||||
static xtype: string; |
||||
static EVENT_CANCEL: string; |
||||
static EVENT_CONFIRM: string; |
||||
static EVENT_CHANGE: string; |
||||
static EVENT_BEFORE_POPUPVIEW: string; |
||||
hidePopupView: () => void; |
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
if (this.importScripts) { |
||||
importScripts("./dist/fineui_without_jquery_polyfill.js"); |
||||
importScripts("../dist/fineui_without_jquery_polyfill.js"); |
||||
BI.initWorker(); |
||||
} |
||||
var Model = BI.inherit(Fix.Model, { |
@ -0,0 +1,118 @@
|
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title></title> |
||||
<link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.css"/> |
||||
<script src="../dist/2.0/fineui.js"></script> |
||||
</head> |
||||
<body> |
||||
<div id="wrapper"></div> |
||||
<script> |
||||
// tab上下文环境测试 |
||||
var Model = BI.inherit(Fix.Model, { |
||||
state: function () { |
||||
return { |
||||
expand: false |
||||
}; |
||||
}, |
||||
childContext: ["text"], |
||||
|
||||
computed: { |
||||
text: function () { |
||||
return this.model.expand ? "text-yes" : "text-not"; |
||||
} |
||||
}, |
||||
|
||||
actions: { |
||||
toggle: function () { |
||||
this.model.expand = !this.model.expand; |
||||
} |
||||
} |
||||
}); |
||||
|
||||
BI.model("demo.model", Model); |
||||
var ChildModel = BI.inherit(Fix.Model, { |
||||
context: ["text"] |
||||
}); |
||||
|
||||
BI.model("demo.child_model", ChildModel); |
||||
|
||||
var Child = BI.inherit(BI.Widget, { |
||||
setup: function () { |
||||
var store = BI.useStore(function () { |
||||
return BI.Models.getModel("demo.child_model"); |
||||
}); |
||||
return { |
||||
render: function () { |
||||
return { |
||||
type: "bi.label", |
||||
text: store.model.text |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
}); |
||||
BI.shortcut("demo.child", Child); |
||||
|
||||
var Widget = BI.inherit(BI.Widget, { |
||||
props: { |
||||
updateMode: "auto" |
||||
}, |
||||
setup: function () { |
||||
var child; |
||||
var store = BI.useStore(function () { |
||||
return BI.Models.getModel("demo.model"); |
||||
}); |
||||
setInterval(function () { |
||||
store.toggle(); |
||||
}, 1000); |
||||
BI.watch("text", function () { |
||||
// child.reset(); |
||||
}); |
||||
return function () { |
||||
return { |
||||
type: "bi.vertical", |
||||
vgap: 20, |
||||
items: [{ |
||||
type: "demo.child", |
||||
ref: function (_ref) { |
||||
child = _ref; |
||||
} |
||||
}, { |
||||
type: "bi.combo", |
||||
el: { |
||||
type: "bi.button", |
||||
text: "点击" |
||||
}, |
||||
popup: { |
||||
el: { |
||||
type: "bi.tab", |
||||
height: 100, |
||||
showIndex: 0, |
||||
cardCreator: function () { |
||||
return { |
||||
type: "demo.child" |
||||
}; |
||||
} |
||||
} |
||||
} |
||||
}] |
||||
}; |
||||
}; |
||||
} |
||||
}); |
||||
BI.shortcut("demo.parent", Widget); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "demo.parent" |
||||
}, |
||||
top: 100, |
||||
left: 100 |
||||
}], |
||||
element: "#wrapper" |
||||
}); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,102 @@
|
||||
BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { |
||||
props: function () { |
||||
return BI.extend(BI.FlexLeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), { |
||||
baseCls: "bi-f-lr-v-c", |
||||
items: {}, |
||||
llgap: 0, |
||||
lrgap: 0, |
||||
lhgap: 0, |
||||
ltgap: 0, |
||||
lbgap: 0, |
||||
lvgap: 0, |
||||
rlgap: 0, |
||||
rrgap: 0, |
||||
rhgap: 0, |
||||
rtgap: 0, |
||||
rbgap: 0, |
||||
rvgap: 0 |
||||
}); |
||||
}, |
||||
render: function () { |
||||
var o = this.options, self = this; |
||||
BI.FlexLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments); |
||||
return { |
||||
type: "bi.flex_vertical_adapt", |
||||
ref: function (_ref) { |
||||
self.layout = _ref; |
||||
}, |
||||
items: this._formatItems(), |
||||
scrollx: o.scrollx, |
||||
scrolly: o.scrolly, |
||||
scrollable: o.scrollable |
||||
}; |
||||
}, |
||||
|
||||
_formatItems: function () { |
||||
var o = this.options; |
||||
var leftItems = o.items.left || []; |
||||
var rightItems = o.items.right || []; |
||||
leftItems = BI.map(leftItems, function (i, item) { |
||||
var json = { |
||||
el: BI.stripEL(item) |
||||
}; |
||||
if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { |
||||
json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0); |
||||
} |
||||
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) { |
||||
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0); |
||||
} |
||||
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) { |
||||
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0); |
||||
} |
||||
if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) { |
||||
json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0); |
||||
} |
||||
return json; |
||||
}); |
||||
rightItems = BI.map(rightItems, function (i, item) { |
||||
if (i === 0) { |
||||
if (BI.isWidget(item)) { |
||||
item.element.addClass("flex-left-auto"); |
||||
} else { |
||||
var t = BI.stripEL(item); |
||||
t.cls = (t.cls || "") + " flex-left-auto"; |
||||
} |
||||
} |
||||
var json = { |
||||
el: BI.stripEL(item) |
||||
}; |
||||
if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { |
||||
json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0); |
||||
} |
||||
if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) { |
||||
if (i > 0) { |
||||
json.lgap = o.rlgap + (item.lgap || 0) + (item.hgap || 0); |
||||
} |
||||
} |
||||
if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) { |
||||
json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0); |
||||
} |
||||
if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) { |
||||
json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0); |
||||
} |
||||
return json; |
||||
}); |
||||
return leftItems.concat(rightItems); |
||||
}, |
||||
|
||||
resize: function () { |
||||
// console.log("left_right_vertical_adapt布局不需要resize");
|
||||
}, |
||||
|
||||
addItem: function () { |
||||
// do nothing
|
||||
throw new Error("cannot be added"); |
||||
}, |
||||
|
||||
populate: function (items) { |
||||
this.options.items = items; |
||||
this.layout.populate(this._formatItems()); |
||||
} |
||||
}); |
||||
BI.shortcut("bi.flex_left_right_vertical_adapt", BI.FlexLeftRightVerticalAdaptLayout); |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue