Viewer
npm install capacitor-plugin-hanwha-viewer
npx cap sync
import { Viewer } from 'capacitor-plugin-hanwha-viewer';
let file = [
{ key: '1', ext: 'pdf', name: '첨부파일예제.pdf', url: 'https://naver.com' },
{ key: '2', ext: 'pdf', name: '첨부파일예제2.pdf', url: 'https://daum.net' },
{ key: '3', ext: 'doc', name: '첨부파일예제3.doc', url: 'https://nate.com' },
];
await Viewer.load({ items: JSON.stringify(file), token: '토큰 값' });
load(options: { items: string; token?: string; }) => Promise<{ value: string; }>
Param | Type | Description |
---|---|---|
options |
{ items: string; token?: string; } |
items : "{ key: (index), ext: (확장자), name: (파일명), url: (파일주소) }" (optional)token : accessToken값 |
Returns: Promise<{ value: string; }>