feat: 引入taro-ui组件库
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import { useLaunch } from '@tarojs/taro'
|
||||
import './app.scss'
|
||||
import 'taro-ui/dist/style/index.scss' // 全局引入一次即可
|
||||
|
||||
function App({ children }) {
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import "~taro-ui/dist/style/index.scss"; // 引入组件样式 - 方式二
|
||||
@@ -1,5 +1,8 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import { useLoad } from '@tarojs/taro'
|
||||
import { AtButton } from 'taro-ui'
|
||||
import { AtIcon } from 'taro-ui'
|
||||
import { AtAvatar } from 'taro-ui'
|
||||
import './index.scss'
|
||||
|
||||
export default function Index() {
|
||||
@@ -10,7 +13,12 @@ export default function Index() {
|
||||
|
||||
return (
|
||||
<View className='index'>
|
||||
<AtButton>按钮文案</AtButton>
|
||||
<AtButton type='primary' size='small'>按钮文案</AtButton>
|
||||
<AtButton type='primary' size='normal'>按钮文案</AtButton>
|
||||
<Text>Hello world1!</Text>
|
||||
<View className='at-icon at-icon-settings'></View>
|
||||
<AtAvatar text='凹凸实验室'></AtAvatar>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user