refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范

这个提交包含在:
wikiboss
2026-09-20 17:05:22 +08:00
父节点 de3cf8b870
当前提交 9fa1d1fbd0
共有 1679 个文件被更改,包括 204798 次插入 和 16817 次删除

查看文件

@@ -0,0 +1,56 @@
<template>
<view class="single-root-box" :class="props.childClass">
<text class="single-root-text">{{ props.text }}</text>
<view class="box" :class="props.boxClass"></view>
</view>
</template>
<script setup lang="uts">
// 禁用自动属性继承,手动控制属性绑定位置
defineOptions({
inheritAttrs: false,
externalClasses: ['child-class', 'box-class']
// TODO: Web端样式隔离下,externalClasses使用App.uvue中的全局class时,
// 目前需要显式配置styleIsolation: 'app',待修复后移除此兼容配置。
// #ifdef WEB
,styleIsolation: 'app'
// #endif
})
// 定义组件属性接口
type Props = {
text ?: string,
childClass ?: string.ClassString,
boxClass ?: string.ClassString
}
// 使用 withDefaults 设置默认值
const props = withDefaults(defineProps<Props>(), {
text: '单根节点组件:绿色背景红色描边',
childClass: '',
boxClass: ''
})
</script>
<style>
.single-root-box {
background-color: #FFF3E0;
padding: 15px;
border-radius: 8px;
border: 2px solid #FF9800;
margin: 5px;
}
.single-root-text {
color: #E65100;
font-size: 14px;
}
.box {
width: 150px;
height: 30px;
background-color: #d9d1ff;
border: #9e4ef7 solid 2px;
}
</style>

查看文件

@@ -0,0 +1,44 @@
<template>
<view class="external-style-box" :style="props.boxStyle">
<text class="external-style-text">{{ props.text }}</text>
<view class="box" :style="props.innerBoxStyle"></view>
</view>
</template>
<script setup lang="uts">
// 定义组件属性接口
type Props = {
text ?: string,
boxStyle ?: string,
innerBoxStyle ?: string
}
// 使用 withDefaults 设置默认值
const props = withDefaults(defineProps<Props>(), {
text: 'external-style测试:默认样式(橙色背景)',
boxStyle: '',
innerBoxStyle: ''
})
</script>
<style>
.external-style-box {
background-color: #FFF3E0;
padding: 15px;
border-radius: 8px;
border: 2px solid #FF9800;
margin: 5px;
}
.external-style-text {
color: #E65100;
font-size: 14px;
}
.box {
width: 150px;
height: 30px;
background-color: #d9d1ff;
border: #9e4ef7 solid 2px;
}
</style>

查看文件

@@ -0,0 +1,8 @@
<template>
<view>
<slot></slot>
</view>
</template>
<script setup lang="uts">
</script>

查看文件

@@ -0,0 +1,52 @@
<template>
<!-- <text>多跟节点继承 $attrs.style 和 $attrs.class</text> -->
<view class="multi-root-box" :class="$attrs['class']">
<text class="multi-root-text">hasClassAttr</text>
<text class="multi-root-text">{{ hasClassAttr }}</text>
</view>
<view class="multi-root-box" :style="$attrs['style']?? ''">
<text class="multi-root-text">hasStyleAttr</text>
<text class="multi-root-text">{{ hasStyleAttr }}</text>
</view>
</template>
<script setup lang="uts">
defineProps({
text: {
type: String,
required: true
}
})
const attrs = useAttrs()
const hasClassAttr = computed(():boolean => {
return attrs['class'] != null
})
const hasStyleAttr = computed(():boolean=>{
return attrs['style'] != null
})
</script>
<style>
.multi-root-box {
background-color: #FFF3E0;
padding: 15px;
border-radius: 8px;
border: 2px solid #FF9800;
margin: 5px;
flex-direction: row;
}
.multi-root-text {
color: #E65100;
font-size: 14px;
margin: 0 20px;
}
</style>

查看文件

