fix
This commit is contained in:
39
README.md
39
README.md
@@ -79,7 +79,8 @@ npm install # 或 yarn
|
||||
|
||||
# 编译流程
|
||||
|
||||
- `build` 会生成 `dist` 文件夹,以及 `plugin.zip` 文件
|
||||
- **build**
|
||||
- `build` 会生成 `dist` 文件夹,以及 `plugin.zip` 文件
|
||||
|
||||
> 如果只需要 `dist` 文件夹,可以执行 `vite:build`
|
||||
|
||||
@@ -90,13 +91,22 @@ npm run build # 或 yarn build
|
||||
npm run vite:build # 或 yarn vite:build
|
||||
```
|
||||
|
||||
- `upload` 会将 `plugin.zip` 上传到 Kintone plugin
|
||||
- **build:prod**
|
||||
- `build:prod` 也是生成 `plugin.zip` 文件,但是会进行压缩和混淆,并且没有 sourceMap,在发布的时候使用
|
||||
|
||||
```bash
|
||||
npm run build:prod # 或 yarn build:prod
|
||||
```
|
||||
|
||||
- **upload**
|
||||
- `upload` 会将 `plugin.zip` 上传到 Kintone plugin
|
||||
|
||||
```bash
|
||||
npm run upload # 或 yarn upload
|
||||
```
|
||||
|
||||
- `build-upload` 会顺序执行上面两步
|
||||
- **build-upload**
|
||||
- `build-upload` 会顺序执行上面两步
|
||||
|
||||
```bash
|
||||
npm run build-upload # 或 yarn build-upload
|
||||
@@ -199,6 +209,28 @@ desktop/mobile 的 js 会被 `vite` 使用 `lib` 模式打包,从而将所有
|
||||
```
|
||||
|
||||
|
||||
## 关于 KintoneRestAPIClient
|
||||
|
||||
在 desktop/mobile,直接使用:
|
||||
|
||||
```ts
|
||||
import { KintoneRestAPIClient } from '@kintone/rest-api-client';
|
||||
|
||||
const client = new KintoneRestAPIClient();
|
||||
client.app...
|
||||
```
|
||||
|
||||
在 vue 中使用 useKintoneClient():
|
||||
|
||||
```vue
|
||||
import { useKintoneClient } from '@/composables/useKintoneClient';
|
||||
|
||||
const client = useKintoneClient();// KintoneRestAPIClient
|
||||
client.app...
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 关于 i18n
|
||||
|
||||
在 desktop/mobile:
|
||||
@@ -211,6 +243,7 @@ console.log(t('config.button.label'));
|
||||
```
|
||||
|
||||
在 vue:
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
Reference in New Issue
Block a user