From d1448cb0ef10f358bb7bddb4e1ec268515e0b787 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 11:46:57 +0800 Subject: [PATCH] 项目初始化 --- components/button/FloatButton.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/components/button/FloatButton.vue b/components/button/FloatButton.vue new file mode 100644 index 0000000..d3efd1b --- /dev/null +++ b/components/button/FloatButton.vue @@ -0,0 +1,52 @@ +<template> + <view class="float-button"> + <u-button :type="type" :icon="icon" :shape="shape" :disabled="disabled" :size="size" @click="$emit('click')"></u-button> + </view> +</template> + +<script> +export default { + props: { + // 鎸夐挳鐨勯缃牱寮忥紝info锛宲rimary锛宔rror锛寃arning锛宻uccess + type: { + type: String, + default: uni.$u.props.button.type + }, + // 鍥炬爣 + icon: { + type: String + }, + // 鎸夐挳灏哄锛宭arge锛宯ormal锛宻mall锛宮ini + size: { + type: String, + default: 'large' + }, + // 鎸夐挳褰㈢姸锛宑ircle锛堜袱杈逛负鍗婂渾锛夛紝square锛堝甫鍦嗚锛� + shape: { + type: String, + default: 'circle' + }, + // 鎸夐挳鏄惁闀傜┖ + plain: { + type: Boolean, + default: uni.$u.props.button.plain + }, + // 鏄惁绂佹鐘舵�� + disabled: { + type: Boolean, + default: uni.$u.props.button.disabled + }, + } +} +</script> + +<style lang="scss" scoped> +.float-button { + bottom: 100px; + right: 20px; + width: 52px; + height: 52px; + position: fixed; + z-index: 10; +} +</style> \ No newline at end of file -- Gitblit v1.9.3