mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
{% extends "page.html" %}
|
|
|
|
{% block scripts %}
|
|
<script src="/dist/{{ config.package.name }}-{{ config.package.version }}.js"></script>
|
|
<script src="/dist/demo.js"></script>
|
|
<script>
|
|
window.require = function(path) {
|
|
var result = window;
|
|
var namespaces = path.split('/');
|
|
namespaces.forEach(function(key, i) {
|
|
if (i !== 0 && i === namespaces.length - 1) {
|
|
key = capitalizeFirstLetter(key);
|
|
}
|
|
if (key !== 'lib') {
|
|
if (result[key]) {
|
|
result = result[key];
|
|
} else {
|
|
throw 'There should not have modules here 2.';
|
|
}
|
|
}
|
|
});
|
|
function capitalizeFirstLetter(string) {
|
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
}
|
|
return result;
|
|
};
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="main-container">
|
|
<article class="markdown">
|
|
<h1>
|
|
{{ post.title }} {{ post.meta.chinese }}
|
|
{%- if post.meta.API %}
|
|
<a class="api-link" href="http://{{ post.meta.API }}" target="_blank">
|
|
<i class="iconfont-home icon-externallink"></i>
|
|
API 使用说明
|
|
</a>
|
|
{%- endif %}
|
|
</h1>
|
|
{{ post.html }}
|
|
</article>
|
|
{%- if post.meta.template === 'component' && !post.meta.nodemos %}
|
|
{%- include "demos.html" %}
|
|
{%- endif %}
|
|
</section>
|
|
{% endblock %}
|