papayaui 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -165,7 +165,7 @@ export const calendarWrapperEmits = {
|
|
|
165
165
|
export const calendarEmits = {
|
|
166
166
|
...popupEmits,
|
|
167
167
|
confirm: (value: CalendarValue) => isDate(value) || isArray(value),
|
|
168
|
-
select: (value:
|
|
168
|
+
select: (value: Date) => isDate(value),
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
export type CalendarProps = ExtractPropTypes<typeof calendarProps>
|
|
@@ -51,7 +51,8 @@ export const searchEmits = {
|
|
|
51
51
|
'update:modelValue': (value: string) => isString(value),
|
|
52
52
|
change: (value: string) => isString(value),
|
|
53
53
|
confirm: (value: EventDetail<{ value: string }>) => isObject(value),
|
|
54
|
-
|
|
54
|
+
focus: (_value: unknown) => true,
|
|
55
|
+
blur: (_value: unknown) => true,
|
|
55
56
|
clear: () => true,
|
|
56
57
|
'click-input': () => true,
|
|
57
58
|
}
|
package/package.json
CHANGED
package/utils/object.ts
CHANGED
|
@@ -10,6 +10,18 @@ export const pick = <T extends object, U extends keyof T>(object: T, keys: Array
|
|
|
10
10
|
}, {} as Pick<T, U>)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @description 反向版 pick,这个方法返回忽略属性之外的自身和继承的可枚举属性
|
|
15
|
+
*/
|
|
16
|
+
export const omit = <T extends object, U extends keyof T>(object: T, keys: Array<U>) => {
|
|
17
|
+
return (Object.keys(object) as U[]).reduce((newObject, key) => {
|
|
18
|
+
if (!keys.includes(key)) {
|
|
19
|
+
newObject[key] = object[key]
|
|
20
|
+
}
|
|
21
|
+
return newObject
|
|
22
|
+
}, {} as Pick<T, U>)
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
/**
|
|
14
26
|
* @description 递归合并 sources 来源对象自身和继承的可枚举属性到 object 目标对象
|
|
15
27
|
*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defaultNamespace } from '../../core'
|
|
2
|
-
|
|
3
|
-
const Dialog = () => {
|
|
4
|
-
const node = uni
|
|
5
|
-
.createSelectorQuery()
|
|
6
|
-
.select(`#${defaultNamespace}-dialog`)
|
|
7
|
-
.node((result) => {
|
|
8
|
-
console.log('result', result)
|
|
9
|
-
})
|
|
10
|
-
.exec()
|
|
11
|
-
console.log(node)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default Dialog
|