随笔分类 -  vue.js

1
摘要:新建hooks.ts import { ref, onMounted } from 'vue' export default function useRooks() { const list = ref<any>([]) const showShare = ref<boolean>(false) c 阅读全文
posted @ 2021-08-05 10:43 一叶*秋 阅读(578) 评论(0) 推荐(0)
摘要:<template> <div class="overall"> <div class="zp-box"> <div class="panzi" :style="{transition:'transform ' + time / 1000 + 's ease',transform:'rotate(' 阅读全文
posted @ 2021-08-05 10:04 一叶*秋 阅读(386) 评论(0) 推荐(0)
摘要:这是需要在src目录下新增一个static文件夹即可 阅读全文
posted @ 2019-02-26 16:33 一叶*秋 阅读(940) 评论(0) 推荐(0)
摘要::style="{height: partOneHeight + 'px',paddingBottom: 10 + 'px'}" 阅读全文
posted @ 2019-02-19 16:00 一叶*秋 阅读(1053) 评论(0) 推荐(0)
摘要:this.$watch this.$watch('value.series', (n, o) => { this.init();}) watch watch:{ value(n, o) {// debugger } }, 阅读全文
posted @ 2019-01-30 10:03 一叶*秋 阅读(4798) 评论(0) 推荐(0)
摘要:强制表单更新 阅读全文
posted @ 2018-10-10 08:47 一叶*秋 阅读(2019) 评论(0) 推荐(0)
摘要:///组件生命周期 挂载到html文档中//this.$watch可以下载mounted和update这种但是不能在methods中 mounted () { this.$watch('value.show',newValue=>{ if (newValue){ this.value.formDat 阅读全文
posted @ 2018-09-26 16:40 一叶*秋 阅读(2489) 评论(0) 推荐(0)
摘要:beforeCreate(创建前) created(创建后) beforeMount(载入前) mounted(载入后) beforeUpdate(更新前) updated(更新后) beforeDestroy(销毁前) destroyed(销毁后) computed:{/****实现某一属性的实时 阅读全文
posted @ 2018-09-26 16:24 一叶*秋 阅读(161) 评论(0) 推荐(0)
摘要:Promise.all([this.$Request.get('api/voteRecord/list',params), this.$Request.get('api/voteMember/list',params)]).then(res=>{ if (res && res[0].code==0 阅读全文
posted @ 2018-09-06 17:19 一叶*秋 阅读(884) 评论(0) 推荐(0)
摘要:将回调延迟到下次 DOM 更新循环之后执行。在修改数据之后立即使用它,然后等待 DOM 更新。它跟全局方法 Vue.nextTick 一样,不同的是回调的 this 自动绑定到调用它的实例上。this.$nextTick(()=>{ this.$refs.table.refresh();});例如通 阅读全文
posted @ 2018-08-08 15:50 一叶*秋 阅读(2782) 评论(0) 推荐(0)
摘要:data中的参数变化 data{ name:'', } 阅读全文
posted @ 2018-08-02 16:31 一叶*秋 阅读(2637) 评论(0) 推荐(0)
摘要:return{ expandTable:{}, } getOrgTree () { this.$Request.get('api/groups/tree', {}).then(res => { console.log(res); if (res && res.code 0) { if (Array. 阅读全文
posted @ 2018-07-23 17:43 一叶*秋 阅读(2452) 评论(1) 推荐(0)
摘要:mapTree (org) { const haveChildren = Array.isArray(org.children) && org.children.length > 0; return { //分别将我们查询出来的值做出改变他的key title: org.groupName, lab 阅读全文
posted @ 2018-07-23 10:27 一叶*秋 阅读(5560) 评论(0) 推荐(0)
摘要:<Table style="margin-top: 16px;" stripe border :columns="fundcols" :data="dataMsg" size="small"></Table> stripe隔行变色 阅读全文
posted @ 2018-07-13 11:19 一叶*秋 阅读(1638) 评论(0) 推荐(0)
摘要:将数据以XLSX的形式导出需要安装XLSX.js文件 npm install xlsx --save exportData(){ let table='考勤查看'; let page=1; let rows=this.totals; let exportTableCellColumn={ xuhao 阅读全文
posted @ 2018-07-13 10:27 一叶*秋 阅读(733) 评论(0) 推荐(0)
摘要:vue 去除输入框首位的空格 阅读全文
posted @ 2018-06-26 12:47 一叶*秋 阅读(2497) 评论(0) 推荐(0)
摘要:1.父组件 阅读全文
posted @ 2018-05-11 14:58 一叶*秋 阅读(169) 评论(0) 推荐(0)
摘要:子组件<button @click='increment()'>点击</button> increment:function(){ this.mycontent=10; alert(this.mycontent); this.$emit("increment",this.mycontent);}父组 阅读全文
posted @ 2018-05-09 15:31 一叶*秋 阅读(2940) 评论(0) 推荐(0)
摘要:父组件<componentA> <p>123</p></componentA>子组件 <template> <div> {{boonook}} <button @click ="emitMyEvent">emit</button> <slot></slot> </div></template>插槽里 阅读全文
posted @ 2018-05-02 19:42 一叶*秋 阅读(322) 评论(0) 推荐(0)
摘要:main.js中的要改成这样 在logo.vue页面 阅读全文
posted @ 2018-04-26 08:35 一叶*秋 阅读(6568) 评论(0) 推荐(0)

1

博客侧边栏公告广告位招租