Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] customlayout flex 布局排版错误 #1163

Closed
fangsmile opened this issue Feb 29, 2024 · 0 comments · Fixed by #1164
Closed

[Bug] customlayout flex 布局排版错误 #1163

fangsmile opened this issue Feb 29, 2024 · 0 comments · Fixed by #1164
Assignees
Labels
bug Something isn't working

Comments

@fangsmile
Copy link
Contributor

fangsmile commented Feb 29, 2024

Version

develop

Link to Minimal Reproduction

none

Steps to Reproduce

      {
        field: 'serviceTicketHandleType',
        title: '处理方式',
        sort: false,

        width: 'auto',
        headerStyle: {
          bgColor: '#f5f7fa',
          color: '#909399',
          fontSize: 14,
          fontWeight: 900,
          borderColor: '#ebeef5'
        },
        style: {
          bgColor: '#fff',
          color: '#606266',
          fontSize: 14,
          borderColor: '#ebeef5'
        },
        customLayout: args => {
          const { table, row, col, rect } = args;
          const { height, width } = rect || table.getCellRect(col, row);
          const record = table.getRecordByRowCol(col, row);
          const container = new VTable.CustomLayout.Group({
            height,
            width,
            display: 'flex',
            flexDirection: 'row',
            alignItems: 'center',
            flexWrap: 'wrap',
            alignContent: 'center'
          });

          const edittext = new VTable.CustomLayout.Text({
            text: '修改',
            fontSize: 14,
            fill: '#2E5CF6',
            boundsPadding: [7, 10, 5, 10],
            cursor: 'pointer',
            key: 'serviceTicketVo-table-edit'
          } as any);
          container.add(edittext);
          const dealtext = new VTable.CustomLayout.Text({
            text: '处理',
            fontSize: 14,
            fill: '#2E5CF6',
            boundsPadding: [7, 10, 5, 10],
            cursor: 'pointer',
            key: 'serviceTicketVo-table-deal'
          } as any);
          container.add(dealtext);
          const addReviewtext = new VTable.CustomLayout.Text({
            text: '评论',
            fontSize: 14,
            fill: '#2E5CF6',
            boundsPadding: [7, 10, 5, 10],
            cursor: 'pointer',
            key: 'serviceTicketVo-table-addReview'
          } as any);
          container.add(addReviewtext);
          const sendWxCpApptext = new VTable.CustomLayout.Text({
            text: '企微通知',
            fontSize: 14,
            fill: '#2E5CF6',
            boundsPadding: [7, 10, 5, 10],
            cursor: 'pointer',
            key: 'serviceTicketVo-table-sendWxCpApp'
          } as any);
          container.add(sendWxCpApptext);
          const editTipstext = new VTable.CustomLayout.Text({
            text: '填写提示',
            fontSize: 14,
            fill: '#2E5CF6',
            boundsPadding: [7, 10, 5, 10],
            cursor: 'pointer',
            key: 'serviceTicketVo-table-editTips'
          } as any);
          container.add(editTipstext);
          return {
            rootContainer: container,
            renderDefault: false
          };
        }
      },

应该显示横排 但显示成立竖排

Current Behavior

image

Expected Behavior

image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@fangsmile fangsmile added the bug Something isn't working label Feb 29, 2024
@fangsmile fangsmile self-assigned this Feb 29, 2024
@fangsmile fangsmile linked a pull request Feb 29, 2024 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant