Vue + Element 使用 js 的 ‘substring’ 语句报错 报错内容 TypeError: Cannot read property ‘substring’ of undefined 报错原因 使用substring 的时候没有判断字符串是否为空。