Ver código fonte

feat: 还是发现会有样式污染,不妥

Burt 2 anos atrás
pai
commit
f6d52a437c
2 arquivos alterados com 13 adições e 0 exclusões
  1. 11 0
      src/pages/index/Test.vue
  2. 2 0
      src/pages/index/index.vue

+ 11 - 0
src/pages/index/Test.vue

@@ -0,0 +1,11 @@
+<template>
+  <view class="content">
+    <view class="text-green-500">test</view>
+  </view>
+</template>
+
+<style>
+.content {
+  font-size: 40rpx;
+}
+</style>

+ 2 - 0
src/pages/index/index.vue

@@ -8,12 +8,14 @@
       Demo Count: {{ countStore.count }}
       <button class="ml-2" @click="countStore.increment">新增</button>
     </view>
+    <Test />
   </view>
 </template>
 
 <script setup lang="ts" name="TestIndex">
 import { ref } from 'vue'
 import { useCountStore } from '@/store/count'
+import Test from './Test.vue'
 
 const countStore = useCountStore()
 const title = ref('Hello')