我正在ag-grid网站上执行简单的“ Vue项目中的ag-Grid入门”,但遇到了问题。在本教程的某个步骤中,它尝试使用ag-grid-vue上的gridReady道具执行一个名为onGridReady的函数。但这似乎永远不会触发。
我严格按照此处的指示进行操作:https://www.ag-grid.com/vue-getting-started/?utm_source=ag-grid-readme&utm_medium=repository&utm_campaign=github
App.vue:
class Rectangle {
constructor(height, width) {
this.height = height;
this.width = width;
}
equals(rect) {
return this.width == rect.width && this.height == rect.height;
}
}
我希望能够单击该按钮并查看并提醒所选节点。 得到的是一条错误消息: 未捕获的TypeError:无法读取未定义的属性'getSelectedNodes' 在VueComponent.getSelectedRows(VM2832 App.vue:54)
答案 0 :(得分:1)
使用此绑定绑定事件(在Vue中):
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<ns6:ACASecurityHeader xmlns:ns6="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns="urn:us:gov:treasury:irs:common" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns4="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns7="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" xmlns:ns8="urn:us:gov:treasury:irs:msg:acabusinessheader">
<UserId>[USERID]</UserId>
</ns6:ACASecurityHeader>
<ns5:Security xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="urn:us:gov:treasury:irs:common" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns4="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns:ns6="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns:ns7="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" xmlns:ns8="urn:us:gov:treasury:irs:msg:acabusinessheader">
<dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="Id-0001547235026109-000000002d2383e8-3">
<dsig:SignedInfo>
<dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<dsig:Reference URI="#Id-0001547235026109-000000002d2383e8-2">
<dsig:Transforms>
<dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<dsig:DigestValue>[VALUE]</dsig:DigestValue>
</dsig:Reference>
<dsig:Reference URI="#Id-0001547235026109-000000002d2383e8-1">
<dsig:Transforms>
<dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<dsig:DigestValue>[VALUE]</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
<dsig:SignatureValue>[VALUE]</dsig:SignatureValue>
<dsig:KeyInfo Id="Id-0001547235026109-000000002d2383e8-4">
<dsig:X509Data>
<dsig:X509Certificate>[VALUE]</dsig:X509Certificate>
</dsig:X509Data>
</dsig:KeyInfo>
</dsig:Signature>
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-0001547235026109-000000002d2383e8-1">
<wsu:Created>2019-01-11T19:30:26Z</wsu:Created>
<wsu:Expires>2019-01-11T19:40:26Z</wsu:Expires>
</wsu:Timestamp>
</ns5:Security>
<ns8:ACABusinessHeader xmlns:ns8="urn:us:gov:treasury:irs:msg:acabusinessheader" xmlns="urn:us:gov:treasury:irs:common" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns4="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns6="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns:ns7="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-0001547235026109-000000002d2383e8-2">
<ns4:UniqueTransmissionId>fec69de8-b01d-4603-b0d3-90d0e198670d:SYS12:XXXX::T</ns4:UniqueTransmissionId>
<Timestamp>2018-12-11T10:13:42Z</Timestamp>
</ns8:ACABusinessHeader>
<ns4:ACATransmitterManifestReqDtl xmlns:ns4="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns="urn:us:gov:treasury:irs:common" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns6="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns:ns7="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" xmlns:ns8="urn:us:gov:treasury:irs:msg:acabusinessheader">
<ns4:PaymentYr>2018</ns4:PaymentYr>
<ns4:PriorYearDataInd>0</ns4:PriorYearDataInd>
<EIN>[VALUE]</EIN>
<ns4:TransmissionTypeCd>O</ns4:TransmissionTypeCd>
<ns4:TestFileCd>T</ns4:TestFileCd>
<ns4:TransmitterNameGrp>
<ns4:BusinessNameLine1Txt>[VALUE]</ns4:BusinessNameLine1Txt>
</ns4:TransmitterNameGrp>
<ns4:CompanyInformationGrp>
<ns4:CompanyNm>[VALUE]</ns4:CompanyNm>
<ns4:MailingAddressGrp>
<ns4:USAddressGrp>
<ns4:AddressLine1Txt>[VALUE]</ns4:AddressLine1Txt>
<CityNm>[VALUE]</CityNm>
<ns4:USStateCd>[VALUE]</ns4:USStateCd>
<USZIPCd>[VALUE]</USZIPCd>
<USZIPExtensionCd>[VALUE]</USZIPExtensionCd>
</ns4:USAddressGrp>
</ns4:MailingAddressGrp>
<ns4:ContactNameGrp>
<ns4:PersonFirstNm>[VALUE]</ns4:PersonFirstNm>
<ns4:PersonLastNm>[VALUE]</ns4:PersonLastNm>
</ns4:ContactNameGrp>
<ns4:ContactPhoneNum>[VALUE]</ns4:ContactPhoneNum>
</ns4:CompanyInformationGrp>
<ns4:VendorInformationGrp>
<ns4:VendorCd>I</ns4:VendorCd>
<ns4:ContactNameGrp>
<ns4:PersonFirstNm>[VALUE]</ns4:PersonFirstNm>
<ns4:PersonLastNm>[VALUE]</ns4:PersonLastNm>
[VALUE]
</ns4:ContactNameGrp>
<ns4:ContactPhoneNum>[VALUE]</ns4:ContactPhoneNum>
</ns4:VendorInformationGrp>
<ns4:TotalPayeeRecordCnt>1</ns4:TotalPayeeRecordCnt>
<ns4:TotalPayerRecordCnt>1</ns4:TotalPayerRecordCnt>
<ns4:SoftwareId>[VALUE]</ns4:SoftwareId>
<ns4:FormTypeCd>1094/1095B</ns4:FormTypeCd>
<BinaryFormatCd>application/xml</BinaryFormatCd>
<ChecksumAugmentationNum>6bc09caf95518e1af23bc8104376dde7870da3a2c139cb7644f2b924c8bf8a28</ChecksumAugmentationNum>
<AttachmentByteSizeNum>15971</AttachmentByteSizeNum>
<ns4:DocumentSystemFileNm>1094B_Request_XXXX_20181211T101342309Z.xml</ns4:DocumentSystemFileNm>
</ns4:ACATransmitterManifestReqDtl>
</env:Header>
<env:Body>
<ns7:ACABulkRequestTransmitter xmlns:ns7="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" xmlns="urn:us:gov:treasury:irs:common" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns4="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns6="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns:ns8="urn:us:gov:treasury:irs:msg:acabusinessheader">
<BulkExchangeFile>
<inc:Include xmlns:inc="http://www.w3.org/2004/08/xop/include" href="cid:1094B_Request_XXXX_20181211T101342309Z.xml" />
</BulkExchangeFile>
</ns7:ACABulkRequestTransmitter>
</env:Body>
</env:Envelope>
请参阅: