Compare commits

...

4 Commits

Author SHA1 Message Date
gimmyhehe f3c2499ab7
fix(grid): fix index not update at drag row (#3622) 2025-07-31 09:26:15 +08:00
liukun db03876549
fix(input):fix textarea height in Multiple line placeholders (#3624)
* Update App.vue

* fix:多行占位符导致文本域高度计算错误
2025-07-30 11:44:26 +08:00
申君健 b7aa885dc9
fix(input): add pre=true for tiny-tooltip (#3625) 2025-07-30 11:35:25 +08:00
申君健 22b3099cb8
fix(PropType): fix import of PropType (#3620)
* fix(PropType):  fix import of PropType

* fix(propType): fix
2025-07-30 11:07:49 +08:00
12 changed files with 20 additions and 14 deletions

View File

@ -136,6 +136,7 @@ const handleShowTinyRobot = () => {
padding: 34px 0 0;
}
}
.right-panel:not(.collapsed) {
:deep(.tr-container) {
z-index: 9999;

View File

@ -124,7 +124,9 @@ export const calcTextareaHeight =
const { paddingSize, borderSize, boxSizing, contextStyle } = api.calculateNodeStyling(targetElement)
hiddenTextarea.setAttribute('style', `${contextStyle};${HIDDEN_STYLE}`)
hiddenTextarea.value = targetElement.value || targetElement.placeholder || ''
// 多行placeholder只计算单行高度防止撑高scrollHeight
const safePlaceholder = targetElement.placeholder ? targetElement.placeholder.trim().split('\n')[0] : ''
hiddenTextarea.value = targetElement.value || safePlaceholder || ''
let height = hiddenTextarea.scrollHeight
const textareaStyle: {
@ -161,11 +163,7 @@ export const calcTextareaHeight =
minHeight = props.height
}
if (!state.isDisplayOnly) {
if (props.autosize) {
height = Math.max(minHeight, height)
} else {
height = Math.min(minHeight, height)
}
height = Math.max(minHeight, height)
textareaStyle.minHeight = `${Math.floor(minHeight)}px`
} else {
textareaStyle.minHeight = `0px`

View File

@ -9,8 +9,9 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $props, $prefix, $setup, defineComponent, type PropType } from '@opentiny/vue-common'
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import template from 'virtual-template?pc'
import type { PropType } from '@opentiny/vue-common'
import type { IButtonGroupNode } from '@opentiny/vue-renderless/types/button-group.type'
export const buttonGroupProps = {

View File

@ -10,6 +10,7 @@
*
*/
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import { type PropType } from '@opentiny/vue-common'
import template from 'virtual-template?pc|mobile-first'
export const buttonProps = {

View File

@ -25,7 +25,6 @@
import { findTree } from '@opentiny/vue-renderless/grid/static/'
import Modal from '@opentiny/vue-modal'
import GlobalConfig from '../../config'
import { isVue2 } from '@opentiny/vue-common'
export const createHandlerOnEnd = ({ _vm, refresh }) => {
return (event) => {
@ -79,8 +78,7 @@ export const createHandlerOnEnd = ({ _vm, refresh }) => {
// 如果变动了树层级,需要刷新数据
_vm.$emit('row-drop-end', event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData)
// 因为vue2劫持了数组方法所以在data通过splice改变数组时数组长度不变会触发更新但是vue3是浅层响应所以需要通过传递数据让表格更新
refresh && _vm.data && !isVue2 && _vm.refreshData(_vm.data)
refresh && _vm.data && _vm.refreshData(_vm.data)
}
}

View File

@ -48,6 +48,7 @@
placement="top"
:popper-class="state.tooltipConfig.popperClass || ''"
:popper-options="{ bubbling: true }"
pre
@mouseenter.native="handleEnterDisplayOnlyContent"
>
<span

View File

@ -56,6 +56,7 @@
:content="state.displayOnlyTooltip"
placement="top"
:popper-class="state.tooltipConfig.popperClass || ''"
pre
@mouseenter.native="handleEnterDisplayOnlyContent"
>
<span class="tiny-input-display-only__content" v-if="type === 'password'">{{ state.hiddenPassword }}</span>

View File

@ -1,4 +1,5 @@
import { $props, $prefix, $setup, defineComponent, type PropType } from '@opentiny/vue-common'
import type { PropType } from '@opentiny/vue-common'
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import template from 'virtual-template?pc|mobile-first'
export const pagerProps = {

View File

@ -9,7 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $props, $prefix, $setup, defineComponent, type PropType } from '@opentiny/vue-common'
import type { PropType } from '@opentiny/vue-common'
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import template from 'virtual-template?pc|mobile-first'
export const radioGroupProps = {

View File

@ -9,7 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $props, $prefix, $setup, defineComponent, type PropType } from '@opentiny/vue-common'
import type { PropType } from '@opentiny/vue-common'
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import template from 'virtual-template?pc|mobile-first'
export const $constants = {

View File

@ -9,7 +9,8 @@
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import { $props, $prefix, $setup, defineComponent, type PropType } from '@opentiny/vue-common'
import { $props, $prefix, $setup, defineComponent } from '@opentiny/vue-common'
import type { PropType } from '@opentiny/vue-common'
import template from 'virtual-template?pc|mobile-first'
export const $constants = {

View File

@ -11,6 +11,7 @@
*/
import { $props, $setup, $prefix, defineComponent } from '@opentiny/vue-common'
import { type PropType } from '@opentiny/vue-common'
import template from 'virtual-template?pc'
export const userContactProps = {