@@ -0,0 +1,49 @@
<template>
<!-- 单根节点组件 - 测试外部class和style是否会覆盖到根节点上 -->
<view class="single-root-box">
<text class="global-text" style="font-size: 10px;">我是组件,测试全局样式不影响组件,文字应为:紫色</text>
<text class="single-root-text">{{ text }}</text>
<!-- 内联style测试:这个view有内联style,外部class无法覆盖 -->
<view class="inline-style-box" style="border-width: 3px; background-color: #ffeb37;">
<text style="font-size: 10px;">内联style,外部class无法覆盖</text>
</view>
</view>
</template>
<script setup lang="uts">
defineProps({
text: {
type: String,
default: '单根节点组件'
}
})
</script>
<style>
.single-root-box {
background-color: #FFF3E0;
padding: 15px;
border-radius: 8px;
border: 2px solid #FF9800;
margin: 5px;
}
.single-root-text {
color: #E65100;
font-size: 14px;
}
.global-text{
color: #5555ff;
}
.inline-style-box {
width: 200px;
height: 30px;
background-color: #FFF3E0;
border: 1px solid #FF9800;
margin-top: 10px;
justify-content: center;
align-items: center;
}
</style>

查看文件

@@ -0,0 +1,51 @@
<template>
<view class="component-container">
<!-- TODO 目前 app 端相同权重的 class 是根据class值域的书写顺序决定的,标准web是根据定义的顺序决定,先调整书写顺序,后续统一拉齐 -->
<!-- 原来书写顺序:global-box page-box com-box -->
<!-- 临时调整书写顺序:global-box com-box page-box -->
<view class="global-box com-box page-box">
<text class="com-text">多样式 - {{text}}</text>
</view>
<view class="global-box">
<!-- 原来书写顺序:com-text global-text -->
<!-- 临时调整书写顺序:global-text com-text -->
<text class="global-text com-text">全局样式(预期字体大小18px,背景蓝色)</text>
</view>
<view class="page-box">
<text class="com-text page-text">页面样式(预期字体大小14px,背景绿色,文字红色)</text>
</view>
<view class="com-box">
<text class="com-text">组件样式</text>
</view>
</view>
</template>
<script setup lang="uts">
defineOptions({
styleIsolation: 'app-and-page'
})
defineProps({
text: {
type: String,
default: 'app-and-page'
}
})
</script>
<style>
.com-box {
background-color: #d9d1ff;
padding: 10px;
margin: 10px;
border-radius: 8px;
border: 2px solid #9e4ef7;
}
.com-text {
color: #9e4ef7;
}
.component-container {
margin: 10px;
}
</style>

查看文件

@@ -0,0 +1,47 @@
<template>
<view class="component-container">
<view class="global-box page-box com-box">
<text class="com-text">多样式,只显示组件自身样式(紫色)</text>
</view>
<view class="global-box">
<!-- TODO 目前 app 端相同权重的 class 是根据class值域的书写顺序决定的,标准web是根据定义的顺序决定,先调整书写顺序,后续统一拉齐 -->
<!-- 原来书写顺序:com-text global-text -->
<!-- 临时调整书写顺序:global-text com-text -->
<text class="global-text com-text">全局样式(预期字体大小18px)</text>
</view>
<view class="page-box">
<text class="com-text font-size page-text">页面样式(预期默认字体大小16px)</text>
</view>
<view class="com-box">
<text class="com-text">组件样式</text>
</view>
</view>
</template>
<script setup lang="uts">
defineOptions({
styleIsolation: 'app'
})
</script>
<style>
.com-box {
background-color: #d9d1ff;
padding: 10px;
margin: 10px;
border-radius: 8px;
border: 2px solid #9e4ef7;
}
.com-text {
color: #9e4ef7;
}
.font-size{
font-size: 16px;
}
.component-container {
margin: 10px;
}
</style>

查看文件

@@ -0,0 +1,41 @@
<template>
<view class="component-container">
<view class="global-box page-box com-box">
<text class="com-text">多样式,只显示组件自身样式(紫色)</text>
</view>
<view class="global-box">
<text class="com-text global-text">全局样式(预期默认字体大小16px)</text>
</view>
<view class="page-box">
<text class="com-text page-text">页面样式(预期默认字体大小16px)</text>
</view>
<view class="com-box">
<text class="com-text">组件样式</text>
</view>
</view>
</template>
<script setup lang="uts">
defineOptions({
styleIsolation: 'isolated'
})
</script>
<style>
.com-box {
background-color: #d9d1ff;
padding: 10px;
margin: 10px;
border-radius: 8px;
border: 2px solid #9e4ef7;
}
.com-text {
color: #9e4ef7;
font-size: 16px;
}
.component-container {
margin: 10px;
}
</style>

查看文件

