mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Fix demo
This commit is contained in:
parent
1b39960901
commit
7fd7130763
@ -26,7 +26,7 @@ InstantClickChangeFns.push(function () {
|
||||
},
|
||||
|
||||
handleSelect(value) {
|
||||
location.pathname = '/components/' + value.replace(/([a-z])([A-Z])/g, function (m, m1, m2) {
|
||||
location.href = rootUrl + '/components/' + value.replace(/([a-z])([A-Z])/g, function (m, m1, m2) {
|
||||
return m1 + '-' + m2;
|
||||
}).toLowerCase();
|
||||
},
|
||||
|
@ -35,14 +35,22 @@
|
||||
</script>
|
||||
<script src="https://a.alipayobjects.com/??bluebird/2.9.30/bluebird.js,jquery/jquery/1.11.1/jquery.js,es5-shim/4.1.10/es5-shim.js,es5-shim/4.1.10/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js,react/0.13.3/react.js"></script>
|
||||
<script>
|
||||
var ANT_COMPONENTS = [];
|
||||
var InstantClickChangeFns = [];
|
||||
(function() {
|
||||
window.ANT_COMPONENTS = [];
|
||||
window.InstantClickChangeFns = [];
|
||||
{%- for item in resource.pages|find_category(["CSS","Components"]) %}
|
||||
ANT_COMPONENTS.push({
|
||||
title: '{{item.title}}',
|
||||
desc: '{{item.meta.chinese}}'
|
||||
});
|
||||
{%- endfor %}
|
||||
var i = location.pathname.split('/').lastIndexOf('ant-design');
|
||||
if (i > 0) {
|
||||
window.rootUrl = location.origin + location.pathname.split('/').slice(0, 2+1).join('/');
|
||||
} else {
|
||||
window.rootUrl = location.origin;
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script src="{{static_url('script.js')}}"></script>
|
||||
<script>
|
||||
|
@ -78,7 +78,7 @@
|
||||
> 慎用 Bounce 或 Elastic,这两种适用在特殊元素下,一般 back 即可满足页面上元素的弹动;
|
||||
|
||||
<div id="J-Back"></div>
|
||||
<script src="/static/motionDemoLoad.js?page=easing"></script>
|
||||
<script src="../../static/motionDemoLoad.js?page=easing"></script>
|
||||
|
||||
上图所示缓动函数:绿 `easeOutBounce` `easeOutElastic`(css 需自配), 蓝 `ease-out-back` `ease-in-back`。
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
- 被展开的信息区域内容按照一定的路径依次进场。
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/motionDemo.css">
|
||||
<link rel="stylesheet" href="../../static/motionDemo.css">
|
||||
<div class="video-player">
|
||||
</div>
|
||||
|
||||
|
@ -70,7 +70,7 @@ $(function () {
|
||||
function getLoad(){
|
||||
var str=loadData[num];
|
||||
if(str.indexOf(".js")>=0){
|
||||
$.getScript(str,function (){
|
||||
$.getScript(rootUrl + str,function (){
|
||||
num++;
|
||||
self.loadBar.css("width",num/loadData.length*100+"%");
|
||||
if(num>=loadData.length){
|
||||
|
@ -22,7 +22,7 @@ $(function () {
|
||||
if ((str.indexOf('TweenMax') >= 0 && TweenMax) || (str.indexOf('motion.js') >= 0 && Motion)) {
|
||||
self.numSub(_callback)
|
||||
} else {
|
||||
$.getScript(str, function () {
|
||||
$.getScript(rootUrl + str, function () {
|
||||
self.numSub(_callback)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user