【发布时间】:2016-07-22 06:09:34
【问题描述】:
我正在尝试使用 click.tigger() 将模板的模式更改为可编辑。问题是我在这个模板中有一个图片库,我不想让 click.trigger 触发。
app.js:
<div click.trigger="enableEdit()">
<response containerless></response>
</div>
response.html:
<template>
<div>
...
<gallery></gallery> <-- I want this to still be able to fire
<button click.trigger="save()">save</button> <-- I want this to work as well but they wont with "enableEdit()" above attached.
</div>
</template>
图库.js:
attached() {
const carousel = new Flickity(this.gallery, {
cellAlign: 'left',
contain: true,
lazyLoad: true,
});
}
一旦我单击触发器,它就会起作用并启用编辑。该画廊正在使用一个名为 Flickity 的插件。上面我展示了我是如何实例化它的。
【问题讨论】:
标签: javascript aurelia