diff --git a/.github/workflows/manual-build-pro-image.yml b/.github/workflows/manual-build-pro-image.yml index b78435fbe2..b3e6e1d718 100644 --- a/.github/workflows/manual-build-pro-image.yml +++ b/.github/workflows/manual-build-pro-image.yml @@ -25,19 +25,21 @@ jobs: - 4873:4873 steps: - name: Get pro plugins - id: get-pro-plugins + id: get-info run: | if [[ "${{ github.head_ref || github.ref_name }}" == "main" ]]; then echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT + echo "branch=$(echo 'main')" >> $GITHUB_OUTPUT else echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT + echo "branch=$(echo 'next')" >> $GITHUB_OUTPUT fi - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.NOCOBASE_APP_ID }} private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }} - repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ',') }} + repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-info.outputs.proRepos), ',') }} skip-token-revoke: true - name: Checkout uses: actions/checkout@v4 @@ -71,14 +73,14 @@ jobs: - name: Clone pro repos shell: bash run: | - for repo in ${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ' ') }} + for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }} do - git clone -b ${{ github.head_ref || github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo + git clone -b ${{ steps.get-info.outputs.branch }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo done - name: rm .git run: | rm -rf packages/pro-plugins/.git - for repo in ${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ' ') }} + for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }} do rm -rf packages/pro-plugins/@nocobase/$repo/.git done diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index 0abb554a1d..f77bcc1dd1 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -181,7 +181,7 @@ export const SubTable: any = observer( return { current: currentPage > page ? page : currentPage, pageSize: pageSize || 10, - total: field?.value?.length, + total: field?.value, onChange: (page, pageSize) => { setCurrentPage(page); setPageSize(pageSize); diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx index b92067f05b..50911ad7de 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx @@ -200,23 +200,23 @@ const useTableColumns = (props: { showDel?: any; isSubTable?: boolean }, paginat render: (v, record, index) => { if (props.showDel(record)) { return ( - { return action(() => { const fieldIndex = (current - 1) * pageSize + index; + const deleteCount = field.value[fieldIndex] ? 1 : 2; spliceArrayState(field, { startIndex: fieldIndex, - deleteCount: 1, - }); - field.value.splice(fieldIndex, 1); - setTimeout(() => { - field.value[field.value.length] = null; + deleteCount: deleteCount, }); + field.value.splice(fieldIndex, deleteCount); + field.setInitialValue(field.value); return field.onInput(field.value); }); }} - /> + > + + ); } return;