Compare commits

...

5 Commits

Author SHA1 Message Date
SerKo 8f82f23846
fix(runtime-core): keep options API typing intact when expose is used (#14118)
ci / test (push) Has been cancelled Details
ci / continuous-release (push) Has been cancelled Details
size data / upload (push) Has been cancelled Details
Lock Closed Issues / action (push) Has been cancelled Details
Auto close issues with "can't reproduce" label / close-issues (push) Has been cancelled Details
Fixed: #14117
Fixed: vuejs/language-tools#5069
2025-11-20 08:59:42 +08:00
Vida Xie 83f6ab686d
chore(compiler-ssr): move `defaultProps` initialization into `input` tag branch (#14115)
ci / test (push) Waiting to run Details
ci / continuous-release (push) Waiting to run Details
size data / upload (push) Waiting to run Details
2025-11-19 13:42:16 +08:00
Sean Wang 3942dbe613
types(jsx): add new HTML attributes for improved JSX support (#13370)
ci / test (push) Waiting to run Details
ci / continuous-release (push) Waiting to run Details
size data / upload (push) Waiting to run Details
2025-11-18 08:53:01 +08:00
shuang f40baa2d50
types(jsx): correct the naming of the enterKeyHint property (#14090) 2025-11-18 08:33:44 +08:00
Stefano Nepa e9c676ff2b
chore(runtime-dom): export nodeOps and patchProp for better accessibility (#13753) 2025-11-10 09:38:05 +08:00
6 changed files with 66 additions and 16 deletions

View File

@ -2107,3 +2107,38 @@ defineComponent({
expectType<string>(this.$props)
},
})
// #14117
defineComponent({
setup() {
const setup1 = ref('setup1')
const setup2 = ref('setup2')
return { setup1, setup2 }
},
data() {
return {
data1: 1,
}
},
props: {
props1: {
type: String,
},
},
methods: {
methods1() {
return `methods1`
},
},
computed: {
computed1() {
this.setup1
this.setup2
this.data1
this.props1
this.methods1()
return `computed1`
},
},
expose: ['setup1'],
})

View File

@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
if (node.tagType === ElementTypes.ELEMENT) {
const res: DirectiveTransformResult = { props: [] }
if (node.tag === 'input') {
const defaultProps = [
// default value binding for text type inputs
createObjectProperty(`value`, model),
]
if (node.tag === 'input') {
const type = findProp(node, 'type')
if (type) {
const value = findValueBinding(node)

View File

@ -272,7 +272,7 @@ export function defineComponent<
Slots,
LocalComponents,
Directives,
Exposed
string
>
>,
): DefineComponent<

View File

@ -1194,7 +1194,7 @@ export type ComponentOptionsWithoutProps<
S,
LC,
Directives,
Exposed
string
>
>
@ -1256,7 +1256,7 @@ export type ComponentOptionsWithArrayProps<
S,
LC,
Directives,
Exposed
string
>
>

View File

@ -17,6 +17,7 @@ import {
} from '@vue/runtime-core'
import { nodeOps } from './nodeOps'
import { patchProp } from './patchProp'
export { nodeOps, patchProp }
// Importing from the compiler, will be tree-shaken in prod
import {
NOOP,

View File

@ -286,6 +286,19 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
contextmenu?: string | undefined
dir?: string | undefined
draggable?: Booleanish | undefined
enterkeyhint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
| undefined
/**
* @deprecated Use `enterkeyhint` instead.
*/
enterKeyHint?: HTMLAttributes['enterkeyhint']
hidden?: Booleanish | '' | 'hidden' | 'until-found' | undefined
id?: string | undefined
inert?: Booleanish | undefined
@ -346,6 +359,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
*/
is?: string | undefined
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
*/
exportparts?: string
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
*/
part?: string
}
type HTMLAttributeReferrerPolicy =
@ -498,6 +519,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
alt?: string | undefined
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined
decoding?: 'async' | 'auto' | 'sync' | undefined
fetchpriority?: 'high' | 'low' | 'auto' | undefined
height?: Numberish | undefined
loading?: 'eager' | 'lazy' | undefined
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined
@ -547,15 +569,6 @@ export interface InputHTMLAttributes extends HTMLAttributes {
checked?: Booleanish | any[] | Set<any> | undefined // for IDE v-model multi-checkbox support
crossorigin?: string | undefined
disabled?: Booleanish | undefined
enterKeyHint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
| undefined
form?: string | undefined
formaction?: string | undefined
formenctype?: string | undefined
@ -1288,6 +1301,7 @@ export interface IntrinsicElementAttributes {
polyline: SVGAttributes
radialGradient: SVGAttributes
rect: SVGAttributes
set: SVGAttributes
stop: SVGAttributes
switch: SVGAttributes
symbol: SVGAttributes