Skip to content

Commit

Permalink
chore(ix-source): re-introduce vue-class-comp use
Browse files Browse the repository at this point in the history
  • Loading branch information
luqven committed Apr 20, 2021
1 parent 244c540 commit 14d0ea0
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/plugins/vue-imgix/ix-source.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import { ensureVueImgixClientSingleton, IVueImgixClient } from './vue-imgix';
import {defineComponent, h } from 'vue';

const IxSourceProps = defineComponent({
props: {
src: {
type: String,
required: true,
},
imgixParams: Object,
attributeConfig: Object,
},
});
import { h } from 'vue';
import { Vue, prop } from 'vue-class-component';

class Props {
src = prop({
type: String,
required: true,
});
imgixParams = prop({ type: Object });
attributeConfig = prop({ type: Object });
}

const defaultAttributeMap = {
src: 'src',
srcset: 'srcset',
};

export class IxSource extends IxSourceProps {
export class IxSource extends Vue.with(Props) {
// Using !: here because we ensure it is set in created()
private vueImgixSingleton!: IVueImgixClient;

Expand Down

0 comments on commit 14d0ea0

Please sign in to comment.