我正在研究闪电组件,在组件布局中,我必须提供一个按钮,可以生成闪电组件的pdf。我发现了一些博客,但仍不确定实际的解决方案。如果你们有一些示例实现示例,请告诉我。 谢谢!
答案 0 :(得分:0)
如果要保存整个窗口,可以打开打印窗口,然后另存为PDF(如果业务要求允许):
#!/bin/bash
for region in us-east-2 us-east-1 us-west-1 us-west-2 ap-east-1 ap-south-1 ap-northeast-3 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-northeast-1 ca-central-1 cn-north-1 cn-northwest-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 eu-north-1 me-south-1 sa-east-1
do
echo "Processing region $region ..."
for stack in $(aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE --output json --region $region | jq '.StackSummaries[] | .StackId' | sed -e 's/^"//' -e 's/"$//')
do
echo "Processing stack $stack ..."
aws cloudformation describe-stack-resources --stack-name $stack --output json --region $region | jq '.StackResources[] | select(.ResourceType=="AWS::IAM::Role") | select(.PhysicalResourceId=="PUT_YOUR_ROLE_NAME_HERE")'
done
done
如果要打印闪电组件的一部分,则可能需要将页面重建为pdf。请按照以下步骤操作:
print : function (component, event, helper) {
window.print();
}