@@ -0,0 +1,15 @@
<template>
<!-- 测试外部class和style是否会覆盖到 二级组件根节点上 -->
<view class="box">
<text>我是二级组件</text>
</view>
</template>
<script setup lang="uts">
</script>
<style>
.box{
background-color: #55aa00;
}
</style>

查看文件

@@ -0,0 +1,11 @@
<template>
<levelChild></levelChild>
</template>
<script setup>
import levelChild from './level-child.uvue'
</script>
<style>
</style>

查看文件

@@ -0,0 +1,34 @@
<template>
<!-- 默认策略下,父组件的样式不会影响子组件。
但在web下子组件的根节点依然可能会受父组件的影响,
所以需要尽可能避免在子组件的根节点加父组件的样式。 -->
<view>
<view class="child-box">
<text class="child-text">{{ text }}</text>
</view>
</view>
</template>
<script setup lang="uts">
defineProps({
text: {
type: String,
default: '子组件'
}
})
</script>
<style>
.child-box {
background-color: #E3F2FD;
padding: 10px;
border-radius: 6px;
border: 2px solid #2196F3;
margin: 5px;
}
.child-text {
color: #1565C0;
font-size: 13px;
}
</style>

查看文件

@@ -0,0 +1,32 @@
<template>
<view class="parent-box">
<text class="parent-text">父组件样式(橙色背景)</text>
<parent-child text="子组件"></parent-child>
</view>
</template>
<script setup lang="uts">
import parentChild from './parent-child.uvue'
</script>
<style>
.parent-box {
padding: 15px;
border-radius: 8px;
background-color: #FFF3E0;
border: 2px solid #FF9800;
margin: 5px;
}
.parent-text {
color: #ff7b00;
font-size: 14px;
margin-bottom: 10px;
}
/* 父组件中的样式,测试是否会影响子组件 */
.child-box {
background-color: yellow !important;
border-color: orange !important;
}
</style>

查看文件

