
现在在我之前的项目中应用:
indeterminate 属性用以表示 checkbox 的不确定状态,一般用于实现全选的效果
(这里就是为什么上图每次点击全选按钮时候需要置为false、false即为全选按钮置为下图样式):
然后就能实现全选按钮了:
这里参考element官方文档即可实现,主要需要调整一下数据的格式即可。
vue安卓手机下载文件需要在页面上添加下载插件按钮。具体 *** 作方法如下:1、将插件exe文件放在前端代码目录public下;
2、在页面中添加按钮;
3、点击按钮的实现方法即可。
<template>
<div v-viewer="{'toolbar': true,'navbar': false, 'title': false}"
class="images clearfix"
@ready="readys"
@shown="shown">
<slot></slot>
</div>
</template>
<script>
export default {
name: "Preview",
data() {
return {}
},
mounted() {
this.$nextTick(() => {
})
},
methods: {
readys() {
var toolbar = this.jquery(this.$el.viewer.viewer).find(".viewer-toolbar")
var downLoadEle = this.jquery('<li role="button" class="downLoadImg" data-viewer-action="downLoadImg" style="display: flexalign-items: centerjustify-content: center"><i style="color: whitefont-size: 14px" class="iconfont icontupiandanchuang-xiazaitubiao1"></i></li>')
if (toolbar.find("downLoadImg").length != 0) {
return
}
toolbar.find("ul").append(downLoadEle)
},
shown() {
var self = this
this.jquery(".downLoadImg").off().on("click", function() {
location.href = self.jquery(".viewer-canvas img").attr("src")
})
}
}
}
</script>
<style scoped>
</style>
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)