微信小程式開發 工具 npm 使用

2021-09-28 22:31:54 字數 919 閱讀 5765

具體步驟如下:

1、npm init

這裡會產生 package.json 的配置檔案

2、npm install ** --p --s

安裝需要的包,這裡會產生 node_modules

5、使用包

引入的元件可以有第三方元件和 js 工具

1、 按照步驟安裝庫同時走一遍 「工具」 -> 「構建 npm」,產生\miniprogram_npm\weui-miniprogra

npm install weui-miniprogram --p --s

@import

"./miniprogram_npm/weui-miniprogram/weui-wxss/dist/style/weui.wxss"

;

3、在需要使用的頁面中引入控制項和使用,

譬如 pages/index/index.json,然後就可以在 index.wxml

}

1、 按照步驟安裝庫同時走一遍 「工具」 -> 「構建 npm」,產生\miniprogram_npm\js-base64

npm install js-base64 --p --s

2、在 *.js 檔案中用 require 或者 import 引入,然後使用

import

from

'js-base64'

let=

require

('js-base64'

)console.

log(base64)

;console.

log(base64_2)

;

微信小程式 開發工具 快捷鍵

導航元素 展開 摺疊 enter 編輯屬性 h 隱藏元素 增量值 衰減值 pageup shift 增量10 pagedown shift 減量10 shift pageup 增量100 shift pagedown 減量100 alt 增量0.1 alt 減量0.1 ctrl l 清除控制台 ta...

微信小程式開發工具 常用快捷鍵

ctrl s 儲存檔案 ctrl ctrl 行縮排 ctrl shift ctrl shift 摺疊開啟 塊 ctrl c ctrl v 複製貼上,如果沒有選中任何文字則複製貼上一行 shift alt f 格式化 alt up,alt down 上下移動一行 shift alt up,shift ...

微信小程式開發工具中快捷鍵

現在總結一下小程式開發工具常用的一些快捷鍵 格式調整 ctrl s 儲存檔案 ctrl ctrl 行縮排 ctrl shift ctrl shift 摺疊開啟 塊 ctrl c ctrl v 複製貼上,如果沒有選中任何文字則複製貼上一行 shift alt f 格式化 alt up,alt down...