Skip to content

Commit 4f53c92

Browse files
authored
1 parent 3fe9713 commit 4f53c92

File tree

18 files changed

+104
-14
lines changed

18 files changed

+104
-14
lines changed

lib/styles/selectors/query/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ import { Template } from "../../template"
4646

4747
const TRANSITION_CLASS_BASES = [
4848
"enter",
49+
"enter-from",
4950
"enter-active",
5051
"enter-to",
5152
"leave",
53+
"leave-from",
5254
"leave-active",
5355
"leave-to",
5456
]

tests/lib/rules/no-unused-selector.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,13 @@ tester.run("no-unused-selector", rule, {
215215
</template>
216216
<style scoped>
217217
.v-enter,
218+
.v-enter-from,
218219
.v-enter-active,
219220
.v-enter-to,
220221
.v-leave,
221-
.v-leave-to,
222-
.v-leave-active {}
222+
.v-leave-from,
223+
.v-leave-active,
224+
.v-leave-to {}
223225
</style>
224226
`,
225227
`
@@ -230,11 +232,13 @@ tester.run("no-unused-selector", rule, {
230232
</template>
231233
<style scoped>
232234
.foo-enter,
235+
.foo-enter-from,
233236
.foo-enter-active,
234237
.foo-enter-to,
235238
.foo-leave,
236-
.foo-leave-to,
237-
.foo-leave-active {}
239+
.foo-leave-from,
240+
.foo-leave-active,
241+
.foo-leave-to {}
238242
</style>
239243
`,
240244
`
@@ -246,11 +250,13 @@ tester.run("no-unused-selector", rule, {
246250
</template>
247251
<style scoped>
248252
.foo-enter,
253+
.foo-enter-from,
249254
.foo-enter-active,
250255
.foo-enter-to,
251256
.foo-leave,
252-
.foo-leave-to,
253-
.foo-leave-active {}
257+
.foo-leave-from,
258+
.foo-leave-active,
259+
.foo-leave-to {}
254260
</style>
255261
`,
256262
`

tests/lib/rules/require-selector-used-inside.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,13 @@ tester.run("require-selector-used-inside", rule, {
177177
</template>
178178
<style scoped>
179179
.v-enter,
180+
.v-enter-from,
180181
.v-enter-active,
181182
.v-enter-to,
182183
.v-leave,
183-
.v-leave-to,
184-
.v-leave-active {}
184+
.v-leave-from,
185+
.v-leave-active,
186+
.v-leave-to {}
185187
</style>
186188
`,
187189
`
@@ -192,11 +194,13 @@ tester.run("require-selector-used-inside", rule, {
192194
</template>
193195
<style scoped>
194196
.foo-enter,
197+
.foo-enter-from,
195198
.foo-enter-active,
196199
.foo-enter-to,
197200
.foo-leave,
198-
.foo-leave-to,
199-
.foo-leave-active {}
201+
.foo-leave-from,
202+
.foo-leave-active,
203+
.foo-leave-to {}
200204
</style>
201205
`,
202206
`
@@ -208,11 +212,13 @@ tester.run("require-selector-used-inside", rule, {
208212
</template>
209213
<style scoped>
210214
.foo-enter,
215+
.foo-enter-from,
211216
.foo-enter-active,
212217
.foo-enter-to,
213218
.foo-leave,
214-
.foo-leave-to,
215-
.foo-leave-active {}
219+
.foo-leave-from,
220+
.foo-leave-active,
221+
.foo-leave-to {}
216222
</style>
217223
`,
218224
`

tests/lib/styles/fixtures/selectors/query/vue-transition-group01/query-result.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"div#example-2>transition-group>p#a",
44
"div#example-2>transition-group>p#c"
55
],
6+
".v-enter-from": [
7+
"div#example-2>transition-group>p#a",
8+
"div#example-2>transition-group>p#c"
9+
],
610
".v-enter-active": [
711
"div#example-2>transition-group>p#a",
812
"div#example-2>transition-group>p#c"
@@ -15,6 +19,10 @@
1519
"div#example-2>transition-group>p#a",
1620
"div#example-2>transition-group>p#c"
1721
],
22+
".v-leave-from": [
23+
"div#example-2>transition-group>p#a",
24+
"div#example-2>transition-group>p#c"
25+
],
1826
".v-leave-active": [
1927
"div#example-2>transition-group>p#a",
2028
"div#example-2>transition-group>p#c"

tests/lib/styles/fixtures/selectors/query/vue-transition-group01/source.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@
2323
<style scoped>
2424
.v-enter {
2525
}
26+
.v-enter-from {
27+
}
2628
.v-enter-active{
2729
}
2830
.v-enter-to{
2931
}
3032
.v-leave{
3133
}
34+
.v-leave-from{
35+
}
3236
.v-leave-active{
3337
}
3438
.v-leave-to{

tests/lib/styles/fixtures/selectors/query/vue-transition01/query-result.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"div#example-2>transition>p#a",
44
"div#example-2>transition>p#c"
55
],
6+
".v-enter-from": [
7+
"div#example-2>transition>p#a",
8+
"div#example-2>transition>p#c"
9+
],
610
".v-enter-active": [
711
"div#example-2>transition>p#a",
812
"div#example-2>transition>p#c"
@@ -15,6 +19,10 @@
1519
"div#example-2>transition>p#a",
1620
"div#example-2>transition>p#c"
1721
],
22+
".v-leave-from": [
23+
"div#example-2>transition>p#a",
24+
"div#example-2>transition>p#c"
25+
],
1826
".v-leave-active": [
1927
"div#example-2>transition>p#a",
2028
"div#example-2>transition>p#c"

tests/lib/styles/fixtures/selectors/query/vue-transition01/source.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@
2323
<style scoped>
2424
.v-enter {
2525
}
26+
.v-enter-from {
27+
}
2628
.v-enter-active{
2729
}
2830
.v-enter-to{
2931
}
3032
.v-leave{
3133
}
34+
.v-leave-from{
35+
}
3236
.v-leave-active{
3337
}
3438
.v-leave-to{

tests/lib/styles/fixtures/selectors/query/vue-transition02/query-result.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"div#example-2>transition>p#b",
44
"div#example-2>transition>p#c"
55
],
6+
".custom-enter-from": [
7+
"div#example-2>transition>p#b",
8+
"div#example-2>transition>p#c"
9+
],
610
".custom-enter-active": [
711
"div#example-2>transition>p#b",
812
"div#example-2>transition>p#c"
@@ -15,6 +19,10 @@
1519
"div#example-2>transition>p#b",
1620
"div#example-2>transition>p#c"
1721
],
22+
".custom-leave-from": [
23+
"div#example-2>transition>p#b",
24+
"div#example-2>transition>p#c"
25+
],
1826
".custom-leave-active": [
1927
"div#example-2>transition>p#b",
2028
"div#example-2>transition>p#c"

tests/lib/styles/fixtures/selectors/query/vue-transition02/source.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@
2323
<style scoped>
2424
.custom-enter {
2525
}
26+
.custom-enter-from {
27+
}
2628
.custom-enter-active{
2729
}
2830
.custom-enter-to{
2931
}
3032
.custom-leave{
3133
}
34+
.custom-leave-from{
35+
}
3236
.custom-leave-active{
3337
}
3438
.custom-leave-to{

tests/lib/styles/fixtures/selectors/query/vue-transition03/query-result.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
".v-enter": [
33
"div#example-2>transition>p#a"
44
],
5+
".v-enter-from": [
6+
"div#example-2>transition>p#a"
7+
],
58
".v-enter-active": [
69
"div#example-2>transition>p#a"
710
],
@@ -11,6 +14,9 @@
1114
".v-leave": [
1215
"div#example-2>transition>p#a"
1316
],
17+
".v-leave-from": [
18+
"div#example-2>transition>p#a"
19+
],
1420
".v-leave-active": [
1521
"div#example-2>transition>p#a"
1622
],

0 commit comments

Comments
 (0)