在項目中有時候要對用戶的輸入內容進行過濾,而不是做校驗。
<el-input
v-model="input"
@input="e => input = inputMe(e)"
placeholder="請輸入內容">
</el-input>
使用@input對用戶輸入進行監控
inputMe(e){
return e.replace(/\//,'')
},
對輸入的內容進行處理再返回
在項目中有時候要對用戶的輸入內容進行過濾,而不是做校驗。
<el-input
v-model="input"
@input="e => input = inputMe(e)"
placeholder="請輸入內容">
</el-input>
使用@input對用戶輸入進行監控
inputMe(e){
return e.replace(/\//,'')
},
對輸入的內容進行處理再返回
項目中需要按照不同的媒體類型,展示不同的表頭且數據字段也不同。可以增加不同key值解決v-if不生效問題。 <el-table-column prop="author" align="center"
修改ejs文件 將<% if (!process.browser) {%> 改成: <% if (!require(‘process’).browser) { %>