-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runner): 修复 common 公共样式问题,fix #8168
1. buildNativeComp 模式下,为各组件自动引入 common 公共样式 2. 当开发者没有全局样式文件时,仍能正确引入 common 公共样式 --------- Co-authored-by: BarryYang <[email protected]>
- Loading branch information
Showing
12 changed files
with
3,444 additions
and
6,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
examples/blended-taro-component/taro-project/src/components/article/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import React from 'react' | ||
import { View, NativeSlot } from '@tarojs/components' | ||
import Common from '../common' | ||
|
||
export default function (props) { | ||
return ( | ||
<View> | ||
<View>Header: <NativeSlot name='header' /></View> | ||
<View>Footer: <NativeSlot name='footer' /></View> | ||
<Common /> | ||
</View> | ||
) | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/blended-taro-component/taro-project/src/components/common/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { View } from '@tarojs/components' | ||
import './index.scss' | ||
|
||
export default function Index () { | ||
return ( | ||
<View className='common'>Common Style Example</View> | ||
) | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/blended-taro-component/taro-project/src/components/common/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.common { | ||
height: 30px; | ||
line-height: 30px; | ||
color: cyan; | ||
border: 1px solid cyan; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
examples/blended-taro-component/taro-project/src/pages/detail/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import React, { Component } from 'react' | ||
import { View } from '@tarojs/components' | ||
import Common from '../../components/common' | ||
|
||
import './index.scss' | ||
|
||
export default class Index extends Component { | ||
render () { | ||
return ( | ||
<View className='blue'>Detail</View> | ||
<View> | ||
<View className='blue'>Detail</View> | ||
<Common /> | ||
</View> | ||
) | ||
} | ||
} |
Oops, something went wrong.