在meteor 项目中引用openseadragon报错?

挑战
  • 575

openseadragon-imaginghelper.js:778 Uncaught ReferenceError: OpenSeadragon is not defined

at openseadragon-imaginghelper.js:778

(anonymous) @ openseadragon-imaginghelper.js:778
openseadragon-paperjs-overlay.js:6 [openseadragon-canvas-overlay] requires OpenSeadragon
(anonymous) @ openseadragon-paperjs-overlay.js:6
(anonymous) @ openseadragon-paperjs-overlay.js:92
openseadragon-scalebar.js:560 Uncaught ReferenceError: OpenSeadragon is not defined

at openseadragon-scalebar.js:560

(anonymous) @ openseadragon-scalebar.js:560
app.js?hash=95788c3fac9ea2bbb1d811a3b71e9ab2c0b03900:501 0000 {ybl_20180625_13979.kfb: {…}, ybl_20180625_13978.kfb: {…}, __ob__: Observer}
modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:51401 [Vue warn]: Error in mounted hook (Promise/async): "ReferenceError: OpenSeadragon is not defined"

found in

---> <Mains>

   <ElMain> at packages/main/src/main.vue
     <ElContainer> at packages/container/src/main.vue
       <Layout>
         <Root>

warn @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:51401
logError @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52660
globalHandleError @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52655
handleError @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52615
(anonymous) @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52632
(anonymous) @ meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1234
Promise.then (async)
Promise.then @ promise.js?hash=0bbd44021409d2a1858ff0fd3fd612863bf2cb96:132
invokeWithErrorHandling @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52632
callHook @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:54981
insert @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:53913
invokeInsertHook @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:57100
patch @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:57317
Vue._update @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:54707
updateComponent @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:54828
get @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:55239
Watcher @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:55228
mountComponent @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:54835
Vue.$mount @ modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:59166
(anonymous) @ app.js?hash=95788c3fac9ea2bbb1d811a3b71e9ab2c0b03900:182
maybeReady @ meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:938
loadingCompleted @ meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:950
modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:52664 ReferenceError: OpenSeadragon is not defined

at VueComponent._callee$ (app.js?hash=95788c3fac9ea2bbb1d811a3b71e9ab2c0b03900:600)
at tryCatch (modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68131)
at Generator.invoke [as _invoke] (modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68357)
at Generator.prototype.(:3000/anonymous function) [as next] (http://localhost:3000/packages/modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68183:21)
at tryCatch (modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68131)
at invoke (modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68221)
at modules.js?hash=3c70c89f419f78865b7c1fc0d666558354ae28db:68231
at meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1234

引用方式在client/main.html

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
          integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
    <link href="/static/libs/annotation/colorpicker.css" rel="stylesheet" type="text/css"/>
    <link href="/static/libs/annotation/bootstrap-switch.css" rel="stylesheet" type="text/css"/>
    <link href="/static/libs/annotation/digitalslidearchive.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/main.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
          integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
</head>
<body>
<div id="app"></div>
<script src="/libs/openseadragon/openseadragon.js"></script>
<script src="/libs/openseadragon-imaginghelper.js"></script>
<script src="/libs/jquery-3.3.1.js"></script>
<script src="/libs/jquery-ui-1.12.1/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js"
        integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em"
        crossorigin="anonymous"></script>
<script src="/libs/openseadragon-paperjs-overlay.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.9.25/paper-full.js"></script>
<script src="/libs/openseadragon-scalebar.js"></script>
<script src="/libs/canvas2image.js"></script>
<script src="/libs/base64.js"></script>
</body>
回复
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