![-w537](https://i-blog.csdnimg.cn/blog_migrate/8ded67409b8c65131286b927c0402768.png)
<import name="brightness" src="../Common/ui/h-ui/advance/c_brightness"></import>
<template>
<div class="container">
<brightness id="brightness1"></brightness>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
![-w539](https://i-blog.csdnimg.cn/blog_migrate/213ea4ba0463d6fa4be4c89d1632d1bd.png)
<import name="brightness" src="../Common/ui/h-ui/advance/c_brightness"></import>
<template>
<div class="container">
<brightness id="brightness2" type="default"></brightness>
<brightness id="brightness3" type="info"></brightness>
<brightness id="brightness4" type="primary"></brightness>
<brightness id="brightness5" type="danger"></brightness>
<brightness id="brightness6" type="warning"></brightness>
<brightness id="brightness7" type="success"></brightness>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
![-w540](https://i-blog.csdnimg.cn/blog_migrate/038d623357a44c494e04879dde995be3.png)
<import name="brightness" src="../Common/ui/h-ui/advance/c_brightness"></import>
<template>
<div class="container">
<brightness id="brightness8" show-toast="true"></brightness>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
onInit() {
this.$on('brightness8_dispatchEvt',this.dispatchEvt)
},
dispatchEvt(evt) {
console.info('当前亮度:' + evt.detail.value + '%')
}
}
</script>
扫码体验
![-w256](https://i-blog.csdnimg.cn/blog_migrate/6fda6db4a5a1abf68180507bed1c4127.png)