Skip to content

Commit fc197b3

Browse files
committed
feat: 更新快照
1 parent 2fe6a2f commit fc197b3

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

__test__/index.spec.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,3 +736,27 @@ test('Harmony attrbute test -webkt-line-clamp', t => {
736736
})
737737
t.snapshot(code)
738738
})
739+
740+
test('Harmony attrbute test animation', t => {
741+
const { code } = parse(normal, [`
742+
.anim {
743+
animation: move 2s infinite;
744+
}
745+
746+
@keyframes move {
747+
0% {
748+
transform: translateX(0);
749+
}
750+
50% {
751+
transform: translateX(650px);
752+
}
753+
100% {
754+
transform: translateX(0);
755+
}
756+
}
757+
758+
`], {
759+
platformString: 'Harmony'
760+
})
761+
t.snapshot(code)
762+
})

__test__/index.spec.mjs.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,3 +1304,69 @@ Generated by [AVA](https://avajs.dev).
13041304
};␊
13051305
export default Index;␊
13061306
`
1307+
1308+
## Harmony attrbute test animation
1309+
1310+
> Snapshot 1
1311+
1312+
`import { View } from '@tarojs/components';␊
1313+
import { calcStaticStyle, convertNumber2VP, __combine_nesting_style__, __var_fn, globalCss } from "@tarojs/runtime";␊
1314+
let __inner_style_data__;␊
1315+
function __inner_style__() {␊
1316+
if (__inner_style_data__) return __inner_style_data__;␊
1317+
__inner_style_data__ = {␊
1318+
"anim": {␊
1319+
animation: {␊
1320+
"params": {␊
1321+
"delay": 0,␊
1322+
"iterations": -1,␊
1323+
"duration": 2000␊
1324+
},␊
1325+
"keyframes": [␊
1326+
{␊
1327+
"percentage": 0,␊
1328+
"duration": 0,␊
1329+
"curve": "ease",␊
1330+
"event": {␊
1331+
transform: {␊
1332+
Translate: {␊
1333+
x: convertNumber2VP(0)␊
1334+
}␊
1335+
}␊
1336+
}␊
1337+
},␊
1338+
{␊
1339+
"percentage": 0.5,␊
1340+
"duration": 1000,␊
1341+
"curve": "ease",␊
1342+
"event": {␊
1343+
transform: {␊
1344+
Translate: {␊
1345+
x: convertNumber2VP(650)␊
1346+
}␊
1347+
}␊
1348+
}␊
1349+
},␊
1350+
{␊
1351+
"percentage": 1,␊
1352+
"duration": 1000,␊
1353+
"curve": "ease",␊
1354+
"event": {␊
1355+
transform: {␊
1356+
Translate: {␊
1357+
x: convertNumber2VP(0)␊
1358+
}␊
1359+
}␊
1360+
}␊
1361+
}␊
1362+
]␊
1363+
}␊
1364+
}␊
1365+
};␊
1366+
return __inner_style_data__;␊
1367+
}␊
1368+
const Index = ()=>{␊
1369+
return __combine_nesting_style__(<View __hmStyle={calcStaticStyle(__inner_style__(), 'index')} className='index'/>, null);␊
1370+
};␊
1371+
export default Index;␊
1372+
`

__test__/index.spec.mjs.snap

190 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)