-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue3 意见收集 是否需要加入微前端架构? #459
Labels
enhancement
New feature or request
Comments
LengYXin
added
bug
Something isn't working
enhancement
New feature or request
and removed
bug
Something isn't working
labels
Mar 12, 2021
这里顺便贴一个 React 版本结构和vue3一致entity.tsimport { action, observable } from 'mobx';
import React from 'react';
import { EnumLocaleLabel } from '../locales';
/**
* 页面实体
* 配置参考 https://procomponents.ant.design/components/field-set/
*/
class Entity {
/**
* 当前表单 的值
* @memberof Entity
*/
@observable values = {};
/**
* 更改 value
*/
@action.bound
onValuesChange(values) {
console.log("LENG ~ frameworkuser", values)
this.values = values
}
/**
* ITCode
* @readonly
* @memberof Entity
*/
get ITCode(): React.WTM_EntitiesField {
const label = React.$i18n.t(EnumLocaleLabel.ITCode)
return {
name: ['Entity', 'ITCode'],
label,
placeholder: React.$i18n.t(`tips.placeholder.input`, { label }),
rules: [{ required: true }],
}
}
...
/**
* 角色
* @readonly
* @memberof Entity
*/
get SelectedRolesCodes(): React.WTM_EntitiesField {
const label = React.$i18n.t(EnumLocaleLabel.RoleName)
return {
name: 'SelectedRolesCodes',
label,
// valueType: "checkbox",
request: this.GetFrameworkRoles,
placeholder: React.$i18n.t(`tips.placeholder.input`, { label }),
rules: [],
}
}
/**
* 用户组
* @readonly
* @memberof Entity
*/
get SelectedGroupCodes(): React.WTM_EntitiesField {
const label = React.$i18n.t(EnumLocaleLabel.GroupName)
return {
name: 'SelectedGroupCodes',
label,
// valueType: "checkbox",
request: this.GetFrameworkGroups,
placeholder: React.$i18n.t(`tips.placeholder.input`, { label }),
rules: [],
}
}
async GetFrameworkRoles(params, props) {
return React.Ajax.get<any>('/api/_FrameworkUserBase/GetFrameworkRoles')
}
async GetFrameworkGroups(params, props) {
return React.Ajax.get<any>('/api/_FrameworkUserBase/GetFrameworkGroups')
}
}
export const PageEntity = new Entity() 使用class ReadonlyFields extends React.Component {
componentDidMount() {
console.log("LENG ~ index ~ componentDidMount ~ componentDidMount", this)
}
render() {
return (
<React.Fragment>
<React.ant.ProForm.Group>
<React.ant.ProFormField readonly width="md" {...PageEntity.ITCode} />
<React.ant.ProFormField readonly width="md" {...PageEntity.Password} />
</React.ant.ProForm.Group>
<React.ant.ProForm.Group>
<React.ant.ProFormField readonly width="md" {...PageEntity.Name} />
<React.ant.ProFormField readonly width="md" {...PageEntity.Gender} />
</React.ant.ProForm.Group>
<React.ant.ProForm.Group>
<React.ant.ProFormField readonly width="md" {...PageEntity.Email} />
<React.ant.ProFormField readonly width="md" {...PageEntity.Address} />
</React.ant.ProForm.Group>
<React.ant.ProForm.Group>
<React.ant.ProFormField readonly width="md" {...PageEntity.CellPhone} />
<React.ant.ProFormField readonly width="md" {...PageEntity.HomePhone} />
</React.ant.ProForm.Group>
<React.ant.ProForm.Group>
<React.ant.ProFormField readonly width="md" {...PageEntity.ZipCode} />
</React.ant.ProForm.Group>
<React.ant.ProFormField readonly {...PageEntity.PhotoId} >
<React.ant.Upload listType="picture-card" >
<div>
<React.icons.PlusOutlined />
</div>
</React.ant.Upload>
</React.ant.ProFormField>
<React.ant.ProFormField readonly {...PageEntity.SelectedGroupCodes} />
<React.ant.ProFormField readonly {...PageEntity.SelectedRolesCodes} />
</React.Fragment>
)
}
} |
大佬 wtm-vue3版本发布日程有了吗? |
已开发完成,待发布 |
大佬. 2022年喽. VUE3 望眼欲穿哦 |
plus里已经可以生成vue3的项目了 |
试用了一下. 看到plus里的layui是有代码生成的, 但下载为vue3时 , 没有了本地代码生成器. 这个代码本地生成器还挺重要的. |
还有layui,官方已经放弃了. 在WTM项目中是否还有坚持的必要? |
接楼上,layui是我这种后端唯一改前端的方式了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Vue3
rc 版本已发布一段时间 WTM 的 Vue3 分离版本已提上日程。
在此收集 一些 基础架构的意见和规则方便后续开发
有什么需求都可以提出来 多多益善
常见的路由&多语言等配置现在都是自动化 根据 路径名称匹配 当然也可以手动设置
UI 集成 Antd
Grid 集成 AgGrid
富文本 集成 Ckeditor
页面目前的结构如下
基本上都是 Vue3 文件推荐语法 当然默认情况下以 @vue-class-component 的 class 组件为主
比较关键的位置 为
使用实体 WtmField 组件 传入 entityKey
源代码 在 WalkingTec.Mvvm.Vue3Demo 中
是否需要微前端架构?这是一个问题
The text was updated successfully, but these errors were encountered: