我想在iOS中使用html5进行时间输入。我尝试使用step =“ 900”属性仅允许15分钟的间隔,这在浏览器中运行时有效,但在我正在开发的ipad上却无法使用。
<input type="time" id="deliveryTime" value="09:00:00" step="900">
Run Code Online (Sandbox Code Playgroud)
但是在IOS中,它仍然每分钟显示00-59。
有人可以帮忙吗?
我正在尝试创建一个带有分区和排序键的二级索引的 dynamoDB 表。我可以在没有二级索引的情况下创建表,但还没有找到添加二级索引的方法
我已经查看了这两个资源,但没有找到任何可以实际向我展示我需要在我的 cdk python 脚本中使用二级索引创建资源的代码 https://docs.aws.amazon.com/cdk /api/latest/docs/@aws-cdk_aws-dynamodb.Table.html https://docs.aws.amazon.com/cdk/api/latest/docs/aws-dynamodb-readme.html
这是将创建表的代码
table_name = 'event-table-name'
event_table = dynamoDB.Table(self, 'EventsTable',
table_name=table_name,
partition_key=Attribute(
name='composite',
type=AttributeType.STRING
),
sort_key=Attribute(
name='switch_ref',
type=AttributeType.STRING
),
removal_policy=core.RemovalPolicy.DESTROY,
billing_mode=BillingMode.PAY_PER_REQUEST,
stream=StreamViewType.NEW_IMAGE,
)
Run Code Online (Sandbox Code Playgroud)
这是我需要附加到它的二级索引
secondaryIndex = dynamoDB.GlobalSecondaryIndexProps(
index_name='mpan-status-index',
partition_key=Attribute(
name='field1',
type=AttributeType.STRING
),
sort_key=Attribute(
name='field2',
type=AttributeType.STRING
),
)
Run Code Online (Sandbox Code Playgroud)
我尝试在表创建中添加块并尝试在表上调用 addSecondaryindex 方法。但是两者都失败,要么说意外的关键字要么对象没有属性 addGlobalSecondaryIndex