Skip to content

Commit 79421a5

Browse files
committed
Docs: Fix jsdelivr to use @latest links. Fix issue in build
1 parent a316b51 commit 79421a5

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

docs/src/examples/query/plugins/query-behavior/query-tooltip.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,35 @@ const templates = {
1414
<div class="ui tooltip">
1515
<div class="title"></div>
1616
<div class="content"></div>
17-
</div>`
17+
</div>`,
1818
};
1919

2020
// Create shared tooltip across all three boxes
2121
const setup = ({ $, templates }) => {
2222
return {
23-
$tooltip: $(templates.tooltip).appendTo('body')
23+
$tooltip: $(templates.tooltip).appendTo('body'),
2424
};
2525
};
2626

2727
const createBehavior = ({ $, el, settings, self }) => ({
28-
2928
updateTooltip() {
3029
self.$tooltip
3130
.find('.title').html(settings.title).end()
32-
.find('.content').html(settings.content)
33-
;
31+
.find('.content').html(settings.content);
3432
},
3533

3634
getTooltipPosition() {
3735
const rect = el.getBoundingClientRect();
3836
const tooltipHeight = self.$tooltip.get(0).offsetHeight;
3937
return {
40-
top: rect.top - tooltipHeight - 8,
41-
left: rect.left,
38+
top: `${rect.top - tooltipHeight - 8}px`,
39+
left: `${rect.left}px`,
4240
};
4341
},
4442

4543
updateTooltipPosition(position) {
4644
self.$tooltip.css({
47-
...position
45+
...position,
4846
});
4947
},
5048

@@ -84,7 +82,6 @@ const createBehavior = ({ $, el, settings, self }) => ({
8482
},
8583
});
8684

87-
8885
const events = {
8986
'global click body': ({ self }) => {
9087
self.hide();

docs/src/pages/examples/importmap.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for (const pkg of importPackages) {
4343
try {
4444
// use jsdelivr
4545
if (isStaticBuild) {
46-
let url = `${packageBase}/${pkg}/`;
46+
let url = `${packageBase}/${pkg}@latest/`;
4747
if (packageBase.includes('jsdelivr')) {
4848
url += '+esm';
4949
}

0 commit comments

Comments
 (0)