@cmss/amp-probe-lightweight
v1.0.6
Published
amp helper library
Downloads
18
Keywords
Readme
介绍
前端橡皮擦
功能
指定页面元素,通过外部配置模式改变页面元素状态。
安装
npm install @cmss/amp-probe-lightweight --save
快速使用
在main.js中引入插件
import AMP from '@cmss/amp-probe-lightweight'
Vue.use(AMP, {
mockUrl:${mockUrl}
})
其中mockUrl的格式如下:
[
{
"id": "history-event", // 绑定在dom上的唯一id
"ruleName": "隐藏历史事件", // 自定义规则名称
"rule": "invisible" // 规则,目前支持invisible(不可见)和disabled(不可用)
},
{
"id": "button1",
"ruleName": "隐藏新建实例按钮",
"rule": "invisible"
}
]