@@ -0,0 +1,142 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isAndroid = platformInfo.startsWith('android')
const isIos = platformInfo.startsWith('ios')
const isHarmony = platformInfo.startsWith('harmony')
const isApp = isAndroid || isIos || isHarmony
const isDom2 = process.env.UNI_APP_X_DOM2 === "true"
const PAGE_PATH = '/pages/CSS/style-isolation/style-isolation'
describe('style-isolation', () => {
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor('view')
})
it('screenshot', async () => {
const image = await program.screenshot({ fullPage: true });
expect(image).toSaveImageSnapshot();
});
it('自定义组件hover-class透传', async () => {
const childHoverEl = await page.$('.view-class')
// 设置较长的 hover-stay-time,确保在 waitFor(1000) 时 hover 状态仍然激活
await page.setData({
data:{
stay_time: 1000 * 3
}
})
await page.waitFor(100)
if(isApp){
const viewRect = await page.data('data.childViewRect');
const point_x = viewRect.x + viewRect.width / 2.0;
const point_y = viewRect.y + viewRect.height - (isDom2 ? 20 : 10);
await program.tap({
x: Math.round(point_x),
y: Math.round(point_y)
})
await page.waitFor(200);
}else{
await childHoverEl.tap()
}
await page.waitFor(1000)
// 通过检查样式来判断 hover-class 是否生效
const getHoverStyle = await childHoverEl.style('background-color')
console.log('getHoverStyle', getHoverStyle)
// TODO: Android/iOS/Web 平台,在 hover 激活期间 style.getPropertyValue 读取样式还是之前的样式
if(isHarmony){
expect(getHoverStyle).toBe(isDom2 ? 'rgb(232, 245, 233)' : '#00aaff')
}
})
it('测试组件的根节点为二级组件时 样式传递', async () => {
const levelEl = await page.$('.level-child-class')
const levelElStyle = await levelEl.style('background-color')
if(isApp){
expect(levelElStyle).toBe(isDom2? 'rgb(0, 170, 255)' : '#00aaff')
}else{
expect(levelElStyle).toBe('rgb(0, 170, 255)')
}
})
it('styleIsolation-isolated模式 - 全隔离', async () => {
const compIsolatedEl = await page.$('.comp-isolated')
// 样式全隔离,预期组件自身样式紫色
const comBoxEl = await compIsolatedEl.$('.com-box')
const comBoxStyle = await comBoxEl.style('background-color')
if(isApp){
expect(comBoxStyle).toBe(isDom2? 'rgb(217, 209, 255)' : '#d9d1ff')
}else{
expect(comBoxStyle).toBe('rgb(217, 209, 255)')
}
// 验证全局样式无效,预期组件默认字体大小16px
const globalTestEl = await compIsolatedEl.$('.global-text')
const globalTestStyle = await globalTestEl.style('font-size')
// TODO:临时注释,调整写法,有差异,web/MP:16px,ios/harmony:16(ios端是number,其他是string)
// expect(globalTestStyle).toBe('16px')
if(!isAndroid){
expect([16,'16','16px']).toContain(globalTestStyle)
}
})
it('styleIsolation-app模式 - 受全局样式影响', async () => {
const compAppEl = await page.$('.comp-app')
// 优先级:全局样式 < 自身样式,预期组件自身样式紫色
const comBoxEl = await compAppEl.$('.com-box')
const comBoxStyle = await comBoxEl.style('background-color')
if(isApp){
expect(comBoxStyle).toBe(isDom2? 'rgb(217, 209, 255)' : '#d9d1ff')
}else{
expect(comBoxStyle).toBe('rgb(217, 209, 255)')
}
// 验证,全局样式有效(字体的粗细bold与 700 等值,大小18px)
const globalTestEl = await compAppEl.$('.global-text')
const globalTestWeight = await globalTestEl.style('font-weight')
const globalTestSize = await globalTestEl.style('font-size')
expect(['700','bold']).toContain(globalTestWeight)
// TODO:临时注释,有差异,安卓端为空,web/MP:16px,ios/harmony:16
// expect(globalTestSize).toBe('18px')
if(!isAndroid){
expect([18,'18','18px']).toContain(globalTestSize)
}
// 验证,页面样式无效,默认字体大小16px
const pageTestEl = await compAppEl.$('.page-text')
const pageTestSize = await pageTestEl.style('font-size')
// expect(pageTestSize).toBe('16px')
if(!isAndroid){
expect([16,'16','16px']).toContain(pageTestSize)
}
})
it('styleIsolation-app-and-page模式 - 受全局和页面样式影响', async () => {
const compAppAndPageEl = await page.$('.comp-app-and-page')
// 优先级:全局样式 < 组件自身样式 < 页面样式,预期组件应用页面样式(绿色)优先级最高
const comBoxEl = await compAppAndPageEl.$('.com-box')
const comBoxStyle = await comBoxEl.style('background-color')
// app dom2 rgb(232, 245, 233)
if(isApp){
expect(comBoxStyle).toBe(isDom2? 'rgb(232, 245, 233)' : '#e8f5e9')
}else{
expect(comBoxStyle).toBe('rgb(232, 245, 233)')
}
// 验证,全局样式有效(字体的粗细bold,大小18px)
const globalTestEl = await compAppAndPageEl.$('.global-text')
const globalTestSize = await globalTestEl.style('font-size')
// TODO:临时注释,有差异,web/MP:16px,ios/harmony:16
// expect(globalTestSize).toBe('18px')
if(!isAndroid){
expect([18,'18','18px']).toContain(globalTestSize)
}
// 验证,页面样式有效,字体大小14px
const pageTestEl = await compAppAndPageEl.$('.page-text')
const pageTestSize = await pageTestEl.style('font-size')
// expect(pageTestSize).toBe('14px')
if(!isAndroid){
expect([14,'14','14px']).toContain(pageTestSize)
}
})
});

查看文件

