Skip to content

Commit

Permalink
chore: replace api and release version (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Nov 19, 2024
1 parent 1e18f7a commit 395f4f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tdesign-site-components",
"version": "0.15.5",
"version": "0.15.6",
"main": "lib/site.es.js",
"scripts": {
"dev": "vite",
Expand Down
22 changes: 8 additions & 14 deletions packages/components/src/components/td-header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,14 @@ export default define({
get: (_host, lastValue) => lastValue || {},
set: (_host, value) => value,
connect: (host) => {
allComponentsNpmUrl.forEach((item) => {
// flutter is not a npm package
if (item === 'tdesign-flutter') return;
fetch(`https://service-edbzjd6y-1257786608.hk.apigw.tencentcs.com/release/npm/versions/${item}`)
.then((res) => res.json())
.then((res) => {
const latestVersion = res?.['dist-tags']?.['latest'];
host.npmVersions = {
...host.npmVersions,
[item]: latestVersion,
};
})
.catch(console.error);
});
fetch(`https://service-edbzjd6y-1257786608.hk.apigw.tencentcs.com/release/npm/latest-versions`)
.then((res) => res.json())
.then((res) => {
host.npmVersions = {
...res,
};
})
.catch(console.error);
},
},
collapseMenu: {
Expand Down

0 comments on commit 395f4f5

Please sign in to comment.