// 公共方法
createPinyinUpperCode(str) {
var pinyinData = pinyin(str, {
style: pinyin.STYLE_FIRST_LETTER, // 设置拼音风格
heteronym: false
})
return pinyinData.join("").toUpperCase();
},
watch: {
"sendDataInfo.scopeName": {
handler: function (newValue, oldValue) {
this.sendDataInfo.scopeCode =
this.$common.createPinyinUpperCode(newValue);
},
deep: true,
},
},