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

fix(app & h5): remove alertText

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