Commit ee508093 by zhangmeng

增加disabledList属性

parent eb59d48d
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "@gic-test/vue-gic-card",
"description": "vue-gic-card Plugin",
"version": "1.0.43",
"version": "1.0.44",
"license": "MIT",
"private": false,
"main": "dist/vue-gic-card.js",
......
......@@ -31,7 +31,7 @@
@row-click="handleCurrentChangeTable">
<el-table-column label="" width="55">
<template slot-scope="scope">
<el-radio class="radio-style" :label="scope.row.coupCardId" v-model="radio">
<el-radio class="radio-style" :label="scope.row.coupCardId" v-model="radio" :disabled="scope.row.disabled">
&nbsp;
</el-radio>
</template>
......@@ -104,7 +104,7 @@
import qs from 'qs';
export default {
name: 'vue-gic-card',
props: ['showCardDialog','projectName','cardLimit', 'cardType'],
props: ['showCardDialog','projectName','cardLimit', 'cardType','disabledList'],
data () {
return {
repProjectName: 'gic-web', // 项目名
......@@ -138,8 +138,10 @@
handleCurrentChangeTable(val) { // 当前格发生变化时触发
var that = this
console.log("table: ",val);
if (!val.disabled) {
that.radio = val.coupCardId;
that.currentRow = val;
}
},
// 页码变化
......@@ -245,6 +247,8 @@
if (!!ele.endDate) {
ele.endDate = that.formatDate(ele.endDate,'.')
}
console.log(ele)
ele.disabled = that.disabledList.indexOf(ele.coupCardId) >= 0;
})
that.cardData = resData.result.result
}
......@@ -281,26 +285,19 @@
let d = myDate.getDate();
return y + flag + formatDig(m) + flag + formatDig(d) + flag
}
},
watch: {
showCardDialog: function(newData,oldData){
var that = this;
console.log("新数据:",newData,oldData)
that.setNewData(newData)
showCardDialog(newData,oldData){
this.setNewData(newData)
},
projectName: function(newData,oldData){
var that = this;
// console.log("新数据:",newData,oldData)
that.repProjectName = newData || 'gic-web';
projectName(newData,oldData){
this.repProjectName = newData || 'gic-web';
},
cardLimit: function(newData,oldData){
var that = this;
that.cardLimitType = newData;
cardLimit(newData,oldData){
this.cardLimitType = newData;
},
cardType: function(newData,oldData){
var that = this;
that.cardTypes = newData;
cardType(newData,oldData){
this.cardTypes = newData;
},
},
......@@ -319,8 +316,7 @@
that.setNewData(that.showCardDialog)
},
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment