|
|
@@ -77,10 +77,11 @@
|
|
|
<button class="btn" type="button" onclick="openDemo('loadding')">Loading</button>
|
|
|
<button class="btn" type="button" onclick="openDemo('banner')">Banner</button>
|
|
|
<button class="btn" type="button" onclick="openDemo('BallSorting')">BallSorting</button>
|
|
|
+ <button class="btn" type="button" onclick="openDemo('BallSorting', false)">Scale Pop</button>
|
|
|
<button class="btn disabled" type="button" disabled>更多动画待加入...</button>
|
|
|
</div>
|
|
|
<div class="hint">
|
|
|
- Tip: 将 Lottie JSON 放在 <code class="inline">/svg</code> 目录,按钮参数填 <code class="inline">svg:<json文件名></code>。
|
|
|
+ Tip: 关闭 <code class="inline">popupAnimation</code> 可查看当前位置的缩放回弹效果。
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -93,11 +94,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <pre id="js-code" class="code-view active">function openDemo(name) {
|
|
|
+ <pre id="js-code" class="code-view active">function openDemo(name, popupOverride) {
|
|
|
if (typeof window.$ !== 'function') return;
|
|
|
|
|
|
const iconAnimation = !!document.getElementById('optIcon')?.checked;
|
|
|
- const popupAnimation = !!document.getElementById('optPopup')?.checked;
|
|
|
+ const popupAnimation = (typeof popupOverride === 'boolean')
|
|
|
+ ? popupOverride
|
|
|
+ : !!document.getElementById('optPopup')?.checked;
|
|
|
const closeOnEsc = !!document.getElementById('optEsc')?.checked;
|
|
|
const iconBox = name === 'loadding' ? '11em' : null;
|
|
|
|
|
|
@@ -125,10 +128,11 @@
|
|
|
<button class="btn" type="button" onclick="openDemo('loadding')">Loading</button>
|
|
|
<button class="btn" type="button" onclick="openDemo('banner')">Banner</button>
|
|
|
<button class="btn" type="button" onclick="openDemo('BallSorting')">BallSorting</button>
|
|
|
+ <button class="btn" type="button" onclick="openDemo('BallSorting', false)">Scale Pop</button>
|
|
|
<button class="btn disabled" type="button" disabled>更多动画待加入...</button>
|
|
|
</div>
|
|
|
<div class="hint">
|
|
|
- Tip: 将 Lottie JSON 放在 <code class="inline">/svg</code> 目录,按钮参数填 <code class="inline">svg:&lt;json文件名&gt;</code>。
|
|
|
+ Tip: 关闭 <code class="inline">popupAnimation</code> 可查看当前位置的缩放回弹效果。
|
|
|
</div>
|
|
|
</div></pre>
|
|
|
|
|
|
@@ -223,11 +227,13 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function openDemo(name) {
|
|
|
+ function openDemo(name, popupOverride) {
|
|
|
if (typeof window.$ !== 'function') return;
|
|
|
|
|
|
const iconAnimation = !!document.getElementById('optIcon')?.checked;
|
|
|
- const popupAnimation = !!document.getElementById('optPopup')?.checked;
|
|
|
+ const popupAnimation = (typeof popupOverride === 'boolean')
|
|
|
+ ? popupOverride
|
|
|
+ : !!document.getElementById('optPopup')?.checked;
|
|
|
const closeOnEsc = !!document.getElementById('optEsc')?.checked;
|
|
|
|
|
|
const titleCap = name ? (name[0].toUpperCase() + name.slice(1)) : '';
|