# 手机摇一摇

## API

| 参数        | 说明         | 类型      | 默认值   |
| --------- | ---------- | ------- | ----- |
| stop      | 是否停止派发摇动事件 | Boolean | false |
| threshold | 可选，摇动力度阈值  | Number  | 15    |
| timeout   | 可选，事件收集频率  | Number  | 1000  |

## Demo

\`\`\` vux height=200 components=Shake,XButton

shake your phone \</template>

&#x20;export default { data () { return { stopShake: false } }, methods: { 'on-shake': function () { alert('shaked') } } }&#x20;

\`\`\`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vuxjs.gitbook.io/vux/dong-tai-jian-ce/shou-ji-yao-yi-yao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
