如何在 svelte 列表中的日期和待办事项文本之间给出 space?
How can I give space in between date and todo text in the list in svelte?
我现在改变了这样的东西:https://svelte.dev/repl/f137b909d3e740f99a030576189091db?version=3.22.3
这是 Svelte 中的新功能。我正在用电子构建这个。
提前致谢!
我调整了你的样式,todo-item-left
变成了网格。纯 CSS,无需其他更改:
.remove-item {
cursor: pointer;
}
.todo-item-left {
display: grid;
grid-template-columns: 1fr 3fr 3fr;
justify-items: start;
width: 100%;
}
我更新了 REPL 给你玩。
非常感谢@Gh05d
我刚刚更改了我的代码中的一些内容...在这个代码中,我希望按钮 'ENTER' 的功能与上面的输入字段相同,但不知道为什么它不起作用:
此按钮代码:
<div class="buttonDate">
<button on:click={newTodoTitle}>Enter</button>
</div>
https://svelte.dev/repl/f137b909d3e740f99a030576189091db?version=3.22.3
我现在改变了这样的东西:https://svelte.dev/repl/f137b909d3e740f99a030576189091db?version=3.22.3
这是 Svelte 中的新功能。我正在用电子构建这个。 提前致谢!
我调整了你的样式,todo-item-left
变成了网格。纯 CSS,无需其他更改:
.remove-item {
cursor: pointer;
}
.todo-item-left {
display: grid;
grid-template-columns: 1fr 3fr 3fr;
justify-items: start;
width: 100%;
}
我更新了 REPL 给你玩。
非常感谢@Gh05d
我刚刚更改了我的代码中的一些内容...在这个代码中,我希望按钮 'ENTER' 的功能与上面的输入字段相同,但不知道为什么它不起作用:
此按钮代码:
<div class="buttonDate">
<button on:click={newTodoTitle}>Enter</button>
</div>
https://svelte.dev/repl/f137b909d3e740f99a030576189091db?version=3.22.3