前端双语实现方案(VUE版)

news2024/11/16 15:57:32

一、封装一个lib包

结构如下

en.js

'use strict';

exports.__esModule = true;
exports.default = {
    sp: {
        input: {
            amountError: 'Incorrect amount format'
        },
        table: {
            total: 'Total:',
            selected: 'Selected:',
            tableNoData: 'No data',
            tableNoDataSubtext: 'Tip: Suggest to recheck your filter.',
            tableLoadingData: 'Searching...'
        },
        select: {
            placeholder: 'Select'
        },
        preview: {
            button: 'View'
        }
    }
};

zh-CN.js

'use strict';

exports.__esModule = true;
exports.default = {
    sp: {
        input: {
            amountError: '金额格式不正确'
        },
        table: {
            total: '共计:',
            selected: '已选择:',
            tableNoData: '暂无数据',
            tableNoDataSubtext: '提示:建议核实筛选条件',
            tableLoadingData: '搜索中...'
        },
        select: {
            placeholder: '请选择'
        },
        preview: {
            button: '查看'
        }
    }
};

index.js

'use strict';

exports.__esModule = true;
exports.i18n = exports.use = exports.t = undefined;

var _zhCN = require('./lang/zh-CN');

var _zhCN2 = _interopRequireDefault(_zhCN);

var _vue = require('vue');

var _vue2 = _interopRequireDefault(_vue);

var _deepmerge = require('deepmerge');

var _deepmerge2 = _interopRequireDefault(_deepmerge);

var _format = require('element-ui/lib/locale/format');

var _format2 = _interopRequireDefault(_format);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var format = (0, _format2.default)(_vue2.default);
var lang = _zhCN2.default;
var merged = false;
var i18nHandler = function i18nHandler() {
  var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
  if (typeof vuei18n === 'function' && !!_vue2.default.locale) {
    if (!merged) {
      merged = true;
      _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, { clone: true }));
    }
    return vuei18n.apply(this, arguments);
  }
};
var t = exports.t = function t(path, options) {
  var value = i18nHandler.apply(this, arguments);
  if (value !== null && value !== undefined) return value;

  var array = path.split('.');
  var current = lang;

  for (var i = 0, j = array.length; i < j; i++) {
    var property = array[i];
    value = current[property];
    if (i === j - 1) return format(value, options);
    if (!value) return '';
    current = value;
  }
  return '';
};

var use = exports.use = function use(l) {
  lang = l || lang;
};

var i18n = exports.i18n = function i18n(fn) {
  i18nHandler = fn || i18nHandler;
};

exports.default = { use: use, t: t, i18n: i18n };

二、封装i18n对象

结构如下

index.js

import Vue from 'vue';
import VueI18n from 'vue-i18n';
import elementLocale from 'element-ui/lib/locale';

import elementCnLocale from 'element-ui/lib/locale/lang/zh-CN'; // element-ui lang
import elementEnLocale from 'element-ui/lib/locale/lang/en'; // element-ui lang
import cnLocale from './lang/cn';
import enLocale from './lang/en';
import spuiEnLocale from 'lib/locale/lang/en';
import spuiCnLocale from 'lib/locale/lang/zh-CN';
import spuiLocale from 'lib/locale/index.js';

const messages = {
  en: {
    ...elementEnLocale,
    ...enLocale,
    ...spuiEnLocale

  },
  cn: {
    ...elementCnLocale,
    ...cnLocale,
    ...spuiCnLocale

  }
};

Vue.use(VueI18n);

const i18n = new VueI18n({
  locale: 'cn',
  fallbackLocale: 'cn',
  messages
});

// fix element-ui language switching issue.
elementLocale.i18n((key, value) => i18n.t(key, value));
spuiLocale.i18n(function(key, value) {
  return i18n.t(key, value);
});

export default i18n;

cn/index.js

