Browse Source
* commit 'ffd8d98b05e1396c4b3c4ddf544c82914542b0f1': (94 commits) auto upgrade version to 2.0.20210309211237 优化一下context的传递 auto upgrade version to 2.0.20210309202225 auto upgrade version to 2.0.20210309201230 无JIRA任务 revert日期控件的边框处理 auto upgrade version to 2.0.20210309200235 优化一下context的传递 优化一下context的传递 Revert "优化一下context的传递" auto upgrade version to 2.0.20210309194230 适配下回滚 优化一下context的传递 优化一下context的传递 优化一下context的传递 无JIRA任务 变量修改 无JIRA任务 统一item.mulitselect和item.singleselect.radio 图标和文字的布局行为 无JIRA任务 revert:es65fb75ef130
[5fb75ef
] auto upgrade version to 2.0.20210309160246 auto upgrade version to 2.0.20210309155237 chore: 补充类型 ...
94 changed files with 3907 additions and 2526 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; |
||||||
|
} |
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) { |
if (this.importScripts) { |
||||||
importScripts("./dist/fineui_without_jquery_polyfill.js"); |
importScripts("../dist/fineui_without_jquery_polyfill.js"); |
||||||
BI.initWorker(); |
BI.initWorker(); |
||||||
} |
} |
||||||
var Model = BI.inherit(Fix.Model, { |
var Model = BI.inherit(Fix.Model, { |
@ -0,0 +1,108 @@ |
|||||||
|
<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>--> |
||||||
|
<script src="http://localhost:9001/fineui.js"></script> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="wrapper"></div> |
||||||
|
<script> |
||||||
|
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.vertical", |
||||||
|
items: [{ |
||||||
|
type: "bi.button", |
||||||
|
text: store.model.text |
||||||
|
}, { |
||||||
|
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: "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,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,36 @@ |
|||||||
|
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; |
||||||
|
} |
Loading…
Reference in new issue