美文网首页
import * as xxx from "xxx" 和 im

import * as xxx from "xxx" 和 im

作者: 丰起云啸 | 来源:发表于2019-08-09 09:30 被阅读0次

    导出一个
    import xx from "xx"
    let validAmountReg= (rule, value, callback) => {
    if (!value) {
    return callback(new Error("金额不能为空!"));
    } else {
    let reg = validAmounts.validAmount;
    if (reg.test(value)) {
    callback();
    } else {
    return callback(new Error(validAmounts.validAmountMessage));
    }
    }
    };
    export default validAmountReg
    直接调用 validAmountReg

    导出多个
    export var validNames =
    export var validNames = (rule, value, callback) => {}
    export var validNames = (rule, value, callback) => {}
    引入
    import * as addChannelReg from '../validate/addChannelReg';
    addChannelReg .validNames
    ...

    相关文章

      网友评论

          本文标题:import * as xxx from "xxx" 和 im

          本文链接:https://www.haomeiwen.com/subject/okqcjctx.html