mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-30 21:01:04 +00:00
@@ -65,8 +65,8 @@ export const Identicon = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createData: function (): void {
|
||||
this.iconSize = this.size || DEFAULT_SIZE;
|
||||
this.type = this.theme;
|
||||
this.iconSize = this.size as number || DEFAULT_SIZE;
|
||||
this.type = this.theme as 'empty';
|
||||
|
||||
this.recodeAddress();
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export const Jdenticon = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
this.svgHtml = jdenticon.toSvg(this.publicKey.substr(2), this.size);
|
||||
this.svgHtml = jdenticon.toSvg((this.publicKey as string).substr(2), this.size);
|
||||
}
|
||||
},
|
||||
props: ['publicKey', 'size'],
|
||||
|
||||
@@ -9,6 +9,11 @@ interface Data {
|
||||
svgHtml: string;
|
||||
}
|
||||
|
||||
interface This {
|
||||
address: string;
|
||||
isAlternative?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Polkadot
|
||||
* @description The Polkadot default identicon
|
||||
@@ -25,11 +30,11 @@ export const Polkadot = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
const circles = polkadotIcon(this.address, { isAlternative: this.isAlternative || false }).map(({ cx, cy, fill, r }) =>
|
||||
const circles = polkadotIcon(this.address, { isAlternative: (this as This).isAlternative || false }).map(({ cx, cy, fill, r }) =>
|
||||
`<circle cx=${cx} cy=${cy} fill="${fill}" r=${r} />`
|
||||
).join('');
|
||||
|
||||
this.svgHtml = `<svg height=${this.size} viewBox='0 0 64 64' width=${this.size}>${circles}</svg>`;
|
||||
this.svgHtml = `<svg height=${this.size as number} viewBox='0 0 64 64' width=${this.size as number}>${circles}</svg>`;
|
||||
}
|
||||
},
|
||||
props: ['address', 'isAlternative', 'size'],
|
||||
|
||||
Reference in New Issue
Block a user