export default {
  common: {
    merchantPlatform: '商户平台',
    search: '查询',
    clear: '清除',
    prev: '上一步',
    next: '下一步',
    done: '完成',
    batchCopy: '一键复制',
    currency: '币种',
    back: '返回',
    submit: '提交',
    confirm: '确认',
    add: '添加',
    delete: '删除',
    edit: '编辑',
    notify: '通知',
    noLoginName: '未登录',
    logout: '账号登出',
    changePwd: '修改密码',
    total: '总计',
    language: '语言设置',
    languageList: [
      {
        value: 'en',
        label: 'English'
      },
      {
        value: 'cn',
        label: '中文'
      }
    ],
    gotIt: '知道了',
    tableNoData: '暂无数据',
    tableNoDataSubtext: '提示:建议核实筛选条件',
    talbeLoadingData: '搜索中...',
    homeLoadingTitle: '正在加载资源',
    homeLoadingSubTitle: '初次加载资源可能需要较多时间 请耐心等待',
    action: '操作',
    save: '保存',
    cancel: '取消',
    saveSuccessTip: '保存成功!',
    deleteSuccessTip: '删除成功',
    yes: '是',
    no: '否',
    nonactivated: '未开通',
    required: '必填',
    view: '查看',
    agree: '同意',
    disagree: '不同意',
    notice: '公告通知',
    workOrderNotice: '工单通知',
    timeZone: '时区',
    mailLanguage: '邮件语言: ',
    mailLanguageTitle: '选择邮件语言',
    mailLanguageContent: '所有与您绑定的商户,都将以该语言给您发送邮件。',
    noContractSigned: '当前账户未开通该业务合同,请您联系PayerMax商务负责人获取进一步帮助',
    copySuccessfully: '复制成功',
    copyFailed: '复制失败:您可尝试单击右键进行复制',
    require: '必填',
    to: '-',
    today: '今天',
    yesterday: '昨天',
    last7Days: '过去7天',
    last30Days: '过去30天',
    placeholderStartDate: '开始日期',
    placeholderEndDate: '结束日期',
    applyRefundDes_1: '系统正在处理,请稍后查询。受理成功后,款项预计',
    applyRefundDes_2: '返回至原支付账户中。',
    approvalArrivalTimeMap: { 0: '将立刻', 1: '将在1天', 2: '将在10天内', 3: '' },
    reupload: '重新上传',
    download: '导出',
    export: '导出',
    create: '创建',
    showDetail: '详情',
    pixiuDetail: '详情',
    success: '成功',
    unit: '笔',
    units: '笔',
    all: '全部',
    timeZoneSetting: '时区设置:',
    timeZoneDefault: '默认',
    timeZoneSelectHint: '时区筛选',

    platformTimeZoneList: [
      { value: 'UTC', label: 'UTC +0:00', offset: 0, city: '   世界标准时间', countryCode: 'UTC', zoneName: 'UTC' },
      { value: 'UTC +4:00  GST', label: 'UTC +4:00', offset: 240, city: '  迪拜(阿联酋)', countryCode: 'AE', zoneName: 'Asia/Dubai' },
      { value: 'UTC +3:00  MSK', label: 'UTC +3:00', offset: 180, city: '  莫斯科(俄罗斯)', countryCode: 'RU', zoneName: 'Europe/Moscow' },
      { value: 'UTC +2:00  CAT', label: 'UTC +2:00', offset: 120, city: '  开罗(埃及)', countryCode: 'EG', zoneName: 'Africa/Cairo' },
      { value: 'UTC +8:00  PHT', label: 'UTC +8:00', offset: 480, city: '  马尼拉(菲律宾)', countryCode: 'PH', zoneName: 'Asia/Manila' },
      { value: 'UTC +8:00  MYT', label: 'UTC +8:00', offset: 480, city: '  古晋(马来西亚)', countryCode: 'MY', zoneName: 'Asia/Kuala_Lumpur' },
      { value: 'UTC +2:00  SAST', label: 'UTC +2:00', offset: 120, city: '  约翰内斯堡(南非)', countryCode: 'ZA', zoneName: 'Africa/Johannesburg' },
      { value: 'UTC +3:00  AST', label: 'UTC +3:00', offset: 180, city: '  利雅得(沙特)', countryCode: 'SA', zoneName: 'Asia/Riyadh' },
      { value: 'UTC +8:00  SGT', label: 'UTC +8:00', offset: 480, city: '  新加坡(新加坡)', countryCode: 'SG', zoneName: 'Asia/Singapore' },
      { value: 'UTC +5:30  IST', label: 'UTC +5:30', offset: 330, city: '  加尔各答(印度)', countryCode: 'IN', zoneName: 'Asia/Calcutta' },
      { value: 'UTC +7:00  WIB', label: 'UTC +7:00', offset: 420, city: '  雅加达(印度尼西亚)', countryCode: 'ID', zoneName: 'Asia/Jakarta' },
      { value: 'UTC +8:00  CST', label: 'UTC +8:00', offset: 480, city: '  北京(中国)', countryCode: 'CN', zoneName: 'Asia/Shanghai' },
      { value: 'UTC -3:00  BRT', label: 'UTC -3:00', offset: -180, city: '  圣保罗(巴西)', countryCode: 'BR', zoneName: 'America/Sao_Paulo' },
      { value: 'UTC +3:00  TRT', label: 'UTC +3:00', offset: 180, city: '  伊斯坦布尔(土耳其)', countryCode: 'TR', zoneName: 'Europe/Istanbul' }
    ],
    faq: {
      label: '常见问题',
      testUrl: 'https://docs-dev.shareitpay.in/#/2?page_id=178&si=1&lang=zh-cn',
      prodUrl: 'https://docs.payermax.com/#/12?page_id=180&si=1&lang=zh-cn',
    },
    helpList: [{
      label: '文档中心',
      testUrl: 'https://docs-dev.shareitpay.in/#/2?page_id=4&si=1&lang=zh-cn',
      prodUrl: 'https://docs.payermax.com/#/30?page_id=580&si=1&lang=zh-cn',
    },
    {
      label: '帮助中心',
      url: '',
    }],
    documentUrlInfo: {
      testUrl: 'https://docs.payermax.com/#/12?page_id=81&si=1&lang=cn',
      prodUrl: 'https://docs.payermax.com/#/30?page_id=580&si=1&lang=zh-cn',
    },
    datePick: {
      tip: '时间跨度最大支持31天'
    },
    downloadEmail: {
      title: '数据处理中',
      submit: '好的',
      message: '数据处理完成后,我们会将导出文件发送至您的邮箱 <span class="waring">%{email}</span>,请注意查收。'
    },
    accountSubject: '账户主体',
    securityVerification: '用户安全登录验证',
    securityOpen: '已开启',
    securityClosed: '已关闭',
    deleteMerchantDes: '设为默认,账号登录后默认打开此商户号',
    defaultMerchantGroupsDes: '设为默认,账号登录后默认打开此商户群组',
    createGroup: '创建商户群组',
    switchTommc: '切换至商户平台运营',
    notification: '公告通知',
    documentCenter: '文档中心',
    paymentMethodType: '支付方式类型',
  },
  route: {
    unknown: '未命名菜单',
    dashboard: '仪表盘',
    overview: '概览',
    group: '群组管理',
    banlnce: '账户余额',
    balanceTotal: '余额汇总',
    incomeDetail: '收支明细',
    merchant: 'merchant',
    report: '报告',
    disbursement: '出款查询',
    reportHistory: '导出记录',
    transaction: '收单管理',
    orderSearch: '订单查询',
    orderDetail: '订单详情',
  },
  responseError: {
    error602: {
      title: '确定登出',
      content: '您已被登出,请重新登录',
      okStr: '重新登录',
    },
    error603: {
      title: '提示',
      okStr: '重新登录',
    },
    errorCodeList: [
      { value: '600', label: '用户账号不存在' },
      { value: '601', label: '账号名或密码错误' },
      { value: '603', label: '获取权限异常,建议重新登录' },
      { value: '604', label: '验证失败过多,账号已锁定,请重设密码' },
    ],
    unknownError: '未知错误'
  }
};

