| | |
| | | </p> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import ElCheckboxGroup from 'element-ui/packages/checkbox-group'; |
| | | import ElCheckbox from 'element-ui/packages/checkbox'; |
| | |
| | | computed: { |
| | | filteredData() { |
| | | return this.data.filter(item => { |
| | | console.log(item) |
| | | if (typeof this.filterMethod === 'function') { |
| | | return this.filterMethod(this.query, item); |
| | | } else { |
| | |
| | | |
| | | methods: { |
| | | updateAllChecked() { |
| | | |
| | | |
| | | const checkableDataKeys = this.checkableData.map(item => item[this.keyProp]); |
| | | |
| | | |
| | | this.allChecked = checkableDataKeys.length > 0 && |
| | | checkableDataKeys.every(item => this.checked===item); |
| | | }, |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | |