0
点赞
收藏
分享

微信扫一扫

Element Plus CDN时间选择器英文转中文

直接上代码

<link rel="stylesheet" href="element-plus@1.0.2/index.css">
<script src="element-plus@1.0.2/index.js"></script>
<script src="element-plus@1.0.2/element_plus_es.js"></script>
<script src="element-plus@1.0.2/element_plus_zh-cn.js"></script>
<script>
	ElementPlus.locale(ElementPlus.lang.zhCn)
</script>

对应的源文件如下:

es.js

(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define("element/locale/es", ["exports"], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports);
    global.ElementPlus.lang = global.ElementPlus.lang || {};
    global.ElementPlus.lang.es = mod.exports.default;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;
  var _default = {
    name: 'es',
    el: {
      colorpicker: {
        confirm: 'Confirmar',
        clear: 'Despejar'
      },
      datepicker: {
        now: 'Ahora',
        today: 'Hoy',
        cancel: 'Cancelar',
        clear: 'Despejar',
        confirm: 'Confirmar',
        selectDate: 'Seleccionar fecha',
        selectTime: 'Seleccionar hora',
        startDate: 'Fecha Incial',
        startTime: 'Hora Inicial',
        endDate: 'Fecha Final',
        endTime: 'Hora Final',
        prevYear: 'Año Anterior',
        nextYear: 'Próximo Año',
        prevMonth: 'Mes Anterior',
        nextMonth: 'Próximo Mes',
        year: '',
        month1: 'enero',
        month2: 'febrero',
        month3: 'marzo',
        month4: 'abril',
        month5: 'mayo',
        month6: 'junio',
        month7: 'julio',
        month8: 'agosto',
        month9: 'septiembre',
        month10: 'octubre',
        month11: 'noviembre',
        month12: 'diciembre',
        // week: 'semana',
        weeks: {
          sun: 'dom',
          mon: 'lun',
          tue: 'mar',
          wed: 'mié',
          thu: 'jue',
          fri: 'vie',
          sat: 'sáb'
        },
        months: {
          jan: 'ene',
          feb: 'feb',
          mar: 'mar',
          apr: 'abr',
          may: 'may',
          jun: 'jun',
          jul: 'jul',
          aug: 'ago',
          sep: 'sep',
          oct: 'oct',
          nov: 'nov',
          dec: 'dic'
        }
      },
      select: {
        loading: 'Cargando',
        noMatch: 'No hay datos que coincidan',
        noData: 'Sin datos',
        placeholder: 'Seleccionar'
      },
      cascader: {
        noMatch: 'No hay datos que coincidan',
        loading: 'Cargando',
        placeholder: 'Seleccionar',
        noData: 'Sin datos'
      },
      pagination: {
        goto: 'Ir a',
        pagesize: '/página',
        total: 'Total {total}',
        pageClassifier: ''
      },
      messagebox: {
        confirm: 'Aceptar',
        cancel: 'Cancelar',
        error: 'Entrada inválida'
      },
      upload: {
        deleteTip: 'Pulse Eliminar para retirar',
        delete: 'Eliminar',
        preview: 'Vista Previa',
        continue: 'Continuar'
      },
      table: {
        emptyText: 'Sin Datos',
        confirmFilter: 'Confirmar',
        resetFilter: 'Reiniciar',
        clearFilter: 'Despejar',
        sumText: 'Suma'
      },
      tree: {
        emptyText: 'Sin Datos'
      },
      transfer: {
        noMatch: 'No hay datos que coincidan',
        noData: 'Sin datos',
        titles: ['Lista 1', 'Lista 2'],
        filterPlaceholder: 'Ingresar palabra clave',
        noCheckedFormat: '{total} artículos',
        hasCheckedFormat: '{checked}/{total} revisados'
      },
      image: {
        error: 'HA FALLADO'
      },
      pageHeader: {
        title: 'Volver'
      },
      popconfirm: {
        confirmButtonText: 'Si',
        cancelButtonText: 'No'
      }
    }
  };
  _exports.default = _default;
});

zh-cn.js

(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define("element/locale/zh-cn", ["exports"], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports);
    global.ElementPlus.lang = global.ElementPlus.lang || {};
    global.ElementPlus.lang.zhCn = mod.exports.default;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;
  var _default = {
    name: 'zh-cn',
    el: {
      colorpicker: {
        confirm: '确定',
        clear: '清空'
      },
      datepicker: {
        now: '此刻',
        today: '今天',
        cancel: '取消',
        clear: '清空',
        confirm: '确定',
        selectDate: '选择日期',
        selectTime: '选择时间',
        startDate: '开始日期',
        startTime: '开始时间',
        endDate: '结束日期',
        endTime: '结束时间',
        prevYear: '前一年',
        nextYear: '后一年',
        prevMonth: '上个月',
        nextMonth: '下个月',
        year: '年',
        month1: '1 月',
        month2: '2 月',
        month3: '3 月',
        month4: '4 月',
        month5: '5 月',
        month6: '6 月',
        month7: '7 月',
        month8: '8 月',
        month9: '9 月',
        month10: '10 月',
        month11: '11 月',
        month12: '12 月',
        // week: '周次',
        weeks: {
          sun: '日',
          mon: '一',
          tue: '二',
          wed: '三',
          thu: '四',
          fri: '五',
          sat: '六'
        },
        months: {
          jan: '一月',
          feb: '二月',
          mar: '三月',
          apr: '四月',
          may: '五月',
          jun: '六月',
          jul: '七月',
          aug: '八月',
          sep: '九月',
          oct: '十月',
          nov: '十一月',
          dec: '十二月'
        }
      },
      select: {
        loading: '加载中',
        noMatch: '无匹配数据',
        noData: '无数据',
        placeholder: '请选择'
      },
      cascader: {
        noMatch: '无匹配数据',
        loading: '加载中',
        placeholder: '请选择',
        noData: '暂无数据'
      },
      pagination: {
        goto: '前往',
        pagesize: '条/页',
        total: '共 {total} 条',
        pageClassifier: '页'
      },
      messagebox: {
        title: '提示',
        confirm: '确定',
        cancel: '取消',
        error: '输入的数据不合法!'
      },
      upload: {
        deleteTip: '按 delete 键可删除',
        delete: '删除',
        preview: '查看图片',
        continue: '继续上传'
      },
      table: {
        emptyText: '暂无数据',
        confirmFilter: '筛选',
        resetFilter: '重置',
        clearFilter: '全部',
        sumText: '合计'
      },
      tree: {
        emptyText: '暂无数据'
      },
      transfer: {
        noMatch: '无匹配数据',
        noData: '无数据',
        titles: ['列表 1', '列表 2'],
        filterPlaceholder: '请输入搜索内容',
        noCheckedFormat: '共 {total} 项',
        hasCheckedFormat: '已选 {checked}/{total} 项'
      },
      image: {
        error: '加载失败'
      },
      pageHeader: {
        title: '返回'
      },
      popconfirm: {
        confirmButtonText: '确定',
        cancelButtonText: '取消'
      }
    }
  };
  _exports.default = _default;
});
举报

相关推荐

0 条评论