en/index.js

export default {
  common: {
    merchantPlatform: 'Merchant Platform',
    search: 'Search',
    clear: 'Clear',
    prev: 'Back',
    done: 'Done',
    batchCopy: 'Copy All',
    currency: 'Currency',
    next: 'Next',
    back: 'Back',
    submit: 'Submit',
    confirm: 'Confirm',
    add: 'Add',
    delete: 'Delete',
    edit: 'Edit',
    notify: 'Notify',
    noLoginName: 'No Login',
    logout: 'Sign Out',
    changePwd: 'Change Password',
    total: 'Total',
    language: 'Language Settings',
    languageList: [
      {
        value: 'en',
        label: 'English'
      },
      {
        value: 'cn',
        label: '中文'
      }
    ],
    gotIt: 'Got it',
    tableNoData: 'No data',
    tableNoDataSubtext: 'Tip: Suggest to recheck your filter.',
    talbeLoadingData: 'Searching...',
    homeLoadingTitle: 'Loading...',
    homeLoadingSubTitle: 'It may take more time to load the resource for the first time. Please wait patiently.',
    action: 'Action',
    save: 'Save',
    cancel: 'Cancel',
    saveSuccessTip: 'Save successfully!',
    deleteSuccessTip: 'Delete successfully!',
    yes: 'Confirm',
    no: 'Cancel',
    nonactivated: 'Nonactivated',
    required: 'Required',
    view: 'View',
    agree: 'Agree',
    disagree: 'Disagree',
    notice: 'Notification',
    timeZone: 'Time Zone',
    mailLanguage: 'Email Language: ',
    mailLanguageTitle: 'Select Email Language',
    mailLanguageContent: 'All merchants that are bound to you will send you an email in this language.',
    noContractSigned: 'There is no contract under the current account, please contact the PayerMax business development for further assistance.',
    copySuccessfully: 'Copy successfully',
    copyFailed: 'Copy failed: Please try right-click and select Copy',
    require: 'Required',
    to: '-',
    today: 'Today',
    yesterday: 'Yesterday',
    last7Days: 'Last 7 days',
    last30Days: 'Last 30 days',
    placeholderStartDate: 'Start Date',
    placeholderEndDate: 'End Date',
    applyRefundDes_1: 'Wait for some time, system is processing. Once the refund is processed, the money will be sent to the original payment source',
    applyRefundDes_2: '.',
    approvalArrivalTimeMap: { 0: ' immediately', 1: ' within 1 working day', 2: ' within 10 working days', 3: '' },
    reupload: 'Re-upload',
    download: 'Download',
    export: 'Export',
    create: 'Create',
    showDetail: 'Detail',
    pixiuDetail: 'Details',
    success: 'Success',
    unit: 'order',
    units: 'orders',
    all: 'All',
    timeZoneSetting: 'Timezone Setting: ',
    timeZoneDefault: 'Default',
    timeZoneSelectHint: 'Time Zone Filter',
    platformTimeZoneList: [
      { value: 'UTC', label: 'UTC +0:00', offset: 0, city: '   Universal Time Coordinated', countryCode: 'UTC', zoneName: 'UTC' },
      { value: 'UTC +4:00  GST', label: 'UTC +4:00', offset: 240, city: '  Dubai(United Arab Emirates)', countryCode: 'AE', zoneName: 'Asia/Dubai' },
      { value: 'UTC +3:00  MSK', label: 'UTC +3:00', offset: 180, city: '  Moscow(Russia)', countryCode: 'RU', zoneName: 'Europe/Moscow' },
      { value: 'UTC +2:00  CAT', label: 'UTC +2:00', offset: 120, city: '  Cairo(Egypt)', countryCode: 'EG', zoneName: 'Africa/Cairo' },
      { value: 'UTC +8:00  PHT', label: 'UTC +8:00', offset: 480, city: '  Manila(Philippines)', countryCode: 'PH', zoneName: 'Asia/Manila' },
      { value: 'UTC +8:00  MYT', label: 'UTC +8:00', offset: 480, city: '  Kuching(Malaysia)', countryCode: 'MY', zoneName: 'Asia/Kuala_Lumpur' },
      { value: 'UTC +2:00  SAST', label: 'UTC +2:00', offset: 120, city: '  Johannesburg(South Africa)', countryCode: 'ZA', zoneName: 'Africa/Johannesburg' },
      { value: 'UTC +3:00  AST', label: 'UTC +3:00', offset: 180, city: '  Riyadh(Saudi Arabia)', countryCode: 'SA', zoneName: 'Asia/Riyadh' },
      { value: 'UTC +8:00  SGT', label: 'UTC +8:00', offset: 480, city: '  Singapore(Singapore)', countryCode: 'SG', zoneName: 'Asia/Singapore' },
      { value: 'UTC +5:30  IST', label: 'UTC +5:30', offset: 330, city: '  Kolkata(India)', countryCode: 'IN', zoneName: 'Asia/Calcutta' },
      { value: 'UTC +7:00  WIB', label: 'UTC +7:00', offset: 420, city: '  Jakarta(Indonesia)', countryCode: 'ID', zoneName: 'Asia/Jakarta' },
      { value: 'UTC +8:00  CST', label: 'UTC +8:00', offset: 480, city: '  Beijing(China)', countryCode: 'CN', zoneName: 'Asia/Shanghai' },
      { value: 'UTC -3:00  BRT', label: 'UTC -3:00', offset: -180, city: '  Sao Paulo(Brazil)', countryCode: 'BR', zoneName: 'America/Sao_Paulo' },
      { value: 'UTC +3:00  TRT', label: 'UTC +3:00', offset: 180, city: '  Istanbul(Turkey)', countryCode: 'TR', zoneName: 'Europe/Istanbul' }
    ],
    faq: {
      label: 'FAQ',
      testUrl: 'https://docs-dev.payermax.com/#/2?page_id=178&si=1&lang=en',
      prodUrl: 'https://docs.payermax.com/#/12?page_id=180&si=1&lang=en',
    },
    helpList: [{
      label: 'Documents',
      testUrl: 'https://docs-dev.payermax.com/#/2?page_id=4&si=1&lang=en',
      prodUrl: 'https://docs.payermax.com/#/30?page_id=580&si=1&lang=zh-en',
    },
    {
      label: 'Support',
      url: '',
      hidden: true
    }],
    documentUrlInfo: {
      testUrl: 'https://docs.payermax.com/#/30?page_id=580&si=1&lang=zh-en',
      prodUrl: 'https://docs.payermax.com/#/30?page_id=580&si=1&lang=zh-en',
    },
    datePick: {
      tip: 'Date range up to 31 days'
    },
    downloadEmail: {
      title: 'Data processing',
      submit: 'OK',
      message: 'We will send the export to <span class="waring">%{email}</span> when it\'s completed, please check it later.'
    },
    accountSubject: 'Account Subject',
    securityVerification: 'User security login verification',
    securityOpen: 'Enabled',
    securityClosed: 'Closed',
    deleteMerchantDes: 'Set as default, this merchant account will be displayed after account login',
    defaultMerchantGroupsDes: 'Set as default, this merchant group account will be displayed after account login',
    createGroup: 'Create Group',
    switchTommc: 'Switch to Merchant Platform',
    notification: 'Notification',
    documentCenter: 'Document Center',
    paymentMethodType: 'Payment Method Type',
  },
  route: {
    unknown: 'unknown menu',
    dashboard: 'Dashboard',
    overview: 'Dashboard',
    banlnce: 'Banlnce',
    balanceTotal: 'Balance Summary',
    incomeDetail: 'Account Turnover',
    group: 'Group',
    report: 'Report',
    disbursement: 'Disbursement',
    reportHistory: 'Export Records',
    merchant: 'merchant',
    transaction: 'Payment',
    orderSearch: 'Order Search',
    orderDetail: 'Order Detail',
  },
  responseError: {
    error602: {
      title: 'Logout',
      content: 'Your session has expired, please login again.',
      okStr: 'Click to Sign in',
    },
    error603: {
      title: 'Hint',
      okStr: 'Click to Sign in',
    },
    errorCodeList: [
      { value: '600', label: 'The user account is not exits.' },
      { value: '601', label: 'User ID or Password is incorrect.' },
      { value: '603', label: 'Something wrong with accessing permission. Suggest to sign in again.' },
    ],
    unknownError: 'Unknown error.'
  }
};

