Browse Source

release

typings
npmrun 3 years ago
parent
commit
14bf50a8da
  1. 12
      packages/components/tree/tree.vue
  2. 2
      packages/princess-ui/package.json
  3. 870
      pnpm-lock.yaml

12
packages/components/tree/tree.vue

@ -55,7 +55,7 @@ async function onDrop2(ev) {
if (
data
) {
const isSuccess = (await props.dropFn?.(ENiuTreeStatus.DragIn, data, props.list))
const isSuccess = (await props.dropFn?.(ENiuTreeStatus.DragIn, data, undefined))
if (isSuccess == undefined || isSuccess) {
removeByKey(sourceKey, props.list)
props.list.push(data)
@ -73,7 +73,7 @@ const props = withDefaults(
justOpenOne?: boolean
sort?: boolean
level?: number
dropFn?(status: ENiuTreeStatus, data: INiuTreeData, targetDataList: INiuTreeData[]): boolean | Promise<boolean>
dropFn?(status: ENiuTreeStatus, data: INiuTreeData, targetDataList?: INiuTreeData): boolean | Promise<boolean>
}>(),
{
justOpenOne: false,
@ -152,7 +152,7 @@ async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) {
sourceKey != key &&
!isChildOf(key, sourceKey, props.list)
) {
const isSuccess = (await props.dropFn?.(status, data, parentData?.children ?? props.list))
const isSuccess = (await props.dropFn?.(status, data, parentData))
if (isSuccess == undefined || isSuccess) {
removeByKey(sourceKey, props.list)
if(parentData){
@ -175,7 +175,7 @@ async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) {
!isChildOf(key, sourceKey, props.list) &&
targetData.children
) {
const isSuccess = (await props.dropFn?.(status, data, targetData.children))
const isSuccess = (await props.dropFn?.(status, data, targetData))
if (isSuccess == undefined || isSuccess) {
removeByKey(sourceKey, props.list)
targetData.children.push(data)
@ -194,7 +194,7 @@ async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) {
sourceKey != key &&
!isChildOf(key, sourceKey, props.list)
) {
const isSuccess = (await props.dropFn?.(status, data, targetData.children))
const isSuccess = (await props.dropFn?.(status, data, targetData))
if (isSuccess == undefined || isSuccess) {
removeByKey(sourceKey, props.list)
insertAfterByKey(key, data, props.list)
@ -210,7 +210,7 @@ async function onDrop(key: INiuTreeKey, status?: ENiuTreeStatus) {
sourceKey != key &&
!isChildOf(key, sourceKey, props.list)
) {
const isSuccess = (await props.dropFn?.(status, data, targetData.children))
const isSuccess = (await props.dropFn?.(status, data, targetData))
if (isSuccess == undefined || isSuccess) {
removeByKey(sourceKey, props.list)
insertBeforeByKey(key, data, props.list)

2
packages/princess-ui/package.json

@ -1,6 +1,6 @@
{
"name": "princess-ui",
"version": "0.0.8-beta.12",
"version": "0.0.8-beta.13",
"description": "a vue3 ui, just for personal use",
"scripts": {
"build": "tsc ./PrincessResolver.ts --skipLibCheck --esModuleInterop"

870
pnpm-lock.yaml

File diff suppressed because it is too large
Loading…
Cancel
Save