小编Rid*_*ung的帖子

如何使用户片段在字符串中工作:vscode

我为 javascript 制作了自己的用户片段代码

"inner backquote concat variable" : {
    "prefix": "$",
    "body": "\\${$1}",
    "description": "concat variable with backquote sting"
}
Run Code Online (Sandbox Code Playgroud)

当我像这样按“$”时,我希望该片段在反引号字符串或单引号字符串中工作

片段作品.gif

但在字符串内部时它不起作用。

heloquote.gif

如何使代码片段在字符串中工作?

visual-studio-code vscode-snippets

4
推荐指数
1
解决办法
911
查看次数

SweetAlert - 更改模式颜色

默认情况下颜色为白色。是否可以更改 sweetalert2 的模态背景颜色?

我尝试用 CSS 来改变它,就像我在此处此处处理其他问题一样,如下所示:

.sweet-alert 
{
   background-color: #2f2f2f96;
}
Run Code Online (Sandbox Code Playgroud)

但我什么也没得到

我使用 sweetalert 问题功能

Swal.mixin({
  input: 'text',
  confirmButtonText: 'Next →',
  showCancelButton: true,
  progressSteps: ['1', '2', '3']
}).queue([
  {
    title: 'Question 1',
    text: 'Chaining swal2 modals is easy'
  },
  'Question 2',
  'Question 3'
]).then((result) => {
  if (result.value) {
    Swal.fire({
     title: 'All done!',
     html:
       'Your answers: <pre><code>' +
         JSON.stringify(result.value) +
        '</code></pre>',
      confirmButtonText: 'Lovely!'
    })
  }
})
Run Code Online (Sandbox Code Playgroud)

我希望我可以将模式颜色更改为灰色

javascript css sweetalert2

2
推荐指数
1
解决办法
5917
查看次数