三、在VUE中引入 main.js

import i18n from './i18n';

const vue = new Vue({
  router,
  store,
  i18n,
  created() {
    injectBeyla();
  },
  mounted() {
    util.init();
  },
  render: h => h(App),
}).$mount('#app');

四、在页面中使用

  
  <ProblemDescription :title="$t(`workOrderInfo.yourLocalReceivingAccountNumber`)" />
  <el-button @click="goBack">{{ $t('workOrderInfo.return') }}</el-button>

 {
    prop: 'status',
    labelKey: 'workOrderInfo.workOrderStatus',
    minWidth: 130,
    render(h, row) {
      const type = setStatus(row.status, this.language) || '';
      return <div>
        {row.status == 'PROCESS' && <div style='color: rgba(251, 151, 1, 1);padding: 4px 12px;border-radius: 14px;background: rgba(255, 241, 215, 1);'>{type || '-'}</div>}
        {row.status == 'FINISHED' && <div style='color: rgba(0, 195, 82, 1);padding: 4px 12px;border-radius: 14px;background: rgba(230, 249, 239, 1);'>{type || '-'}</div>}
      </div>;
    }
  },
  

  import local from './local';

  const SCOPE_NAME = 'workOrderInfo';


  created() {
    if (!this.$i18n.getLocaleMessage('en')[SCOPE_NAME]) {
      this.$i18n.mergeLocaleMessage('en', local.en);
      this.$i18n.mergeLocaleMessage('cn', local.cn);
    }
  },

  this.tipMessage(this.$t('workOrderInfo.orderExisting'));

