mirror of https://github.com/vuejs/core.git
Compare commits
5 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8f82f23846 | |
|
|
83f6ab686d | |
|
|
3942dbe613 | |
|
|
f40baa2d50 | |
|
|
e9c676ff2b |
|
|
@ -2107,3 +2107,38 @@ defineComponent({
|
||||||
expectType<string>(this.$props)
|
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'],
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
|
||||||
|
|
||||||
if (node.tagType === ElementTypes.ELEMENT) {
|
if (node.tagType === ElementTypes.ELEMENT) {
|
||||||
const res: DirectiveTransformResult = { props: [] }
|
const res: DirectiveTransformResult = { props: [] }
|
||||||
const defaultProps = [
|
|
||||||
// default value binding for text type inputs
|
|
||||||
createObjectProperty(`value`, model),
|
|
||||||
]
|
|
||||||
if (node.tag === 'input') {
|
if (node.tag === 'input') {
|
||||||
|
const defaultProps = [
|
||||||
|
// default value binding for text type inputs
|
||||||
|
createObjectProperty(`value`, model),
|
||||||
|
]
|
||||||
const type = findProp(node, 'type')
|
const type = findProp(node, 'type')
|
||||||
if (type) {
|
if (type) {
|
||||||
const value = findValueBinding(node)
|
const value = findValueBinding(node)
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ export function defineComponent<
|
||||||
Slots,
|
Slots,
|
||||||
LocalComponents,
|
LocalComponents,
|
||||||
Directives,
|
Directives,
|
||||||
Exposed
|
string
|
||||||
>
|
>
|
||||||
>,
|
>,
|
||||||
): DefineComponent<
|
): DefineComponent<
|
||||||
|
|
|
||||||
|
|
@ -1194,7 +1194,7 @@ export type ComponentOptionsWithoutProps<
|
||||||
S,
|
S,
|
||||||
LC,
|
LC,
|
||||||
Directives,
|
Directives,
|
||||||
Exposed
|
string
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
@ -1256,7 +1256,7 @@ export type ComponentOptionsWithArrayProps<
|
||||||
S,
|
S,
|
||||||
LC,
|
LC,
|
||||||
Directives,
|
Directives,
|
||||||
Exposed
|
string
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import {
|
||||||
} from '@vue/runtime-core'
|
} from '@vue/runtime-core'
|
||||||
import { nodeOps } from './nodeOps'
|
import { nodeOps } from './nodeOps'
|
||||||
import { patchProp } from './patchProp'
|
import { patchProp } from './patchProp'
|
||||||
|
export { nodeOps, patchProp }
|
||||||
// Importing from the compiler, will be tree-shaken in prod
|
// Importing from the compiler, will be tree-shaken in prod
|
||||||
import {
|
import {
|
||||||
NOOP,
|
NOOP,
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,19 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
||||||
contextmenu?: string | undefined
|
contextmenu?: string | undefined
|
||||||
dir?: string | undefined
|
dir?: string | undefined
|
||||||
draggable?: Booleanish | 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
|
hidden?: Booleanish | '' | 'hidden' | 'until-found' | undefined
|
||||||
id?: string | undefined
|
id?: string | undefined
|
||||||
inert?: Booleanish | 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
|
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
|
||||||
*/
|
*/
|
||||||
is?: string | undefined
|
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 =
|
type HTMLAttributeReferrerPolicy =
|
||||||
|
|
@ -498,6 +519,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
|
||||||
alt?: string | undefined
|
alt?: string | undefined
|
||||||
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined
|
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined
|
||||||
decoding?: 'async' | 'auto' | 'sync' | undefined
|
decoding?: 'async' | 'auto' | 'sync' | undefined
|
||||||
|
fetchpriority?: 'high' | 'low' | 'auto' | undefined
|
||||||
height?: Numberish | undefined
|
height?: Numberish | undefined
|
||||||
loading?: 'eager' | 'lazy' | undefined
|
loading?: 'eager' | 'lazy' | undefined
|
||||||
referrerpolicy?: HTMLAttributeReferrerPolicy | 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
|
checked?: Booleanish | any[] | Set<any> | undefined // for IDE v-model multi-checkbox support
|
||||||
crossorigin?: string | undefined
|
crossorigin?: string | undefined
|
||||||
disabled?: Booleanish | undefined
|
disabled?: Booleanish | undefined
|
||||||
enterKeyHint?:
|
|
||||||
| 'enter'
|
|
||||||
| 'done'
|
|
||||||
| 'go'
|
|
||||||
| 'next'
|
|
||||||
| 'previous'
|
|
||||||
| 'search'
|
|
||||||
| 'send'
|
|
||||||
| undefined
|
|
||||||
form?: string | undefined
|
form?: string | undefined
|
||||||
formaction?: string | undefined
|
formaction?: string | undefined
|
||||||
formenctype?: string | undefined
|
formenctype?: string | undefined
|
||||||
|
|
@ -1288,6 +1301,7 @@ export interface IntrinsicElementAttributes {
|
||||||
polyline: SVGAttributes
|
polyline: SVGAttributes
|
||||||
radialGradient: SVGAttributes
|
radialGradient: SVGAttributes
|
||||||
rect: SVGAttributes
|
rect: SVGAttributes
|
||||||
|
set: SVGAttributes
|
||||||
stop: SVGAttributes
|
stop: SVGAttributes
|
||||||
switch: SVGAttributes
|
switch: SVGAttributes
|
||||||
symbol: SVGAttributes
|
symbol: SVGAttributes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue