mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-06-05 01:48:10 +08:00
Compare commits
2 Commits
7f38a0d988
...
ba4a0760bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba4a0760bb | ||
|
|
8382fd15ad |
@ -17,6 +17,24 @@ export default {
|
|||||||
return this.$route.name;
|
return this.$route.name;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
const anchors = [].slice.call(this.$el.querySelectorAll('h2, h3, h4, h5'));
|
||||||
|
anchors.forEach((anchor) => {
|
||||||
|
anchor.addEventListener('click', this.scrollToAnchor);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
scrollToAnchor(event) {
|
||||||
|
if (event.target.id) {
|
||||||
|
this.$router.push({
|
||||||
|
name: this.$route.name,
|
||||||
|
hash: '#' + event.target.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
6
packages/vant-cli/site/tsconfig.json
Normal file
6
packages/vant-cli/site/tsconfig.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,5 +9,5 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"lib": ["esnext", "dom"]
|
"lib": ["esnext", "dom"]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "site"]
|
"include": ["src/**/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,6 +78,8 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
resize: none;
|
resize: none;
|
||||||
|
// https://github.com/youzan/vant/pull/9418
|
||||||
|
user-select: auto;
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: var(--van-field-placeholder-text-color);
|
color: var(--van-field-placeholder-text-color);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user