Skip to content

Commit

Permalink
fix: lint style indent
Browse files Browse the repository at this point in the history
Signed-off-by: Artea <[email protected]>
  • Loading branch information
Sepush committed Jan 4, 2025
1 parent 24251b1 commit 8e19b2d
Show file tree
Hide file tree
Showing 86 changed files with 1,164 additions and 1,164 deletions.
4 changes: 2 additions & 2 deletions scripts/utils/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function getPartsOfMdDemo(tokens) {
function createBlockTemplate(tag, content, attrs) {
const attrsStr = attrs
? Object.keys(attrs).reduce((attrsStr, key) => {
return `${attrsStr} ${key}="${attrs[key]}"`
}, '')
return `${attrsStr} ${key}="${attrs[key]}"`
}, '')
: ''
return `<${tag}${attrsStr}>
${content}
Expand Down
10 changes: 5 additions & 5 deletions src/_internal/select-menu/src/SelectMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ export default defineComponent({
const { inlineThemeDisabled } = props
const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'internal-select-menu',
computed(() => props.size[0]),
cssVarsRef,
props
)
'internal-select-menu',
computed(() => props.size[0]),
cssVarsRef,
props
)
: undefined
const exposedProps: InternalExposedProps = {
selfRef,
Expand Down
40 changes: 20 additions & 20 deletions src/_internal/selection/src/Selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ export default defineComponent({
return props.selectedOption
? props.renderTag
? props.renderTag({
option: props.selectedOption,
handleClose: () => {}
})
option: props.selectedOption,
handleClose: () => {}
})
: props.renderLabel
? props.renderLabel(props.selectedOption as never, true)
: render(
props.selectedOption[props.labelField],
props.selectedOption,
true
)
props.selectedOption[props.labelField],
props.selectedOption,
true
)
: props.placeholder
})
const labelRef = computed(() => {
Expand Down Expand Up @@ -541,13 +541,13 @@ export default defineComponent({
})
const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'internal-selection',
computed(() => {
return props.size[0]
}),
cssVarsRef,
props
)
'internal-selection',
computed(() => {
return props.size[0]
}),
cssVarsRef,
props
)
: undefined
return {
mergedTheme: themeRef,
Expand Down Expand Up @@ -903,9 +903,9 @@ export default defineComponent({
<div class={`${clsPrefix}-base-selection-overlay__wrapper`}>
{renderTag
? renderTag({
option: this.selectedOption!,
handleClose: () => {}
})
option: this.selectedOption!,
handleClose: () => {}
})
: renderLabel
? renderLabel(this.selectedOption!, true)
: render(this.label, this.selectedOption, true)}
Expand Down Expand Up @@ -942,9 +942,9 @@ export default defineComponent({
<div class={`${clsPrefix}-base-selection-input__content`}>
{renderTag
? renderTag({
option: this.selectedOption!,
handleClose: () => {}
})
option: this.selectedOption!,
handleClose: () => {}
})
: renderLabel
? renderLabel(this.selectedOption!, true)
: render(this.label, this.selectedOption, true)}
Expand Down
2 changes: 1 addition & 1 deletion src/_utils/cssr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function createKey<P extends string, S extends string>(
+ (suffix === 'default'
? ''
: suffix.replace(/^[a-z]/, startChar =>
startChar.toUpperCase()))) as any
startChar.toUpperCase()))) as any
}

export {
Expand Down
14 changes: 7 additions & 7 deletions src/alert/src/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ export default defineComponent({
})
const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'alert',
computed(() => {
return props.type[0]
}),
cssVarsRef,
props
)
'alert',
computed(() => {
return props.type[0]
}),
cssVarsRef,
props
)
: undefined
const visibleRef = ref(true)
const doAfterLeave = (): void => {
Expand Down
58 changes: 29 additions & 29 deletions src/avatar/src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,35 +174,35 @@ export default defineComponent({
})
const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'avatar',
computed(() => {
const size = mergedSizeRef.value
const round = mergedRoundRef.value
const bordered = mergedBorderedRef.value
const { color } = props
let hash = ''
if (size) {
if (typeof size === 'number') {
hash += `a${size}`
'avatar',
computed(() => {
const size = mergedSizeRef.value
const round = mergedRoundRef.value
const bordered = mergedBorderedRef.value
const { color } = props
let hash = ''
if (size) {
if (typeof size === 'number') {
hash += `a${size}`
}
else {
hash += size[0]
}
}
else {
hash += size[0]
if (round) {
hash += 'b'
}
}
if (round) {
hash += 'b'
}
if (bordered) {
hash += 'c'
}
if (color) {
hash += color2Class(color)
}
return hash
}),
cssVarsRef,
props
)
if (bordered) {
hash += 'c'
}
if (color) {
hash += color2Class(color)
}
return hash
}),
cssVarsRef,
props
)
: undefined

const shouldStartLoadingRef = ref(!props.lazy)
Expand Down Expand Up @@ -290,8 +290,8 @@ export default defineComponent({
img = this.renderFallback
? this.renderFallback()
: resolveSlot($slots.fallback, () => [
<img src={this.fallbackSrc} style={{ objectFit: this.objectFit }} />
])
<img src={this.fallbackSrc} style={{ objectFit: this.objectFit }} />
])
}
else {
img = resolveWrappedSlot($slots.default, (children) => {
Expand Down
34 changes: 17 additions & 17 deletions src/back-top/src/BackTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,23 +288,23 @@ export default defineComponent({
this.onRender?.()
return this.mergedShow
? h(
'div',
mergeProps(this.$attrs, {
class: [
`${mergedClsPrefix}-back-top`,
this.themeClass,
this.transitionDisabled
&& `${mergedClsPrefix}-back-top--transition-disabled`
],
style: [this.style, this.cssVars],
onClick: this.handleClick
}),
resolveSlot(this.$slots.default, () => [
<NBaseIcon clsPrefix={mergedClsPrefix}>
{{ default: renderBackTopIcon }}
</NBaseIcon>
])
)
'div',
mergeProps(this.$attrs, {
class: [
`${mergedClsPrefix}-back-top`,
this.themeClass,
this.transitionDisabled
&& `${mergedClsPrefix}-back-top--transition-disabled`
],
style: [this.style, this.cssVars],
onClick: this.handleClick
}),
resolveSlot(this.$slots.default, () => [
<NBaseIcon clsPrefix={mergedClsPrefix}>
{{ default: renderBackTopIcon }}
</NBaseIcon>
])
)
: null
}
}}
Expand Down
30 changes: 15 additions & 15 deletions src/badge/src/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ export default defineComponent({

const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'badge',
computed(() => {
let hash = ''
const { type, color } = props
if (type) {
hash += type[0]
}
if (color) {
hash += color2Class(color)
}
return hash
}),
cssVarsRef,
props
)
'badge',
computed(() => {
let hash = ''
const { type, color } = props
if (type) {
hash += type[0]
}
if (color) {
hash += color2Class(color)
}
return hash
}),
cssVarsRef,
props
)
: undefined

const offsetStyleRef = computed(() => {
Expand Down
Loading

0 comments on commit 8e19b2d

Please sign in to comment.