vant dialog message allow-html 怎么用?

1,294 阅读1分钟

vant2+vue2

vant dialog message allow-html 怎么用?


Dialog.confirm({
                allowHtml: true,
                message:
                  this.$t("home.queryTip") +
                  '"' +
                  `<span style="color: #f52242">${res1.data.unfinished_task}</span>` +
                  '"' +
                  this.$t("home.queryTip2"),
                confirmButtonText: this.$t("home.ok"),
                confirmButtonColor: "#0072FF",
                cancelButtonText: this.$t("home.cancel"),
                cancelButtonColor: "#FF4141",
              })