# 一些网页 **Repository Path**: cosonwei/some-web-pages ## Basic Information - **Project Name**: 一些网页 - **Description**: 学习一下全景图的在网页中的使用以及一些画面跳转 - **Primary Language**: HTML - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-09-27 - **Last Updated**: 2024-03-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vue3.0版本 photo-sphere-viewer使用 核心代码 ```vue import { Viewer } from 'photo-sphere-viewer' import 'photo-sphere-viewer/dist/photo-sphere-viewer.css' psViewer.value = new Viewer({ container: document.querySelector('#viewer'), panorama: imageRef.value.src }) } ``` # 注意: panorama 需要使用的图片地址. 1) 静态图片 使用 require('...文件路径') 2) 外链图片 通过外链地址, 转canvas 读取 base64, 放入到img.src中, 然后在onload时, 调用new Viewer(), panorama 指向元素的src ## Project setup ``` yarn install ``` ### Compiles and hot-reloads for development ``` yarn serve ``` ### Compiles and minifies for production ``` yarn build ``` ### Lints and fixes files ``` yarn lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).