![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
caffreygo
这个作者很懒,什么都没留下…
展开
-
tinymce5的图片上传实现
在vue created中初始化 tinymce.init({ selector: '#tinymce-editor', language_url: "/tinymce/zh_CN.js", language: "zh_CN", height: 400, toolbar: "formatselect fontselect | bold italic ...原创 2020-03-13 11:01:02 · 1851 阅读 · 0 评论 -
vue获取DOM元素,触发事件
HTML元素:如果元素是一个原生的HTML元素,通过绑定ref="selector"通过this.$refs['selector'].click() 触发组件:如果元素是一个组件,通过绑定ref="selector"需要通过this.$refs['selector'].$el.click() 触发...原创 2020-02-20 10:44:05 · 2626 阅读 · 0 评论 -
vue实现环形百分比进度条组件
参考网上的一些环形百分比进度展示,加了一些拓展属性~下面为两个调用的实例效果~icon组件为另外封装的,可自行删除修改组件调用<radial-indicator percentNum="87" speed="3" size="155" color="#8abf50" @animationFinished="animationFi...原创 2019-09-20 18:27:09 · 4703 阅读 · 0 评论 -
vue axios发送formData数据格式的设置
this.$ajax({ method: 'post', headers:{ 'Content-Type': 'application/x-www-form-urlencoded' ...原创 2019-08-21 15:23:00 · 1165 阅读 · 0 评论 -
vue作用域插槽slot-scope
一个简单的例子:父组件仅仅是调用了子组件 子组件内部实现了一个todolist列表整个数据传递的流程:1.父组件传递了todos数组给子组件 2.子组件通过props接受了数组数据,这里应该没有任何问题 3.子组件拿到数组后v-for渲染列表,并且通过 <slot :todo="todo">的方式,把数组内的每一个todo对象,传递给父组件 4.父组件通过slot-s...转载 2019-03-26 16:58:32 · 661 阅读 · 0 评论 -
vue中组件非prop接收数据时的特性自定义绑定
非 Prop 的特性一个非 prop 特性是指传向一个组件,但是该组件并没有相应 prop 定义的特性。 特性就会自动添加到根元素上对于绝大多数特性来说,从外部提供给组件的值会替换掉组件内部设置好的值。所以如果传入type="text"就会替换掉type="date"并把它破坏!class和style特性会稍微智能一些,即两边的值会被合并起来,从而得...原创 2019-03-25 14:01:49 · 348 阅读 · 0 评论 -
watch监听$store状态的两种方法(对象
computed: mapState({ socket: state => state.ws.socket }),watch: {socket: { handler: function(val) { if (this.$store.state.ws.socket.message.state === 'success') { ...原创 2019-01-24 11:29:39 · 10974 阅读 · 0 评论 -
vue页面引入Axios插件post数据
methods: { handleSubmit(index, row) { this.$refs['ruleForm'].validate((valid) => { if (valid) { const form = { login: row.login, realname: row.r...原创 2019-01-08 16:50:15 · 372 阅读 · 0 评论 -
vue监听url变化清空vuex中的数据
created() { if (sessionStorage.getItem('store')) { this.$store.replaceState({ ...this.$store.state, ...JSON.parse(sessionStorage.getItem('store')) }) } windo...原创 2019-01-05 13:54:13 · 1382 阅读 · 0 评论 -
element ui在table中放入input且实现验证
<template> <div class="app-container" style="overflow: auto;"> <el-table :data="list" size="small" element-loading-text="Loading" border highlight-c...原创 2018-12-29 12:47:16 · 19196 阅读 · 3 评论