◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:ChibiCostumeSwitcher”的版本间的差异
(测试) |
小 |
||
(未显示2个用户的3个中间版本) | |||
第1行: | 第1行: | ||
<includeonly><style> | <includeonly><style> | ||
div#content { | div#content { | ||
− | overflow: | + | overflow: clip; |
}</style><script> | }</style><script> | ||
/* Original widget created by en.gfwiki.com/wiki/User:Messing_with_data, Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License */ | /* Original widget created by en.gfwiki.com/wiki/User:Messing_with_data, Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License */ | ||
第29行: | 第29行: | ||
var selectBox = $(element); | var selectBox = $(element); | ||
− | costumeSelectionIndex = selectBox.prop('selectedIndex'); | + | const costumeSelectionIndex = selectBox.prop('selectedIndex'); |
− | + | console.log('costumeSelectionIndex', costumeSelectionIndex, costumeSelectionIndex != 0); | |
var chibiCostumeName = ""; | var chibiCostumeName = ""; | ||
if (costumeSelectionIndex != 0) { | if (costumeSelectionIndex != 0) { | ||
第37行: | 第37行: | ||
var targetSelector = targetId == "" ? ".chibiAnimationContainer" : ("#" + targetId); | var targetSelector = targetId == "" ? ".chibiAnimationContainer" : ("#" + targetId); | ||
$(targetSelector).attr('data-tdoll-costume', chibiCostumeName); | $(targetSelector).attr('data-tdoll-costume', chibiCostumeName); | ||
− | $(targetSelector).find('.chibiAnimation').trigger("costume_changed", chibiCostumeName); | + | $(targetSelector).find('.chibiAnimation').trigger("costume_changed", [chibiCostumeName]); |
if($(targetSelector).children('.chibiDormButton').hasClass('stateon')) { | if($(targetSelector).children('.chibiDormButton').hasClass('stateon')) { | ||
var currentDormButton = $(targetSelector).children('.chibiDormButton'); | var currentDormButton = $(targetSelector).children('.chibiDormButton'); | ||
第65行: | 第65行: | ||
<option value="{{BASEPAGENAME}}" selected="selected">默认Q版</option> | <option value="{{BASEPAGENAME}}" selected="selected">默认Q版</option> | ||
<!--{foreach from=$costumes key=key item=item}--> | <!--{foreach from=$costumes key=key item=item}--> | ||
− | <!--{if $ | + | <!--{if $key neq '' && $item neq ""}--><option value="<!--{$key|escape:'html'}-->"><!--{$item|escape:'html'}--></option><!--{/if}--> |
<!--{/foreach}--> | <!--{/foreach}--> | ||
</select></includeonly> | </select></includeonly> |
2023年8月26日 (六) 00:04的最新版本
Original widget created by https://en.gfwiki.com/wiki/User:Messing_with_data, Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License