提交 ee4cbad8 编写于 作者: inkwalk's avatar inkwalk

fix(app & h5): remove alertText

上级 6c893f45
......@@ -7,7 +7,6 @@ export const ShowActionSheetProtocol: ApiProtocol<API_TYPE_SHOW_ACTION_SHEET> =
required: true,
},
title: String,
alertText: String,
itemColor: String,
popover: Object,
}
......
......@@ -11,13 +11,7 @@ import { initI18nShowActionSheetMsgsOnce, useI18n } from '@dcloudio/uni-core'
export const showActionSheet = defineAsyncApi<API_TYPE_SHOW_ACTION_SHEET>(
API_SHOW_ACTION_SHEET,
(
{
itemList = [],
itemColor = '#000000',
title = '',
alertText = '',
popover,
},
{ itemList = [], itemColor = '#000000', title = '', popover },
{ resolve, reject }
) => {
initI18nShowActionSheetMsgsOnce()
......@@ -30,9 +24,6 @@ export const showActionSheet = defineAsyncApi<API_TYPE_SHOW_ACTION_SHEET>(
color: itemColor,
})),
}
if (title || alertText) {
options.title = alertText || title
}
plus.nativeUI.actionSheet(
extend(options, {
popover,
......
......@@ -9,7 +9,6 @@ import {
watchEffect,
nextTick,
Transition,
computed,
} from 'vue'
import { usePopupStyle } from '../../../../helpers/usePopupStyle'
import { useKeyboard } from '../../../../helpers/useKeyboard'
......@@ -30,10 +29,6 @@ const props = {
type: String,
default: '',
},
alertText: {
type: String,
default: '',
},
itemList: {
type: Array,
default() {
......@@ -140,14 +135,12 @@ export default /*#__PURE__*/ defineComponent({
$event.preventDefault()
}
const fixTitle = computed(() => props.title || props.alertText)
watch(
() => props.visible,
() => {
nextTick(() => {
// title 占位
if (fixTitle.value) {
if (props.title) {
titleHeight.value = (
document.querySelector('.uni-actionsheet__title') as HTMLElement
).offsetHeight
......@@ -189,13 +182,13 @@ export default /*#__PURE__*/ defineComponent({
onWheel={_handleWheel}
>
{/* title占位 */}
{fixTitle.value ? (
{props.title ? (
<>
<div
class="uni-actionsheet__cell"
style={{ height: `${titleHeight.value}px` }}
/>
<div class="uni-actionsheet__title">{fixTitle.value}</div>
<div class="uni-actionsheet__title">{props.title}</div>
</>
) : (
''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册