12345678910111213141516171819202122232425262728293031 |
- <template>
- <view class="pdf-view"> <view id="demo"></view> </view>
- </template>
- <script>
- export default {
- data() {
- return {
- pdfh5: null,
- pdfurl: '',
- title: ''
- }
- },
- onLoad(option) {
- console.log(option)
- this.pdfurl = 'http://localhost:8009/document/pdfdetails.html?type=1src=' + option.url
- this.title = option.title || ''
- uni.setNavigationBarTitle({
- title: this.title
- })
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "pdfh5/css/pdfh5.css";
- .pdf-view {
- width: 100%;
- height: 100vh;
- }
- </style>
|