From d1448cb0ef10f358bb7bddb4e1ec268515e0b787 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 11:46:57 +0800 Subject: [PATCH] 项目初始化 --- uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue | 61 ++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 0 deletions(-) diff --git a/uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue b/uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue new file mode 100644 index 0000000..a9508c0 --- /dev/null +++ b/uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue @@ -0,0 +1,61 @@ +<template> + <view :style="[$u.addStyle(customStyle)]" :class="[customClass]" class="u-cell-group"> + <view v-if="title" class="u-cell-group__title"> + <slot name="title"> + <text class="u-cell-group__title__text">{{ title }}</text> + </slot> + </view> + <view class="u-cell-group__wrapper"> + <u-line v-if="border"></u-line> + <slot /> + </view> + </view> +</template> + +<script> + import props from './props.js'; + /** + * cellGroup 鍗曞厓鏍� + * @description cell鍗曞厓鏍间竴鑸敤浜庝竴缁勫垪琛ㄧ殑鎯呭喌锛屾瘮濡備釜浜轰腑蹇冮〉锛岃缃〉绛夈�� + * @tutorial https://uviewui.com/components/cell.html + * + * @property {String} title 鍒嗙粍鏍囬 + * @property {Boolean} border 鏄惁鏄剧ず澶栬竟妗� (榛樿 true ) + * @property {Object} customStyle 瀹氫箟闇�瑕佺敤鍒扮殑澶栭儴鏍峰紡 + * + * @event {Function} click 鐐瑰嚮cell鍒楄〃鏃惰Е鍙� + * @example <u-cell-group title="璁剧疆鍠滃ソ"> + */ + export default { + name: 'u-cell-group', + mixins: [uni.$u.mpMixin, uni.$u.mixin,props], + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/components.scss"; + + $u-cell-group-title-padding: 16px 16px 8px !default; + $u-cell-group-title-font-size: 15px !default; + $u-cell-group-title-line-height: 16px !default; + $u-cell-group-title-color: $u-main-color !default; + + .u-cell-group { + flex: 1; + + &__title { + padding: $u-cell-group-title-padding; + + &__text { + font-size: $u-cell-group-title-font-size; + line-height: $u-cell-group-title-line-height; + color: $u-cell-group-title-color; + } + } + + &__wrapper { + position: relative; + } + } +</style> + -- Gitblit v1.9.3