Appearance
Button 按钮 #
TIP
项目中的皆为本地使用路径,自己项目使用请根据快速开始中操作使用
基本用法 #
展示基本lv风格的按钮 包含了禁止状态,是否充填
基本样式按钮
<template>
<div class="container">
<aux-noble-button >
<span>加入购物</span>
</aux-noble-button>
<aux-noble-button disabled>
<span>禁止</span>
</aux-noble-button>
<aux-noble-button type="primary" fill>
<span>主要按钮</span>
</aux-noble-button>
<aux-noble-button type="success" fill>
<span>登陆微信</span>
</aux-noble-button>
<aux-noble-button type="confirm" fill>
<span>确认购买</span>
</aux-noble-button>
</div>
</template>
<script lang="ts" setup>
import { defineComponent, ref } from 'vue';
import { NobleButton as AuxNobleButton } from "../../../../../aux-ui/main"
</script>
<style scoped>
.container {
min-height: 100px;
display: flex;
justify-content: center;
align-items: center;
perspective: 600px;
background-color: #813705;
}
</style>
显示代码
多种样式按钮 #
实现圆形按钮,icon按钮
通过传入参数改变按钮形状
<template>
<div class="container">
<aux-noble-button round >
<span>加入购物</span>
</aux-noble-button>
<aux-noble-button fill round>
<span>筛选</span>
<i class="iconfont icon-control1"></i>
</aux-noble-button>
<aux-noble-button circle>
<i class="iconfont icon-shopping-cart-fill"></i>
</aux-noble-button>
<aux-noble-button circle fill>
<i class="iconfont icon-shopping-cart-fill"></i>
</aux-noble-button>
</div>
</template>
<script lang="ts" setup>
import { defineComponent, ref } from 'vue';
import { NobleButton as AuxNobleButton } from "../../../../../aux-ui/main"
const words = ref("So do i")
</script>
<style scoped>
@import url(//at.alicdn.com/t/c/font_3882013_q5u06iila8.css);
.icon-control1{
font-size: 20px;
margin-left: 5px;
}
.container {
min-height: 100px;
display: flex;
justify-content: center;
align-items: center;
perspective: 600px;
background-color: #813705;
}
</style>
显示代码
带下划线的按钮 #
通过underline加入下划线
通过underline加入下划线
<template>
<div class="container">
<aux-noble-button underline >
<span>加入购物</span>
</aux-noble-button>
<aux-noble-button round underline>
<span>即可订购</span>
</aux-noble-button>
</div>
</template>
<script lang="ts" setup>
import { defineComponent, ref } from 'vue';
import { NobleButton as AuxNobleButton } from "../../../../../aux-ui/main"
const words = ref("So do i")
</script>
<style scoped>
.container {
min-height: 100px;
display: flex;
justify-content: center;
align-items: center;
perspective: 600px;
background-color: #813705;
}
</style>
显示代码
自定义颜色按钮 #
改变color属性
改变color属性
<template>
<div class="container">
<aux-noble-button color="rgba(0,0,0,.4)" >
<span>加入购物</span>
</aux-noble-button>
<aux-noble-button color="yellow" underline round>
<span>即可订购</span>
</aux-noble-button>
</div>
</template>
<script lang="ts" setup>
import { defineComponent, ref } from 'vue';
import { NobleButton as AuxNobleButton } from "../../../../../aux-ui/main"
const words = ref("So do i")
</script>
<style scoped>
.container {
min-height: 100px;
display: flex;
justify-content: center;
align-items: center;
perspective: 600px;
background-color: #813705;
}
</style>
显示代码
Button 参数 #
参数名 | 类型 | 默认值 | 说明 | 跳转 Demo |
---|---|---|---|---|
type | primary,success,confirm | - | 更新于v0.0.1-alpha.2 主题颜色类型 | 基本用法 |
fill | Boolean | false | 更新于v0.0.1-alpha.2 是否充填 | 基本用法 |
round | Boolean | false | 倒圆角边 | 多种样式按钮 |
circle | Boolean | false | 圆形 | 多种样式按钮 |
underline | Boolean | false | 下划线按钮 | 带下划线的按钮 |
color | string | #fff | 颜色支持rgb,16进制 | 自定义颜色按钮 |
disabled | Boolean | false | 是否禁用 | 基本用法 |
Button 插槽 #
插槽名 | 说明 | 跳转 Demo |
---|---|---|
default | 任意内容 | 基本用法 |
Button Bug&update #
功能更新
参数:
fill =>是否充填按钮
type => 明确规定主题颜色
BUG Q&A
Q1 : hover时候颜色冲突
A1: 已修复,默认反相对比颜色