(prop)
| 1145 | } |
| 1146 | |
| 1147 | getPropertyBestPractices(prop) { |
| 1148 | const practices = []; |
| 1149 | |
| 1150 | if (prop.includes('animation')) { |
| 1151 | practices.push('使用 transform 和 opacity 实现动画'); |
| 1152 | practices.push('添加 will-change 提示'); |
| 1153 | } |
| 1154 | if (prop.includes('transform')) { |
| 1155 | practices.push('使用 3D transform 触发 GPU 加速'); |
| 1156 | practices.push('合理使用 will-change'); |
| 1157 | } |
| 1158 | |
| 1159 | return practices; |
| 1160 | } |
| 1161 | |
| 1162 | getPropertyCommonPitfalls(prop) { |
| 1163 | const pitfalls = []; |
no outgoing calls
no test coverage detected