- 在入口文件(app.js)引入全局 css (
:global(.xxx){...}
),.xxx
不会被解析成 hash,可以在组件中className="xxx"
使用 - 本地css在组件(demo.js)中引入局部 css (
.yyy{...}
) ,在组件中styleName="yyy" 使用
common.css: global-style
:global(.xxx) {
...
一篇讨论 webpack 和 rollup 的文章 https://medium.com/webpack/webpack-and-rollup-the-same-but-different-a41ad427058c
pkg.module 也很重要
Main.ts
var music = new Music;
this.addChild(music)
this.once(egret.TouchEvent.TOUCH_BEGIN,function(){
music.stop();
music.play();
},this)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main extends egret.DisplayObjectContainer { | |
private loadingView: LoadingUI; | |
static stageWidth: number; | |
static stageHeight: number; | |
public constructor() { | |
super(); | |
NewerOlder