- 博客(60)
- 资源 (6)
- 收藏
- 关注
转载 在子组件中使用mescroll插件中的mescroll-body(uniapp)
子组件中,首先在script标签中import引入,并在mixins中使用该混入,然后在template中的列表数据外包裹mescrol-body标签,其他的downOption、upOption等可根据需要自行配置。父页面中,首先在script标签中import引入,并在mixins中使用该混入,然后在template中的子组件标签中使用ref。本篇文章介绍在uniapp中父页面使用子组件的情况下,为在子组件中正确使用mescroll-body,父页面和子组件所需的设置。
2024-03-20 14:42:19 41 1
转载 vue+element select树形下拉
转载于https://zhuanlan.zhihu.com/p/415995268,供学习。组件页面代码(新增multiple 多选模式默认 false)
2023-03-23 15:30:21 219
原创 element select 下拉及输入筛选
el-select @change=“refreshData” v-model=“queryParams.companyId” filterable :filter-method=“filterMethod” placeholder=‘请选择’>
2023-03-19 13:36:34 346 1
原创 three.js 波浪图
<template><div id="container" ></div></template><script> import * as THREE from 'three'; const SCREEN_WIDTH = window.innerWidth, SCREEN_HEIGHT = window.innerHeight, r = 450; let container let mouseY = 0, win
2022-05-25 10:18:01 330
原创 css不规则标签 菱形 三角符号
.global-lozenge-label{ position: absolute; padding: 0 5px; display: flex; align-items: center; width:15%; height: 26px; color: #fff; background-color: #2058CF; } .global-lozenge-label::before{..
2022-05-23 16:23:19 225
原创 vue 翻牌器
//组件<template> <div class="chartNum"> <div class="box-item"> <li :class="{ 'number-item': !isNaN(item), 'mark-item': !isNaN(item) }" v-for="(item, index) in orderNum" :key="index" >
2022-05-23 11:19:48 488
转载 vue 标签球滚动
<div id='app' > <svg :width='width' :height='height' @mousemove='listener($event)'> <a :href="tag.href" v-for='tag in tags'> <text :x='tag.x' :y='tag.y' :font-size='20 * (600/(600-tag.z))' :fill-...
2022-04-20 11:26:42 434
原创 富文本编辑器 可全屏可粘贴(只能单独粘贴图片或文字)
vue-quill-editor 全屏设置components/Editor/fullScreen.jsimport Vue from "vue";const domList = [ { dom: `<svg t="1637824425355" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10463"><path d="M243
2022-03-21 14:44:32 1620
原创 手机端滚动 左边横向固定 上边纵向固定 css解决方案
<template> <div class="report"> <table> <thead> <tr> <th v-for="(n,i) of 35">字段 {{i+1}}</th> </tr> </thead> <tbody>
2021-10-28 17:18:09 140
转载 element ui input正整数验证
//完美解决需要将v-model 拆开成 :value 和@input <el-input :value="text" @input="e => (text = isnumber(e))" style="width: 66px" :disabled="isEdit" ></el-input> isnumber(val) {
2021-09-22 11:03:51 238
原创 vue使用v-viewer 组件实现图片预览 放大 旋转
//第一步 先安装 # 图片放大 预览 npm install v-viewer --save//第二步 直接使用 注意 imgList:['xxx.png','xxx.jpg']<viewer :images="imgList"> <!-- //photo 一定要一个数组,否则报错 --> <img v
2021-08-17 15:14:29 318
原创 vue element 手动上传文件
<el-dialog :visible.sync="visible" :title="titles" :close-on-click-modal="false" :close-on-press-escape="false" class="videoDialog" width="35%"> <el-form ref="dataForm" label-width="150px" class="mt15"><el-upload class="upload-demo"
2021-08-17 15:05:49 355
原创 vue3和vue2创建项目区别
vue3和vue2创建项目区别vue3npm install -g @vue/cli --force:安装vue clinpm init vite-app kmw:初始化项目cd kmw:切换项目路径npm install:安装项目依赖包npm run dev:启动和运行项目vue2npm install --global vue-cli:安装vue clivue init webpack kmw:初始化基于webpack模板项目cd kmw:切换项目路径npm install:安装项目依赖包n
2021-05-08 09:20:05 547
原创 rich-text 图片大小设置
<rich-text type="text" :nodes="info.content" image-menu-prevent="true"></rich-text>//设置图片宽度 const nodes = res.data.content nodes.map((node, nodeIndex) => { node.children.map((childNode, childIndex) => { if(childNode.name === 'i
2021-04-15 15:56:58 1839
原创 vue 合并数组去重复
//xx.vueimport {unique} from "@/utils/index.js" let ids=[1,2,3]let dataIds=[2,4,5]var arry=([...ids,...dataIds]) //1,2,3,4,5,2//调用上面方法去重复let arr=unique(arry)//1,2,3,4,5//index.jsexport function unique(arr) { // 根据唯一标识no来对数组进行过滤 let result =
2021-03-02 14:58:50 1971
原创 vue+element table表格校验必填项
<el-form :model="inServForm" ref="inServForm" :rules="rules" size="small"> <el-table ref="infiledList" border :data="inServForm.infiledList" style="width: 100%" > <el-table-column prop="matnrid" label="阈值" width="165px">
2020-12-15 12:15:17 2485
原创 el-input 从接口获取数据赋值后不能编辑
dataForm: { houseId: undefined }//站房id that.dataForm.houseId = response.data.device.houseId; 这样是不行的 编辑不了 //原因在于在Vue实例创建时,obj.b并未声明,因此就没有被Vue转换为响应式的属性,自然就不会触发视图的更新,这时就需要使用Vue的全局api $set()://$set()方法相当于手动的去把obj.b处理成一个响应式的属性,此时视
2020-12-15 11:03:49 759 1
原创 计算时间差 兼容苹果手机
/**计算时间差*/function difference(beginTime, endTime) { var beginT=beginTime.replace(/-/g, '/') //2020-08-08 08:00:00 将-替换成/ 因为苹果手机不兼容-这种写法 var endT=endTime.replace(/-/g, '/') var beginTimeS = new Date(beginT); // 日期格式转时间戳 var start = beginTimeS.getTime(
2020-11-19 14:19:26 173
原创 vue页面跳转刷新
//问题现象:当从第一个调到第二个地址时,页面内容不进行刷新,依然停留在地址1的内容,但是地址栏会变化为地址二。//使用watch监听 watch: { '$route': function(newUrl, oldUrl) { if (newUrl != oldUrl) { //调用方法,从后台再次获取数据 this.getList(); } } },...
2020-11-05 11:06:49 314
原创 vue element 针对某个div进行加载提示
getList() { let that = this //打卡加载遮罩层 const loading = this.$loading({ lock: true, text: '拼命加载中,请稍后...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.5)', target: document
2020-11-05 10:21:34 671
原创 vue 动态更改浏览器上的ico
//动态更改浏览器ico var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); link.type = 'image/x-icon'; link.rel = 'shortcut icon'; link.href ='图片路径' documen..
2020-10-27 10:23:42 1075
原创 input 只能填写整数和小数
<el-input oninput="value=value.replace(/[^0-9.]/g,'').replace(/^\./g, '').replace('.', 'dollar#dollar').replace(/\./g, '').replace('dollar#dollar', '.');" />
2020-10-10 11:38:30 177
原创 uniapp switchTab页面跳转刷新
//编写App//页面Auni.switchTab({ url: '/pages/index/index', success: function (e) { var page = getCurrentPages()[0] if (page == undefined || page == null) return; page.navigateHandle(); } });//页面BnavigateHandle:function(){/
2020-09-12 11:17:14 4815 1
原创 element table下input v-model绑定数据并动态新增
<el-button type="primary" icon="el-icon-plus" @click="addRule">新增</el-button><el-form :rules="formData.rules" :model="formData" ref="formDom" class="demo-ruleForm"> <el-table :data="formData.deviceThresholdList">
2020-09-02 09:37:02 4169
原创 element table 展开行 通过自定义按钮
<el-table ref="expandstable" :data="channelList" :expand-row-keys="expands" :row-key="getRowKeys"> <el-table-column type="expand"> <template slot-scope="props"> <el-row> &l
2020-08-25 15:27:46 2183
原创 element table 行高亮,点击行改变背景及默认选中第一行
//:highlight-current-row='true' 高亮 //@row-click="rowModelHandel" 行点击事件 //ref="multipleTable" //:row-class-name="tableRowIndex" 点击行获取index给row <el-table :data="templateList" class="mt15" @row-click="rowModelHandel" :highlight-current-row='true'
2020-08-25 15:15:14 1728
原创 element自定义表单验证
/**validate.js * @param {string} path * @returns {Boolean} */export function isExternal(path) { return /^(https?:|mailto:|tel:)/.test(path)}/** * 手机号码 * @param {*} s */export function checkPhone(rule, value, callback){ const phoneReg = /^1[3|
2020-08-18 11:13:19 240
原创 uni-app 动态修改原生导航栏文字
修改顶部文字uni.setNavigationBarTitle({title: “首页” //这是修改后的导航栏文字})修改顶部文字颜色以及导航栏背景色uni.setNavigationBarColor({frontColor: “#ffffff”, //文字颜色backgroundColor: “#007AFF” //底部背景色})...
2020-08-15 10:51:36 5544
EZUIKit_js_v2.7.0_build20200420.zip
2020-05-20
wxParse-master.zip
2020-03-06
tfgg-verify_1.0.1.zip
2020-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人