Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 628 Bytes

started.md

File metadata and controls

52 lines (35 loc) · 628 Bytes

Quick start

Init your weex project first

weexpack create [project name]

Enter your project folder

cd [project name]

Install nat.js

npm install natjs --save

Add modules you need

weexpack plugin add [nat moudle]
...

Usage

Use Nat in vue/weex file (.vue/.we)

<script>
import Nat from 'natjs'

// Make a phone call
Nat.call('415-736-0000')

// Take a photo
Nat.camera.captureImage((err, ret) => {
    console.log('Path: ', ret.path)
})

// Get device info
Nat.device.info((err, ret) => {
    console.log('Info: ', ret)
})

</script>