Compare commits

..

5 Commits

Author SHA1 Message Date
Wells
6f2c8f239a chore(release): publish
- @music163/tango-designer@1.0.0-alpha.16
2024-03-21 16:06:40 +08:00
Wells
6215ed96f2 fix: copy node path in variable tree 2024-03-21 15:33:23 +08:00
Wells
190aa1d8ee chore(release): publish
- @music163/tango-designer@1.0.0-alpha.15
2024-03-20 17:42:17 +08:00
Wells
bceb7a5c9c fix: update selection helper style 2024-03-20 17:40:12 +08:00
Wells
d64042922b fix: quick insert child 2024-03-20 17:10:52 +08:00
5 changed files with 37 additions and 10 deletions

View File

@@ -2,7 +2,7 @@ const packageJson = {
name: 'demo',
private: true,
dependencies: {
'@music163/antd': '0.2.1',
'@music163/antd': '0.2.2',
'@music163/tango-boot': '0.2.5',
react: '17.0.2',
'react-dom': '17.0.2',
@@ -56,7 +56,7 @@ const tangoConfigJson = {
},
'@music163/antd': {
description: '云音乐低代码中后台应用基础物料',
version: '0.2.1',
version: '0.2.2',
library: 'TangoAntd',
type: 'baseDependency',
resources: [

View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.0.0-alpha.16](https://github.com/netease/tango/compare/@music163/tango-designer@1.0.0-alpha.15...@music163/tango-designer@1.0.0-alpha.16) (2024-03-21)
### Bug Fixes
- copy node path in variable tree ([6215ed9](https://github.com/netease/tango/commit/6215ed96f241adf6b67aa3019745bf7d40751787))
# [1.0.0-alpha.15](https://github.com/netease/tango/compare/@music163/tango-designer@1.0.0-alpha.14...@music163/tango-designer@1.0.0-alpha.15) (2024-03-20)
### Bug Fixes
- quick insert child ([d640429](https://github.com/netease/tango/commit/d64042922bc21723025b1a59586ef23f37f17ffc))
- update selection helper style ([bceb7a5](https://github.com/netease/tango/commit/bceb7a5c9cea9dc2acb091bf7967e5d3b7ba5210))
# [1.0.0-alpha.14](https://github.com/netease/tango/compare/@music163/tango-designer@1.0.0-alpha.13...@music163/tango-designer@1.0.0-alpha.14) (2024-03-19)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@music163/tango-designer",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.16",
"description": "lowcode designer",
"keywords": [
"react"

View File

@@ -164,6 +164,8 @@ export function VariableTree(props: VariableTreeProps) {
const state = { activeNode, mode, setMode, clear };
console.log(treeData);
return (
<Box display="flex" columnGap="l" className="VariableTree" css={varTreeStyle} {...rest}>
<Box className="VariableList" width="40%">
@@ -184,6 +186,12 @@ export function VariableTree(props: VariableTreeProps) {
if (isLeaf) {
const showView = node.showViewButton ?? showViewButton;
let nodePath = node.key;
if (/^(stores|services)\./.test(nodePath)) {
nodePath = `tango.${node.key.replaceAll('.', '?.').replace('?.', '.')}`;
}
return (
<Box display="flex" justifyContent="space-between" alignItems="center">
<Text flex="1" truncated>
@@ -216,7 +224,7 @@ export function VariableTree(props: VariableTreeProps) {
/>
</Popconfirm>
)}
<CopyClipboard text={`tango.${node.key.replaceAll('.', '?.')}`}>
<CopyClipboard text={nodePath}>
{({ copied, onClick }) => {
const label = copied ? '已复制' : '复制变量路径';
return (

View File

@@ -244,10 +244,6 @@ const selectionHelperStyle = css`
cursor: pointer;
background: var(--color-active, var(--tango-colors-brand));
svg {
margin-right: 4px;
}
&:hover {
background: var(--color-active-hover, var(--tango-colors-primary-50));
}
@@ -395,7 +391,7 @@ function InsertedDropdown({ options = [], onSelect, ...props }: InsertedDropdown
key={item.name}
label={item.label}
icon={item.icon}
description={item.description}
description={item.description || '暂无组件描述'}
onClick={() => onSelect?.(item.name)}
/>
))}
@@ -410,6 +406,7 @@ function InsertedDropdown({ options = [], onSelect, ...props }: InsertedDropdown
const insertedItemStyle = css`
cursor: pointer;
user-select: none;
&:hover {
background-color: var(--tango-colors-fill2);
@@ -420,9 +417,18 @@ function InsertedItem({
label,
icon = 'icon-placeholder',
description,
...rest
}: HTMLCoralProps<'div'> & Omit<IInsertedData, 'name'>) {
return (
<Box display="flex" columnGap="m" px="l" py="m" fontSize="12px" css={insertedItemStyle}>
<Box
display="flex"
columnGap="m"
px="l"
py="m"
fontSize="12px"
css={insertedItemStyle}
{...rest}
>
<Box
size="35px"
fontSize="32px"