Merge pull request #113 from Tencent/omi-ts-support-png
Add png support for omi-ts template
This commit is contained in:
commit
cb9ee30aa4
|
@ -0,0 +1,7 @@
|
|||
declare module '*.svg'
|
||||
declare module '*.png'
|
||||
declare module '*.jpg'
|
||||
declare module '*.jpeg'
|
||||
declare module '*.gif'
|
||||
declare module '*.bmp'
|
||||
declare module '*.tiff'
|
|
@ -1,6 +1,8 @@
|
|||
import { tag, WeElement, render, h } from 'omi'
|
||||
import './hello-omi';
|
||||
|
||||
import * as logo from './omi.png';
|
||||
|
||||
interface AbcEvent extends Event {
|
||||
detail: {
|
||||
name: string;
|
||||
|
@ -47,6 +49,7 @@ class MyApp extends WeElement<MyAppProps, MyAppData> {
|
|||
render() {
|
||||
return (
|
||||
<div>
|
||||
<img src={logo} />
|
||||
Hello {this.props.name} {this.data.abc}
|
||||
<hello-omi onAbc={this.onAbc} prop-from-parent={this.data.passToChild} msg="Omi"></hello-omi>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue