Commit e410b6d4 by dhn

测试

parent 4549614d
......@@ -17,18 +17,3 @@ if ($block->hasRequiredOptions()) {
<?= $block->getChildHtml('', true) ?>
</div>
</div>
<script>
require(['jquery'], function ($) {
window.onload = function(){
if($('.swatch-attribute .swatch-option'))
{
var swatchObj = $('.swatch-attribute');
for(var i=0;i<swatchObj.length;i++)
{
$(swatchObj[i]).find('.swatch-option:first').trigger('click');
}
}
}
});
</script>
\ No newline at end of file
......@@ -333,6 +333,17 @@ define([
} else {
console.log('SwatchRenderer: No input data received');
}
window.onload = function(){
if($('.swatch-attribute .swatch-option'))
{
var swatchObj = $('.swatch-attribute');
for(var i=0;i<swatchObj.length;i++)
{
$(swatchObj[i]).find('.swatch-option:first').trigger('click');
}
}
}
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment