mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 09:08:51 +08:00
fix: 🐛 修复部分组件某些属性必填警告的问题
This commit is contained in:
parent
514c13e24f
commit
1b866c062e
@ -29,16 +29,18 @@ import { ref, watch } from 'vue'
|
||||
|
||||
interface Props {
|
||||
customClass?: string
|
||||
title: string
|
||||
ver: number
|
||||
hor: number
|
||||
transparent: boolean
|
||||
title?: string
|
||||
ver?: number
|
||||
hor?: number
|
||||
transparent?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
title: '',
|
||||
customClass: '',
|
||||
ver: 10,
|
||||
hor: 15
|
||||
hor: 15,
|
||||
transparent: false
|
||||
})
|
||||
|
||||
const style = ref<string>('')
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<page-wraper>
|
||||
<wd-message-box></wd-message-box>
|
||||
<wd-toast></wd-toast>
|
||||
<wd-message-box selector="wd-message-box-slot" use-slot>
|
||||
<wd-rate custom-class="custom-rate-class" v-model="value" />
|
||||
</wd-message-box>
|
||||
@ -31,7 +30,7 @@
|
||||
</page-wraper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useMessage } from '@/uni_modules/wot-design-uni/components/wd-message-box'
|
||||
import { useMessage } from '@/uni_modules/wot-design-uni'
|
||||
import { ref } from 'vue'
|
||||
const value = ref<number>(1)
|
||||
const value1 = ref<string>('')
|
||||
|
||||
@ -44,7 +44,9 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { clickOut } from '@/uni_modules/wot-design-uni'
|
||||
import { clickOut, useToast } from '@/uni_modules/wot-design-uni'
|
||||
|
||||
const toast = useToast()
|
||||
|
||||
function clickoutside() {
|
||||
clickOut.closeOutside()
|
||||
|
||||
@ -2,8 +2,8 @@ import { getCurrentInstance, inject, nextTick, onBeforeMount, onMounted, ref, wa
|
||||
|
||||
export function useCell() {
|
||||
const border = ref<boolean>(false) // 是否展示边框
|
||||
const cellGroup: any = inject('cell-group') || {}
|
||||
const cellList: any = inject('cell-list') || ref<any[]>([])
|
||||
const cellGroup: any = inject('cell-group', null) || {}
|
||||
const cellList: any = inject('cell-list', null) || ref<any[]>([])
|
||||
const { proxy } = getCurrentInstance() as any
|
||||
|
||||
watch(
|
||||
|
||||
@ -94,16 +94,16 @@ interface Props {
|
||||
customClass?: string
|
||||
customHeaderClass?: string
|
||||
show: boolean
|
||||
actions: Array<Action>
|
||||
panels: Array<Panel>
|
||||
actions?: Array<Action>
|
||||
panels?: Array<Panel>
|
||||
title?: string
|
||||
cancelText?: string
|
||||
closeOnClickAction: boolean
|
||||
closeOnClickModal: boolean
|
||||
duration: number
|
||||
zIndex: number
|
||||
lazyRender: boolean
|
||||
safeAreaInsetBottom: boolean
|
||||
closeOnClickAction?: boolean
|
||||
closeOnClickModal?: boolean
|
||||
duration?: number
|
||||
zIndex?: number
|
||||
lazyRender?: boolean
|
||||
safeAreaInsetBottom?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: weisheng
|
||||
* @Date: 2023-06-12 18:40:59
|
||||
* @LastEditTime: 2023-08-15 15:47:51
|
||||
* @LastEditTime: 2023-08-22 23:23:37
|
||||
* @LastEditors: weisheng
|
||||
* @Description:
|
||||
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-badge\wd-badge.vue
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
import { computed, ref, watch } from 'vue'
|
||||
type BadgeType = 'primary' | 'success' | 'warning' | 'danger' | 'info'
|
||||
interface Props {
|
||||
modelValue: number | string | null
|
||||
modelValue?: number | string | null
|
||||
bgColor?: string
|
||||
max?: number
|
||||
isDot?: boolean
|
||||
@ -41,7 +41,7 @@ interface Props {
|
||||
type?: BadgeType
|
||||
top?: number
|
||||
right?: number
|
||||
customClass: string
|
||||
customClass?: string
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
customClass: '',
|
||||
|
||||
@ -71,15 +71,15 @@ type ButtonType = 'primary' | 'success' | 'info' | 'warning' | 'error' | 'defaul
|
||||
type ButtonSize = 'small' | 'medium' | 'large'
|
||||
|
||||
interface Props {
|
||||
plain: boolean
|
||||
disabled: boolean
|
||||
round: boolean
|
||||
suck: boolean
|
||||
block: boolean
|
||||
type: ButtonType
|
||||
size: ButtonSize
|
||||
plain?: boolean
|
||||
disabled?: boolean
|
||||
round?: boolean
|
||||
suck?: boolean
|
||||
block?: boolean
|
||||
type?: ButtonType
|
||||
size?: ButtonSize
|
||||
icon?: string
|
||||
loading: boolean
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
openType?: string
|
||||
formType?: string
|
||||
@ -91,8 +91,8 @@ interface Props {
|
||||
sendMessageImg?: string
|
||||
appParameter?: string
|
||||
showMessageCard?: boolean
|
||||
customClass: string
|
||||
customStyle: string
|
||||
customClass?: string
|
||||
customStyle?: string
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
type: 'primary',
|
||||
|
||||
@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<wd-toast selector="wd-month" />
|
||||
<view class="month" :data-date="date">
|
||||
<view class="wd-month">
|
||||
<view class="wd-month__title">{{ monthTitle(date) }}</view>
|
||||
<view class="wd-month__days">
|
||||
<view
|
||||
v-for="(item, index) in days"
|
||||
:key="index"
|
||||
:class="`wd-month__day ${item.disabled ? 'is-disabled' : ''} ${item.type ? itemClass(item.type, value, type) : ''}`"
|
||||
:style="firstDayStyle(index, item.date, firstDayOfWeek)"
|
||||
@click="handleDateClick(index)"
|
||||
>
|
||||
<view class="wd-month__day-container">
|
||||
<view class="wd-month__day-top">{{ item.topInfo }}</view>
|
||||
<view class="wd-month__day-text">
|
||||
{{ item.text }}
|
||||
<view>
|
||||
<wd-toast selector="wd-month" />
|
||||
<view class="month">
|
||||
<view class="wd-month">
|
||||
<view class="wd-month__title">{{ monthTitle(date) }}</view>
|
||||
<view class="wd-month__days">
|
||||
<view
|
||||
v-for="(item, index) in days"
|
||||
:key="index"
|
||||
:class="`wd-month__day ${item.disabled ? 'is-disabled' : ''} ${item.type ? itemClass(item.type, value, type) : ''}`"
|
||||
:style="firstDayStyle(index, item.date, firstDayOfWeek)"
|
||||
@click="handleDateClick(index)"
|
||||
>
|
||||
<view class="wd-month__day-container">
|
||||
<view class="wd-month__day-top">{{ item.topInfo }}</view>
|
||||
<view class="wd-month__day-text">
|
||||
{{ item.text }}
|
||||
</view>
|
||||
<view class="wd-month__day-bottom">{{ item.bottomInfo }}</view>
|
||||
</view>
|
||||
<view class="wd-month__day-bottom">{{ item.bottomInfo }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -61,7 +63,7 @@ interface Props {
|
||||
formatter?: Function
|
||||
maxRange?: number
|
||||
rangePrompt?: string
|
||||
allowSameDay: boolean
|
||||
allowSameDay?: boolean
|
||||
defaultTime: Array<number>
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -78,13 +78,13 @@ interface Props {
|
||||
formatter?: Function
|
||||
maxRange?: number
|
||||
rangePrompt?: string
|
||||
allowSameDay: boolean
|
||||
showPanelTitle: boolean
|
||||
allowSameDay?: boolean
|
||||
showPanelTitle?: boolean
|
||||
defaultTime: Array<number>
|
||||
panelHeight: number
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
timeFilter?: Function
|
||||
hideSecond: boolean
|
||||
hideSecond?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
allowSameDay: false,
|
||||
|
||||
@ -63,13 +63,13 @@ interface Props {
|
||||
// 选中值,为 13 位时间戳或时间戳数组
|
||||
modelValue: number | Array<number> | null
|
||||
// 日期类型
|
||||
type: CalendarType
|
||||
type?: CalendarType
|
||||
// 最小日期,为 13 位时间戳
|
||||
minDate: number
|
||||
minDate?: number
|
||||
// 最大日期,为 13 位时间戳
|
||||
maxDate: number
|
||||
maxDate?: number
|
||||
// 周起始天
|
||||
firstDayOfWeek: number
|
||||
firstDayOfWeek?: number
|
||||
// 日期格式化函数
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
formatter?: Function
|
||||
@ -78,18 +78,18 @@ interface Props {
|
||||
// type 为范围选择时有效,选择超出最大日期范围时的错误提示文案
|
||||
rangePrompt?: string
|
||||
// type 为范围选择时有效,是否允许选择同一天
|
||||
allowSameDay: boolean
|
||||
allowSameDay?: boolean
|
||||
// 是否展示面板标题,自动计算当前滚动的日期月份
|
||||
showPanelTitle: boolean
|
||||
showPanelTitle?: boolean
|
||||
// 选中日期所使用的当日内具体时刻
|
||||
defaultTime: string | Array<string>
|
||||
defaultTime?: string | Array<string>
|
||||
// 可滚动面板的高度
|
||||
panelHeight: number
|
||||
panelHeight?: number
|
||||
// type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
timeFilter?: Function
|
||||
// type 为 'datetime' 或 'datetimerange' 时有效,是否不展示秒修改
|
||||
hideSecond: boolean
|
||||
hideSecond?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
customClass: '',
|
||||
|
||||
@ -43,7 +43,7 @@ interface Props {
|
||||
formatter?: Function
|
||||
maxRange?: number
|
||||
rangePrompt?: string
|
||||
allowSameDay: boolean
|
||||
allowSameDay?: boolean
|
||||
defaultTime: Array<number>
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -48,8 +48,8 @@ interface Props {
|
||||
formatter?: Function
|
||||
maxRange?: number
|
||||
rangePrompt?: string
|
||||
allowSameDay: boolean
|
||||
showPanelTitle: boolean
|
||||
allowSameDay?: boolean
|
||||
showPanelTitle?: boolean
|
||||
defaultTime: Array<number>
|
||||
panelHeight: number
|
||||
}
|
||||
@ -61,11 +61,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
const title = ref<string>('')
|
||||
const scrollTop = ref<number>(0) // 滚动位置
|
||||
|
||||
const scrollIntoViewValue = ref<string>('')
|
||||
|
||||
let contentObserver: null | UniApp.IntersectionObserver = null
|
||||
const instance = getCurrentInstance() as any
|
||||
|
||||
// 滚动区域的高度
|
||||
const scrollHeight = computed(() => {
|
||||
const scrollHeight: number = (props.panelHeight || 378) + (props.showPanelTitle ? 26 : 16)
|
||||
|
||||
@ -45,8 +45,8 @@ interface Props {
|
||||
customClass?: string
|
||||
title?: string
|
||||
value?: string
|
||||
useSlot: boolean
|
||||
border: boolean
|
||||
useSlot?: boolean
|
||||
border?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
useSlot: false,
|
||||
|
||||
@ -64,15 +64,15 @@ interface Props {
|
||||
value?: string
|
||||
icon?: string
|
||||
label?: string
|
||||
isLink: boolean
|
||||
isLink?: boolean
|
||||
to?: string
|
||||
replace: boolean
|
||||
clickable: boolean
|
||||
replace?: boolean
|
||||
clickable?: boolean
|
||||
size?: string
|
||||
titleWidth?: string
|
||||
center: boolean
|
||||
required: boolean
|
||||
vertical: boolean
|
||||
center?: boolean
|
||||
required?: boolean
|
||||
vertical?: boolean
|
||||
customClass?: string
|
||||
customIconClass?: string
|
||||
customLabelClass?: string
|
||||
@ -81,6 +81,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
customClass: '',
|
||||
customIconClass: '',
|
||||
customLabelClass: '',
|
||||
customValueClass: '',
|
||||
|
||||
@ -22,13 +22,13 @@ type checkShape = 'circle' | 'square' | 'button'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
modelValue: Array<string | number | boolean>
|
||||
cell: boolean
|
||||
shape: checkShape
|
||||
checkedColor: string
|
||||
disabled: boolean
|
||||
min: number
|
||||
max: number
|
||||
inline: boolean
|
||||
cell?: boolean
|
||||
shape?: checkShape
|
||||
checkedColor?: string
|
||||
disabled?: boolean
|
||||
min?: number
|
||||
max?: number
|
||||
inline?: boolean
|
||||
size?: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
@ -50,11 +50,11 @@ interface Props {
|
||||
customShapeClass?: string
|
||||
customClass?: string
|
||||
modelValue: string | number | boolean
|
||||
shape: checkShape
|
||||
shape?: checkShape
|
||||
checkedColor?: string
|
||||
disabled: boolean | null
|
||||
trueValue: string | number | boolean
|
||||
falseValue: string | number | boolean
|
||||
disabled?: boolean | null
|
||||
trueValue?: string | number | boolean
|
||||
falseValue?: string | number | boolean
|
||||
size?: string
|
||||
maxWidth?: string
|
||||
}
|
||||
@ -75,7 +75,7 @@ const inited = ref<boolean>(false)
|
||||
// 相同组件的伪类选择器无效,这里配合类名手动模拟 last-child、first-child
|
||||
const isFirst = ref<boolean>(false)
|
||||
const isLast = ref<boolean>(false)
|
||||
const parent = inject<any>('checkGroup')
|
||||
const parent = inject<any>('checkGroup', null)
|
||||
const { proxy } = getCurrentInstance() as any
|
||||
|
||||
watch(
|
||||
|
||||
@ -104,12 +104,12 @@ interface Props {
|
||||
modelValue: Array<Record<string, any>>
|
||||
columns: Array<Array<Record<string, any>>>
|
||||
label?: string
|
||||
labelWidth: string
|
||||
useLabelSlot: boolean
|
||||
useDefaultSlot: boolean
|
||||
disabled: boolean
|
||||
readonly: boolean
|
||||
placeholder: string
|
||||
labelWidth?: string
|
||||
useLabelSlot?: boolean
|
||||
useDefaultSlot?: boolean
|
||||
disabled?: boolean
|
||||
readonly?: boolean
|
||||
placeholder?: string
|
||||
title?: string
|
||||
// 接收当前列的选中项 item、当前列下标、当前列选中项下标下一列数据处理函数 resolve、结束选择 finish
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
@ -119,19 +119,19 @@ interface Props {
|
||||
displayFormat?: Function
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforeConfirm?: Function
|
||||
alignRight: boolean
|
||||
error: boolean
|
||||
required: boolean
|
||||
alignRight?: boolean
|
||||
error?: boolean
|
||||
required?: boolean
|
||||
size?: string
|
||||
valueKey: string
|
||||
labelKey: string
|
||||
tipKey: string
|
||||
loadingColor: string
|
||||
closeOnClickModal: boolean
|
||||
autoComplete: boolean
|
||||
zIndex: number
|
||||
safeAreaInsetBottom: boolean
|
||||
ellipsis: boolean
|
||||
valueKey?: string
|
||||
labelKey?: string
|
||||
tipKey?: string
|
||||
loadingColor?: string
|
||||
closeOnClickModal?: boolean
|
||||
autoComplete?: boolean
|
||||
zIndex?: number
|
||||
safeAreaInsetBottom?: boolean
|
||||
ellipsis?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: weisheng
|
||||
* @Date: 2023-06-13 11:34:35
|
||||
* @LastEditTime: 2023-08-15 13:06:34
|
||||
* @LastEditTime: 2023-08-22 22:26:37
|
||||
* @LastEditors: weisheng
|
||||
* @Description:
|
||||
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-col\wd-col.vue
|
||||
@ -35,7 +35,8 @@ interface Props {
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
span: 24,
|
||||
offset: 0
|
||||
offset: 0,
|
||||
customClass: ''
|
||||
})
|
||||
|
||||
const style = ref<string>('')
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: weisheng
|
||||
* @Date: 2023-08-01 11:12:05
|
||||
* @LastEditTime: 2023-08-15 16:30:17
|
||||
* @LastEditTime: 2023-08-22 22:28:28
|
||||
* @LastEditors: weisheng
|
||||
* @Description:
|
||||
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-collapse-item\wd-collapse-item.vue
|
||||
@ -41,7 +41,7 @@ const $body = '.wd-collapse-item__body'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
title?: string
|
||||
disabled: boolean
|
||||
disabled?: boolean
|
||||
name: string
|
||||
// 打开前的回调函数,返回 false 可以阻止打开,支持返回 Promise
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: weisheng
|
||||
* @Date: 2023-08-01 11:12:05
|
||||
* @LastEditTime: 2023-08-04 13:34:15
|
||||
* @LastEditTime: 2023-08-22 22:28:17
|
||||
* @LastEditors: weisheng
|
||||
* @Description:
|
||||
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-collapse\wd-collapse.vue
|
||||
@ -58,10 +58,10 @@ interface Props {
|
||||
customClass?: string
|
||||
customMoreSlotClass?: string
|
||||
modelValue: string | Array<string> | boolean
|
||||
accordion: boolean
|
||||
viewmore: boolean
|
||||
useMoreSlot: boolean
|
||||
lineNum: number
|
||||
accordion?: boolean
|
||||
viewmore?: boolean
|
||||
useMoreSlot?: boolean
|
||||
lineNum?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -28,8 +28,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
type ConfigProviderTheme = 'light' | 'dark'
|
||||
interface Props {
|
||||
theme: ConfigProviderTheme
|
||||
themeVars: Record<string, any>
|
||||
theme?: ConfigProviderTheme
|
||||
themeVars?: Record<string, any>
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -6,14 +6,13 @@
|
||||
position="center"
|
||||
:close-on-click-modal="closeOnClickModal"
|
||||
:hide-when-close="hideWhenClose"
|
||||
@beforeenter="beforeenter"
|
||||
@before-enter="beforeenter"
|
||||
@enter="enter"
|
||||
@afterenter="afterenter"
|
||||
@beforeleave="beforeleave"
|
||||
@after-enter="afterenter"
|
||||
@before-leave="beforeleave"
|
||||
@leave="leave"
|
||||
@afterleave="afterleave"
|
||||
@after-leave="afterleave"
|
||||
@close="close"
|
||||
@closed="closed"
|
||||
@clickmodal="clickModal"
|
||||
:custom-class="`wd-curtain ${customClass}`"
|
||||
>
|
||||
@ -42,12 +41,12 @@ type ClosePosition = 'inset' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bo
|
||||
interface Props {
|
||||
customClass?: string
|
||||
value: boolean
|
||||
closePosition: ClosePosition
|
||||
closePosition?: ClosePosition
|
||||
src?: string
|
||||
to?: string
|
||||
width?: number
|
||||
closeOnClickModal: boolean
|
||||
hideWhenClose: boolean
|
||||
closeOnClickModal?: boolean
|
||||
hideWhenClose?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -139,6 +138,7 @@ function leave() {
|
||||
|
||||
function afterleave() {
|
||||
emit('afterleave')
|
||||
emit('closed')
|
||||
}
|
||||
|
||||
function close() {
|
||||
@ -146,10 +146,6 @@ function close() {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
function closed() {
|
||||
emit('closed')
|
||||
}
|
||||
|
||||
function clickModal() {
|
||||
emit('clickmodal')
|
||||
}
|
||||
|
||||
@ -63,17 +63,17 @@ interface Props {
|
||||
modelValue: string | number | Date
|
||||
// PickerView的Props 开始
|
||||
// 加载中
|
||||
loading: boolean
|
||||
loadingColor: string
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
// 选项总高度
|
||||
columnsHeight: number
|
||||
columnsHeight?: number
|
||||
// 选项对象中,value对应的 key
|
||||
valueKey: string
|
||||
valueKey?: string
|
||||
// 选项对象中,展示的文本对应的 key
|
||||
labelKey: string
|
||||
labelKey?: string
|
||||
// PickerView的Props 结束
|
||||
// 时间选择器的类型
|
||||
type: DateTimeType
|
||||
type?: DateTimeType
|
||||
// 自定义过滤选项的函数,返回列的选项数组
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
filter?: Function
|
||||
@ -84,18 +84,18 @@ interface Props {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
columnFormatter?: Function
|
||||
// 最小日期 20(x-10)年1月1日
|
||||
minDate: number
|
||||
minDate?: number
|
||||
// 最大日期 20(x+10)年1月1日
|
||||
maxDate: number
|
||||
maxDate?: number
|
||||
// 最小小时
|
||||
minHour: number
|
||||
minHour?: number
|
||||
// 最大小时
|
||||
maxHour: number
|
||||
maxHour?: number
|
||||
// 最小分钟
|
||||
minMinute: number
|
||||
minMinute?: number
|
||||
// 最大分钟
|
||||
maxMinute: number
|
||||
startSymbol: boolean
|
||||
maxMinute?: number
|
||||
startSymbol?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -138,60 +138,60 @@ import { deepClone, getType, isArray, isDef, isEqual, padZero } from '../common/
|
||||
import { useCell } from '../mixins/useCell'
|
||||
import { DateTimeType, getPickerValue } from '../wd-datetime-picker-view/type'
|
||||
interface Props {
|
||||
customClass: string
|
||||
customViewClass: string
|
||||
customLabelClass: string
|
||||
customValueClass: string
|
||||
customClass?: string
|
||||
customViewClass?: string
|
||||
customLabelClass?: string
|
||||
customValueClass?: string
|
||||
// 选择器左侧文案
|
||||
label?: string
|
||||
// 选择器占位符
|
||||
placeholder: string
|
||||
placeholder?: string
|
||||
// 禁用
|
||||
disabled: boolean
|
||||
disabled?: boolean
|
||||
// 只读
|
||||
readonly: boolean
|
||||
loading: boolean
|
||||
loadingColor: string
|
||||
readonly?: boolean
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
/* popup */
|
||||
// 弹出层标题
|
||||
title?: string
|
||||
// 取消按钮文案
|
||||
cancelButtonText: string
|
||||
cancelButtonText?: string
|
||||
// 确认按钮文案
|
||||
confirmButtonText: string
|
||||
confirmButtonText?: string
|
||||
// 是否必填
|
||||
required: boolean
|
||||
required?: boolean
|
||||
size?: string
|
||||
labelWidth: string
|
||||
useDefaultSlot: boolean
|
||||
useLabelSlot: boolean
|
||||
error: boolean
|
||||
alignRight: boolean
|
||||
closeOnClickModal: boolean
|
||||
safeAreaInsetBottom: boolean
|
||||
ellipsis: boolean
|
||||
labelWidth?: string
|
||||
useDefaultSlot?: boolean
|
||||
useLabelSlot?: boolean
|
||||
error?: boolean
|
||||
alignRight?: boolean
|
||||
closeOnClickModal?: boolean
|
||||
safeAreaInsetBottom?: boolean
|
||||
ellipsis?: boolean
|
||||
// 选项总高度
|
||||
columnsHeight: number
|
||||
columnsHeight?: number
|
||||
// 选项对象中,value对应的 key
|
||||
valueKey: string
|
||||
valueKey?: string
|
||||
// 选项对象中,展示的文本对应的 key
|
||||
labelKey: string
|
||||
labelKey?: string
|
||||
// 选中项,当 type 为 time 时,类型为字符串,否则为 时间戳
|
||||
modelValue: string | number | Date | Array<string | number | Date>
|
||||
// 时间选择器的类型
|
||||
type: DateTimeType
|
||||
type?: DateTimeType
|
||||
// 最小日期 20(x-10)年1月1日
|
||||
minDate: number
|
||||
minDate?: number
|
||||
// 最大日期 20(x+10)年1月1日
|
||||
maxDate: number
|
||||
maxDate?: number
|
||||
// 最小小时
|
||||
minHour: number
|
||||
minHour?: number
|
||||
// 最大小时
|
||||
maxHour: number
|
||||
maxHour?: number
|
||||
// 最小分钟
|
||||
minMinute: number
|
||||
minMinute?: number
|
||||
// 最大分钟
|
||||
maxMinute: number
|
||||
maxMinute?: number
|
||||
// 自定义过滤选项的函数,返回列的选项数组
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
filter?: Function
|
||||
@ -208,7 +208,7 @@ interface Props {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
displayFormatTabLabel?: Function
|
||||
defaultValue?: string | number | Date | Array<string | number | Date>
|
||||
zIndex: number
|
||||
zIndex?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
<script lang="ts" setup>
|
||||
interface Props {
|
||||
customClass?: string
|
||||
color: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -61,14 +61,14 @@ interface Props {
|
||||
// 当前选中的value
|
||||
modelValue?: string | number
|
||||
// 可能是 array || String
|
||||
options: Array<Record<string, any>>
|
||||
useDropItemSlot: boolean
|
||||
disabled: boolean
|
||||
iconName: string
|
||||
options?: Array<Record<string, any>>
|
||||
useDropItemSlot?: boolean
|
||||
disabled?: boolean
|
||||
iconName?: string
|
||||
title?: string
|
||||
valueKey: string
|
||||
labelKey: string
|
||||
tipKey: string
|
||||
valueKey?: string
|
||||
labelKey?: string
|
||||
tipKey?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -34,13 +34,13 @@ import { getRect } from '../common/util'
|
||||
|
||||
type DropDirction = 'up' | 'down'
|
||||
interface Props {
|
||||
customClass: string
|
||||
customStyle: string
|
||||
zIndex: number
|
||||
direction: DropDirction
|
||||
modal: boolean
|
||||
closeOnClickModal: boolean
|
||||
duration: number
|
||||
customClass?: string
|
||||
customStyle?: string
|
||||
zIndex?: number
|
||||
direction?: DropDirction
|
||||
modal?: boolean
|
||||
closeOnClickModal?: boolean
|
||||
duration?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -37,16 +37,16 @@ interface Props {
|
||||
customText?: string
|
||||
customIcon?: string
|
||||
customClass?: string
|
||||
icon: string
|
||||
iconSize: string
|
||||
icon?: string
|
||||
iconSize?: string
|
||||
text?: string
|
||||
url?: string
|
||||
linkType: LinkType
|
||||
useSlot: boolean
|
||||
useIconSlot: boolean
|
||||
useTextSlot: boolean
|
||||
linkType?: LinkType
|
||||
useSlot?: boolean
|
||||
useIconSlot?: boolean
|
||||
useTextSlot?: boolean
|
||||
// badge属性
|
||||
isDot: boolean
|
||||
isDot?: boolean
|
||||
type?: BadgeType
|
||||
value?: number
|
||||
max?: number
|
||||
|
||||
@ -22,11 +22,11 @@ const nextTick = () => new Promise((resolve) => setTimeout(resolve, 20))
|
||||
|
||||
interface Props {
|
||||
customClass?: string
|
||||
clickable: boolean
|
||||
square: boolean
|
||||
clickable?: boolean
|
||||
square?: boolean
|
||||
column?: number
|
||||
border: boolean
|
||||
bgColor: string
|
||||
border?: boolean
|
||||
bgColor?: string
|
||||
gutter?: number
|
||||
}
|
||||
|
||||
|
||||
@ -96,26 +96,26 @@ const TOP_PERCENT = 0.85
|
||||
interface Props {
|
||||
customClass?: string
|
||||
modelValue: boolean
|
||||
cancelButtonText: string
|
||||
confirmButtonText: string
|
||||
cancelButtonText?: string
|
||||
confirmButtonText?: string
|
||||
// 是否禁用旋转
|
||||
disabledRotate: boolean
|
||||
disabledRotate?: boolean
|
||||
/** canvas绘图参数 start **/
|
||||
// canvasToTempFilePath —— fileType
|
||||
fileType: string
|
||||
fileType?: string
|
||||
// canvasToTempFilePath —— quality
|
||||
quality: number
|
||||
quality?: number
|
||||
// 设置导出图片尺寸
|
||||
exportScale: number
|
||||
exportScale?: number
|
||||
/** canvas绘图参数 end **/
|
||||
// 图片源路径
|
||||
imgSrc: string
|
||||
imgSrc?: string
|
||||
// 图片宽
|
||||
imgWidth: string | number
|
||||
imgWidth?: string | number
|
||||
// 图片高
|
||||
imgHeight: string | number
|
||||
imgHeight?: string | number
|
||||
// 最大缩放
|
||||
maxScale: number
|
||||
maxScale?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -646,7 +646,7 @@ defineExpose({
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || H5 -->
|
||||
<script module="animation" lang="wxs">
|
||||
|
||||
function setAnimation(newValue, oldValue, ownerInstance){
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: weisheng
|
||||
* @Date: 2023-06-12 10:04:19
|
||||
* @LastEditTime: 2023-08-15 13:11:35
|
||||
* @LastEditTime: 2023-08-22 22:37:02
|
||||
* @LastEditors: weisheng
|
||||
* @Description:
|
||||
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-img\wd-img.vue
|
||||
@ -32,9 +32,9 @@ interface Props {
|
||||
customStyle?: string
|
||||
customImage?: string
|
||||
src: string
|
||||
round: boolean
|
||||
mode: string
|
||||
lazyLoad: boolean
|
||||
round?: boolean
|
||||
mode?: string
|
||||
lazyLoad?: boolean
|
||||
width?: string | number
|
||||
height?: string | number
|
||||
}
|
||||
|
||||
@ -41,17 +41,17 @@ import { debounce, getType } from '../common/util'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
modelValue: number | string
|
||||
min: number
|
||||
max: number
|
||||
step: number
|
||||
stepStrictly: boolean
|
||||
precision: number
|
||||
disabled: boolean
|
||||
withoutInput: boolean
|
||||
inputWidth: string | number
|
||||
allowNull: boolean
|
||||
placeholder: string
|
||||
name: string
|
||||
min?: number
|
||||
max?: number
|
||||
step?: number
|
||||
stepStrictly?: boolean
|
||||
precision?: number
|
||||
disabled?: boolean
|
||||
withoutInput?: boolean
|
||||
inputWidth?: string | number
|
||||
allowNull?: boolean
|
||||
placeholder?: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -141,55 +141,55 @@ import { objToStyle, requestAnimationFrame } from '../common/util'
|
||||
import { useCell } from '../mixins/useCell'
|
||||
|
||||
interface Props {
|
||||
customTextareaContainerClass: string
|
||||
customTextareaClass: string
|
||||
customInputClass: string
|
||||
customLabelClass: string
|
||||
customClass: string
|
||||
customStyle: string
|
||||
customTextareaContainerClass?: string
|
||||
customTextareaClass?: string
|
||||
customInputClass?: string
|
||||
customLabelClass?: string
|
||||
customClass?: string
|
||||
customStyle?: string
|
||||
// 原生属性
|
||||
placeholder: string
|
||||
placeholder?: string
|
||||
placeholderStyle?: string
|
||||
placeholderClass: string
|
||||
autoHeight: boolean
|
||||
fixed: boolean
|
||||
cursorSpacing: number
|
||||
cursor: number
|
||||
showConfirmBar: boolean
|
||||
selectionStart: number
|
||||
selectionEnd: number
|
||||
adjustPosition: boolean
|
||||
holdKeyboard: boolean
|
||||
confirmType: string
|
||||
confirmHold: boolean
|
||||
focus: boolean
|
||||
type: string
|
||||
maxlength: number
|
||||
disabled: boolean
|
||||
alignRight: boolean
|
||||
placeholderClass?: string
|
||||
autoHeight?: boolean
|
||||
fixed?: boolean
|
||||
cursorSpacing?: number
|
||||
cursor?: number
|
||||
showConfirmBar?: boolean
|
||||
selectionStart?: number
|
||||
selectionEnd?: number
|
||||
adjustPosition?: boolean
|
||||
holdKeyboard?: boolean
|
||||
confirmType?: string
|
||||
confirmHold?: boolean
|
||||
focus?: boolean
|
||||
type?: string
|
||||
maxlength?: number
|
||||
disabled?: boolean
|
||||
alignRight?: boolean
|
||||
// 原生属性结束
|
||||
modelValue: string | number
|
||||
minlength?: number
|
||||
showPassword: boolean
|
||||
clearable: boolean
|
||||
showClear: boolean
|
||||
readonly: boolean
|
||||
useSuffixSlot: boolean
|
||||
usePrefixSlot: boolean
|
||||
showPassword?: boolean
|
||||
clearable?: boolean
|
||||
showClear?: boolean
|
||||
readonly?: boolean
|
||||
useSuffixSlot?: boolean
|
||||
usePrefixSlot?: boolean
|
||||
prefixIcon?: string
|
||||
suffixIcon?: string
|
||||
showWordLimit: boolean
|
||||
showWordCount: boolean
|
||||
showWordLimit?: boolean
|
||||
showWordCount?: boolean
|
||||
suffix?: string
|
||||
suffixCount?: number
|
||||
label?: string
|
||||
labelWidth: string
|
||||
useLabelSlot: boolean
|
||||
labelWidth?: string
|
||||
useLabelSlot?: boolean
|
||||
size?: string
|
||||
error: boolean
|
||||
center: boolean
|
||||
noBorder: boolean
|
||||
required: boolean
|
||||
error?: boolean
|
||||
center?: boolean
|
||||
noBorder?: boolean
|
||||
required?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -23,15 +23,16 @@ export default {
|
||||
<script lang="ts" setup>
|
||||
interface Props {
|
||||
show: boolean
|
||||
duration: Record<string, number> | number | boolean
|
||||
zIndex: number
|
||||
duration?: Record<string, number> | number | boolean
|
||||
zIndex?: number
|
||||
customStyle?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
show: false,
|
||||
duration: 300,
|
||||
zIndex: 10
|
||||
zIndex: 10,
|
||||
customStyle: ''
|
||||
})
|
||||
|
||||
const emit = defineEmits(['click'])
|
||||
|
||||
@ -36,12 +36,12 @@ type NoticeBarType = 'warning' | 'info' | 'danger' | ''
|
||||
interface Props {
|
||||
customClass?: string
|
||||
text?: string
|
||||
type: NoticeBarType
|
||||
scrollable: boolean
|
||||
delay: number
|
||||
speed: number
|
||||
closable: boolean
|
||||
wrapable: boolean
|
||||
type?: NoticeBarType
|
||||
scrollable?: boolean
|
||||
delay?: number
|
||||
speed?: number
|
||||
closable?: boolean
|
||||
wrapable?: boolean
|
||||
prefix?: string
|
||||
color?: string
|
||||
backgroundColor?: string
|
||||
|
||||
@ -57,14 +57,14 @@ import { ref, watch } from 'vue'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
modelValue: number // 当前页
|
||||
totalPage: number
|
||||
showIcon: boolean // 是否展示分页为Icon图标
|
||||
showMessage: boolean
|
||||
total: number
|
||||
pageSize: number
|
||||
prevText: string
|
||||
nextText: string
|
||||
hideIfOnePage: boolean
|
||||
totalPage?: number
|
||||
showIcon?: boolean // 是否展示分页为Icon图标
|
||||
showMessage?: boolean
|
||||
total?: number
|
||||
pageSize?: number
|
||||
prevText?: string
|
||||
nextText?: string
|
||||
hideIfOnePage?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -49,14 +49,14 @@ import { ColumnItem, formatArray } from './type'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
// 加载中
|
||||
loading: boolean
|
||||
loadingColor: string
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
// 选项总高度
|
||||
columnsHeight: number
|
||||
columnsHeight?: number
|
||||
// 选项对象中,value对应的 key
|
||||
valueKey: string
|
||||
valueKey?: string
|
||||
// 选项对象中,展示的文本对应的 key
|
||||
labelKey: string
|
||||
labelKey?: string
|
||||
// 初始值
|
||||
modelValue: string | number | boolean | Array<string | number | boolean>
|
||||
// 选择器数据
|
||||
|
||||
@ -91,44 +91,44 @@ interface Props {
|
||||
// 选择器左侧文案
|
||||
label?: string
|
||||
// 选择器占位符
|
||||
placeholder: string
|
||||
placeholder?: string
|
||||
// 禁用
|
||||
disabled: boolean
|
||||
disabled?: boolean
|
||||
// 只读
|
||||
readonly: boolean
|
||||
loading: boolean
|
||||
loadingColor: string
|
||||
readonly?: boolean
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
/* popup */
|
||||
// 弹出层标题
|
||||
title?: string
|
||||
// 取消按钮文案
|
||||
cancelButtonText: string
|
||||
cancelButtonText?: string
|
||||
// 确认按钮文案
|
||||
confirmButtonText: string
|
||||
confirmButtonText?: string
|
||||
// 是否必填
|
||||
required: boolean
|
||||
required?: boolean
|
||||
size?: string
|
||||
labelWidth?: string
|
||||
useDefaultSlot: boolean
|
||||
useLabelSlot: boolean
|
||||
error: boolean
|
||||
alignRight: boolean
|
||||
useDefaultSlot?: boolean
|
||||
useLabelSlot?: boolean
|
||||
error?: boolean
|
||||
alignRight?: boolean
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforeConfirm?: Function
|
||||
closeOnClickModal: boolean
|
||||
safeAreaInsetBottom: boolean
|
||||
ellipsis: boolean
|
||||
closeOnClickModal?: boolean
|
||||
safeAreaInsetBottom?: boolean
|
||||
ellipsis?: boolean
|
||||
|
||||
// 选项总高度
|
||||
columnsHeight: number
|
||||
columnsHeight?: number
|
||||
// 选项对象中,value对应的 key
|
||||
valueKey: string
|
||||
valueKey?: string
|
||||
// 选项对象中,展示的文本对应的 key
|
||||
labelKey: string
|
||||
labelKey?: string
|
||||
// 初始值
|
||||
modelValue: string | number | Array<string | number>
|
||||
modelValue?: string | number | Array<string | number>
|
||||
// 选择器数据
|
||||
columns: Array<string | number | ColumnItem | Array<string | number | ColumnItem>>
|
||||
columns?: Array<string | number | ColumnItem | Array<string | number | ColumnItem>>
|
||||
// 多级联动
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
columnChange?: Function
|
||||
@ -136,13 +136,15 @@ interface Props {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
displayFormat?: Function
|
||||
// 自定义层级
|
||||
zIndex: number
|
||||
zIndex?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: '',
|
||||
customClass: '',
|
||||
customViewClass: '',
|
||||
customLabelClass: '',
|
||||
customValueClass: '',
|
||||
// 选择器占位符
|
||||
placeholder: '请选择',
|
||||
// 禁用
|
||||
|
||||
@ -88,16 +88,16 @@ interface Props {
|
||||
customPop?: string
|
||||
customClass?: string
|
||||
// 是否显示 popover 箭头
|
||||
visibleArrow: boolean
|
||||
visibleArrow?: boolean
|
||||
// 显示内容
|
||||
content: string | Record<string, any>[]
|
||||
placement: PlacementType
|
||||
offset: number
|
||||
useContentSlot: boolean
|
||||
disabled: boolean
|
||||
showClose: boolean
|
||||
placement?: PlacementType
|
||||
offset?: number
|
||||
useContentSlot?: boolean
|
||||
disabled?: boolean
|
||||
showClose?: boolean
|
||||
modelValue: boolean
|
||||
mode: PopoverMode
|
||||
mode?: PopoverMode
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
customClass: '',
|
||||
|
||||
@ -31,19 +31,19 @@ import { isObj, requestAnimationFrame } from '../common/util'
|
||||
|
||||
interface Props {
|
||||
transition?: string
|
||||
closable: boolean
|
||||
position: string
|
||||
closeOnClickModal: boolean
|
||||
duration: number | boolean
|
||||
modal: boolean
|
||||
zIndex: number
|
||||
hideWhenClose: boolean
|
||||
modalStyle: string
|
||||
safeAreaInsetBottom: boolean
|
||||
closable?: boolean
|
||||
position?: string
|
||||
closeOnClickModal?: boolean
|
||||
duration?: number | boolean
|
||||
modal?: boolean
|
||||
zIndex?: number
|
||||
hideWhenClose?: boolean
|
||||
modalStyle?: string
|
||||
safeAreaInsetBottom?: boolean
|
||||
modelValue: boolean
|
||||
customStyle: string
|
||||
lazyRender: boolean
|
||||
customClass: string
|
||||
customStyle?: string
|
||||
lazyRender?: boolean
|
||||
customClass?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -34,10 +34,10 @@ type ProgressStatus = 'success' | 'danger' // 状态类型
|
||||
|
||||
interface Props {
|
||||
customClass?: string
|
||||
percentage: number
|
||||
percentage?: number
|
||||
hideText?: boolean
|
||||
color?: string | string[] | Record<string, any>[]
|
||||
duration: number
|
||||
duration?: number
|
||||
status?: ProgressStatus
|
||||
}
|
||||
|
||||
|
||||
@ -21,12 +21,12 @@ type RadioShape = 'dot' | 'button' | 'check'
|
||||
interface Props {
|
||||
customClass?: string
|
||||
modelValue: string | number | boolean
|
||||
shape: RadioShape
|
||||
checkedColor: string
|
||||
disabled: boolean
|
||||
cell: boolean
|
||||
size: string
|
||||
inline: boolean
|
||||
shape?: RadioShape
|
||||
checkedColor?: string
|
||||
disabled?: boolean
|
||||
cell?: boolean
|
||||
size?: string
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -39,10 +39,10 @@ interface Props {
|
||||
value?: string | number | boolean
|
||||
shape?: RadioShape
|
||||
checkedColor?: string
|
||||
disabled: boolean | null
|
||||
cell: boolean | null
|
||||
disabled?: boolean | null
|
||||
cell?: boolean | null
|
||||
size?: string
|
||||
inline: boolean | null
|
||||
inline?: boolean | null
|
||||
maxWidth?: string
|
||||
}
|
||||
|
||||
|
||||
@ -33,17 +33,17 @@ import { computed, ref, watch } from 'vue'
|
||||
|
||||
interface Props {
|
||||
customClass?: string
|
||||
num: number
|
||||
num?: number
|
||||
modelValue: string | number | null
|
||||
readonly: boolean
|
||||
size: string
|
||||
space: string
|
||||
color: string
|
||||
activeColor: string | Array<string>
|
||||
icon: string
|
||||
activeIcon: string
|
||||
disabled: boolean
|
||||
disabledColor: string
|
||||
readonly?: boolean
|
||||
size?: string
|
||||
space?: string
|
||||
color?: string
|
||||
activeColor?: string | Array<string>
|
||||
icon?: string
|
||||
activeIcon?: string
|
||||
disabled?: boolean
|
||||
disabledColor?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -63,18 +63,18 @@ import { computed, ref, watch } from 'vue'
|
||||
import { requestAnimationFrame } from '../common/util'
|
||||
|
||||
interface Props {
|
||||
useActionSlot: boolean
|
||||
useLabelSlot: boolean
|
||||
userSuffixSlot: boolean
|
||||
placeholder: string
|
||||
cancelTxt: string
|
||||
light: boolean
|
||||
hideCancel: boolean
|
||||
disabled: boolean
|
||||
maxlength: number | string
|
||||
modelValue: string
|
||||
placeholderLeft: boolean
|
||||
customClass: string
|
||||
useActionSlot?: boolean
|
||||
useLabelSlot?: boolean
|
||||
userSuffixSlot?: boolean
|
||||
placeholder?: string
|
||||
cancelTxt?: string
|
||||
light?: boolean
|
||||
hideCancel?: boolean
|
||||
disabled?: boolean
|
||||
maxlength?: number | string
|
||||
modelValue?: string
|
||||
placeholderLeft?: boolean
|
||||
customClass?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -110,40 +110,40 @@ interface Props {
|
||||
customLabelClass?: string
|
||||
customValueClass?: string
|
||||
label?: string
|
||||
labelWidth: string
|
||||
disabled: boolean
|
||||
readonly: boolean
|
||||
placeholder: string
|
||||
labelWidth?: string
|
||||
disabled?: boolean
|
||||
readonly?: boolean
|
||||
placeholder?: string
|
||||
title?: string
|
||||
alignRight: boolean
|
||||
error: boolean
|
||||
required: boolean
|
||||
useLabelSlot: boolean
|
||||
useDefaultSlot: boolean
|
||||
alignRight?: boolean
|
||||
error?: boolean
|
||||
required?: boolean
|
||||
useLabelSlot?: boolean
|
||||
useDefaultSlot?: boolean
|
||||
size?: string
|
||||
checkedColor: string
|
||||
min: number
|
||||
max: number
|
||||
checkedColor?: string
|
||||
min?: number
|
||||
max?: number
|
||||
selectSize?: string
|
||||
loading: boolean
|
||||
loadingColor: string
|
||||
closeOnClickModal: boolean
|
||||
loading?: boolean
|
||||
loadingColor?: string
|
||||
closeOnClickModal?: boolean
|
||||
modelValue: Array<number | boolean | string> | number | boolean | string
|
||||
columns: Array<Record<string, any>>
|
||||
type: SelectPickerType
|
||||
valueKey: string
|
||||
labelKey: string
|
||||
confirmButtonText: string
|
||||
type?: SelectPickerType
|
||||
valueKey?: string
|
||||
labelKey?: string
|
||||
confirmButtonText?: string
|
||||
// 外部展示格式化函数
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
displayFormat?: Function
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforeConfirm?: Function
|
||||
zIndex: number
|
||||
safeAreaInsetBottom: boolean
|
||||
filterable: boolean
|
||||
filterPlaceholder: string
|
||||
ellipsis: boolean
|
||||
zIndex?: number
|
||||
safeAreaInsetBottom?: boolean
|
||||
filterable?: boolean
|
||||
filterPlaceholder?: string
|
||||
ellipsis?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -62,14 +62,14 @@ interface Props {
|
||||
customMinClass?: string
|
||||
customMaxClass?: string
|
||||
customClass?: string
|
||||
hideMinMax: boolean
|
||||
hideLabel: boolean
|
||||
disabled: boolean
|
||||
inactiveColor: string
|
||||
activeColor: string
|
||||
max: number
|
||||
min: number
|
||||
step: number
|
||||
hideMinMax?: boolean
|
||||
hideLabel?: boolean
|
||||
disabled?: boolean
|
||||
inactiveColor?: string
|
||||
activeColor?: string
|
||||
max?: number
|
||||
min?: number
|
||||
step?: number
|
||||
modelValue: number | number[]
|
||||
}
|
||||
|
||||
|
||||
@ -26,11 +26,11 @@ export default {
|
||||
<script lang="ts" setup>
|
||||
interface Props {
|
||||
customClass?: string
|
||||
title: string
|
||||
title?: string
|
||||
modelValue: number
|
||||
allowReset: boolean
|
||||
descFirst: boolean
|
||||
line: boolean
|
||||
allowReset?: boolean
|
||||
descFirst?: boolean
|
||||
line?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -31,10 +31,10 @@ import { ref, watch } from 'vue'
|
||||
type StatusTipType = 'search' | 'network' | 'content' | 'collect' | 'comment' | 'halo' | 'message'
|
||||
|
||||
interface Props {
|
||||
customClass: string
|
||||
customStyle: string
|
||||
type: StatusTipType
|
||||
tip: string
|
||||
customClass?: string
|
||||
customStyle?: string
|
||||
type?: StatusTipType
|
||||
tip?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -53,9 +53,9 @@ interface Props {
|
||||
description?: string
|
||||
icon?: string
|
||||
status?: StepStatus
|
||||
iconSlot: boolean
|
||||
titleSlot: boolean
|
||||
descriptionSlot: boolean
|
||||
iconSlot?: boolean
|
||||
titleSlot?: boolean
|
||||
descriptionSlot?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -27,11 +27,11 @@ import { getCurrentInstance, provide, watch } from 'vue'
|
||||
|
||||
interface Props {
|
||||
customClass?: string
|
||||
active: number
|
||||
vertical: boolean
|
||||
dot: boolean
|
||||
active?: number
|
||||
vertical?: boolean
|
||||
dot?: boolean
|
||||
space?: string
|
||||
alignCenter: boolean
|
||||
alignCenter?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -33,8 +33,8 @@ import { addUnit, getRect, objToStyle } from '../common/util'
|
||||
interface Props {
|
||||
customStyle?: string
|
||||
customClass?: string
|
||||
zIndex: number
|
||||
offsetTop: number
|
||||
zIndex?: number
|
||||
offsetTop?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -52,9 +52,9 @@ const width = ref<number>(0)
|
||||
const observerList = ref<UniApp.IntersectionObserver[]>([])
|
||||
const state = ref<string>('')
|
||||
|
||||
const boxHeight: Ref<number> = inject('box-height') || ref(0)
|
||||
const boxHeight: Ref<number> = inject('box-height', null) || ref(0)
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
const observerForChild: Function | null = inject('observerForChild') || null
|
||||
const observerForChild: Function | null = inject('observerForChild', null)
|
||||
|
||||
const { proxy } = getCurrentInstance() as any
|
||||
const instance = getCurrentInstance() as any
|
||||
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { getCurrentInstance, onBeforeMount, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { closeOther, pushToQueue, removeFromQueue } from '../common/clickoutside'
|
||||
import { useTouch } from '../mixins/useTouch'
|
||||
import { getRect } from '../common/util'
|
||||
@ -44,8 +44,8 @@ interface Props {
|
||||
customClass?: string
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforeClose?: Function
|
||||
disabled: boolean
|
||||
modelValue: string
|
||||
disabled?: boolean
|
||||
modelValue?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -20,15 +20,15 @@ import { getType, objToStyle } from '../common/util'
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean | string | number
|
||||
disabled: boolean
|
||||
activeValue: boolean | string | number
|
||||
inactiveValue: boolean | string | number
|
||||
disabled?: boolean
|
||||
activeValue?: boolean | string | number
|
||||
inactiveValue?: boolean | string | number
|
||||
activeColor?: string
|
||||
inactiveColor?: string
|
||||
size: string
|
||||
size?: string
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforeChange?: Function
|
||||
customClass: string
|
||||
customClass?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -27,7 +27,7 @@ interface Props {
|
||||
// tab的label
|
||||
title?: string
|
||||
// tab禁用,无法点击
|
||||
disabled: boolean
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -143,19 +143,19 @@ interface Props {
|
||||
// 绑定值
|
||||
modelValue: number
|
||||
// 标签数超过阈值可滑动
|
||||
slidableNum: number
|
||||
slidableNum?: number
|
||||
// 标签数超过阈值显示导航地图
|
||||
mapNum: number
|
||||
mapNum?: number
|
||||
// 粘性布局
|
||||
sticky: boolean
|
||||
sticky?: boolean
|
||||
// 粘性布局吸顶位置
|
||||
offsetTop: number
|
||||
offsetTop?: number
|
||||
// 开启手势滑动
|
||||
swipeable: boolean
|
||||
swipeable?: boolean
|
||||
// 底部条宽度,单位像素
|
||||
lineWidth: number
|
||||
lineWidth?: number
|
||||
// 底部条高度,单位像素
|
||||
lineHeight: number
|
||||
lineHeight?: number
|
||||
color?: string
|
||||
inactiveColor?: string
|
||||
}
|
||||
|
||||
@ -40,17 +40,17 @@ import { objToStyle } from '../common/util'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
|
||||
interface Props {
|
||||
useIconSlot: boolean
|
||||
useIconSlot?: boolean
|
||||
type?: string
|
||||
icon?: string
|
||||
closable: boolean
|
||||
plain: boolean
|
||||
dynamic: boolean
|
||||
closable?: boolean
|
||||
plain?: boolean
|
||||
dynamic?: boolean
|
||||
color?: string
|
||||
bgColor?: string
|
||||
round: boolean
|
||||
mark: boolean
|
||||
customClass: string
|
||||
round?: boolean
|
||||
mark?: boolean
|
||||
customClass?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -55,19 +55,19 @@ type PlacementType =
|
||||
| 'right-end'
|
||||
|
||||
interface Props {
|
||||
customStyle: string
|
||||
customArrow: string
|
||||
customPop: string
|
||||
customClass: string
|
||||
customStyle?: string
|
||||
customArrow?: string
|
||||
customPop?: string
|
||||
customClass?: string
|
||||
// 是否显示 popover 箭头
|
||||
visibleArrow: boolean
|
||||
visibleArrow?: boolean
|
||||
// 显示内容
|
||||
content?: Record<string, any>[] | string
|
||||
placement: PlacementType
|
||||
offset: number
|
||||
useContentSlot: boolean
|
||||
disabled: boolean
|
||||
showClose: boolean
|
||||
placement?: PlacementType
|
||||
offset?: number
|
||||
useContentSlot?: boolean
|
||||
disabled?: boolean
|
||||
showClose?: boolean
|
||||
modelValue: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@ -51,11 +51,11 @@ type TransitionName =
|
||||
| 'zoom-out'
|
||||
|
||||
interface Props {
|
||||
show: boolean
|
||||
show?: boolean
|
||||
duration?: Record<string, number> | number | boolean
|
||||
name: TransitionName | ''
|
||||
customStyle: string
|
||||
lazyRender: boolean
|
||||
name?: TransitionName | ''
|
||||
customStyle?: string
|
||||
lazyRender?: boolean
|
||||
customClass?: string
|
||||
// 定义进入过渡的开始状态。在元素被插入之前生效,在元素被插入之后的下一帧移除。
|
||||
enterClass?: string
|
||||
|
||||
@ -56,31 +56,31 @@ import { context, getType, isDef, isEqual } from '../common/util'
|
||||
import { chooseFile } from './utils'
|
||||
|
||||
interface Props {
|
||||
customClass: string
|
||||
customEvokeClass: string
|
||||
customPreviewClass: string
|
||||
customClass?: string
|
||||
customEvokeClass?: string
|
||||
customPreviewClass?: string
|
||||
// 多选
|
||||
multiple: boolean
|
||||
multiple?: boolean
|
||||
// 接受类型 暂定接受类型为图片,视频后续添加
|
||||
accept: string
|
||||
sizeType: Array<string>
|
||||
sourceType: Array<string>
|
||||
header: Record<string, any>
|
||||
name: string
|
||||
formData: Record<string, any>
|
||||
accept?: string
|
||||
sizeType?: Array<string>
|
||||
sourceType?: Array<string>
|
||||
header?: Record<string, any>
|
||||
name?: string
|
||||
formData?: Record<string, any>
|
||||
// 上传相关
|
||||
action: string
|
||||
fileList: Record<string, any>[]
|
||||
statusKey: string
|
||||
maxSize: number
|
||||
fileList?: Record<string, any>[]
|
||||
statusKey?: string
|
||||
maxSize?: number
|
||||
limit?: number
|
||||
showLimitMum: boolean
|
||||
disabled: boolean
|
||||
useDefaultSlot: boolean
|
||||
showLimitMum?: boolean
|
||||
disabled?: boolean
|
||||
useDefaultSlot?: boolean
|
||||
// loading 相关
|
||||
loadingType: string
|
||||
loadingColor: string
|
||||
loadingSize: string
|
||||
loadingType?: string
|
||||
loadingColor?: string
|
||||
loadingSize?: string
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
beforePreview?: Function
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user