随笔分类 - vue.js
1
摘要:新建hooks.ts import { ref, onMounted } from 'vue' export default function useRooks() { const list = ref<any>([]) const showShare = ref<boolean>(false) c
阅读全文
摘要:<template> <div class="overall"> <div class="zp-box"> <div class="panzi" :style="{transition:'transform ' + time / 1000 + 's ease',transform:'rotate('
阅读全文
摘要:这是需要在src目录下新增一个static文件夹即可
阅读全文
摘要::style="{height: partOneHeight + 'px',paddingBottom: 10 + 'px'}"
阅读全文
摘要:this.$watch this.$watch('value.series', (n, o) => { this.init();}) watch watch:{ value(n, o) {// debugger } },
阅读全文
摘要:///组件生命周期 挂载到html文档中//this.$watch可以下载mounted和update这种但是不能在methods中 mounted () { this.$watch('value.show',newValue=>{ if (newValue){ this.value.formDat
阅读全文
摘要:beforeCreate(创建前) created(创建后) beforeMount(载入前) mounted(载入后) beforeUpdate(更新前) updated(更新后) beforeDestroy(销毁前) destroyed(销毁后) computed:{/****实现某一属性的实时
阅读全文
摘要:Promise.all([this.$Request.get('api/voteRecord/list',params), this.$Request.get('api/voteMember/list',params)]).then(res=>{ if (res && res[0].code==0
阅读全文
摘要:将回调延迟到下次 DOM 更新循环之后执行。在修改数据之后立即使用它,然后等待 DOM 更新。它跟全局方法 Vue.nextTick 一样,不同的是回调的 this 自动绑定到调用它的实例上。this.$nextTick(()=>{ this.$refs.table.refresh();});例如通
阅读全文
摘要:data中的参数变化 data{ name:'', }
阅读全文
摘要:return{ expandTable:{}, } getOrgTree () { this.$Request.get('api/groups/tree', {}).then(res => { console.log(res); if (res && res.code 0) { if (Array.
阅读全文
摘要:mapTree (org) { const haveChildren = Array.isArray(org.children) && org.children.length > 0; return { //分别将我们查询出来的值做出改变他的key title: org.groupName, lab
阅读全文
摘要:<Table style="margin-top: 16px;" stripe border :columns="fundcols" :data="dataMsg" size="small"></Table> stripe隔行变色
阅读全文
摘要:将数据以XLSX的形式导出需要安装XLSX.js文件 npm install xlsx --save exportData(){ let table='考勤查看'; let page=1; let rows=this.totals; let exportTableCellColumn={ xuhao
阅读全文
摘要:子组件<button @click='increment()'>点击</button> increment:function(){ this.mycontent=10; alert(this.mycontent); this.$emit("increment",this.mycontent);}父组
阅读全文
摘要:父组件<componentA> <p>123</p></componentA>子组件 <template> <div> {{boonook}} <button @click ="emitMyEvent">emit</button> <slot></slot> </div></template>插槽里
阅读全文
摘要:main.js中的要改成这样 在logo.vue页面
阅读全文
1

浙公网安备 33010602011771号