인보이스
인보이스 (Invoice)
청구서(인보이스) 신청 페이지를 보여 주는 컴포넌트예요. 입력·라디오 같은 폼 항목을 데이터 구조로 정의해 넘기면 폼 검증까지 함께 처리할 수 있어요.
출처: 문서
설치 (Install)
import { createApp } from 'vue'
import { Invoice } from '@nutui/nutui'
const app = createApp()
app.use(Invoice)
사용 예제 (Usage)
기본 사용법 (Basic Usage)
demo: invoice basic
API
Props
| Attribute | Description | Type | Default |
|---|---|---|---|
| data | Invoice data | Array | [] |
| form-value | Form data object (required when using form verification) | object | - |
| submit | Whether to show the submit button | boolean | true |
data의 데이터 구조 (Data Structure of Data)
사용할 수 있는 속성은 다음과 같아요:
| Attribute | Description | Type |
|---|---|---|
| type | Type, eg input、radio |
string |
| label | Label | string |
| placeholder | Input placeholder | string |
| radio-label | Radio label | string |
| form-item-prop | The v-model field of the form field is required | string |
| rules | Check rules,Refer to FormItem Rule data structure | Array |
| required | Is it a required field | boolean |
Events
| Event | Description | Arguments |
|---|---|---|
| submit | Method of submitting form for verification | Promise |
Types v4.3.3
이 컴포넌트는 다음 타입 정의를 함께 내보내요:
import type {
InvoiceDataItem,
InvoiceProps,
InvoiceInstance
} from '@nutui/nutui';
테마 (Theming)
CSS 변수 (CSS Variables)
컴포넌트는 스타일을 커스터마이징할 때 쓸 수 있는 CSS 변수를 제공해요. 자세한 사용법은 ConfigProvider 컴포넌트 문서를 참고하세요.
| Name | Default Value |
|---|---|
| --nut-invoice-padding | _ 10px 10px 20px_ |
더 알아보기 (Learn more)
이 글은 NutUI 공식 문서의 영문 원문을 한국어로 번역한 내용이에요. 최신 내용과 전체 문서는 아래 링크에서 확인할 수 있어요:
- 원문 문서: invoice doc.en-US.md
- NutUI GitHub 저장소: https://github.com/jd-opensource/nutui