changeInt(msg) {
    // 判断是否为颜色的16进制
    console.log(msg);
    var reg = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/;
    console.log(reg.test(msg));
},
<input type="number" v-model="amount" @input="changeInt(color)">

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-01
  • 2021-09-09
相关资源
相似解决方案