weshop-segment

0.0.2 • Public • Published

React + TypeScript + Vite

A simple component for making elements segment.

<Segment apiKey="111" taskId="222" handleMask={handleMask}></Segment>

For more information about apiKey and taskId, please check https://open.weshop.com/authorization/apikey

Version Compatibility
0.x React 18+

Installing

$ npm install weshop-segment
// ES6
import Segment from 'weshop-segment' // The default

Segment Usage

View the Demo at example/App.tsx

import Segment from 'weshop-segment'
import './index.less'
function App() {
    const handleMask = (mask: string) => {
        console.log(`您选择的区域为:${mask}`)
    }
    return (
        <div className="App">
            <div className="segment">
                <div className="segment-content">
                    <Segment apiKey="111" taskId="222" handleMask={handleMask}></Segment>
                </div>
            </div>
        </div>
    )
}

export default App

<Segment> Props:

{
  apiKey: string,
  taskId: string,
  handleMask: (mask: string) => void
}

Run Demo

$ npm install
$ npm run dev

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i weshop-segment

Weekly Downloads

1

Version

0.0.2

License

none

Unpacked Size

205 kB

Total Files

6

Last publish

Collaborators

  • rhea_weshop