X Tutup
Skip to content

Commit bd2aaff

Browse files
committed
style: 💄 优化样式
1 parent 96cf9ab commit bd2aaff

File tree

8 files changed

+35
-13
lines changed

8 files changed

+35
-13
lines changed

packages/plugin-datasource-pane/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alilc/lowcode-plugin-datasource-pane",
3-
"version": "1.0.0-beta.2",
3+
"version": "1.0.0",
44
"description": "低代码引擎数据源面板",
55
"main": "lib/index.js",
66
"files": [
@@ -58,5 +58,5 @@
5858
"traverse": "^0.6.6",
5959
"xstate": "^4.26.0"
6060
},
61-
"homepage": "https://unpkg.com/@alilc/lowcode-plugin-datasource-pane@1.0.0-beta.1/build/index.html"
61+
"homepage": "https://unpkg.com/@alilc/lowcode-plugin-datasource-pane@1.0.0/build/index.html"
6262
}

packages/plugin-datasource-pane/src/components/DataSourceForm/DataSourceForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ const SCHEMA = {
132132
'x-component-props': {
133133
defaultPropertyKeys: [],
134134
addText: '选择添加',
135+
autoWidth: false,
135136
},
136137
'x-decorator-props': {},
137138
properties: {

packages/plugin-datasource-pane/src/components/DataSourceListItem/DataSourceListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class DataSourceListItemOperation extends PureComponent<DataSourceListIte
239239
key={icon}
240240
delay={100}
241241
trigger={
242-
<Button size="small" onClick={this.handleOperationClick} text>
242+
<Button iconSize="small" className={generateClassName('item-operate')} onClick={this.handleOperationClick} text>
243243
<Icon type={icon} />
244244
</Button>
245245
}

packages/plugin-datasource-pane/src/components/DataSourceListItem/list-item.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $cls-prefix: "lowcode-plugin-datasource-pane";
1818
text-overflow: ellipsis;
1919
white-space: nowrap;
2020
font-size: 12px;
21+
font-weight: bold;
2122
.#{$cls-prefix}-item-typetag {
2223
font-weight: 700;
2324
margin-right: 4px;
@@ -36,4 +37,12 @@ $cls-prefix: "lowcode-plugin-datasource-pane";
3637
overflow: hidden;
3738
}
3839
}
39-
}
40+
41+
.#{$cls-prefix}-item-operate {
42+
color: #8f9bb3 !important;
43+
44+
&:hover {
45+
color: #5584ff !important;
46+
}
47+
}
48+
}

packages/plugin-datasource-pane/src/components/DataSourceOperations/DataSourceOperations.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ export class DataSourceOperations extends PureComponent<DataSourceOperationsProp
5252
this.props;
5353

5454
if (mode === 'sorting') {
55-
return [
56-
<Button onClick={this.props.onFinishSort}>完成</Button>,
57-
<Button text onClick={this.props.onCancelSort}>
58-
取消
59-
</Button>,
55+
return [
56+
<Button onClick={this.props.onFinishSort}>完成</Button>,
57+
<Button text onClick={this.props.onCancelSort}>
58+
取消
59+
</Button>,
6060
];
61-
}
61+
}
6262
if (mode === 'exporting') {
6363
return [
6464
<Button

packages/plugin-datasource-pane/src/components/Forms/component-switch-btn.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { PureComponent } from 'react';
22
import { Button, Icon } from '@alifd/next';
3+
import { IconVariable } from '../icons/variable';
34
import _get from 'lodash/get';
45
import { connect, mapProps } from '@formily/react';
56
import cn from 'classnames';
@@ -55,7 +56,7 @@ class ComponentSwitchBtnCompComp extends PureComponent<
5556
text
5657
onClick={this.handleSwitch}
5758
>
58-
<Icon type="set" />
59+
<IconVariable size={20} fill="#8f9bb3" />
5960
</Button>
6061
);
6162
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { SVGIcon, IconProps } from '@alilc/lowcode-utils';
2+
3+
export function IconVariable(props: IconProps) {
4+
return (
5+
<SVGIcon viewBox="0 0 1024 1024" {...props}>
6+
<path d="M596.32 263.392c18.048 6.56 27.328 26.496 20.8 44.512l-151.04 414.912a34.72 34.72 0 1 1-65.28-23.744l151.04-414.912a34.72 34.72 0 0 1 44.48-20.768zM220.64 192H273.6v55.488H233.024c-26.112 0-38.464 14.4-38.464 44.544v134.304c0 42.496-19.936 71.264-59.104 85.664 39.168 16.448 59.104 44.544 59.104 85.664v134.976c0 28.8 12.352 43.84 38.464 43.84H273.6V832H220.672c-30.24 0-53.6-10.272-70.08-29.44-15.136-17.856-22.72-42.496-22.72-72.64v-128.832c0-19.872-4.096-34.24-12.352-43.2-9.6-10.944-26.784-16.416-51.52-17.792v-56.192c24.736-1.376 41.92-7.52 51.52-17.824 8.256-9.6 12.384-24 12.384-43.168V294.784c0-30.848 7.552-55.488 22.688-73.312C167.04 201.6 190.4 192 220.672 192z m529.792 0h52.896c30.24 0 53.6 9.6 70.08 29.44 15.136 17.856 22.72 42.496 22.72 73.344v128.128c0 19.2 4.096 34.24 13.024 43.84 8.96 9.6 26.112 15.776 50.848 17.152v56.192c-24.736 1.376-41.92 6.848-51.52 17.824-8.256 8.896-12.384 23.296-12.384 43.168v128.8c0 30.176-7.552 54.816-22.688 72.64-16.48 19.2-39.84 29.472-70.08 29.472h-52.896v-55.488h40.544c25.408 0 38.464-15.104 38.464-43.84v-135.04c0-41.088 19.232-69.184 59.104-85.632-39.872-14.4-59.104-43.168-59.104-85.664V292.032c0-30.144-13.056-44.544-38.464-44.544H750.4V192z" />
7+
</SVGIcon>
8+
);
9+
}
10+
11+
IconVariable.displayName = 'Variable';

packages/plugin-datasource-pane/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface Options {
1616
const plugin = (ctx: ILowCodePluginContext) => {
1717
return {
1818
name: 'com.alibaba.lowcode.datasource.pane',
19-
width: 600,
19+
width: 300,
2020
// 依赖的插件(插件名数组)
2121
dep: [],
2222
// 插件对外暴露的数据和方法
@@ -36,7 +36,7 @@ const plugin = (ctx: ILowCodePluginContext) => {
3636
description: '数据源',
3737
},
3838
panelProps: {
39-
width: '600px',
39+
width: '300px',
4040
// title: '源码面板',
4141
},
4242
content: (

0 commit comments

Comments
 (0)
X Tutup