local.js

export default {
  cn: {
    workOrderInfo: {
      orderExisting: '该订单已经创建咨询,请刷新页面',
      mustSelectAContent: '必须选择一项内容',
      fileCount: '当前限制最多上传 5 个文件!',

    }
  },
  en: {
    workOrderInfo: {
      orderExisting: 'The order has been created, please refresh the page',
      mustSelectAContent: 'One item must be selected',
      fileCount: 'The current limit allows for a maximum of 5 files to be uploaded!',
    }
  }
};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1656373.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

浅析安全用电监控系统在工厂的研究与应用论述

摘 要&#xff1a;随着社会时代的发展&#xff0c;人们的安全意识越来越强烈&#xff0c;在人们生活和工作中离不开各种用电设备&#xff0c;用电设备的安全使用是保障人们生命安全的重要内容。工厂因自身厂内工作环境的特殊性&#xff0c;用电设备的种类多且复杂&#xff0c;如…

云原生测试实战-云计算大数据云原生架构容器技术Kubernetes计算机软件工程软件开发

系列文章目录 送书第一期 《用户画像&#xff1a;平台构建与业务实践》 送书活动之抽奖工具的打造 《获取博客评论用户抽取幸运中奖者》 送书第二期 《Spring Cloud Alibaba核心技术与实战案例》 送书第三期 《深入浅出Java虚拟机》 送书第四期 《AI时代项目经理成长之道》 …

