白色主题

This commit is contained in:
2023-02-12 19:04:01 +08:00
parent d736a5912f
commit 57ab6fbb49
411 changed files with 1752 additions and 5304 deletions

View File

@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
import { SuperComponent, wxComponent } from '../common/src/index';
import ImageProps from './props';
import config from '../common/config';
import { addUnit } from '../common/utils';
import { addUnit, getRect } from '../common/utils';
const { prefix } = config;
const name = `${prefix}-image`;
let Image = class Image extends SuperComponent {
@@ -59,15 +59,11 @@ let Image = class Image extends SuperComponent {
(versionArray[0] === 2 && versionArray[1] === 10 && versionArray[2] < 3);
if (mode === 'heightFix' && isInCompatible) {
const { height: picHeight, width: picWidth } = e.detail;
const query = this.createSelectorQuery();
query
.select('#image')
.boundingClientRect((res) => {
const { height } = res;
getRect(this, '#image').then((rect) => {
const { height } = rect;
const resultWidth = ((height / picHeight) * picWidth).toFixed(2);
this.setData({ innerStyle: `height: ${addUnit(height)}; width: ${resultWidth}px;` });
})
.exec();
});
}
this.setData({
isLoading: false,