Compare commits

...

2 Commits

Author SHA1 Message Date
okxiaoliang4
ba4a0760bb
fix(Field): 修复全局设置 user-select: none 时 IOS 下无法输入的问题 (#9418)
* fix: 修复IOS输入光标不显示无法输入内容

* Update index.less

Co-authored-by: neverland <chenjiahan@buaa.edu.cn>
2021-09-10 11:12:00 +08:00
neverland
8382fd15ad
fix(@vant/cli): should allow to click anchor (#9434)
* fix(@vant/cli): should allow to click anchor

* chore: add
2021-09-10 11:07:28 +08:00
5 changed files with 27 additions and 1 deletions

View File

@ -17,6 +17,24 @@ export default {
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>

View File

@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true
}
}

View File

@ -9,5 +9,5 @@
"esModuleInterop": true,
"lib": ["esnext", "dom"]
},
"include": ["src/**/*", "site"]
"include": ["src/**/*"]
}

View File

@ -78,6 +78,8 @@
background-color: transparent;
border: 0;
resize: none;
// https://github.com/youzan/vant/pull/9418
user-select: auto;
&::placeholder {
color: var(--van-field-placeholder-text-color);