AC/DC电源模块在通信与网络设备中的应用研究

BOSHIDA AC/DC电源模块在通信与网络设备中的应用研究 随着通信与网络技术的不断发展&#xff0c;通信与网络设备的使用不断增加。电源作为通信与网络设备的重要组成部分之一&#xff0c;在其稳定工作中起到至关重要的作用。AC/DC电源模块作为一种常用的电源转换器&#xff0c;…

信创 | 区块链技术在信创建设中的应用前景

区块链技术在信创建设中的应用前景是广阔的。首先&#xff0c;区块链技术具有去中心化、可追溯和不可篡改等特性&#xff0c;这些特性使其在数据可信、共享、共治和共同维护以增强信任的应用场景中具有显著优势。特别是在数字政务建设中&#xff0c;区块链技术能够有效解决信任…

Spring Boot集成Ldap快速入门Demo

1.Ldap介绍 LDAP&#xff0c;Lightweight Directory Access Protocol&#xff0c;轻量级目录访问协议. LDAP是一种特殊的服务器&#xff0c;可以存储数据数据的存储是目录形式的&#xff0c;或者可以理解为树状结构&#xff08;一层套一层&#xff09;一般存储关于用户、用户…

多规格产品应该如何设置呢?

今天一用户从供应商手中拿到产品价目表&#xff0c;但是设置起来蒙圈了&#xff0c;接下来我们就一起设置一下吧&#xff5e; 一、产品价格表 我们通过供应商手中拿到产品价目表是这个样子的&#xff1a; 我们可以看到此产品的销售客价根据不同地区导致的价格不同&#xff0…

环绕数字化学校,打造四个体系

近年来&#xff0c;各地学校活跃顺应“互联网教育”发展大势&#xff0c;大力开展数字化学校建造&#xff0c;在投入上都设有专项资金&#xff0c;很多学校现在信息化教育设施已满意现行教育教育要求。学校环绕数字化学校着力打造四个体系&#xff0c;即教育教务管理体系、协同…

UI组件库和内容文字的中英文切换

同时实现UI组件库(这里以ElementPlus为例)和内容文字的中英文切换 1. 安装vueI18n和element-plus pnpm i vue-i18n element-plus 2. 然后在项目中src目录下新建lang文件夹&#xff0c;里面新建en.ts和zh.ts还有index.ts index.ts import { createI18n } from vue-i18n impor…

Certbot免费证书的安装,使用,自动续期

首先你得先确认你得linux是那个操作系统&#xff0c;可以用这几个命令试一下。两个都可以试试 cat /etc/os-releaseuname -a然后看是Certbot得安装&#xff1a; CentOS: yum update yum install certbot -y Debian&#xff1a; apt update apt install certbot -y 有的云…

46. UE5 RPG 增加角色受击反馈

在前面的文章中&#xff0c;我们实现了对敌人的属性的初始化&#xff0c;现在敌人也拥有的自己的属性值&#xff0c;技能击中敌人后&#xff0c;也能够实现血量的减少。 现在还需要的就是在技能击中敌人后&#xff0c;需要敌人进行一些击中反馈&#xff0c;比如敌人被技能击中后…

XN297 2.4GHz 单片高速无线收发芯片

概述 XN297是一款工作在2.400~2.483GHz世界通用ISM频段的单片无线收发芯片。该芯片集成 射频收发器、频率发生器、晶体振荡器、调制解调器等功能模块&#xff0c;并且支持一对多组网和带 ACK的通信模式。发射输出功率、工作频道以及通信数据率均可配置。 主要特性 1、低功…

