mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-08 15:41:05 +08:00
Compare commits
No commits in common. "1b08f84ac6dc84cb3cea93f7816a4fcd5f5c2293" and "bc024a105cd9b0b242faaf2e1ee0caa8c6fd788e" have entirely different histories.
1b08f84ac6
...
bc024a105c
@ -31,12 +31,6 @@ yarn add stylelint@13 @vant/stylelint-config
|
||||
|
||||
现在会默认生成 WebStorm 所需的 web-types.json 文件到 `lib/web-types.json` 目录下。
|
||||
|
||||
## v4.0.4
|
||||
|
||||
`2022-07-02`
|
||||
|
||||
- 修复构建 sfc 文件的类型定义时报错的问题
|
||||
|
||||
## v4.0.3
|
||||
|
||||
`2022-07-02`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/cli",
|
||||
"version": "4.0.4",
|
||||
"version": "4.0.3",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
|
||||
@ -87,6 +87,11 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
new Promise((resolve) => {
|
||||
let script = '';
|
||||
|
||||
// the generated render fn lacks type definitions
|
||||
if (lang === 'ts') {
|
||||
script += '// @ts-nocheck\n';
|
||||
}
|
||||
|
||||
let bindingMetadata;
|
||||
if (descriptor.scriptSetup) {
|
||||
const { bindings, content } = compileScript(descriptor, {
|
||||
@ -120,12 +125,6 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
|
||||
script += `\n${EXPORT} ${VUEIDS}`;
|
||||
|
||||
// ts-nocheck should be placed on the first line
|
||||
// the generated render fn lacks type definitions
|
||||
if (lang === 'ts') {
|
||||
script = '// @ts-nocheck\n' + script;
|
||||
}
|
||||
|
||||
outputFile(scriptFilePath, script).then(resolve);
|
||||
})
|
||||
);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { isObject } from './validate';
|
||||
import type { ComponentPublicInstance } from 'vue';
|
||||
|
||||
export function noop() {}
|
||||
@ -17,7 +16,7 @@ export function get(object: any, path: string): any {
|
||||
let result = object;
|
||||
|
||||
keys.forEach((key) => {
|
||||
result = isObject(result) ? result[key] ?? '' : '';
|
||||
result = result[key] ?? '';
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user