/*
 * @Author: your name
 * @Date: 2022-02-25 17:07:40
 * @LastEditTime: 2022-10-10 10:01:14
 * @LastEditors: 纪泽龙 jizelong@qq.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /newDev/gassafety-progress/gassafetyprogress-web/src/directive/permission/hasValue.js
 */
/**
 * 无内容显示-
 * Copyright (c) 2021 gassafety
 */

export default {
  inserted(el, binding, vnode) {
    // console.log("开始")
    if (!el.innerHTML.replace(/\s+/g, "")) {
      el.innerHTML = "-";
    }
    // el.innerHTML = el.innerHTML.replace(/\s+/g, "") ? el.innerHTML : "-";
  },
  componentUpdated(el, binding, vnode) {
    // console.log("改变了", el.innerHTML);
    // el.innerHTML = el.innerHTML.replace(/\s+/g, "") ? el.innerHTML : "-";
    if (!el.innerHTML.replace(/\s+/g, "")) {
      el.innerHTML = "-";
    }
  },
};
