提交 274c0ccd 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 d7080fe4
流水线 #1830 已失败 ,包含阶段
此差异已折叠。
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>srv_Default_pub</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
\ No newline at end of file
此差异已折叠。
<?xml version="1.0" encoding="UTF-8"?>
<diagram>
<page_setting>
<direction_horizontal>true</direction_horizontal>
<scale>100</scale>
<paper_size>A4 210 x 297 mm</paper_size>
<top_margin>30</top_margin>
<left_margin>30</left_margin>
<bottom_margin>30</bottom_margin>
<right_margin>30</right_margin>
</page_setting>
<category_index>0</category_index>
<zoom>1.0</zoom>
<x>0</x>
<y>0</y>
<default_color>
<r>128</r>
<g>128</g>
<b>192</b>
</default_color>
<color>
<r>255</r>
<g>255</g>
<b>255</b>
</color>
<font_name>Microsoft YaHei UI</font_name>
<font_size>9</font_size>
<settings>
<database>StandardSQL</database>
<capital>false</capital>
<table_style></table_style>
<notation></notation>
<notation_level>0</notation_level>
<notation_expand_group>false</notation_expand_group>
<view_mode>2</view_mode>
<outline_view_mode>2</outline_view_mode>
<view_order_by>1</view_order_by>
<auto_ime_change>false</auto_ime_change>
<validate_physical_name>true</validate_physical_name>
<use_bezier_curve>false</use_bezier_curve>
<suspend_validator>false</suspend_validator>
<export_setting>
<export_ddl_setting>
<output_path></output_path>
<encoding></encoding>
<line_feed></line_feed>
<is_open_after_saved>true</is_open_after_saved>
<environment_id>null</environment_id>
<category_id>null</category_id>
<ddl_target>
<create_comment>true</create_comment>
<create_foreignKey>true</create_foreignKey>
<create_index>true</create_index>
<create_sequence>true</create_sequence>
<create_table>true</create_table>
<create_tablespace>true</create_tablespace>
<create_trigger>true</create_trigger>
<create_view>true</create_view>
<drop_index>true</drop_index>
<drop_sequence>true</drop_sequence>
<drop_table>true</drop_table>
<drop_tablespace>true</drop_tablespace>
<drop_trigger>true</drop_trigger>
<drop_view>true</drop_view>
<inline_column_comment>true</inline_column_comment>
<inline_table_comment>true</inline_table_comment>
<comment_value_description>true</comment_value_description>
<comment_value_logical_name>false</comment_value_logical_name>
<comment_value_logical_name_description>false</comment_value_logical_name_description>
<comment_replace_line_feed>false</comment_replace_line_feed>
<comment_replace_string></comment_replace_string>
</ddl_target>
</export_ddl_setting>
<export_excel_setting>
<category_id>null</category_id>
<output_path></output_path>
<template></template>
<template_path></template_path>
<used_default_template_lang></used_default_template_lang>
<image_output></image_output>
<is_open_after_saved>true</is_open_after_saved>
<is_put_diagram>true</is_put_diagram>
<is_use_logical_name>true</is_use_logical_name>
</export_excel_setting>
<export_html_setting>
<output_dir></output_dir>
<with_category_image>true</with_category_image>
<with_image>true</with_image>
<is_open_after_saved>true</is_open_after_saved>
</export_html_setting>
<export_image_setting>
<output_file_path></output_file_path>
<category_dir_path></category_dir_path>
<with_category_image>true</with_category_image>
<is_open_after_saved>true</is_open_after_saved>
</export_image_setting>
<export_java_setting>
<java_output></java_output>
<package_name></package_name>
<class_name_suffix></class_name_suffix>
<src_file_encoding></src_file_encoding>
<with_hibernate>false</with_hibernate>
</export_java_setting>
<export_testdata_setting>
<file_encoding></file_encoding>
<file_path></file_path>
<format>0</format>
</export_testdata_setting>
</export_setting>
<category_settings>
<free_layout>false</free_layout>
<show_referred_tables>false</show_referred_tables>
<categories>
</categories>
</category_settings>
<translation_settings>
<use>false</use>
<translations>
</translations>
</translation_settings>
<model_properties>
<id></id>
<height>-1</height>
<width>-1</width>
<font_name>Microsoft YaHei UI</font_name>
<font_size>9</font_size>
<x>50</x>
<y>50</y>
<color>
<r>255</r>
<g>255</g>
<b>255</b>
</color>
<connections>
</connections>
<display>false</display>
<creation_date>2016-09-01 09:10:11</creation_date>
<updated_date>2016-09-01 19:00:53</updated_date>
<model_property>
<name>Project Name</name>
<value></value>
</model_property>
<model_property>
<name>Model Name</name>
<value></value>
</model_property>
<model_property>
<name>Version</name>
<value></value>
</model_property>
<model_property>
<name>Company</name>
<value></value>
</model_property>
<model_property>
<name>Author</name>
<value></value>
</model_property>
</model_properties>
<table_properties>
<schema></schema>
</table_properties>
<environment_setting>
<environment>
<id>0</id>
<name>Default</name>
</environment>
</environment_setting>
</settings>
<dictionary>
</dictionary>
<tablespace_set>
</tablespace_set>
<contents>
</contents>
<column_groups>
</column_groups>
<test_data_list>
</test_data_list>
<sequence_set>
</sequence_set>
<trigger_set>
</trigger_set>
<change_tracking_list>
</change_tracking_list>
</diagram>
\ No newline at end of file
const { override, fixBabelImports, addLessLoader } = require('customize-cra');
module.exports = override(
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: { '@primary-color': '#1890ff' },
})
);
{
"name": "antd-demo-ts",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test"
},
"dependencies": {
"antd": "^3.23.2",
"async-validator": "^3.1.0",
"axios": "^0.19.0",
"moment": "^2.24.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "^3.1.1",
"rxjs": "^6.5.3",
"tinymce": "4.8.5",
"typescript": "^3.6.3"
},
"devDependencies": {
"@types/jest": "^24.0.18",
"@types/node": "^12.7.5",
"@types/react": "^16.9.2",
"@types/react-dom": "^16.9.0",
"babel-plugin-import": "^1.12.1",
"customize-cra": "^0.6.1",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"react-app-rewired": "^2.1.3"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
\ No newline at end of file
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
// App.less
#components-layout-demo-custom-trigger .logo {
height: 32px;
text-align: center;
margin: 16px;
}
#components-layout-demo-custom-trigger .trigger {
font-size: 18px;
line-height: 64px;
padding: 0 24px;
cursor: pointer;
transition: color 0.3s;
}
#components-layout-demo-custom-trigger .trigger:hover {
color: #1890ff;
}
#components-layout-demo-custom-trigger .logo {
height: 32px;
margin: 16px;
}
\ No newline at end of file
import React, { PureComponent } from 'react';
import ExampleEditorType from './pages/exapmple/example-editor-type/example-editor-type';
import ExampleEditView from './pages/exapmple/example-edit-view/example-edit-view';
import ExampleDLFEditView from './pages/exapmple/example-dlfedit-view/example-dlfedit-view';
import './App.less';
import { Layout, Menu, Breadcrumb, Icon } from 'antd';
const { Header, Content, Footer, Sider } = Layout;
const { SubMenu } = Menu;
/**
* App
*
* @export
* @class App
* @extends {PureComponent}
*/
export default class App extends PureComponent {
/**
* 当前页面
*/
public currentPage: string = "ExampleEditorType";
/**
* 处理菜单点击
* @param item
* @param key
* @param keyPath
* @param domEvent
*/
public handleMenuClick(item, key, keyPath, domEvent) {
this.currentPage = key;
this.tick();
}
/**
* 获取当前视图
*/
public getCurPage(): any {
if (Object.is(this.currentPage, "ExampleEditorType")) {
return <ExampleEditorType/>;
}
if (Object.is(this.currentPage, "ExampleEditView")) {
return <ExampleEditView/>;
}
if (Object.is(this.currentPage, "ExampleDLFEditView")) {
return <ExampleDLFEditView/>;
}
}
/**
* 变更监测
*
*/
protected tick(): void {
this.setState({
date: new Date()
});
}
/**
* 渲染视图
*
* @returns
* @memberof App
*/
public render() {
return <div className="App">
<Layout id="components-layout-demo-custom-trigger">
<Sider trigger={null} collapsible style={{ minHeight: '100vh' }}>
<div className="logo"><img src="https://cdn.ibizlab.cn/super-form/logo.png" /></div>
<Menu theme="dark" mode="inline" defaultSelectedKeys={['"ExampleEditorType""ExampleEditView""ExampleDLFEditView"']} onClick={({ item, key, keyPath, domEvent }) => { this.handleMenuClick(item, key, keyPath, domEvent) }}>
<Menu.Item key="ExampleEditorType">
<Icon type="user" />
<span>基础编辑器</span>
</Menu.Item>
<Menu.Item key="ExampleEditView">
<Icon type="video-camera" />
<span>基础表单项</span>
</Menu.Item>
<Menu.Item key="ExampleDLFEditView">
<Icon type="upload" />
<span>表单项动态逻辑示例</span>
</Menu.Item>
</Menu>
</Sider>
<Layout>
<Content
style={{
margin: '24px 16px',
padding: 24,
background: '#fff',
minHeight: 280,
}}>
{this.getCurPage()}
</Content>
</Layout>
</Layout>
</div>;
}
}
\ No newline at end of file
// this is less
.app-form-item {
display: flex;
justify-content: space-between;
padding-right: 16px;
margin-bottom: 6px;
.app-form-item-label {
text-align: right;
height: 32px;
line-height: 32px;
padding-right: 16px;
.isrequired {
display: inline-block;
margin-right: 4px;
font-family: SimSun;
line-height: 1;
font-size: 14px;
color: #f5222d;
}
}
.app-form-item-container {
.ant-form-item {
width: 100%;
.ant-form-item-control-wrapper {
width: 100%;
height: auto;
min-height: 59px;
}
}
}
}
.app-form-item-left {
flex-direction: row;
}
.app-form-item-right {
flex-direction: row-reverse;
}
.app-form-item-top {
flex-direction: column;
}
.app-form-item-bottom {
flex-direction: column-reverse;
}
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 0px !important;
}
// this is less
.app-form-item {
display: flex;
justify-content: space-between;
padding-right: 16px;
margin-bottom: 6px;
.app-form-item-label {
text-align: right;
height: 32px;
line-height: 32px;
padding-right: 16px;
.isrequired {
display: inline-block;
margin-right: 4px;
font-family: SimSun;
line-height: 1;
font-size: 14px;
color: #f5222d;
}
}
.app-form-item-container {
.ant-form-item {
width: 100%;
.ant-form-item-control-wrapper {
width: 100%;
height: auto;
min-height: 59px;
}
}
}
}
.app-form-item-left {
flex-direction: row;
}
.app-form-item-right {
flex-direction: row-reverse;
}
.app-form-item-top {
flex-direction: column;
}
.app-form-item-bottom {
flex-direction: column-reverse;
}
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 0px !important;
}
// this is less
.app-form-item {
display: flex;
justify-content: space-between;
padding-right: 16px;
margin-bottom: 6px;
.app-form-item-label {
text-align: right;
height: 32px;
line-height: 32px;
padding-right: 16px;
.isrequired {
display: inline-block;
margin-right: 4px;
font-family: SimSun;
line-height: 1;
font-size: 14px;
color: #f5222d;
}
}
.app-form-item-container {
.ant-form-item {
width: 100%;
.ant-form-item-control-wrapper {
width: 100%;
height: auto;
min-height: 59px;
}
}
}
}
.app-form-item-left {
flex-direction: row;
}
.app-form-item-right {
flex-direction: row-reverse;
}
.app-form-item-top {
flex-direction: column;
}
.app-form-item-bottom {
flex-direction: column-reverse;
}
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 0px !important;
}
此差异已折叠。
import React, { PureComponent } from 'react';
import { Checkbox } from 'antd';
import './app-checkbox-group.less';
/**
* 输入属性
*
* @export
* @interface CheckBoxGroupProps
*/
export interface CheckBoxGroupProps {
/**
* 传入表单项值
*
* @type {any}
* @memberof CheckBoxGroupProps
*/
value?: any;
/**
* 代码表标识
*
* @type {string}
* @memberof CheckBoxGroupProps
*/
tag?: string;
/**
* 是否禁用
*
* @type {boolean}
* @memberof CheckBoxGroupProps
*/
disabled: boolean;
/**
* 代码表
*
* @type {Object}
* @memberof CheckBoxGroupProps
*/
codelist?: Object;
/**
* 当前模式
*
* @type {string}
* @memberof CheckBoxGroupProps
*/
mode?: string;
/**
* 分割符
*
* @type {string}
* @memberof CheckBoxGroupProps
*/
separator?: string;
/**
* 值变化事件
*
* @memberof CheckBoxGroupProps
*/
onChange: (value: string) => void;
}
/**
* AppRadioGroup
*
* @export
* @class AppRadioGroup
* @extends {PureComponent}
*/
export default class AppCheckBoxGroup extends PureComponent<CheckBoxGroupProps> {
/**
* 当前代码表
*
* @memberof AppCheckBoxGroup
*/
public curCodeList: Array<any> = [];
/**
* 绑定值
*/
public currentValue: any = undefined;
/**
* 是否禁用
*/
public curDisabled: boolean = false;
/**
* 当前模式
*/
public curMode?: string;
/**
* 当前分隔符
*/
public curSeparator?: string;
constructor(props) {
super(props);
if (props.tag && props.codelist) {
this.curCodeList = props.codelist[props.tag];
}
if (props.separator) {
this.curSeparator = props.separator;
} else {
this.curSeparator = ";";
}
if (props.mode) {
this.curMode = props.mode;
} else {
this.curMode = "str";
}
if (props.value) {
this.initValve(props.value);
} else {
this.currentValue = [];
}
if (props.disabled) {
this.curDisabled = true;
} else {
this.curDisabled = false;
}
}
/**
* 在组件接收到一个新的 prop (或更新后)时被调用
*
* @memberof AppCheckBoxGroup
*/
public componentWillReceiveProps(nextProps: Readonly<CheckBoxGroupProps>, nextContext: any) {
if (nextProps.value) {
this.initValve(nextProps.value);
} else {
this.currentValue = [];
}
if (nextProps.disabled) {
this.curDisabled = true;
} else {
this.curDisabled = false;
}
}
/**
* 初始化value值
*/
public initValve(value: any) {
if (value) {
if (Object.is(this.curMode, "num") && this.curCodeList) {
let selectsArray: Array<any> = [];
let num = parseInt(value, 10);
this.curCodeList.forEach(item => {
if ((num & item.id) == item.id) {
selectsArray.push(item.id);
}
});
this.currentValue = selectsArray;
} else if (Object.is(this.curMode, "str")) {
if (value !== "") {
this.currentValue = value.split(this.curSeparator);
} else {
this.currentValue = [];
}
}
} else {
this.currentValue = [];
}
}
/**
* 绘制内容
*
* @returns
* @memberof AppCheckBoxGroup
*/
public render() {
return (<Checkbox.Group value={this.currentValue} style={{ width: '100%' }} disabled={this.curDisabled} onChange={($event) => { this.handleChange($event) }}>
{this.curCodeList.map((item) => {
return (<Checkbox key={item.id} value={item.id}>{item.text}</Checkbox>)
})}
</Checkbox.Group>
);
}
/**
* 值变化事件
*
* @param val
* @memberof AppCheckBoxGroup
*/
public handleChange(val) {
let value:any;
if (Object.is(this.curMode, "num")) {
let temp = 0;
val.forEach(item => {
temp = temp | parseInt(item, 10);
});
value = temp;
} else if (Object.is(this.curMode, "str")) {
let _datas:Array<any> = [];
this.curCodeList.forEach(item => {
const index = val.findIndex(_key => Object.is(item.id, _key));
if (index === -1) {
return;
}
_datas.push(item.id);
});
value = _datas.join(this.curSeparator);
}
this.props.onChange(value);
}
/**
* 变更监测
*
* @protected
* @memberof AppCheckBoxGroup
*/
protected tick(): void {
this.setState({
date: new Date()
});
}
}
\ No newline at end of file
// this is less
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 8px;
color: #666;
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册