nutui-uniapp
Advanced tools
Comparing version 1.7.5 to 1.7.6
import type { ExtractPropTypes } from 'vue' | ||
import { commonProps, isNumber, isString, makeArrayProp, makeObjectProp, truthProp } from '../_utils' | ||
import type { AddressListOptions } from './type' | ||
interface OptionsType { | ||
[key: string]: string | ||
} | ||
export const addresslistProps = { | ||
@@ -12,4 +10,3 @@ ...commonProps, | ||
*/ | ||
data: makeArrayProp<unknown>([]), | ||
data: makeArrayProp<any>([]), | ||
/** | ||
@@ -19,3 +16,2 @@ * @description 长按功能 | ||
longPress: Boolean, | ||
/** | ||
@@ -25,3 +21,2 @@ * @description 右滑功能 | ||
swipeEdition: Boolean, | ||
/** | ||
@@ -31,7 +26,6 @@ * @description 是否展示底部按钮 | ||
showBottomButton: truthProp, | ||
/** | ||
* @description 自定义 `key` 值时,设置映射关系 | ||
*/ | ||
options: makeObjectProp<OptionsType>({}), | ||
options: makeObjectProp<AddressListOptions>({}), | ||
} | ||
@@ -50,5 +44,4 @@ | ||
add: (val: Event) => val instanceof Object, | ||
} | ||
export type AddressListEmits = typeof addresslistEmits |
@@ -1,1 +0,2 @@ | ||
export type * from './addresslist' | ||
export * from './type' | ||
export * from './addresslist' |
@@ -0,2 +1,2 @@ | ||
export * from './type' | ||
export * from './avatar' | ||
export type * from './type' |
@@ -5,3 +5,4 @@ import type { ExtractPropTypes } from 'vue' | ||
export const AVATAR_KEY = Symbol('avatarGroup') | ||
export const AVATAR_GROUP_KEY = Symbol('avatarGroup') | ||
export const avatargroupProps = { | ||
@@ -8,0 +9,0 @@ ...commonProps, |
@@ -119,2 +119,4 @@ import type { ExtractPropTypes, PropType } from 'vue' | ||
export type ButtonProps = ExtractPropTypes<typeof buttonProps> | ||
export const buttonEmits = { | ||
@@ -139,3 +141,1 @@ [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object, | ||
export type ButtonEmits = typeof buttonEmits | ||
export type ButtonProps = ExtractPropTypes<typeof buttonProps> |
@@ -1,2 +0,2 @@ | ||
export type { ButtonProps, ButtonEmits } from './button' | ||
export * from './type' | ||
export * from './button' |
@@ -113,4 +113,6 @@ import type { ExtractPropTypes, PropType } from 'vue' | ||
[SELECT_EVENT]: (val: any) => val, | ||
clickCloseIcon: () => true, | ||
clickOverlay: () => true, | ||
} | ||
export type CalendarEmits = typeof calendarEmits |
@@ -0,2 +1,2 @@ | ||
export * from './type' | ||
export * from './input' | ||
export * from './type' |
@@ -149,2 +149,4 @@ import type { ExtractPropTypes, PropType, StyleValue } from 'vue' | ||
export type InputProps = ExtractPropTypes<typeof inputProps> | ||
export const inputEmits = { | ||
@@ -162,3 +164,1 @@ [CLICK_EVENT]: (evt: Event) => evt instanceof Object, | ||
export type InputEmits = typeof inputEmits | ||
export type InputProps = ExtractPropTypes<typeof inputProps> |
@@ -8,6 +8,6 @@ export const inputAlignType = ['left', 'center', 'right'] as const // text-align | ||
export const inputType | ||
= ['tel', 'url', 'date', 'file', 'text', 'time', 'week', 'color', 'digit', 'email', 'image', 'month', 'radio', 'range', 'reset', 'button', 'hidden', 'number', 'search', 'submit', 'checkbox', 'password', 'textarea', 'datetime-local', 'idcard', 'safe-password', 'nickname'] as const | ||
= ['text', 'number', 'idcard', 'digit', 'tel', 'safe-password', 'nickname', 'button', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'password', 'radio', 'range', 'reset', 'search', 'submit', 'time', 'url', 'week'] as const | ||
export type InputType = (typeof inputType)[number] | ||
export const inputMode = ['search', 'tel', 'url', 'text', 'email', 'none', 'decimal', 'numeric'] as const | ||
export const inputMode = ['none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url'] as const | ||
export type InputMode = (typeof inputMode)[number] | ||
@@ -14,0 +14,0 @@ |
@@ -0,1 +1,2 @@ | ||
export * from './type' | ||
export * from './searchbar' |
@@ -1,4 +0,16 @@ | ||
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue' | ||
import { commonProps, isNumber, isString, makeNumberProp, makeNumericProp, makeStringProp, truthProp } from '../_utils' | ||
import type { CSSProperties, ExtractPropTypes } from 'vue' | ||
import type { InputOnBlurEvent, InputOnFocusEvent, InputOnInputEvent } from '@uni-helper/uni-app-types' | ||
import { | ||
commonProps, | ||
isString, | ||
makeNumberProp, | ||
makeNumericProp, | ||
makeObjectProp, | ||
makeStringProp, | ||
numericProp, | ||
truthProp, | ||
} from '../_utils' | ||
import { BLUR_EVENT, CHANGE_EVENT, CLEAR_EVENT, FOCUS_EVENT, SEARCH_EVENT, UPDATE_MODEL_EVENT } from '../_constants' | ||
import type { InputAlignType, InputConfirmType, InputType } from '../input' | ||
import type { SearchbarShape } from './type' | ||
@@ -14,11 +26,11 @@ export const searchbarProps = { | ||
*/ | ||
inputType: makeStringProp<'text' | 'number' | 'idcard' | 'digit' | 'tel' | 'safe-password' | 'nickname'>('text'), | ||
inputType: makeStringProp<InputType>('text'), | ||
/** | ||
* @description 搜索框形状,可选值为 `square` `round` | ||
*/ | ||
shape: makeStringProp<'square' | 'round'>('round'), | ||
shape: makeStringProp<SearchbarShape>('round'), | ||
/** | ||
* @description 最大输入长度 | ||
*/ | ||
maxLength: makeNumericProp(9999), | ||
maxLength: numericProp, | ||
/** | ||
@@ -47,6 +59,3 @@ * @description 输入框默认占位符 | ||
*/ | ||
focusStyle: { | ||
type: Object as PropType<CSSProperties>, | ||
default: () => ({}), | ||
}, | ||
focusStyle: makeObjectProp<CSSProperties>({}), | ||
/** | ||
@@ -67,7 +76,7 @@ * @description 是否自动聚焦 | ||
*/ | ||
inputAlign: makeStringProp<'left' | 'center' | 'right'>('left'), | ||
inputAlign: makeStringProp<InputAlignType>('left'), | ||
/** | ||
* @description 键盘右下角按钮的文字,仅在`type='text'`时生效,可选值 `send`:发送、`search`:搜索、`next`:下一个、`go`:前往、`done`:完成 | ||
*/ | ||
confirmType: makeStringProp<'send' | 'search' | 'next' | 'go' | 'done'>('done'), | ||
confirmType: makeStringProp<InputConfirmType>('done'), | ||
/** | ||
@@ -86,13 +95,13 @@ * @description 是否开启 iphone 系列全面屏底部安全区适配 | ||
export const searchbarEmits = { | ||
[UPDATE_MODEL_EVENT]: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
[CHANGE_EVENT]: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
[BLUR_EVENT]: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
[FOCUS_EVENT]: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
[CLEAR_EVENT]: (val: string | number) => (isString(val) || isNumber(val) || val === undefined), | ||
[SEARCH_EVENT]: (val: string | number) => (isString(val) || isNumber(val) || val === undefined), | ||
clickInput: (event: Event) => event instanceof Object, | ||
clickLeftIcon: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
clickRightIcon: (val: string | number, event: Event) => (isString(val) || isNumber(val) || val === undefined) && event instanceof Object, | ||
[UPDATE_MODEL_EVENT]: (val: string, event: InputOnInputEvent) => (isString(val) || val === undefined) && event instanceof Object, | ||
[CHANGE_EVENT]: (val: string, event: InputOnInputEvent) => (isString(val) || val === undefined) && event instanceof Object, | ||
[BLUR_EVENT]: (val: string, event: InputOnBlurEvent) => (isString(val) || val === undefined) && event instanceof Object, | ||
[FOCUS_EVENT]: (val: string, event: InputOnFocusEvent) => (isString(val) || val === undefined) && event instanceof Object, | ||
[CLEAR_EVENT]: (val: string) => (isString(val) || val === undefined), | ||
[SEARCH_EVENT]: (val: string) => (isString(val) || val === undefined), | ||
clickInput: (val: string, event: Event) => (isString(val) || val === undefined) && event instanceof Object, | ||
clickLeftIcon: (val: string, event: Event) => (isString(val) || val === undefined) && event instanceof Object, | ||
clickRightIcon: (val: string, event: Event) => (isString(val) || val === undefined) && event instanceof Object, | ||
} | ||
export type SearchbarEmits = typeof searchbarEmits |
@@ -0,2 +1,2 @@ | ||
export * from './type' | ||
export * from './textarea' | ||
export * from './type' |
@@ -1,3 +0,2 @@ | ||
export type * from './use-toast' | ||
export type * from './types' | ||
export type * from './toast' | ||
export * from './type' | ||
export * from './toast' |
import type { ExtractPropTypes } from 'vue' | ||
import { commonProps, isBoolean, makeNumberProp, makeNumericProp, makeStringProp } from '../_utils' | ||
import { CLOSED_EVENT, CLOSE_EVENT, UPDATE_VISIBLE_EVENT } from '../_constants' | ||
import type { ToastOptions, ToastSize, ToastType } from './types' | ||
import type { ToastOptions, ToastSize, ToastType } from './type' | ||
@@ -6,0 +6,0 @@ export const toastDefaultOptionsKey = '__TOAST_OPTIONS__' |
import { provide, ref } from 'vue' | ||
import { cloneDeep } from '../_utils' | ||
import type { ToastInst, ToastOptions, ToastType } from './types' | ||
import type { ToastInst, ToastOptions, ToastType } from './type' | ||
import { toastDefaultOptions, toastDefaultOptionsKey } from './toast' | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "nutui-uniapp", | ||
"displayName": "nutui-uniapp 京东风格的轻量级移动端 Uniapp、Vue3 组件库", | ||
"version": "1.7.5", | ||
"version": "1.7.6", | ||
"description": "京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)", | ||
@@ -6,0 +6,0 @@ "author": "yang1206 <y1149221897@outlook.com>", |
@@ -424,3 +424,5 @@ { | ||
"close", | ||
"select" | ||
"select", | ||
"click-close-icon", | ||
"click-overlay" | ||
], | ||
@@ -551,2 +553,3 @@ "description": "[Docs](https://www.uniapp-nutui.tech/components/dentry/calendar.html#calendar-日历)" | ||
"type", | ||
"input-mode", | ||
"input-style", | ||
@@ -695,3 +698,2 @@ "input-class", | ||
"model-value", | ||
"label", | ||
"shape", | ||
@@ -712,3 +714,3 @@ "max-length", | ||
"safe-area-inset-bottom", | ||
"cursor-spacing`v1.2.0`", | ||
"cursor-spacing", | ||
"change", | ||
@@ -715,0 +717,0 @@ "focus", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2811713
568
37618