vue.js - 在开发模式下为 vue 组件/模板添加检查
问题描述
这些检查应仅在开发模式下执行。
这里有一个例子:
<template>
<div>
<slot />
</div>
</template>
<script>
export default {
name: 'FuiButton',
props: {
labeled: {
type: Boolean,
},
labeledIcon: {
type: Boolean,
},
},
};
</script>
例如,检查可能是两个属性不能同时为真。另一种类型的检查可能是:MyCompB 只能作为 MyCompA 的子项存在。
解决方案
推荐阅读
- r - 列出R中data.frame中缺失数据的名称和行号?
- windows-10 - 如何在电子应用程序的标题中添加空格?
- python - 为什么通过 pytest 加载驱动程序会导致 SIGABRT?
- excel - 批量删除不符合条件的行
- python - 结合正则表达式读取Python中的文本
- java - 在 Equinox OSGi 包缓存中提取的类文件?
- sql-server - 如何使用存储过程将导入空白 XML 标记导入表的数字列
- javascript - 获取对象的元素
- postgresql - 两个 ts 向量列之间的 ts_rank
- google-apps-script - 目标是消除错误消息出现的错误消息是“TypeError Methode "clear" von null kann nicht aufgerufen werden。”