From 6cea4063fcc76db46cac5def1e4aeb8b811bdca5 Mon Sep 17 00:00:00 2001 From: alan Date: Tue, 28 May 2019 11:50:53 +0800 Subject: [PATCH] refactor: update --- src/app/connection/more/item/more_link_item.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/connection/more/item/more_link_item.ts b/src/app/connection/more/item/more_link_item.ts index c609f1e..11b772d 100644 --- a/src/app/connection/more/item/more_link_item.ts +++ b/src/app/connection/more/item/more_link_item.ts @@ -25,11 +25,9 @@ const Widget: WidgetType = { type: Img, width: 120, height: 90, - src: `img/${name}.jpg`, + src: this._buildResourceUrl(name), }, { type: Absolute, - left: 90, - top: -90, items: [ { el: { @@ -42,6 +40,8 @@ const Widget: WidgetType = { this.selected = _ref; }, }, + left: 90, + top: -90, }, ], }, { @@ -53,6 +53,10 @@ const Widget: WidgetType = { ], }; }, + _buildResourceUrl(name: string) { + // TODO: 目前不知道生产环境下的图片的绝对地址,先这样写用于测试。 + return `img/${name}.jpg`; + }, }; BI.shortcut(className, BI.inherit(BI.BasicButton, Widget)); export default className;