-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
<div class="m:10 m:20 m:30 m:40@sm m:50@sm"> | ||
... | ||
</div> | ||
|
||
<div class="m:10 m:20 m:30 m:40@sm m:50@sm">...</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<div class="font:12 font:24@sm m:32 block font:32@md mb:48">...</div> | ||
|
||
<div class="font:12 font:24@sm m:32 block font:32@md mb:48">...</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<button class="btn">...</button> | ||
<button class="btn">...</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div class="width:">...</div> | ||
<div class="width:">...</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
export default function areDeclarationsEqual(aDeclarations, bDeclarations) { | ||
// 获取对象A和B的所有属性名 | ||
const aKeys = Object.keys(aDeclarations); | ||
const bKeys = Object.keys(bDeclarations); | ||
const aKeys = Object.keys(aDeclarations) | ||
const bKeys = Object.keys(bDeclarations) | ||
|
||
// 如果属性数量不相等,返回false | ||
if (aKeys.length !== bKeys.length) { | ||
return false; | ||
return false | ||
} | ||
|
||
// 检查对象A的属性是否都存在于对象B中 | ||
for (const key of aKeys) { | ||
if (!bDeclarations.hasOwnProperty(key)) { | ||
return false; | ||
if (!Object.prototype.hasOwnProperty.call(bDeclarations, key)) { | ||
return false | ||
} | ||
if (aDeclarations[key] !== bDeclarations[key]) { | ||
return false | ||
} | ||
} | ||
|
||
// 如果所有属性都匹配,返回true | ||
return true; | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters