Skip to content

Commit

Permalink
Merge remote-tracking branch 'baidu/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Feb 18, 2024
2 parents 765c87a + 0be59c1 commit 85995de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/amis-editor/src/plugin/TableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,15 @@ export class TableViewPlugin extends BasePlugin {
name: 'border',
type: 'switch',
mode: 'row',
pipeIn: defaultValue(true),
inputClassName: 'inline-flex justify-between flex-row-reverse'
},
{
label: '边框颜色',
type: 'input-color',
name: 'borderColor',
visibleOn: 'this.border',
visibleOn:
'this.border || typeof this.border === "undefined"',
pipeIn: defaultValue('#eceff8')
}
]
Expand Down
12 changes: 9 additions & 3 deletions packages/amis/__tests__/renderers/Form/inputDate.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,14 @@ test('Renderer:inputDate disabledDate', async () => {
)!;
expect(todayCell).toBeInTheDocument();

const toddayTr = todayCell.parentElement as HTMLElement;
const toddayTr: HTMLElement = // 因为周日被认为是第一天
// 当今天是周日的时候,moment().day(1) 是明天,moment().day(2) 是后天
// 而日历组件周日是最后一天,所以 moment().day(1) 其实是在下一组里面展示的
(
moment().day() === 0
? todayCell.parentElement?.nextElementSibling
: todayCell.parentElement
) as any;

const mondayCell = toddayTr.querySelector(
'td[data-value="' + monday.date() + '"]'
Expand Down Expand Up @@ -540,9 +547,8 @@ test('Renderer:inputDate defaultValue with formula', async () => {

expect(input).toBeInTheDocument();
expect(input.value).toBe('2021-12-06');

});

test('Renderer:inputDate setValue actions with special words', async () => {
const {container, submitBtn, onSubmit, getByText} = await setup([
{
Expand Down

0 comments on commit 85995de

Please sign in to comment.