@@ -0,0 +1,293 @@
<template>
<!-- #ifdef APP && !VUE3-VAPOR -->
<scroll-view style="flex: 1;">
<!-- #endif -->
<view style="padding: 15px;">
<text class="page-title">样式隔离</text>
<view class="section">
<text class="section-title">1. 全局样式 </text>
<text class="section-desc">App.uvue中定义的全局样式是否会影响页面元素</text>
<view class="test-item">
<text class="label">使用全局class "global-text":</text>
<text class="global-text">这段文字应用了全局样式,文字应为:蓝色</text>
</view>
<view class="test-item">
<text class="label">使用全局class "global-box":</text>
<view class="global-box">
<text>这是应用了全局box样式的容器,背景色应为:蓝色</text>
</view>
</view>
</view>
<view class="section">
<text class="section-title">2. 自定义组件hover-class透传</text>
<text class="section-desc">单根节点为view的自定义组件,可以直接透传hover-class相关属性</text>
<view class="test-item">
<child-hover-class id="view-hover" class="view-class" hover-class="hover-class" :hover-stay-time="data.stay_time">
<text class="text">抬起 1000 ms 后背景恢复</text>
</child-hover-class>
</view>
</view>
<view class="section">
<text class="section-title">3. 单根节点组件 </text>
<text class="section-desc">组件为单根节点时,外部使用的class和style会覆盖在组件的根节点上</text>
<view class="test-item">
<text class="label">默认样式的组件:</text>
<child text="默认样式"></child>
<text class="section-desc">预期:组件内部有内联style的元素(黄色背景,3px边框),外部class无法覆盖内联style</text>
</view>
<view class="test-item">
<text class="label">外部添加class覆盖(绿色):</text>
<child text="外部class覆盖" class="custom-style-green"></child>
</view>
<view class="test-item">
<text class="label">外部添加style覆盖(绿色):</text>
<child text="外部style覆盖" style="background-color: #E8F5E9; border-color: #4CAF50;"></child>
</view>
<view class="test-item">
<text class="label">外部class和style同时覆盖(绿色+border-width为5px):</text>
<child text="class+style覆盖" class="custom-style-green" style="border-width: 5px;"></child>
</view>
</view>
<view class="section">
<text class="section-title">4. externalClasses配置 </text>
<text class="section-desc">通过externalClasses暴露特定class(类似微信小程序),允许外部精确控制组件内部样式</text>
<view class="test-item">
<text class="label">默认样式(橙色):</text>
<child-external text="默认样式:紫色背景和描边"></child-external>
</view>
<view class="test-item">
<text class="label">通过child-class自定义样式(蓝色):</text>
<child-external text="蓝色样式:黄色背景蓝色描边" child-class="external-class" box-class="external-custom-box"></child-external>
</view>
<view class="test-item">
<text class="label">全局样式使用!important覆盖组件样式:</text>
<child-external text="全局蓝色样式:黄色背景描边" child-class="global-important-class" box-class="global-important-box"></child-external>
<text class="section-desc">预期:全局样式中的!important可以覆盖组件内部样式</text>
</view>
</view>
<view class="section">
<text class="section-title">4.5. external-style配置 </text>
<text class="section-desc">通过external-style暴露style属性,允许外部通过style字符串控制组件内部样式(不受样式隔离策略影响)</text>
<view class="test-item">
<text class="label">默认样式(橙色):</text>
<child-external-style text="默认样式:紫色背景和描边"></child-external-style>
</view>
<view class="test-item">
<text class="label">通过box-style自定义外层样式(蓝色):</text>
<child-external-style text="组件根节点:蓝色背景样式" box-style="background-color: #8fd3ff; border-color: #00aaff;"></child-external-style>
</view>
<view class="test-item">
<text class="label">通过inner-box-style自定义内层样式(绿色):</text>
<child-external-style text="组件内层:绿色背景样式" inner-box-style="background-color: #E8F5E9; border-color: #4CAF50;"></child-external-style>
</view>
</view>
<view class="section">
<text class="section-title">5. 多根节点组件 </text>
<text class="section-desc">多根节点继承 $attrs.style 和 $attrs.class,允许外部精确控制组件内部样式</text>
<view class="test-item">
<text class="label">默认样式:</text>
<child-multi-tag text="默认样式"></child-multi-tag>
</view>
<view class="test-item">
<text class="label">通过$attrs.class自定义组件内部样式(紫色):</text>
<child-multi-tag class="child-multi-class" text="class样式"></child-multi-tag>
</view>
<view class="test-item">
<text class="label">通过$attrs.style自定义组件内部样式(蓝色):</text>
<child-multi-tag text="蓝色样式" style="background-color: #8fd3ff;border-color: #00aaff;"></child-multi-tag>
</view>
</view>
<view class="section">
<text class="section-title">6. 组件的根节点为二级组件时 样式传递</text>
<text class="section-desc">页面使用组件level,组件level使用二级组件level-child</text>
<view class="test-item">
<text class="label">默认样式:</text>
<level></level>
</view>
<view class="test-item">
<text class="label">外部添加class覆盖(蓝色):</text>
<level class="level-child-class"></level>
</view>
</view>
<view class="section">
<text class="section-title">7. 父组件不影响子组件 </text>
<text class="section-desc">默认策略下,父组件的样式不会影响子组件(子组件样式隔离)</text>
<view class="test-item">
<text class="label">父组件包含子组件:</text>
<parent></parent>
<text class="section-desc">预期:父组件有橙色背景,子组件有蓝色背景。父组件中定义的.child-box样式(黄色)不会影响子组件,子组件保持自己的蓝色背景</text>
</view>
</view>
<view class="section">
<text class="section-title">8. styleIsolation配置</text>
<text class="section-desc">isolated、app、app-and-page三种样式隔离模式的优先级关系</text>
<view class="test-item">
<text class="label">8.1 isolated模式 - 全隔离</text>
<text class="section-desc">只受组件自身样式影响(除externalClasses、组件根节点、v-deep以外),不受全局样式和页面样式影响</text>
<comp-isolated class="global-box comp-isolated"></comp-isolated>
<text class="section-desc">预期:.global-box不会应用全局样式(蓝色),.page-box不会应用页面样式(绿色),只显示组件自身样式(紫色)</text>
</view>
<view class="test-item">
<text class="label">8.2 app模式 - 受全局样式影响</text>
<text class="section-desc">优先级:全局样式 < 自身样式</text>
<comp-app class="comp-app"></comp-app>
<text class="section-desc">预期:.global-box会应用全局样式(蓝色),.page-box不会应用页面样式(绿色),组件自身样式优先级最高(紫色)</text>
</view>
<view class="test-item">
<text class="label">8.3 app-and-page模式 - 受全局和页面样式影响</text>
<text class="section-desc">优先级:全局样式 &lt; 组件自身样式 &lt; 页面样式</text>
<comp-app-and-page class="comp-app-and-page" text="应该显示页面样式(背景绿色)"></comp-app-and-page>
<text class="section-desc">预期:.global-box会应用全局样式(蓝色),.page-box会应用页面样式(绿色)优先级最高,组件自身样式(紫色)</text>
</view>
</view>
</view>
<!-- #ifdef APP && !VUE3-VAPOR -->
</scroll-view>
<!-- #endif -->
</template>
<script setup lang="uts">
import child from './child.uvue'
import childExternal from './child-external-classes.uvue'
import childHoverClass from './child-hover-class.uvue'
import childExternalStyle from './child-external-style.uvue'
import childMultiTag from './child-multi-tag.uvue'
import level from './level.uvue'
import parent from './parent.uvue'
import compIsolated from './comp-isolated.uvue'
import compApp from './comp-app.uvue'
import compAppAndPage from './comp-app-and-page.uvue'
type DataType = {
stay_time: number;
childViewRect: DOMRect | null;
childView: UniElement | null;
}
// 使用reactive解决ref数据在自动化测试中无法访问
const data = reactive({
stay_time: 1000,
childViewRect: null,
childView:null,
} as DataType)
// #ifdef APP
onReady(() => {
data.childView = uni.getElementById('view-hover')
data.childViewRect = data.childView?.getBoundingClientRect() ?? null
if (data.childViewRect != null) {
data.childViewRect.y += uni.getSystemInfoSync().safeArea.top + 44
}
})
// #endif
defineExpose({
data
})
</script>
<style>
.page-title {
font-size: 24px;
font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 20px;
}
.section {
margin-bottom: 30px;
border-radius: 8px;
}
.section-title {
font-size: 18px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
}
.section-desc {
font-size: 13px;
color: #999;
margin: 10px;
}
.test-item {
margin-bottom: 15px;
padding: 10px;
background-color: #FFFFFF;
border-radius: 6px;
}
.label {
font-size: 15px;
color: #555;
margin-bottom: 8px;
}
/* 外部覆盖样式 - 用于测试单根节点组件 */
.custom-style-green {
background-color: #cbf1db !important;
border-color: #8bc399 !important;
}
/* externalClasses自定义样式 */
.external-class {
background-color: #9ad6fa !important;
border-color: #00aaff !important;
}
.external-custom-box {
background-color: yellow !important;
border: blue solid 2px !important;
}
/* 多根节点组件外部class样式 */
.child-multi-class {
background-color: #d9daff !important;
border-color: #aaaaff !important;
}
.level-child-class {
background-color: #00aaff !important;
}
/* 页面样式 - 用于测试app-and-page样式隔离优先级 */
.page-box {
background-color: #e8f5e9;
padding: 10px;
margin: 10px;
border-radius: 8px;
border: 2px solid #4caf50;
}
.page-text{
color:red;
font-size: 14px;
}
.view-class {
padding: 10px;
margin: 10px;
border-radius: 8px;
border: 2px solid #4caf50;
background-color: #e8f5e9;
justify-content: center;
align-items: center;
}
.hover-class {
background-color: #00aaff;
}
</style>