第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

老師,我這里是什么錯,跟視頻來的

http://img1.sycdn.imooc.com//60190c630001ac8112690728.jpg

const?path?=?require("path");

const?HtmlWebpackPlugin?=?require("html-webpack-plugin");

const?{?CleanWebpackPlugin?}?=?require("clean-webpack-plugin");

module.exports?=?{

??entry:?"./src/main.ts",

??output:?{

????path:?path.resolve(__dirname,?"dist"),

????filename:?"main.js",

??},

??devServer:?{

????contentBase:?"/dist",

????open:?true,

??},

??resolve:?{

????extensions:?[".ts",?".js",?".json"],

??},

??module:?{

????rules:?[

??????{

????????test:?/\.css$/,

????????use:?["style-loader",?"css-loader"],

????????exclude:?[path.resolve(__dirname,?"src/components")],

??????},

??????{

????????test:?/\.css$/,

????????use:?[

??????????"style-loader",

??????????{

????????????loader:?"css-loader",

????????????options:?{

??????????????modules:?true,

????????????},

??????????},

????????],

????????exclude:?[path.resolve(__dirname,?"src/components")],

??????},

??????{

????????test:?/\.(eot|woff2|woff|ttf|svg)$/,

????????use:?["file-loader"],

??????},

??????{

????????test:?/\.ts$/,

????????use:?["ts-loader"],

????????exclude:?/node_modules/,

??????},

????],

??},

??plugins:?[

????new?HtmlWebpackPlugin({

??????template:?"./src/index.html",

????}),

????new?CleanWebpackPlugin(),

??],

??mode:?"development",

};


----------------------------------------


import?'./popup.css';?//?全局css操作

//?let?styles?=?require('./popup.css');

//?用interface來定義接口

//?組件配置接口?主要規(guī)范和約束業(yè)務(wù)開發(fā)人員的

interface?Ipopup?{

???width?:?string;

???height?:?string;

???title?:?string;

???pos?:?string;

???mask?:?boolean;

???content?:?()?=>?void;

}


//?組件的接口?規(guī)范開發(fā)人員要按照統(tǒng)一的模式去做

interface?Icomponent?{

???tempContainer:?HTMLElement;

???init:?()?=>?void;

???template:?()?=>?void;

???handle:?()?=>?void;

}

function?popup(options:?Ipopup)?{

???return?new?Popup(options);

}

class?Popup?implements?Icomponent?{

???tempContainer;

???constructor(private?settings:?Ipopup)?{

??????this.settings?=?Object.assign({

?????????width:?'100%',

?????????height:?'100%',

?????????title:?'',

?????????pos:?'center',

?????????mask:?true,

?????????content:?function?()?{?}

??????},?this.settings)

??????this.init()

???}

???//?初始化

???init()?{

??????this.template()

???}

???//?創(chuàng)建模板

???template()?{

??????this.tempContainer?=?document.createElement('div')

??????this.tempContainer.innerHTML?=?`

?????????<h1>hello</h1>

??????`

??????document.body.appendChild(this.tempContainer)

???}

???//?事件操作

???handle()?{?}

}

export?default?popup


正在回答

1 回答

?{

????????test:?/\.css$/,

????????use:?[

??????????"style-loader",

??????????{

????????????loader:?"css-loader",

????????????options:?{

??????????????modules:?true,

????????????},

??????????},

????????],

????????include:?[path.resolve(__dirname,?"src/components")],

??????},

注意include 和 exclude的區(qū)別


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

老師,我這里是什么錯,跟視頻來的

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號