| 123456789101112131415161718192021222324252627282930 |
- const pidMixin = {
- props: {
- pid: {
- type: Number,
- required: true,
- validator: prop => typeof prop === 'number' || prop === null
- },
- }
- }
-
- const cardMixin = {
- data: () => ({
- cards: [],
- loading: true,
- }),
- watch: {
- /** Fetch the queue if pid changes */
- pid() { this.getCards() },
- },
- async created() {
- await this.getCards()
- },
- methods: {
- _reformat(data, mapCb) {
- return data.map(mapCb)
- }
- }
- }
-
- export { pidMixin, cardMixin }
|