|
@@ -156,11 +156,12 @@ export default create({
|
|
|
};
|
|
};
|
|
|
const open = () => {
|
|
const open = () => {
|
|
|
proxyData.openExpanded = !proxyData.openExpanded;
|
|
proxyData.openExpanded = !proxyData.openExpanded;
|
|
|
- // let time = contentRef.value.childNodes?.length || 1;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- animation();
|
|
|
|
|
- }, 700);
|
|
|
|
|
- // }, 500 * time);
|
|
|
|
|
|
|
+ setTimeout(
|
|
|
|
|
+ () => {
|
|
|
|
|
+ animation();
|
|
|
|
|
+ },
|
|
|
|
|
+ init.value ? 500 : 0
|
|
|
|
|
+ );
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const defaultOpen = () => {
|
|
const defaultOpen = () => {
|
|
@@ -214,7 +215,9 @@ export default create({
|
|
|
if (tm && tm.length > 0) {
|
|
if (tm && tm.length > 0) {
|
|
|
let h = tm[0]['height'];
|
|
let h = tm[0]['height'];
|
|
|
item1.conHeight = h;
|
|
item1.conHeight = h;
|
|
|
- // resetHeight(h);
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ init.value && handleOpen();
|
|
|
|
|
+ }, 500);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
@@ -224,6 +227,9 @@ export default create({
|
|
|
let ary: any = Array.from(item1.$el.children);
|
|
let ary: any = Array.from(item1.$el.children);
|
|
|
let h = ary[1].children[0]['offsetHeight'];
|
|
let h = ary[1].children[0]['offsetHeight'];
|
|
|
item1.conHeight = h;
|
|
item1.conHeight = h;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ init.value && handleOpen();
|
|
|
|
|
+ }, 500);
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -239,7 +245,7 @@ export default create({
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
- onMounted(() => {
|
|
|
|
|
|
|
+ const handleOpen = () => {
|
|
|
const { name } = props;
|
|
const { name } = props;
|
|
|
const active = parent && parent.props.modelValue;
|
|
const active = parent && parent.props.modelValue;
|
|
|
if (typeof active == 'number' || typeof active == 'string') {
|
|
if (typeof active == 'number' || typeof active == 'string') {
|
|
@@ -252,6 +258,10 @@ export default create({
|
|
|
defaultOpen();
|
|
defaultOpen();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ init.value = false;
|
|
|
|
|
+ };
|
|
|
|
|
+ const init = ref(true);
|
|
|
|
|
+ onMounted(() => {
|
|
|
// 获取 DOM 元素
|
|
// 获取 DOM 元素
|
|
|
if (Taro.getEnv() === 'WEB') {
|
|
if (Taro.getEnv() === 'WEB') {
|
|
|
getRefHeight();
|
|
getRefHeight();
|