Files
2025-03-01 22:40:33 +08:00

71 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# demo
## 文件目录说明
```ts
├─README.md
├─block.json 小组件元信息,npm run upload上传的时候,代码将上传到block.json中的blockTypeID对应的小组件(插件),更换其中的url可以更换npm run start预览时打开的多维表格
├─jsconfig.json
├─package.json
├─src 组件
| ├─App.vue 组件入口
| ├─main.js 入口js文件
| ├─locales 多语配置
| | ├─en.json en语言配置
| | ├─i18n.js 多语配置文件,默认启用中文和英文
| | zh.json zh语言配置
| ├─components
| | Form.vue 代码示例
| ├─assets
| | main.css 默认重制了一些css样式
├─public
| ├─favicon.ico 图标
| index.html 入口文件
├─config
| webpack.config.js webpack配置文件
```
## 国际化
本模板已内置国际化方案,你只需提供国际化的文案即可
1.在 src/locales 对应文件增加国际化文案如在en.json中:
```json
{
"title": "title"
}
```
2.在代码中通过$t函数使用国际化key如在App.vue中:
```vue
<template>
<h1>{{$t('title')}}</h1>
</template>
```
## 安装依赖
```sh
npm / yarn / pnpm install
```
## 启动
```sh
npm run dev
```
## 打包
```sh
npm run build
```
## 发布
```sh
npm run upload
```