vue 프로젝트 에 H5+사용
1340 단어 vue
npm i vue-awesome-mui
main.js 파일 에 도입
import Mui from 'vue-awesome-mui';
Vue.use(Mui);
H5Plus 가 필요 한 곳 은 먼저:
methods:{
// API
plusReady () {
var ws = plus.webview.currentWebview(); //pw plus.webview
},
}
created () {
// API , “plusready"
if (window.plus) {
this.plusReady()
} else {
document.addEventListener('plusready', this.plusReady, false) //
}
}
예 를 들 어 프로젝트 에서 사진 을 찍 는 방법 을 사용 해 야 한다.
getImage() {
let cmr = plus.camera.getCamera(); //
let res = cmr.supportedImageResolutions[0]; // ,
let fmt = cmr.supportedImageFormats[0]; // ,
console.log("Resolution :" + res + ", Format: " + fmt);
cmr.captureImage(
path => {
alert(" : " + path);
},
error => {
//
alert(" : " + error.message);
},
{ resolution: res, format: fmt } //
);
}
포장 하 다.
npm run build
컴퓨터 운행
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Fastapi websocket 및 vue 3(Composition API)1부: FastAPI virtualenv 만들기(선택 사항) FastAPI 및 필요한 모든 것을 다음과 같이 설치하십시오. 생성main.py 파일 및 실행 - 브라우저에서 이 링크 열기http://127.0.0.1:...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.