Auto merge base into tabbar
This commit is contained in:
commit
4efb14cbff
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
vite.config.ts
|
||||||
|
uno.config.ts
|
||||||
|
pages.config.ts
|
||||||
|
manifest.config.ts
|
25
.oxlintrc.json
Normal file
25
.oxlintrc.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||||
|
"extends": ["config:recommended"],
|
||||||
|
"plugins": ["import", "typescript", "unicorn"],
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"no-unused-vars": "off"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"foo": "readonly"
|
||||||
|
},
|
||||||
|
"ignorePatterns": ["node_modules", "dist", "src/static/**", "src/uni_modules/**"],
|
||||||
|
"settings": {},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["*.test.ts", "*.spec.ts"],
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -10,7 +10,7 @@ module.exports = {
|
|||||||
htmlWhitespaceSensitivity: 'ignore',
|
htmlWhitespaceSensitivity: 'ignore',
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: '*.json',
|
files: '*.{json,jsonc}',
|
||||||
options: {
|
options: {
|
||||||
trailingComma: 'none',
|
trailingComma: 'none',
|
||||||
},
|
},
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -60,6 +60,6 @@
|
|||||||
"README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
|
"README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
|
||||||
"pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
|
"pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
|
||||||
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
|
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
|
||||||
"tsconfig.json": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs"
|
".oxlintrc.json": "tsconfig.json,.commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,13 +71,14 @@
|
|||||||
"type-check": "vue-tsc --noEmit",
|
"type-check": "vue-tsc --noEmit",
|
||||||
"openapi-ts-request": "openapi-ts",
|
"openapi-ts-request": "openapi-ts",
|
||||||
"prepare": "git init && husky",
|
"prepare": "git init && husky",
|
||||||
"lint:oxlint": "oxlint src/**/*.{ts,js,vue}"
|
"lint": "oxlint",
|
||||||
|
"lint-fix": "oxlint --fix"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"**/*.{html,cjs,json,md,scss,css,txt}": [
|
"**/*.{html,cjs,json,md,scss,css,txt}": [
|
||||||
"prettier --write --cache"
|
"prettier --write --cache"
|
||||||
],
|
],
|
||||||
"**/*.{js,ts,vue}": [
|
"**/*.{js,jsx,ts,tsx,vue,mjs,cjs,mts,cts}": [
|
||||||
"oxlint --fix",
|
"oxlint --fix",
|
||||||
"prettier --write --cache"
|
"prettier --write --cache"
|
||||||
],
|
],
|
||||||
|
@ -20,7 +20,7 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
|
|||||||
const {
|
const {
|
||||||
formData = {},
|
formData = {},
|
||||||
maxSize = 5 * 1024 * 1024,
|
maxSize = 5 * 1024 * 1024,
|
||||||
// accept = ['*'],
|
accept = ['*'],
|
||||||
fileType = 'image',
|
fileType = 'image',
|
||||||
success,
|
success,
|
||||||
error: onError,
|
error: onError,
|
||||||
|
@ -38,6 +38,12 @@ const toSubPage = () => {
|
|||||||
url: '/pages-sub/demo/index',
|
url: '/pages-sub/demo/index',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 奇怪:同样的代码放在 vue 里面不会校验到错误,放在 .ts 文件里面会校验到错误
|
||||||
|
// const testOxlint = (name: string) => {
|
||||||
|
// console.log('oxlint')
|
||||||
|
// }
|
||||||
|
// testOxlint('oxlint')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<view class="mt-12">
|
<view class="mt-12">
|
||||||
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
|
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center text-4xl main-title-color mt-4">unibest</view>
|
<view class="text-center text-4xl text-[#d14328] mt-4">unibest</view>
|
||||||
<view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
|
<view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
|
||||||
|
|
||||||
<view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view>
|
<view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view>
|
||||||
@ -40,9 +40,11 @@ defineOptions({
|
|||||||
|
|
||||||
// 获取屏幕边界到安全区域距离
|
// 获取屏幕边界到安全区域距离
|
||||||
let safeAreaInsets
|
let safeAreaInsets
|
||||||
|
let systemInfo
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 微信小程序使用新的API
|
// 微信小程序使用新的API
|
||||||
const systemInfo = wx.getWindowInfo()
|
systemInfo = uni.getWindowInfo()
|
||||||
safeAreaInsets = systemInfo.safeArea
|
safeAreaInsets = systemInfo.safeArea
|
||||||
? {
|
? {
|
||||||
top: systemInfo.safeArea.top,
|
top: systemInfo.safeArea.top,
|
||||||
@ -55,7 +57,7 @@ safeAreaInsets = systemInfo.safeArea
|
|||||||
|
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
// 其他平台继续使用uni API
|
// 其他平台继续使用uni API
|
||||||
const systemInfo = uni.getSystemInfoSync()
|
systemInfo = uni.getSystemInfoSync()
|
||||||
safeAreaInsets = systemInfo.safeAreaInsets
|
safeAreaInsets = systemInfo.safeAreaInsets
|
||||||
// #endif
|
// #endif
|
||||||
const author = ref('菲鸽')
|
const author = ref('菲鸽')
|
||||||
@ -67,9 +69,3 @@ onLoad(() => {
|
|||||||
console.log('项目作者:', author.value)
|
console.log('项目作者:', author.value)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
.main-title-color {
|
|
||||||
color: #d14328;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user