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

Commit

Permalink
fix: The order of style tags remains consistent with the playground
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c committed Oct 23, 2023
1 parent 1e67bd3 commit 4c1aa2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/sub-style/src/inject/inject-api-custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const injectAddAndRemoveStyle = '_addChildStyles(styles, instance) {\n'
+ ' if (this._childStylesAnchor) {\n'
+ ' this.shadowRoot.insertBefore(\n'
+ ' s,\n'
+ ' this._childStylesAnchor.nextSibling\n'
+ ' this._childStylesAnchor\n'
+ ' );\n'
+ ' } else {\n'
+ ' this.shadowRoot.appendChild(s);\n'
Expand Down
9 changes: 5 additions & 4 deletions play/sub-style/src/edison/A.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import BComp from './B.vue'
</script>

<template>
<p class="a">A</p>
<BComp></BComp>

<p class="a">
A
</p>
<BComp />
</template>

<style scoped>
<style>
.a{
color: red
}
Expand Down
6 changes: 3 additions & 3 deletions play/sub-style/src/edison/B.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import CComp from './C.vue'
</script>

<template>
<p class="b">B</p>
<CComp></CComp>
<p class="a">
B
</p>
</template>

<style>
Expand Down

0 comments on commit 4c1aa2b

Please sign in to comment.