vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.16k stars 922 forks source link

feat(client): improve AutoLinkProps #1554

Closed Mister-Hope closed 1 month ago

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9107201498

Details


Files with Coverage Reduction New Missed Lines %
packages/client/src/components/AutoLink.ts 26 0.0%
<!-- Total: 26 -->
Totals Coverage Status
Change from base Build 9104606222: -0.03%
Covered Lines: 688
Relevant Lines: 1718

💛 - Coveralls
Mister-Hope commented 1 month ago

Downstream env will often provide complicated config object, e.g.:

{
  "text": "ABC",
  "link": "/ABC.html",
  "icon": "abc"
  "children": [
    // ...
  ]
}

For the current prop, developers and users must declare every props, otherwise the default inheritAttrs behavior will make extra configuraion be element props, and compilated ones will become Object object, further more, when setting element preserved keys (e.g.: children), warnings are displayed by Vue telling those keys only have getter.