# 安装 耗材套件
安装 dolphin-weex-bc
npm install dolphin-weex-bc
1
升级
#升级到最新版本
npm install dolphin-weex-bc@latest
# 或
# 升级到指定0.0.8版本
npm install dolphin-weex-bc@0.0.8
1
2
3
4
5
6
2
3
4
5
6
使用说明
# 套件调用示例
- 示例代码:
<template>
<div class="app-wrapper">
<DofBcConsumables layoutMode="row" deviceId="177021372139629"></DofBcConsumables>
<DofBcConsumables deviceId="177021372139629" columnBoxHeight="1200"></DofBcConsumables>
</div>
</template>
<script>
export default {
components: {
DofBcConsumables
},
data:()=> ({
name: 'dolphin-weex-bc',
})
}
</script>
<style scoped>
.app-wrapper {
flex: 1;
background-color: #f9f9f9;
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 属性(data)
Prop | Type | Required | Default | Description |
---|---|---|---|---|
layoutMode | String | N | column | 耗材布局模式,默认纵列展示,支持行展示:row |
showMode | String | N | progress | 耗材展示模式,默认progress进度条展示,支持波浪展示:wave |
deviceId | String | N | '' | 默认获取容器的设备id,可以主动传入 |
columnBoxHeight | Number | N | 1200 | 只有在纵列展示时生效,支持自定义高度 |