-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: table * refactor: table * refactor: table * refactor: table * refactor: table * refactor: table * refactor: table * refactor: table * refactor: table * fix: column not pass to cell * doc: uppate table * fix: update bodyCell headerCell * doc: remove examples * refactor: table * fix: table title not work * fix: table selection * fix: table checkStrictly * refactor: table * fix: table template error * feat: table support summary * test: update snap * perf: table * docs(table): fix ajax demo (#4639) * test: update table * refactor: remove old table * doc: update table doc * doc: update doc * doc: update select * doc: update summary Co-authored-by: John <John60676@qq.com>
- Loading branch information
1 parent
1aee88e
commit 21502ea
Showing
152 changed files
with
15,008 additions
and
14,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { UnwrapRef } from 'vue'; | ||
import { reactive, toRef } from 'vue'; | ||
|
||
/** | ||
* Reactively pick fields from a reactive object | ||
* | ||
* @see https://vueuse.js.org/reactivePick | ||
*/ | ||
export function reactivePick<T extends object, K extends keyof T>( | ||
obj: T, | ||
...keys: K[] | ||
): { [S in K]: UnwrapRef<T[S]> } { | ||
return reactive(Object.fromEntries(keys.map(k => [k, toRef(obj, k)]))) as any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { isRef, reactive } from 'vue'; | ||
import type { Ref } from 'vue'; | ||
type MaybeRef<T> = T | Ref<T>; | ||
/** | ||
* Converts ref to reactive. | ||
* | ||
* @see https://vueuse.org/toReactive | ||
* @param objectRef A ref of object | ||
*/ | ||
export function toReactive<T extends object>(objectRef: MaybeRef<T>): T { | ||
if (!isRef(objectRef)) return reactive(objectRef) as T; | ||
|
||
const proxy = new Proxy( | ||
{}, | ||
{ | ||
get(_, p, receiver) { | ||
return Reflect.get(objectRef.value, p, receiver); | ||
}, | ||
set(_, p, value) { | ||
(objectRef.value as any)[p] = value; | ||
return true; | ||
}, | ||
deleteProperty(_, p) { | ||
return Reflect.deleteProperty(objectRef.value, p); | ||
}, | ||
has(_, p) { | ||
return Reflect.has(objectRef.value, p); | ||
}, | ||
ownKeys() { | ||
return Object.keys(objectRef.value); | ||
}, | ||
getOwnPropertyDescriptor() { | ||
return { | ||
enumerable: true, | ||
configurable: true, | ||
}; | ||
}, | ||
}, | ||
); | ||
|
||
return reactive(proxy) as T; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.