我使用 Material-ui 作为我的 CSS 框架,我想选择包含特定文本的按钮。我当前的代码:
cy.get('button').contains('Edit Claim').should('be.disabled');
Run Code Online (Sandbox Code Playgroud)
它失败了,因为 Material ui 的按钮组件输出了 div 内的文本,因此 cypress 断言了 div 的禁用属性。我希望它断言到按钮。
import Table,{TableProps} from 'my/table/path'
const StyledTable = styled(Table)({
...my styles
})
const AnotherTable = <T, H>(props: TableProps<T, H>) => {
return <StyledTable {...props} />
}
Run Code Online (Sandbox Code Playgroud)
这是我的错误消息:
Types of parameters 'item' and 'item' are incompatible.
Type 'unknown' is not assignable to type 'T'.
'unknown' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
Run Code Online (Sandbox Code Playgroud)
看来我的通用在使用时没有被继承,styled
因为当我这样做时:
const AnotherTable = <T, H>(props: TableProps<T, H>) => {
return <Table {...props} />
} …
Run Code Online (Sandbox Code Playgroud) 我想将 Quasar 安装到我现有的 Nuxt 项目中。我一直在阅读quasar 文档,他们在安装页面中唯一提到的是他们自己的 CLI,其中没有 Nuxt 的选项。我还遇到了nuxt-quasar模块,但它不再维护了。有人有这方面的经验吗?
material-ui ×2
reactjs ×2
button ×1
cypress ×1
javascript ×1
nuxt.js ×1
typescript ×1
vue.js ×1