first
This commit is contained in:
27
src/utils/myMixins.js
Normal file
27
src/utils/myMixins.js
Normal file
@ -0,0 +1,27 @@
|
||||
export const myMixins = {
|
||||
data() {
|
||||
return {
|
||||
touchStart: [],
|
||||
touchEnd: [],
|
||||
slideShow: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goPage(page, query) {
|
||||
this.$router.push({
|
||||
name: page,
|
||||
query: query
|
||||
})
|
||||
},
|
||||
copyText(){//复制订单编号
|
||||
const copyText = document.getElementById('copyText');
|
||||
const range = document.createRange();
|
||||
range.selectNode(copyText);
|
||||
window.getSelection().removeAllRanges(); // 清除当前页面的选择内容
|
||||
window.getSelection().addRange(range);
|
||||
document.execCommand('copy');
|
||||
window.getSelection().removeAllRanges(); // 清除选择内容的高亮状态
|
||||
this.$toast('复制成功')
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user