Skip to content
This repository was archived by the owner on Dec 6, 2021. It is now read-only.

Commit 10ed436

Browse files
committed
fix(input): class named '.at-input--without-border' exists when prop border is true
1 parent d34d7a8 commit 10ed436

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/input/__tests__/input.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ describe('AtInput', () => {
134134

135135
it('should render prop border', async () => {
136136
const wrapper = factory()
137-
expect(wrapper.find('.at-input--without-border').exists()).toBeTruthy()
137+
expect(wrapper.find('.at-input--without-border').exists()).toBeFalsy()
138138

139139
await wrapper.setProps({ border: false })
140-
expect(wrapper.find('.at-input--without-border').exists()).toBeFalsy()
140+
expect(wrapper.find('.at-input--without-border').exists()).toBeTruthy()
141141
})
142142

143143
it('should render prop editable', async () => {

src/components/input/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const AtInput = defineComponent({
135135

136136
const rootClasses = computed(() => ({
137137
'at-input': true,
138-
'at-input--without-border': props.border
138+
'at-input--without-border': !props.border
139139
}))
140140

141141
const containerClasses = computed(() => ({
@@ -310,4 +310,4 @@ const AtInput = defineComponent({
310310
}
311311
})
312312

313-
export default AtInput
313+
export default AtInput

0 commit comments

Comments
 (0)