我正在用riot.js开发我的应用程序,我想使用dropzone(http://www.dropzonejs.com/)。
在我的代码中:
下面的index.html,
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<app></app>
<script src="dist/scripts/bundle.js"></script>
</body>
</html>
&#13;
下面的app.tag,
var route = require('riot-route'); require("dropzone"); require('./main/home.tag'); require('./main/contents1.tag');
<app>
<main>
<contents></contents>
</main>
<script>
route(function(tagName) {
tagName = tagName || 'home'
riot.mount('contents', tagName)
})
route.start(true)
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.3.0/min/dropzone.min.css" />
</app>
&#13;
下面的home.tag,
<home>
<div class="search-box"></div>
</home>
&#13;
然后,我将<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
添加到这样的app.tag中,它运作正常。
<contents></contents>
<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
&#13;
但是,我把它添加到home.tag中就像这样,
<home>
<div class="search-box"></div>
<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
</home>
&#13;
它没有用。谁能帮我??
答案 0 :(得分:1)
尝试在安装标签时更新DropZone,使用on('mount',或者也可以尝试on('updated',
Select t.*
From t
Where t.price = (select min(t2.price) from t t2 where t2.artickeid = t.articleid)