diff --git a/.env.development.example b/.env.development.example new file mode 100644 index 0000000..2f8de6d --- /dev/null +++ b/.env.development.example @@ -0,0 +1,38 @@ +# 是否开启mock数据,关闭时需要自行对接后台接口 +VITE_USE_MOCK = false + +# 资源公共路径,需要以 /开头和结尾 +VITE_PUBLIC_PATH = / + +# 本地开发代理,可以解决跨域及多地址代理 +# 如果接口地址匹配到,则会转发到http://localhost:3000,防止本地出现跨域问题 +# 可以有多个,注意多个不能换行,否则代理将会失效 +# VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]] +# VITE_PROXY=[["/api","https://vvbin.cn/test"]] + +# 是否删除Console.log +VITE_DROP_CONSOLE = false + +# 接口地址 +# 如果没有跨域问题,直接在这里配置即可 +VITE_GLOB_API_URL=http://10.133.96.105:8077 +# 报表系统地址 +VITE_GLOB_REPORT_URL=http://10.133.96.105:3100 + +# 文件上传接口 可选 +VITE_GLOB_UPLOAD_URL = /system/oss/upload + +# 文件预览接口 可选 +VITE_GLOB_UPLOAD_PREVIEW = http://10.0.252.28:8012/onlinePreview?url= + +#外部url地址 +VITE_GLOB_OUT_LINK_URL = ['http://localhost:4100'] + +#打印项目地址 +VITE_GLOB_PRINT_BASE_URL = http://114.116.210.204:3300 + +# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换 +VITE_GLOB_API_URL_PREFIX = + +# 屏蔽通知消息的轮询 +VITE_DISABLE_NEWS = true diff --git a/.env.production.example b/.env.production.example new file mode 100644 index 0000000..9f5ddda --- /dev/null +++ b/.env.production.example @@ -0,0 +1,38 @@ +# 是否开启mock +VITE_USE_MOCK = true + +# 资源公共路径,需要以 / 开头和结尾 +VITE_PUBLIC_PATH = / + +# 是否删除Console.log +VITE_DROP_CONSOLE = true + +# 打包是否输出gz|br文件 +# 可选: gzip | brotli | none +# 也可以有多个, 例如 ‘gzip’|'brotli',这样会同时生成 .gz和.br文件 +VITE_BUILD_COMPRESS = 'gzip' + +# 使用compress时是否删除源文件,默认false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# 接口地址 可以由nginx做转发或者直接写实际地址 +VITE_GLOB_API_URL=http://10.133.96.60:8088 + + +# 文件上传地址 可以由nginx做转发或者直接写实际地址 +VITE_GLOB_UPLOAD_URL = /system/oss/upload + +# 文件预览接口 可选 +VITE_GLOB_UPLOAD_PREVIEW = http://114.116.210.204:8012/onlinePreview?url= + +#外部url地址 +VITE_GLOB_OUT_LINK_URL = ['http://114.116.210.204:4100'] + +#打印项目地址 +VITE_GLOB_PRINT_BASE_URL = http://114.116.210.204:3300 + +# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换 +VITE_GLOB_API_URL_PREFIX = + +# 打包是否开启pwa功能 +VITE_USE_PWA = false diff --git a/.gitignore b/.gitignore index 5a59c14..2297191 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ tests/server/static/upload .env.local .env.*.local .eslintcache +.env.development +.env.production # Log files npm-debug.log* diff --git a/docs/dev_readme.md b/docs/dev_readme.md index 8006597..0ecb24e 100644 --- a/docs/dev_readme.md +++ b/docs/dev_readme.md @@ -11,9 +11,15 @@ - 表单和表格需要合理调整字段宽度,响应式布局下需要使用定宽模式,一般情况下,字段的宽度取平均字长 + 2个汉字的宽度为宜,不要留太长的label,也要避免出现label换行 ## Q&A + ### 为什么表单所有字段都成了必填 默认情况下,绑定流程后,新建节点的所有字段都被设置为必填,需要在流程的开始节点-表单设置中去掉非必填的项。 +### 表单设计和代码模版有什么区别 +代码模版生成的本地文件有二开支持,表单符合UI规范,表单设计可以在线发布,像低开一样,不用写代码,但是界面不符合UI规范。 + +两种方法表单设计器支持内容一致,也都支持流程,差别只是UI方面。建议在设计业务模块优先使用代码模版。 + ## 在Tab页中打开表单/流程 如果你需要自己编程实现Tab页跳转,或者升级旧版框架的页面,可以参考下面步骤: ```typescript diff --git a/docs/表单二开/1_拆分表单.md b/docs/表单二开/1_拆分表单.md index 0b96b9e..7dcf22e 100644 --- a/docs/表单二开/1_拆分表单.md +++ b/docs/表单二开/1_拆分表单.md @@ -68,7 +68,7 @@ export default { components: { Form, Col, SimpleFormItem, Row, FormItem }, mixins: [SimpleFormSetup], setup(props, ctx) { - const ret = SimpleForm.setup(props, ctx); + const ret = SimpleFormSetup.setup(props, ctx); return { ...ret }; diff --git a/docs/表单二开/3_明细表二开例子.md b/docs/表单二开/3_明细表二开例子.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/表单二开/4_表单tab页拆分+改为进度条样式.md b/docs/表单二开/4_表单tab页拆分+改为进度条样式.md new file mode 100644 index 0000000..72e109a --- /dev/null +++ b/docs/表单二开/4_表单tab页拆分+改为进度条样式.md @@ -0,0 +1 @@ +# 二开实例:Tab页拆分+样式调整+校验 diff --git a/src/components/SimpleForm/src/SimpleForm.vue b/src/components/SimpleForm/src/SimpleForm.vue index f920557..74e3b8d 100644 --- a/src/components/SimpleForm/src/SimpleForm.vue +++ b/src/components/SimpleForm/src/SimpleForm.vue @@ -1,20 +1,16 @@ diff --git a/src/utils/helper/generatorHelper.ts b/src/utils/helper/generatorHelper.ts index 7f2ab23..2ab6598 100644 --- a/src/utils/helper/generatorHelper.ts +++ b/src/utils/helper/generatorHelper.ts @@ -581,55 +581,6 @@ export function buildListCode(model: GeneratorConfig): string { ${model.listConfig.isLeftMenu ? '' : ''} - ${ - hasStartWorkButton - ? ` - - - - ${ - hasFlowRecordButton - ? ` - - ` - : '' - }` - : '' - } ${ hasTemplatePrint ? ` ` } - +