diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2eed5ee56fd..95f8211f3f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -108,13 +108,14 @@ jobs: git push origin --delete gh-pages - name: Deploy - uses: peaceiris/actions-gh-pages@v2.5.0 - env: - ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}} + uses: peaceiris/actions-gh-pages@v3.9.0 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: ./dist - with: - forceOrphan: true + CNAME: vben.vvbin.cn + + diff --git a/src/components/Preview/src/Functional.vue b/src/components/Preview/src/Functional.vue index 1c91929786f..2fcf7e39fbb 100644 --- a/src/components/Preview/src/Functional.vue +++ b/src/components/Preview/src/Functional.vue @@ -141,8 +141,16 @@ } // 缩放函数 function scaleFunc(num: number) { + // 最小缩放 + const MIN_SCALE = 0.02; + // 放大缩小的颗粒度 + const GRA = 0.1; if (imgState.imgScale <= 0.2 && num < 0) return; - imgState.imgScale += num; + imgState.imgScale += num * GRA; + // scale 不能 < 0,否则图片会倒置放大 + if (imgState.imgScale < 0) { + imgState.imgScale = MIN_SCALE; + } } // 旋转图片 diff --git a/src/components/Table/src/hooks/useCustomRow.ts b/src/components/Table/src/hooks/useCustomRow.ts index 56187208e83..1a5aac85891 100644 --- a/src/components/Table/src/hooks/useCustomRow.ts +++ b/src/components/Table/src/hooks/useCustomRow.ts @@ -40,7 +40,7 @@ export function useCustomRow( function handleClick() { const { rowSelection, rowKey, clickToRowSelect } = unref(propsRef); if (!rowSelection || !clickToRowSelect) return; - const keys = getSelectRowKeys(); + const keys = getSelectRowKeys() || []; const key = getKey(record, rowKey, unref(getAutoCreateKey)); if (!key) return; diff --git a/src/components/Table/src/hooks/useRowSelection.ts b/src/components/Table/src/hooks/useRowSelection.ts index 3439a223bba..ed19b072a67 100644 --- a/src/components/Table/src/hooks/useRowSelection.ts +++ b/src/components/Table/src/hooks/useRowSelection.ts @@ -66,13 +66,13 @@ export function useRowSelection( selectedRowKeysRef.value = rowKeys; const allSelectedRows = findNodeAll( toRaw(unref(tableData)).concat(toRaw(unref(selectedRowRef))), - (item) => rowKeys.includes(item[unref(getRowKey) as string]), + (item) => rowKeys?.includes(item[unref(getRowKey) as string]), { children: propsRef.value.childrenColumnName ?? 'children', }, ); const trueSelectedRows: any[] = []; - rowKeys.forEach((key: string) => { + rowKeys?.forEach((key: string) => { const found = allSelectedRows.find((item) => item[unref(getRowKey) as string] === key); found && trueSelectedRows.push(found); }); diff --git a/src/views/demo/table/FormTable.vue b/src/views/demo/table/FormTable.vue index 23300aa7c92..fc565edfe12 100644 --- a/src/views/demo/table/FormTable.vue +++ b/src/views/demo/table/FormTable.vue @@ -1,8 +1,5 @@