diff --git a/src/web/app/common/define-widget.ts b/src/web/app/common/define-widget.ts index 9aed5a8902..5102ee1abf 100644 --- a/src/web/app/common/define-widget.ts +++ b/src/web/app/common/define-widget.ts @@ -1,8 +1,8 @@ import Vue from 'vue'; -export default function(data: { +export default function(data: { name: string; - props: any; + props: T; }) { return Vue.extend({ props: { @@ -10,7 +10,7 @@ export default function(data: { type: String, required: true }, - place: { + wplace: { type: String, required: true }, @@ -42,8 +42,10 @@ export default function(data: { }, created() { if (this.props) { - Object.keys(this.wprops).forEach(prop => { - this.props[prop] = this.props.data.hasOwnProperty(prop) ? this.props.data[prop] : this.props[prop]; + Object.keys(this.props).forEach(prop => { + if (this.wprops.hasOwnProperty(prop)) { + this.props[prop] = this.wprops[prop]; + } }); } } diff --git a/src/web/app/common/views/components/widgets/profile.vue b/src/web/app/common/views/components/widgets/profile.vue index 4a22d2391b..1fb756333f 100644 --- a/src/web/app/common/views/components/widgets/profile.vue +++ b/src/web/app/common/views/components/widgets/profile.vue @@ -1,5 +1,125 @@ + + + + diff --git a/src/web/app/desktop/-tags/home-widgets/profile.tag b/src/web/app/desktop/-tags/home-widgets/profile.tag deleted file mode 100644 index 02a1f0d5a3..0000000000 --- a/src/web/app/desktop/-tags/home-widgets/profile.tag +++ /dev/null @@ -1,116 +0,0 @@ - - - avatar - { I.name } -

@{ I.username }

- - -