wepy 框架引入 vant-weapp UI 框架,其他框架類似


	// npm 安裝 vant-weapp | git clone 源碼包
	npm install vant-weapp -S

	// 將 vant-weapp/dist 複製到 components
	cp -r node_modules/vant-weapp/dist src/components/vant-weapp

	// 在頁面配置中引用
	config = {
		usingComponents: {
			'van-button': '../components/vant-weapp/button/index'
		}
	};

	// 模板中使用
	<van-button type="default">按鈕</van-botton>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章