File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1717 <script src="../webcomponentsjs/webcomponents-lite.js"></script>
1818 <script src="../smart-core/source/smart.core.js"></script>
1919 <link rel="stylesheet" href="../smart-core/source/styles/smart.default.css" type="text/css" />
20+ <script>
21+ window.onload = function () {
22+ const basePath = '/images/',
23+ carouselSquare = document.getElementById('carouselSquare'),
24+
25+ carouselSquare.dataSource = generateDataSource(7);
26+
27+ function generateDataSource(items) {
28+ let dataSource = Array(items).fill({});
29+
30+ dataSource.forEach((element, index) => dataSource[index] = { image: `${basePath}carousel-square-${index + 1}.jpg` });
31+ return dataSource;
32+ }
33+ }
34+ </script>
2035 <next-code-block></next-code-block>
2136 </template>
2237</custom-element-demo>
You can’t perform that action at this time.
0 commit comments