@viewfly/router 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/index.esm.js +5 -1
- package/bundles/index.js +5 -1
- package/package.json +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -256,7 +256,11 @@ function Link(props) {
|
|
|
256
256
|
}
|
|
257
257
|
return () => {
|
|
258
258
|
const Tag = props.tag || 'a';
|
|
259
|
-
const attrs = Object.assign({}, props, Object.assign({ onClick
|
|
259
|
+
const attrs = Object.assign({}, props, Object.assign({ onClick(ev) {
|
|
260
|
+
var _a;
|
|
261
|
+
navigate(ev);
|
|
262
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, ev);
|
|
263
|
+
} }, props));
|
|
260
264
|
if (Tag === 'a') {
|
|
261
265
|
attrs.href = navigator.join(props.to, router, props.queryParams, props.fragment);
|
|
262
266
|
}
|
package/bundles/index.js
CHANGED
|
@@ -258,7 +258,11 @@ function Link(props) {
|
|
|
258
258
|
}
|
|
259
259
|
return () => {
|
|
260
260
|
const Tag = props.tag || 'a';
|
|
261
|
-
const attrs = Object.assign({}, props, Object.assign({ onClick
|
|
261
|
+
const attrs = Object.assign({}, props, Object.assign({ onClick(ev) {
|
|
262
|
+
var _a;
|
|
263
|
+
navigate(ev);
|
|
264
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, ev);
|
|
265
|
+
} }, props));
|
|
262
266
|
if (Tag === 'a') {
|
|
263
267
|
attrs.href = navigator.join(props.to, router, props.queryParams, props.fragment);
|
|
264
268
|
}
|
package/package.json
CHANGED