Skip to content

Commit

Permalink
工具类方法调用import化改造
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Apr 7, 2024
1 parent 3a4ced8 commit 558c5ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/uni_modules/uview-plus/components/u-cell/u-cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import props from './props.js';
import mpMixin from '../../libs/mixin/mpMixin.js';
import mixin from '../../libs/mixin/mixin.js';
import { addStyle } from '../../libs/function/index.js';
/**
* cell 单元格
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
Expand Down Expand Up @@ -86,7 +87,7 @@
mixins: [mpMixin, mixin, props],
computed: {
titleTextStyle() {
return uni.$u.addStyle(this.titleStyle)
return addStyle(this.titleStyle)
}
},
emits: ['click'],
Expand Down
9 changes: 5 additions & 4 deletions src/uni_modules/uview-plus/components/u-gap/u-gap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import props from './props.js';
import mpMixin from '../../libs/mixin/mpMixin.js';
import mixin from '../../libs/mixin/mixin.js';
import { addStyle, addUnit, deepMerge } from '../../libs/function/index.js';
/**
* gap 间隔槽
* @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
Expand All @@ -25,11 +26,11 @@
gapStyle() {
const style = {
backgroundColor: this.bgColor,
height: uni.$u.addUnit(this.height),
marginTop: uni.$u.addUnit(this.marginTop),
marginBottom: uni.$u.addUnit(this.marginBottom),
height: addUnit(this.height),
marginTop: addUnit(this.marginTop),
marginBottom: addUnit(this.marginBottom),
}
return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
return deepMerge(style, addStyle(this.customStyle))
}
}
};
Expand Down

0 comments on commit 558c5ce

Please sign in to comment.