Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 4c1aa2b

Browse files
committed
fix: The order of style tags remains consistent with the playground
1 parent 1e67bd3 commit 4c1aa2b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

packages/sub-style/src/inject/inject-api-custom-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const injectAddAndRemoveStyle = '_addChildStyles(styles, instance) {\n'
3939
+ ' if (this._childStylesAnchor) {\n'
4040
+ ' this.shadowRoot.insertBefore(\n'
4141
+ ' s,\n'
42-
+ ' this._childStylesAnchor.nextSibling\n'
42+
+ ' this._childStylesAnchor\n'
4343
+ ' );\n'
4444
+ ' } else {\n'
4545
+ ' this.shadowRoot.appendChild(s);\n'

play/sub-style/src/edison/A.ce.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import BComp from './B.vue'
33
</script>
44

55
<template>
6-
<p class="a">A</p>
7-
<BComp></BComp>
8-
6+
<p class="a">
7+
A
8+
</p>
9+
<BComp />
910
</template>
1011

11-
<style scoped>
12+
<style>
1213
.a{
1314
color: red
1415
}

play/sub-style/src/edison/B.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
2-
import CComp from './C.vue'
32
</script>
43

54
<template>
6-
<p class="b">B</p>
7-
<CComp></CComp>
5+
<p class="a">
6+
B
7+
</p>
88
</template>
99

1010
<style>

0 commit comments

Comments
 (0)