diff --git a/package.json b/package.json index 66bd205..3e80e68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkitd", - "version": "1.3.3", + "version": "1.3.4", "type": "module", "main": "dist/index.js", "files": [ diff --git a/src/router/router-components.js b/src/router/router-components.js index 2ca7002..666a7fe 100644 --- a/src/router/router-components.js +++ b/src/router/router-components.js @@ -107,6 +107,7 @@ class RouterLink extends Component { a { display: flex; align-items: center; + gap: var(--router-link-gap, 0); width: 100%; height: 100%; color: inherit; @@ -119,7 +120,6 @@ class RouterLink extends Component { cursor: not-allowed; } ` - #href = '' #navigate() { @@ -144,13 +144,14 @@ class RouterLink extends Component { ? query.replaceAll('?', '') : object2query(query) - path = path.replace(/^\//, '') + path = '/' + path.replace(/^\/+/, '') + this.to = { path, query } if (params) { path += '?' + params } - return '/' + path + return path } activated() {