Skip to content

Commit 6b38f39

Browse files
committed
修改错误
1 parent 982f798 commit 6b38f39

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

babel.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ module.exports = {
44
"@babel/preset-typescript",
55
],
66
};
7+

src/reactive/reactive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function getTargetType(raw) {
1717
return raw[ReactiveFlags.SKIP];
1818
}
1919

20-
function createReactiveObj(raw, baseHandlers) {
20+
function createReactiveObj(raw: any, baseHandlers) {
2121
if (!isObject(raw)) {
2222
console.error(`${raw} 必须是一个对象`);
2323
}

src/runtime-dom/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function patchProps(el, key, val) {
1010
const isOn = (key: string) => /^on[A-Z]/.test(key);
1111
// 处理事件
1212
if (isOn(key)) {
13-
const event = key.slice(2).toLocaleLowerCase();
13+
const event = key.slice(2).toLowerCase();
1414
el.addEventListener(event, val);
1515
} else if (val !== undefined && val !== null) {
1616
el.setAttribute(key, val);

0 commit comments

Comments
 (0)