提交 55ac1490 编写于 作者: D dujingcheng

dujingcheng@huawei.com

Signed-off-by: Ndujingcheng <dujingcheng@huawei.com>
上级 b64944e5
# Camera<a name="ZH-CN_TOPIC_0000001115814834"></a>
- [子组件](#zh-cn_topic_0000001062209279_section172027510456)
- [属性](#zh-cn_topic_0000001062209279_section153601034618)
- [样式](#zh-cn_topic_0000001062209279_section1889052254711)
- [事件](#zh-cn_topic_0000001062209279_section104349151916)
- [方法](#zh-cn_topic_0000001062209279_section568225514199)
相机组件。一个页面仅支持一个camera组件。
## 子组件<a name="zh-cn_topic_0000001062209279_section172027510456"></a>
> 不支持
## 属性<a name="zh-cn_topic_0000001062209279_section153601034618"></a>
<a name="zh-cn_topic_0000001062209279_table20633101642315"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001062209279_row663331618238"><th class="cellrowborder" valign="top" width="23.119999999999997%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p942mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p942mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p942mcpsimp"></a>名称</p>
</th>
<th class="cellrowborder" valign="top" width="23.119999999999997%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p944mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p944mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p944mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="10.48%" id="mcps1.1.6.1.3"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p946mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p946mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p946mcpsimp"></a>默认值</p>
</th>
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.6.1.4"><p id="zh-cn_topic_0000001062209279_p824610360217"><a name="zh-cn_topic_0000001062209279_p824610360217"></a><a name="zh-cn_topic_0000001062209279_p824610360217"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="35.76%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p948mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p948mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p948mcpsimp"></a>描述</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001062209279_row36332165231"><td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p952mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p952mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p952mcpsimp"></a>id</p>
</td>
<td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p954mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p954mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p954mcpsimp"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="10.48%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p956mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p956mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p956mcpsimp"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p42461736102118"><a name="zh-cn_topic_0000001062209279_p42461736102118"></a><a name="zh-cn_topic_0000001062209279_p42461736102118"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.76%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p958mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p958mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p958mcpsimp"></a>组件的唯一标识。</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001062209279_row13633131616239"><td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p961mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p961mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p961mcpsimp"></a>style</p>
</td>
<td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p963mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p963mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p963mcpsimp"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="10.48%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p965mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p965mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p965mcpsimp"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p17246836142119"><a name="zh-cn_topic_0000001062209279_p17246836142119"></a><a name="zh-cn_topic_0000001062209279_p17246836142119"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.76%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p967mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p967mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p967mcpsimp"></a>组件的样式声明。</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001062209279_row10634131610230"><td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p970mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p970mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p970mcpsimp"></a>class</p>
</td>
<td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p972mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p972mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p972mcpsimp"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="10.48%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p974mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p974mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p974mcpsimp"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p324614367213"><a name="zh-cn_topic_0000001062209279_p324614367213"></a><a name="zh-cn_topic_0000001062209279_p324614367213"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.76%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p976mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p976mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p976mcpsimp"></a>组件的样式类,用于引用样式表。</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1634171618236"><td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1786251117156"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1786251117156"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1786251117156"></a>ref</p>
</td>
<td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1086241119157"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1086241119157"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p1086241119157"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="10.48%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p586281111151"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p586281111151"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p586281111151"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p1624612362219"><a name="zh-cn_topic_0000001062209279_p1624612362219"></a><a name="zh-cn_topic_0000001062209279_p1624612362219"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.76%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p113416153342"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p113416153342"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_p113416153342"></a>用来指定指向子元素<span id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_ph56099211134"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_ph56099211134"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_ph56099211134"></a>或子组件</span>的引用信息,该引用将注册到父组件的$refs 属性对象上。</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1263451617236"><td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p997mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p997mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p997mcpsimp"></a>data</p>
</td>
<td class="cellrowborder" valign="top" width="23.119999999999997%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p999mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p999mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p999mcpsimp"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="10.48%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1001mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1001mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1001mcpsimp"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p22471736132114"><a name="zh-cn_topic_0000001062209279_p22471736132114"></a><a name="zh-cn_topic_0000001062209279_p22471736132114"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.76%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1003mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1003mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050831187_zh-cn_topic_0000000000611464_p1003mcpsimp"></a>给当前组件设置data属性,进行相应的数据存储和读取。</p>
</td>
</tr>
</tbody>
</table>
## 样式<a name="zh-cn_topic_0000001062209279_section1889052254711"></a>
<a name="zh-cn_topic_0000001062209279_table1744514388541"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001062209279_row1244614388545"><th class="cellrowborder" valign="top" width="23.11768823117688%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a>名称</p>
</th>
<th class="cellrowborder" valign="top" width="25.477952204779523%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="8.869113088691131%" id="mcps1.1.6.1.3"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1064mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1064mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1064mcpsimp"></a>默认值</p>
</th>
<th class="cellrowborder" valign="top" width="7.519248075192481%" id="mcps1.1.6.1.4"><p id="zh-cn_topic_0000001062209279_p117421754619"><a name="zh-cn_topic_0000001062209279_p117421754619"></a><a name="zh-cn_topic_0000001062209279_p117421754619"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="35.01599840015999%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a>描述</p>
</th>
</tr>
</thead>
<tbody>
<tr id="zh-cn_topic_0000001062209279_row13446238145410"><td class="cellrowborder" valign="top" width="23.11768823117688%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"></a>width</p>
</td>
<td class="cellrowborder" valign="top" width="25.477952204779523%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"></a>&lt;length&gt;<span id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"></a> | &lt;percentage&gt;</span></p>
</td>
<td class="cellrowborder" valign="top" width="8.869113088691131%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p13174101704612"><a name="zh-cn_topic_0000001062209279_p13174101704612"></a><a name="zh-cn_topic_0000001062209279_p13174101704612"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.01599840015999%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"></a>设置组件自身的宽度。</p>
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"></a>缺省时使用元素自身内容需要的宽度。</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001062209279_row13446238145410"><td class="cellrowborder" valign="top" width="23.11768823117688%" headers="mcps1.1.6.1.1 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1070mcpsimp"></a>height</p>
</td>
<td class="cellrowborder" valign="top" width="25.477952204779523%" headers="mcps1.1.6.1.2 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1072mcpsimp"></a>&lt;length&gt;<span id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_ph597168143913"></a> | &lt;percentage&gt;</span></p>
</td>
<td class="cellrowborder" valign="top" width="8.869113088691131%" headers="mcps1.1.6.1.3 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p3948114217528"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.1.6.1.4 "><p id="zh-cn_topic_0000001062209279_p13174101704612"><a name="zh-cn_topic_0000001062209279_p13174101704612"></a><a name="zh-cn_topic_0000001062209279_p13174101704612"></a></p>
</td>
<td class="cellrowborder" valign="top" width="35.01599840015999%" headers="mcps1.1.6.1.5 "><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p624653010258"></a>设置组件自身的高度。</p>
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_p84811050134010"></a>缺省时使用元素自身内容需要的高度。</p>
</td>
</tr>
</tbody>
</table>
## 事件<a name="zh-cn_topic_0000001062209279_section104349151916"></a>
通用
## 方法<a name="zh-cn_topic_0000001062209279_section568225514199"></a>
<table><thead align="left">
<tr id="zh-cn_topic_0000001062209279_row1244614388545"><th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a>名称</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a>参数</p>
</th>
<th class="cellrowborder" valign="top" width="40%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a>描述</p>
</th>
</tr>
</thead>
<tbody>
<tr id="zh-cn_topic_0000001062209279_row1244614388545"><th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">takePhoto</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">CameraTakePhotoOptions</p>
</th>
<th class="cellrowborder" valign="top" width="40%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp">执行拍照</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545"><th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a>startRecord</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a>-</p>
</th>
<th class="cellrowborder" valign="top" width="40%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a>开始录像</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545"><th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp"></a>closeRecord</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp"></a>CameraRecordOptions</p>
</th>
<th class="cellrowborder" valign="top" width="40%" id="mcps1.1.6.1.5"><p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a><a name="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp"></a>结束录像</p>
</th>
</tr>
</tbody>
</table>
CameraTakePhotoOptions
<table><thead align="left">
</thead>
<tbody>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">quality</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">string</p>
</th>
<th class="cellrowborder" valign="top" width="40%" id="mcps1.1.6.1.5">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1066mcpsimp">图片质量(L3)</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">success</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用成功,返回uri</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">fail</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用失败</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">complete</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用结束</p>
</th>
</tr>
</tbody>
</table>
CameraRecordOptions
<table><thead align="left">
</thead>
<tbody>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">success</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用成功,返回uri</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">fail</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用失败</p>
</th>
</tr>
<tr id="zh-cn_topic_0000001062209279_row1244614388545">
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">complete</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.1">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1060mcpsimp">Function</p>
</th>
<th class="cellrowborder" valign="top" width="30%" id="mcps1.1.6.1.2">
<p id="zh-cn_topic_0000001062209279_zh-cn_topic_0000001050791158_zh-cn_topic_0000000000611468_p1062mcpsimp">接口调用结束</p>
</th>
</tr>
</tbody>
</table>
## 示例<a name="zh-cn_topic_0000001062209279_section104349151916"></a>
```
<div style=" flex-direction: column; align-content: center;" >
<div style="height: {{heights}};width: {{widths}} ;">
<camera id="cameraId" style="height: 100%;width: 100%;"> </camera>
</div>
<text > src: {{src}} photoUri: {{photoUri}} </text>
<div style="height: 200; align-items: center;" >
<image style=" border-radius: 150; width: 200; height: 200; margin-left: 10; margin-right: 30;
object-fit: fill; background-color: black;" src="{{photoUri}}" ></image>
<button style=" border-radius: 150; height: 200; width: 200; margin-right: 30;"
onclick="takePhoto" value="takePhoto"></button>
</div>
<div style="flex-direction: row;height: 200;">
<button value="录像" onclick="startRecord" style="width: 50%;height: 200;"></button>
<button value="结束录像" onclick="closeRecord" style="width: 50%;height: 200;"></button>
</div>
</div>
//.js
import router from '@system.router';
export default {
data: {
photoUri: "",
val: "",
arr:[],
size: -1,
quality:'',
src:'',
heights: 600,
widths:600,
},
onInit() {
},
startRecord() {
this.$element('cameraId').startRecorder();
},
closeRecord() {
this.$element('cameraId').closeRecorder(
{
success: (res) => {
this.src = res.uri;
},
fail: (res) => {
this.val = "fail " + res.errormsg + " " + res.errorcode;
},
complete : (res) => {
this.val += " :complete";
},
}
);
},
takePhoto() {
this.$element('cameraId').takePhoto(
{
quality: -1,
success: (res) => {
this.photoUri = res.uri;
},
fail: (res) => {
this.val = "fail " + res.errormsg + " " + res.errorcode;
},
complete : (res) => {
this.val += " :complete";
},
}
);
},
```
}
\ No newline at end of file
......@@ -62,6 +62,9 @@
- [toolbar-item](toolbar-item.md)
- [toggle](toggle.md)
- [媒体组件](媒体组件.md)
- [Camera](Camera.md)
- [画布组件](画布组件.md)
- [canvas组件](canvas组件.md)
- [CanvasRenderingContext2D对象](CanvasRenderingContext2D对象.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册