mirror of https://github.com/vuejs/core.git
style: fix format in vapor
This commit is contained in:
parent
dce55475a5
commit
d06aac7aa2
|
@ -1 +1 @@
|
|||
export * from './index.js'
|
||||
export * from './index.js'
|
||||
|
|
|
@ -6,7 +6,7 @@ export function initDev() {
|
|||
if (!__ESM_BUNDLER__) {
|
||||
console.info(
|
||||
`You are running a development build of Vue.\n` +
|
||||
`Make sure to use the production build (*.prod.js) when deploying for production.`
|
||||
`Make sure to use the production build (*.prod.js) when deploying for production.`,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export const compile = () => {
|
|||
? ` Use "vue-vapor.esm-browser.js" instead.`
|
||||
: __GLOBAL__
|
||||
? ` Use "vue-vapor.global.js" instead.`
|
||||
: ``) /* should not happen */
|
||||
: ``) /* should not happen */,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ export function DevPlugin({ browser = false } = {}) {
|
|||
'@vue/compiler-ssr': resolve('compiler-ssr/src'),
|
||||
|
||||
'@vue/reactivity': resolve('reactivity/src'),
|
||||
'@vue/shared': resolve('shared/src')
|
||||
}
|
||||
'@vue/shared': resolve('shared/src'),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
__COMMIT__: `"__COMMIT__"`,
|
||||
|
@ -59,9 +59,9 @@ export function DevPlugin({ browser = false } = {}) {
|
|||
// feature flags
|
||||
__FEATURE_SUSPENSE__: `true`,
|
||||
__FEATURE_OPTIONS_API__: `true`,
|
||||
__FEATURE_PROD_DEVTOOLS__: `false`
|
||||
}
|
||||
__FEATURE_PROD_DEVTOOLS__: `false`,
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ startVite(
|
|||
{ plugins: [DevPlugin()] },
|
||||
{
|
||||
deps: {
|
||||
inline: ['@vitejs/plugin-vue']
|
||||
}
|
||||
}
|
||||
inline: ['@vitejs/plugin-vue'],
|
||||
},
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
computed,
|
||||
onMounted,
|
||||
onBeforeMount,
|
||||
getCurrentInstance
|
||||
getCurrentInstance,
|
||||
} from 'vue/vapor'
|
||||
|
||||
const instance = getCurrentInstance()!
|
||||
|
|
|
@ -16,7 +16,7 @@ const vDirective: ObjectDirective<HTMLDivElement, undefined> = {
|
|||
},
|
||||
mounted(node) {
|
||||
if (node.parentElement) node.textContent += 'mounted, '
|
||||
}
|
||||
},
|
||||
}
|
||||
const vDirectiveSimple: FunctionDirective<HTMLDivElement> = (node, binding) => {
|
||||
console.log(node, binding)
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onEffectCleanup, ref, watch, watchEffect, watchPostEffect, watchSyncEffect } from 'vue/vapor'
|
||||
import {
|
||||
onEffectCleanup,
|
||||
ref,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
} from 'vue/vapor'
|
||||
|
||||
const source = ref(0)
|
||||
const add = () => source.value++
|
||||
|
@ -39,9 +46,7 @@ const onUpdate = (arg: any) => {
|
|||
<div>
|
||||
<p>Please check the console</p>
|
||||
<div>
|
||||
<button @click="add">
|
||||
Add
|
||||
</button>
|
||||
<button @click="add">Add</button>
|
||||
|
|
||||
<span>{{ onUpdate(source) }}</span>
|
||||
</div>
|
||||
|
|
|
@ -7,17 +7,17 @@ import * as CompilerSFC from '@vue/compiler-sfc'
|
|||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
target: 'esnext'
|
||||
target: 'esnext',
|
||||
},
|
||||
clearScreen: false,
|
||||
plugins: [
|
||||
Vue({
|
||||
template: {
|
||||
compiler: CompilerVapor as any
|
||||
compiler: CompilerVapor as any,
|
||||
},
|
||||
compiler: CompilerSFC
|
||||
compiler: CompilerSFC,
|
||||
}),
|
||||
DevPlugin(),
|
||||
Inspect()
|
||||
]
|
||||
Inspect(),
|
||||
],
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue