Sfoglia il codice sorgente

feat(core): update some trans

gemercheung 3 anni fa
parent
commit
9a129078b1
2 ha cambiato i file con 6 aggiunte e 35 eliminazioni
  1. 1 1
      package.json
  2. 5 34
      src/views/devices/list.vue

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
     "bootstrap": "pnpm install",
     "serve": "npm run dev",
     "dev": "vite",
-    "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
+    "build": "cross-env NODE_ENV=production vite build --mode production && esno ./build/script/postBuild.ts",
     "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
     "build:no-cache": "pnpm clean:cache && npm run build",
     "report": "cross-env REPORT=true npm run build",

+ 5 - 34
src/views/devices/list.vue

@@ -51,14 +51,13 @@
   import { ListApi } from '/@/api/device/list';
   import AddModal from './AddModal.vue';
   import { useI18n } from '/@/hooks/web/useI18n';
-
+  const { t } = useI18n();
   // param type 0
   export default defineComponent({
     components: { BasicTable, TableAction, Tag, AddModal },
     setup() {
       const { createMessage } = useMessage();
       const [registerAddModal, { openModal: openAddModal }] = useModal();
-      const { t } = useI18n();
       const columns: BasicColumn[] = [
         {
           title: t('routes.devices.childName'),
@@ -108,34 +107,6 @@
       const searchForm: Partial<FormProps> = {
         labelWidth: 100,
         schemas: [
-          // {
-          //   field: 'part',
-          //   component: 'Select',
-          //   label: t('routes.devices.deviceList'),
-          //   defaultValue: '1',
-          //   colProps: {
-          //     span: 4,
-          //   },
-          //   componentProps: {
-          //     options: [
-          //       {
-          //         label: '全部',
-          //         value: '1',
-          //         key: '1',
-          //       },
-          //       {
-          //         label: '正常',
-          //         value: '2',
-          //         key: '2',
-          //       },
-          //       {
-          //         label: '已关闭',
-          //         value: '2',
-          //         key: '2',
-          //       },
-          //     ],
-          //   },
-          // },
           {
             field: 'searchKey',
             label: t('routes.devices.phoneName'),
@@ -193,13 +164,13 @@
       function renderOwnTypeLabel(type: number): string {
         switch (type) {
           case 0:
-            return '正常销售';
+            return t('routes.devices.ownName.0');
           case 2:
-            return '礼品赠送';
+            return t('routes.devices.ownName.2');
           case 1:
-            return '员工自用';
+            return t('routes.devices.ownName.1');
           case 3:
-            return '其它';
+            return t('routes.devices.ownName.3');
           default:
             return '';
         }