【发布时间】:2019-10-08 00:24:33
【问题描述】:
假设我有这样的事情:
<q-input v-model="form.uuid" inverted-light color="white" stack-label="Your subdomain:" @blur="$v.form.uuid.$touch"
:error="$v.form.uuid.$error"
suffix=".website.com">
</q-input>
现在 .website.com 是硬编码的,但如果我想让它基于用于访问网站的主机名呢? IE。如果我访问 mydomain.tld,它不会显示 website.com - 它会显示 mydomain.tld。
有什么想法吗?
谢谢!
【问题讨论】:
-
@TrentonTrama - 我正在尝试在 vue.js 中做到这一点。执行
$('q-input').attr('suffix', host)不太可能奏效。