# tarojs-popups
**Repository Path**: lblblib/tarojs-popups
## Basic Information
- **Project Name**: tarojs-popups
- **Description**: Taro 的随时随地弹出层
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-07-08
- **Last Updated**: 2021-07-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# tarojs-popups
#### 安装
```shell
$ npm install tarojs-popups
# or
$ yarn add tarojs-popups
```
#### 使用
```tsx
import { Button, View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import React, { FC } from 'react'
import 'tarojs-popups/dist/index.css'
import { Popups, useController } from 'tarojs-popups' // 引入
const Test: FC<{name?:string}> = (props) => {
const ctx = useController()
return (
你好,{props.name}
)
}
export default function IndexPage {
return (
{
const value = await Popups.open({
el: Test,
props: { name: 'tarojs-popups' },
position: 'bottom',
})
console.log('获得数据',value)
}}
>
弹出窗口
)
}
```