Skip to content

زر Button ​

مكوّن الزر الأساسي. وسيط العرض هو <button> المدمج في uni (يُترجَم إلى زر أصلي على كل منصة)، ويُترجَم حدث النقر من uni إلى bindtap.

الاستخدام الأساسي ​

vue
<template>
  <lh-button>افتراضي</lh-button>
  <lh-button type="primary">رئيسي</lh-button>
  <lh-button type="success">نجاح</lh-button>
  <lh-button type="warning">تحذير</lh-button>
  <lh-button type="danger">خطر</lh-button>
  <lh-button type="info">معلومات</lh-button>
</template>

الحالات والأشكال ​

vue
<template>
  <lh-button loading>جارٍ التحميل</lh-button>
  <lh-button disabled>معطّل</lh-button>
  <lh-button plain>بسيط</lh-button>
  <lh-button round>زاوية دائرية</lh-button>
  <lh-button circle icon="search" />
  <lh-button block>كتلة (يشغل صفًا كاملًا)</lh-button>
  <lh-button icon="search" type="primary">بأيقونة</lh-button>
</template>

Props ​

الخاصيةالوصفالنوعالافتراضي
typeالنوع'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info''default'
sizeالحجم؛ يُكتسَب من ConfigProvider عند عدم التمرير'small' | 'medium' | 'large'—
loadingحالة التحميلbooleanfalse
disabledمعطّلbooleanfalse
plainنمط بسيط (بحدود)booleanfalse
blockتخطيط كتليbooleanfalse
roundزوايا دائريةbooleanfalse
circleدائريbooleanfalse
iconاسم الأيقونةLhIconName—
customClassصنف مخصّص (يُمرَّر إلى العقدة الجذرية)string—
themeVarsمتغيّرات سمة خاصة بالمكوّنRecord<string, string>—
bgPatternنقش خلفية خاص بالمكوّنstring—
sxخصائص تخطيط سريعةLhSxProps—

Events ​

الحدثالوصفمعامل الاستدعاء
clickالنقر(event)

الفروق عن نسخة Vue3

لا يحمل زر البرنامج المصغر دلالات nativeType / href / target، وهذه الخصائص غير مطبّقة في هذا المسجل. وبقية API مطابق.