el-element的时间选择器el-date-picker type="datetime" 组件使用时,错误信息 mask.replace is not a function

简介: 笔记

组件代码

<template>:
<el-date-picker v-model="value1" type="datetime" placeholder="选择日期时间"> </el-date-picker>
<script>:
data:
value1: ''

出错原因

vue 示例上 dateFormatelement 计算属性冲突了

解决方法 

一、全局替换下这个方法:dateFormat => transformDateFormat

40.png

二、将type="datetime"改成type="date"

注:该方法不会返回分秒


目录
相关文章
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
Error: Element type is invalid: expected a string (for built-in components) or a class/function
2861 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
|
弹性计算 缓存 Serverless
Serverless 应用引擎操作报错合集之阿里函数计算中我打开sd时遇到错误,信息为"Function instance exited unexpectedly(code 1, message:operation not permitted) with start command ' '."如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
622 6
Echarts组件属性function回调函数的灵活使用调整不同的图表状态
Echarts组件属性function回调函数的灵活使用调整不同的图表状态
567 0
Echarts组件属性function回调函数的灵活使用调整不同的图表状态
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value
|
JavaScript 开发者
组件-为什么组件的 data 必须是一个 function|学习笔记
快速学习组件-为什么组件的 data 必须是一个 function
261 0
|
人工智能 Python
083_类_对象_成员方法_method_函数_function_isinstance
本内容主要讲解Python中的数据类型与面向对象基础。回顾了变量类型(如字符串`str`和整型`int`)及其相互转换,探讨了加法在不同类型中的表现。通过超市商品分类比喻,引出“类型”概念,并深入解析类(class)与对象(object)的关系,例如具体橘子是橘子类的实例。还介绍了`isinstance`函数判断类型、`type`与`help`探索类型属性,以及`str`和`int`的不同方法。最终总结类是抽象类型,对象是其实例,不同类型的对象有独特运算和方法,为后续学习埋下伏笔。
315 7
083_类_对象_成员方法_method_函数_function_isinstance
|
Python
[oeasy]python086方法_method_函数_function_区别
本文详细解析了Python中方法(method)与函数(function)的区别。通过回顾列表操作如`append`,以及随机模块的使用,介绍了方法作为类的成员需要通过实例调用的特点。对比内建函数如`print`和`input`,它们无需对象即可直接调用。总结指出方法需基于对象调用且包含`self`参数,而函数独立存在无需`self`。最后提供了学习资源链接,方便进一步探索。
361 17

热门文章

最新文章