Linux-笔记 i2c-tools

1、i2c-tools介绍 1、在日常linux开发中&#xff0c;有时候需要确认i2c硬件是否正常连接&#xff0c;设备是否正常工作&#xff0c;设备的地址是多少等等&#xff0c;这里我们就需要使用一个用于测试I2C总线的工具——i2c-tools&#xff0c;i2c-tools原理是通过操作/dev 路径 …

Python专题:三、数字和运算(2)

目录 一、数学运算 二、赋值运算 一、数学运算 1、运算符号 加法 减法- 乘法* 除法/ 计算机中浮点数表示有精度限制&#xff0c;Python有限&#xff0c;所以近似取数 2、除法取整// Python2中 整数/整数 值为整数 Python3中 整数/整数 整数or浮点数 //计算除法对结果取…

segment anythin 新标注工具 paddleocr训练自己的数据

快递单ocr检测 1.总结2.需求3.方案4.面单定位4.1反转图片扩充数据集4.2新的标注方式4.3json2yolo4.4yolov5推理 5.paddleocr5.1 数据标注5.2 文本检测训练5.3 文本识别训练检测结果 1.总结 按照惯例&#xff0c;先吐槽一下。反正也没人看我比比歪歪。做事全部藏着掖着&#xf…

Redis-新数据类型-Bitmaps

新数据类型-Bitmaps 简介 在计算机中&#xff0c;用二进制&#xff08;位&#xff09;作为存储信息的基本单位&#xff0c;1个字节等于8位。 例如 “abc” 字符串是由 3 个字节组成&#xff0c;计算机存储时使用其二进制表示&#xff0c;"abc"分别对应的ASCII码是 …

苹果Mac用户下载VS Code(Universal、Intel Chip、Apple Silicon)哪个版本?

苹果macOS用户既可以下载通用版&#xff08;Universal&#xff09;&#xff0c;软件将自动检测用户的处理器并进行适配。 也可以根据型号下载对应CPU的版本&#xff1a; 使用Intel CPU的Mac电脑可下载Intel Chip版本&#xff1b; 使用苹果自研M系列CPU的Mac电脑下载Apple Si…

“漫画之家”|基于Springboot+vue的“漫画之家”系统(源码+数据库+文档)

“漫画之家”系统 目录 基于Springbootvue的“漫画之家”系统 一、前言 二、系统设计 三、系统功能设计 1系统功能模块 2后台模块 5.2.1管理员功能模块 5.2.2用户功能模块 四、数据库设计 五、核心代码 六、论文参考 七、最新计算机毕设选题推荐 八、源码获取&a…

Final Draft 12 for Mac:高效专业剧本创作软件

对于剧本创作者来说&#xff0c;一款高效、专业的写作工具是不可或缺的。Final Draft 12 for Mac就是这样一款完美的选择。这款专为Mac用户设计的剧本创作软件&#xff0c;凭借其卓越的性能和丰富的功能&#xff0c;让您的剧本创作更加得心应手。 Final Draft 12支持多种剧本格…

完美匹配企业需求的FTP替代软件,需要具备哪些功能和价值?

FTP作为世界范围内第一个文件传输协议&#xff0c;已被广泛使用30多年&#xff0c;也是企业使用较多的一种方式。但在数字化转型的浪潮中&#xff0c;企业对文件传输的需求日益增长&#xff0c;FTP存在的弊端也逐渐成为企业发展的桎梏&#xff0c;比如安全性、稳定性、传输效率…

软件测试基础理论复习

什么是软件&#xff1f; 软件是计算机系统中与硬件相互依存的另一部分&#xff0c; 软件包括程序文档 什么是软件测试&#xff1f; &#xff08;1&#xff09;软件测试是在现有软件&#xff08;程序文档&#xff09;中寻找缺陷的过程&#xff1b; &#xff08;2&#xff0…