diff --git a/one/build/remark-anchor.js b/one/build/remark-anchor.js
index 38f215f..4f82f7e 100644
--- a/one/build/remark-anchor.js
+++ b/one/build/remark-anchor.js
@@ -1,4 +1,5 @@
import visit from 'unist-util-visit'
+import { upperFirst } from './util'
const KNOWN_SCOPES_CONFIG = {
props: '属性',
@@ -13,7 +14,7 @@ const KNOWN_SCOPES_CONFIG = {
}
const KNOWN_SCOPES = Object.entries(KNOWN_SCOPES_CONFIG).reduce(
(acc, [key, value]) => {
- acc[key] = key
+ acc[upperFirst(key)] = key
acc[value] = key
return acc
},
diff --git a/one/build/util.js b/one/build/util.js
index 19c6df2..11bdd05 100644
--- a/one/build/util.js
+++ b/one/build/util.js
@@ -27,3 +27,10 @@ export function hash (path) {
hash.update(path)
return hash.digest('hex').substring(0, 7)
}
+
+export function upperFirst (str) {
+ if (str.length === 0) {
+ return str
+ }
+ return str[0].toUpperCase() + str.slice(1)
+}
diff --git a/one/docs/changelog.vue b/one/docs/changelog.vue
index 6a4bbaf..92a1ba9 100644
--- a/one/docs/changelog.vue
+++ b/one/docs/changelog.vue
@@ -90,7 +90,10 @@