mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-17 14:30:34 +08:00
Merge branch 'develop' into cli-readme
This commit is contained in:
commit
84ec4f0871
@ -31,11 +31,11 @@ const ParagraphBlock = ({ blockId, events, properties, methods }) => (
|
||||
copyable={
|
||||
type.isObject(properties.copyable)
|
||||
? {
|
||||
text: properties.copyable.text,
|
||||
text: properties.copyable.text || properties.content,
|
||||
onCopy: () => {
|
||||
methods.triggerEvent({
|
||||
name: 'onCopy',
|
||||
event: { value: properties.copyable.text },
|
||||
event: { value: properties.copyable.text || properties.content },
|
||||
});
|
||||
},
|
||||
icon:
|
||||
@ -64,7 +64,15 @@ const ParagraphBlock = ({ blockId, events, properties, methods }) => (
|
||||
)),
|
||||
tooltips: properties.copyable.tooltips,
|
||||
}
|
||||
: properties.copyable
|
||||
: properties.copyable && {
|
||||
text: properties.content,
|
||||
onCopy: () => {
|
||||
methods.triggerEvent({
|
||||
name: 'onCopy',
|
||||
event: { value: properties.content },
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
delete={properties.delete}
|
||||
disabled={properties.disabled}
|
||||
|
@ -35,11 +35,11 @@ const TitleBlock = ({ blockId, events, properties, methods }) => {
|
||||
copyable={
|
||||
type.isObject(properties.copyable)
|
||||
? {
|
||||
text: properties.copyable.text,
|
||||
text: properties.copyable.text || properties.content,
|
||||
onCopy: () => {
|
||||
methods.triggerEvent({
|
||||
name: 'onCopy',
|
||||
event: { value: properties.copyable.text },
|
||||
event: { value: properties.copyable.text || properties.content },
|
||||
});
|
||||
},
|
||||
icon:
|
||||
@ -68,7 +68,15 @@ const TitleBlock = ({ blockId, events, properties, methods }) => {
|
||||
)),
|
||||
tooltips: properties.copyable.tooltips,
|
||||
}
|
||||
: properties.copyable
|
||||
: properties.copyable && {
|
||||
text: properties.content,
|
||||
onCopy: () => {
|
||||
methods.triggerEvent({
|
||||
name: 'onCopy',
|
||||
event: { value: properties.content },
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
delete={properties.delete}
|
||||
disabled={properties.disabled}
|
||||
|
@ -20,11 +20,13 @@ _ref:
|
||||
schema: ../blocks/blocksAntd/src/blocks/Title/Title.json
|
||||
filePath: blocks/display/Title.yaml
|
||||
init_state_values:
|
||||
__type_block.properties.copyable: boolean
|
||||
__type_block.properties.ellipsis: boolean
|
||||
__boolean_block.properties.copyable: false
|
||||
__boolean_block.properties.ellipsis: false
|
||||
__type_block.properties.value: number
|
||||
__number_block.properties.value: 33.3
|
||||
init_property_values:
|
||||
content: A title block.
|
||||
description_content: |
|
||||
A title component. Corresponds to html h1, h2, h3 and h4 elements.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user