javascript - Sweat Alert 2 文本区域未动态调整宽度
问题描述
我为自己创建了一个甜蜜的警报文本框,它使用“textarea”作为其输入属性。这意味着可以拖动文本框来调整其大小。它与https://sweetalert2.github.io/上的示例完全相同,但与网站上的示例不同,我的代码不会动态调整其宽度。您可以在代码段中自己进行测试,高度调整大小但宽度不调整。考虑到我是从他们自己的网站上逐字复制的,我不知道为什么它不起作用。任何见解都会很棒,也许我在这里遗漏了一些东西。
swal({
input: 'textarea',
title: 'Message',
inputPlaceholder: 'Type your message here...',
inputAttributes: {
'aria-label': 'Type your message here'
},
showCancelButton: true
},
function(){
location.href= "http://example.com";
});
<script src="https://cdn.jsdelivr.net/g/sweetalert2@6.6.0(sweetalert2.min.js+sweetalert2.js)"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/g/sweetalert2@6.6.0(sweetalert2.min.css+sweetalert2.css)">
解决方案
推荐阅读
- python - 基于组的另一列中的值在一个列上创建值
- woocommerce - Woocommerce 在产品目录中显示含税和不含税价格
- java - Is there any way to create viewmodel object in application class?
- php - Woocommerce - 购物车页面 - 当购物车更新为新数量时,我希望能够通过总计
- swift - 如何在 popToRootViewController 之后显示警报
- javascript - 大家好,我正在使用 django,但它没有加载 JavaScript 和 jquery
- python - 如何在python中制作一个带有选项的弹出窗口?
- asp.net - 在我的 Asp.Net Core MVC Web 应用程序中加密 appsettings.json 的部分
- flutter - 颤振显示图标与列重叠
- python - 在 python 中读取 XML 和写入 XML