style: upload
parent
40a65d19da
commit
8475542b2f
|
@ -38,7 +38,7 @@ const isTextOverflowSupport = isStyleSupport('textOverflow');
|
||||||
|
|
||||||
export interface CopyConfig {
|
export interface CopyConfig {
|
||||||
text?: string;
|
text?: string;
|
||||||
onCopy?: () => void;
|
onCopy?: (event?: MouseEvent) => void;
|
||||||
tooltip?: boolean;
|
tooltip?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ const Base = defineComponent({
|
||||||
state.copied = true;
|
state.copied = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (copyConfig.onCopy) {
|
if (copyConfig.onCopy) {
|
||||||
copyConfig.onCopy();
|
copyConfig.onCopy(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.copyId = setTimeout(() => {
|
state.copyId = setTimeout(() => {
|
||||||
|
@ -457,6 +457,7 @@ const Base = defineComponent({
|
||||||
onCancel={onEditCancel}
|
onCancel={onEditCancel}
|
||||||
onEnd={onEnd}
|
onEnd={onEnd}
|
||||||
direction={direction.value}
|
direction={direction.value}
|
||||||
|
component={props.component}
|
||||||
v-slots={{ enterIcon: slots.editableEnterIcon }}
|
v-slots={{ enterIcon: slots.editableEnterIcon }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -517,7 +518,6 @@ const Base = defineComponent({
|
||||||
'keyboard',
|
'keyboard',
|
||||||
'onUpdate:content',
|
'onUpdate:content',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const cssEllipsis = canUseCSSEllipsis.value;
|
const cssEllipsis = canUseCSSEllipsis.value;
|
||||||
const cssTextOverflow = rows === 1 && cssEllipsis;
|
const cssTextOverflow = rows === 1 && cssEllipsis;
|
||||||
const cssLineClamp = rows && rows > 1 && cssEllipsis;
|
const cssLineClamp = rows && rows > 1 && cssEllipsis;
|
||||||
|
|
|
@ -18,6 +18,7 @@ const editableProps = () => ({
|
||||||
onChange: Function as PropType<(val: string) => void>,
|
onChange: Function as PropType<(val: string) => void>,
|
||||||
originContent: String,
|
originContent: String,
|
||||||
direction: String as PropType<Direction>,
|
direction: String as PropType<Direction>,
|
||||||
|
component: String,
|
||||||
});
|
});
|
||||||
export type EditableProps = Partial<ExtractPropTypes<ReturnType<typeof editableProps>>>;
|
export type EditableProps = Partial<ExtractPropTypes<ReturnType<typeof editableProps>>>;
|
||||||
const Editable = defineComponent({
|
const Editable = defineComponent({
|
||||||
|
@ -112,6 +113,7 @@ const Editable = defineComponent({
|
||||||
[`${props.prefixCls}`]: true,
|
[`${props.prefixCls}`]: true,
|
||||||
[`${props.prefixCls}-edit-content`]: true,
|
[`${props.prefixCls}-edit-content`]: true,
|
||||||
[`${props.prefixCls}-rtl`]: props.direction === 'rtl',
|
[`${props.prefixCls}-rtl`]: props.direction === 'rtl',
|
||||||
|
[props.component ? `${props.prefixCls}-${props.component}` : '']: true,
|
||||||
}));
|
}));
|
||||||
return () => (
|
return () => (
|
||||||
<div class={textAreaClassName.value}>
|
<div class={textAreaClassName.value}>
|
||||||
|
|
|
@ -81,7 +81,7 @@ Basic text writing, including headings, body text, lists, and more.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
text: string,
|
text: string,
|
||||||
onCopy: function,
|
onCopy: function(event),
|
||||||
tooltip: false,
|
tooltip: false,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -82,7 +82,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
text: string,
|
text: string,
|
||||||
onCopy: function,
|
onCopy: function(event),
|
||||||
tooltip: false,
|
tooltip: false,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
color: @error-color;
|
color: @error-color;
|
||||||
|
|
||||||
a&:active,
|
a&:active,
|
||||||
a&:focus,
|
a&:focus {
|
||||||
|
color: @error-color-active;
|
||||||
|
}
|
||||||
|
|
||||||
a&:hover {
|
a&:hover {
|
||||||
color: ~`colorPalette('@{error-color}', 5) `;
|
color: @error-color-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,26 +46,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
h1&,
|
h1&,
|
||||||
|
div&-h1,
|
||||||
|
div&-h1 > textarea,
|
||||||
h1 {
|
h1 {
|
||||||
.typography-title-1();
|
.typography-title-1();
|
||||||
}
|
}
|
||||||
|
|
||||||
h2&,
|
h2&,
|
||||||
|
div&-h2,
|
||||||
|
div&-h2 > textarea,
|
||||||
h2 {
|
h2 {
|
||||||
.typography-title-2();
|
.typography-title-2();
|
||||||
}
|
}
|
||||||
|
|
||||||
h3&,
|
h3&,
|
||||||
|
div&-h3,
|
||||||
|
div&-h3 > textarea,
|
||||||
h3 {
|
h3 {
|
||||||
.typography-title-3();
|
.typography-title-3();
|
||||||
}
|
}
|
||||||
|
|
||||||
h4&,
|
h4&,
|
||||||
|
div&-h4,
|
||||||
|
div&-h4 > textarea,
|
||||||
h4 {
|
h4 {
|
||||||
.typography-title-4();
|
.typography-title-4();
|
||||||
}
|
}
|
||||||
|
|
||||||
h5&,
|
h5&,
|
||||||
|
div&-h5,
|
||||||
|
div&-h5 > textarea,
|
||||||
h5 {
|
h5 {
|
||||||
.typography-title-5();
|
.typography-title-5();
|
||||||
}
|
}
|
||||||
|
@ -198,11 +211,18 @@
|
||||||
right: 10px;
|
right: 10px;
|
||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
color: @text-color-secondary;
|
color: @text-color-secondary;
|
||||||
|
// default style
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
font-style: normal;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix Editable Textarea flash in Firefox
|
// Fix Editable Textarea flash in Firefox
|
||||||
textarea {
|
textarea {
|
||||||
|
// https://stackoverflow.com/a/7695964/3040605
|
||||||
|
height: 1em;
|
||||||
|
margin: 0 !important;
|
||||||
/* stylelint-disable-next-line property-no-vendor-prefix */
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue