|
@@ -67,7 +67,7 @@
|
|
|
<span class="tag-group__title" v-show="!scope.row.url"> - </span>
|
|
<span class="tag-group__title" v-show="!scope.row.url"> - </span>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="10" >
|
|
<el-col :span="10" >
|
|
|
- <el-button size="mini" type="success" @click="handleDelete(scope.$index, scope.row)">复制</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" type="success" v-clipboard:copy="scope.row.url" v-clipboard:success="onCopy" v-clipboard:error="onError">复制</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
@@ -116,11 +116,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
name: [
|
|
name: [
|
|
|
- { required: true, message: '请输入游戏名', trigger: 'blur' },
|
|
|
|
|
|
|
+ { required: true, message: '请输入游戏名', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
app_id: [
|
|
app_id: [
|
|
|
- { required: true, message: '请输入 app_id', trigger: 'blur' },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ { required: true, message: '请输入 app_id', trigger: 'blur' }
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
formInline: {
|
|
formInline: {
|
|
|
name: '',
|
|
name: '',
|
|
@@ -147,12 +147,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 重置
|
|
// 重置
|
|
|
onReset () {
|
|
onReset () {
|
|
|
- this.fetchData();
|
|
|
|
|
|
|
+ this.fetchData()
|
|
|
},
|
|
},
|
|
|
- onAdd(){
|
|
|
|
|
|
|
+ onAdd () {
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
},
|
|
},
|
|
|
- onAddSubmit(formName) {
|
|
|
|
|
|
|
+ onAddSubmit (formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
api.GAME_ADD(this.form).then(res => {
|
|
api.GAME_ADD(this.form).then(res => {
|
|
@@ -160,7 +160,7 @@ export default {
|
|
|
showClose: true,
|
|
showClose: true,
|
|
|
message: '添加成功!',
|
|
message: '添加成功!',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
this.fetchData()
|
|
this.fetchData()
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
@@ -172,10 +172,10 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- resetAddForm(formName) {
|
|
|
|
|
- this.$refs[formName].resetFields();
|
|
|
|
|
|
|
+ resetAddForm (formName) {
|
|
|
|
|
+ this.$refs[formName].resetFields()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 列表
|
|
// 列表
|
|
@@ -203,17 +203,31 @@ export default {
|
|
|
handleDelete (index, row) {
|
|
handleDelete (index, row) {
|
|
|
console.log(index, row)
|
|
console.log(index, row)
|
|
|
},
|
|
},
|
|
|
|
|
+ onCopy () {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: '复制成功!',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ onError () {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: '复制失败!',
|
|
|
|
|
+ type: 'error'
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
// 分页
|
|
// 分页
|
|
|
- handleSizeChange(val) {
|
|
|
|
|
|
|
+ handleSizeChange (val) {
|
|
|
// this.pagination.limit = val
|
|
// this.pagination.limit = val
|
|
|
- this.fetchData({'limit': val})
|
|
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
|
|
|
|
+ this.fetchData({ limit: val })
|
|
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
},
|
|
},
|
|
|
- handleCurrentChange(val) {
|
|
|
|
|
|
|
+ handleCurrentChange (val) {
|
|
|
this.pagination.page = val
|
|
this.pagination.page = val
|
|
|
- this.fetchData({'page': val})
|
|
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
|
|
|
|
+ this.fetchData({ page: val })
|
|
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|