Auto merge base into spa
This commit is contained in:
commit
c3a26b0df9
@ -1,106 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const { execSync } = require('child_process')
|
|
||||||
|
|
||||||
const scopes = fs
|
|
||||||
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
|
|
||||||
.filter((dirent) => dirent.isDirectory())
|
|
||||||
.map((dirent) => dirent.name.replace(/s$/, ''))
|
|
||||||
|
|
||||||
// precomputed scope
|
|
||||||
const scopeComplete = execSync('git status --porcelain || true')
|
|
||||||
.toString()
|
|
||||||
.trim()
|
|
||||||
.split('\n')
|
|
||||||
.find((r) => ~r.indexOf('M src'))
|
|
||||||
?.replace(/(\/)/g, '%%')
|
|
||||||
?.match(/src%%((\w|-)*)/)?.[1]
|
|
||||||
?.replace(/s$/, '')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
ignores: [(commit) => commit.includes('init')],
|
|
||||||
extends: ['@commitlint/config-conventional'],
|
|
||||||
rules: {
|
|
||||||
'body-leading-blank': [2, 'always'],
|
|
||||||
'footer-leading-blank': [1, 'always'],
|
|
||||||
'header-max-length': [2, 'always', 108],
|
|
||||||
'subject-empty': [2, 'never'],
|
|
||||||
'type-empty': [2, 'never'],
|
|
||||||
'subject-case': [0],
|
|
||||||
'type-enum': [
|
|
||||||
2,
|
|
||||||
'always',
|
|
||||||
[
|
|
||||||
'feat',
|
|
||||||
'fix',
|
|
||||||
'perf',
|
|
||||||
'style',
|
|
||||||
'docs',
|
|
||||||
'test',
|
|
||||||
'refactor',
|
|
||||||
'build',
|
|
||||||
'ci',
|
|
||||||
'chore',
|
|
||||||
'revert',
|
|
||||||
'wip',
|
|
||||||
'workflow',
|
|
||||||
'types',
|
|
||||||
'release',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
prompt: {
|
|
||||||
/** @use `pnpm commit :f` */
|
|
||||||
alias: {
|
|
||||||
f: 'docs: fix typos',
|
|
||||||
r: 'docs: update README',
|
|
||||||
s: 'style: update code format',
|
|
||||||
b: 'build: bump dependencies',
|
|
||||||
c: 'chore: update config',
|
|
||||||
},
|
|
||||||
customScopesAlign: !scopeComplete ? 'top' : 'bottom',
|
|
||||||
defaultScope: scopeComplete,
|
|
||||||
scopes: [...scopes, 'mock'],
|
|
||||||
allowEmptyIssuePrefixs: false,
|
|
||||||
allowCustomIssuePrefixs: false,
|
|
||||||
|
|
||||||
// English
|
|
||||||
typesAppend: [
|
|
||||||
{ value: 'wip', name: 'wip: work in process' },
|
|
||||||
{ value: 'workflow', name: 'workflow: workflow improvements' },
|
|
||||||
{ value: 'types', name: 'types: type definition file changes' },
|
|
||||||
],
|
|
||||||
|
|
||||||
// 中英文对照版
|
|
||||||
// messages: {
|
|
||||||
// type: '选择你要提交的类型 :',
|
|
||||||
// scope: '选择一个提交范围 (可选):',
|
|
||||||
// customScope: '请输入自定义的提交范围 :',
|
|
||||||
// subject: '填写简短精炼的变更描述 :\n',
|
|
||||||
// body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
|
|
||||||
// breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
|
|
||||||
// footerPrefixsSelect: '选择关联issue前缀 (可选):',
|
|
||||||
// customFooterPrefixs: '输入自定义issue前缀 :',
|
|
||||||
// footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
|
|
||||||
// confirmCommit: '是否提交或修改commit ?',
|
|
||||||
// },
|
|
||||||
// types: [
|
|
||||||
// { value: 'feat', name: 'feat: 新增功能' },
|
|
||||||
// { value: 'fix', name: 'fix: 修复缺陷' },
|
|
||||||
// { value: 'docs', name: 'docs: 文档变更' },
|
|
||||||
// { value: 'style', name: 'style: 代码格式' },
|
|
||||||
// { value: 'refactor', name: 'refactor: 代码重构' },
|
|
||||||
// { value: 'perf', name: 'perf: 性能优化' },
|
|
||||||
// { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
|
|
||||||
// { value: 'build', name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)' },
|
|
||||||
// { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
|
|
||||||
// { value: 'revert', name: 'revert: 回滚 commit' },
|
|
||||||
// { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)' },
|
|
||||||
// { value: 'wip', name: 'wip: 正在开发中' },
|
|
||||||
// { value: 'workflow', name: 'workflow: 工作流程改进' },
|
|
||||||
// { value: 'types', name: 'types: 类型定义文件修改' },
|
|
||||||
// ],
|
|
||||||
// emptyScopesAlias: 'empty: 不填写',
|
|
||||||
// customScopesAlias: 'custom: 自定义',
|
|
||||||
},
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
src/uni_modules/
|
|
@ -1,101 +0,0 @@
|
|||||||
{
|
|
||||||
"globals": {
|
|
||||||
"Component": true,
|
|
||||||
"ComponentPublicInstance": true,
|
|
||||||
"ComputedRef": true,
|
|
||||||
"EffectScope": true,
|
|
||||||
"ExtractDefaultPropTypes": true,
|
|
||||||
"ExtractPropTypes": true,
|
|
||||||
"ExtractPublicPropTypes": true,
|
|
||||||
"InjectionKey": true,
|
|
||||||
"PropType": true,
|
|
||||||
"Ref": true,
|
|
||||||
"VNode": true,
|
|
||||||
"WritableComputedRef": true,
|
|
||||||
"computed": true,
|
|
||||||
"createApp": true,
|
|
||||||
"customRef": true,
|
|
||||||
"defineAsyncComponent": true,
|
|
||||||
"defineComponent": true,
|
|
||||||
"effectScope": true,
|
|
||||||
"getCurrentInstance": true,
|
|
||||||
"getCurrentScope": true,
|
|
||||||
"h": true,
|
|
||||||
"inject": true,
|
|
||||||
"isProxy": true,
|
|
||||||
"isReactive": true,
|
|
||||||
"isReadonly": true,
|
|
||||||
"isRef": true,
|
|
||||||
"markRaw": true,
|
|
||||||
"nextTick": true,
|
|
||||||
"onActivated": true,
|
|
||||||
"onAddToFavorites": true,
|
|
||||||
"onBackPress": true,
|
|
||||||
"onBeforeMount": true,
|
|
||||||
"onBeforeUnmount": true,
|
|
||||||
"onBeforeUpdate": true,
|
|
||||||
"onDeactivated": true,
|
|
||||||
"onError": true,
|
|
||||||
"onErrorCaptured": true,
|
|
||||||
"onHide": true,
|
|
||||||
"onLaunch": true,
|
|
||||||
"onLoad": true,
|
|
||||||
"onMounted": true,
|
|
||||||
"onNavigationBarButtonTap": true,
|
|
||||||
"onNavigationBarSearchInputChanged": true,
|
|
||||||
"onNavigationBarSearchInputClicked": true,
|
|
||||||
"onNavigationBarSearchInputConfirmed": true,
|
|
||||||
"onNavigationBarSearchInputFocusChanged": true,
|
|
||||||
"onPageNotFound": true,
|
|
||||||
"onPageScroll": true,
|
|
||||||
"onPullDownRefresh": true,
|
|
||||||
"onReachBottom": true,
|
|
||||||
"onReady": true,
|
|
||||||
"onRenderTracked": true,
|
|
||||||
"onRenderTriggered": true,
|
|
||||||
"onResize": true,
|
|
||||||
"onScopeDispose": true,
|
|
||||||
"onServerPrefetch": true,
|
|
||||||
"onShareAppMessage": true,
|
|
||||||
"onShareTimeline": true,
|
|
||||||
"onShow": true,
|
|
||||||
"onTabItemTap": true,
|
|
||||||
"onThemeChange": true,
|
|
||||||
"onUnhandledRejection": true,
|
|
||||||
"onUnload": true,
|
|
||||||
"onUnmounted": true,
|
|
||||||
"onUpdated": true,
|
|
||||||
"provide": true,
|
|
||||||
"reactive": true,
|
|
||||||
"readonly": true,
|
|
||||||
"ref": true,
|
|
||||||
"resolveComponent": true,
|
|
||||||
"shallowReactive": true,
|
|
||||||
"shallowReadonly": true,
|
|
||||||
"shallowRef": true,
|
|
||||||
"toRaw": true,
|
|
||||||
"toRef": true,
|
|
||||||
"toRefs": true,
|
|
||||||
"toValue": true,
|
|
||||||
"triggerRef": true,
|
|
||||||
"unref": true,
|
|
||||||
"useAttrs": true,
|
|
||||||
"useCssModule": true,
|
|
||||||
"useCssVars": true,
|
|
||||||
"useRequest": true,
|
|
||||||
"useSlots": true,
|
|
||||||
"useUpload": true,
|
|
||||||
"useUpload2": true,
|
|
||||||
"watch": true,
|
|
||||||
"watchEffect": true,
|
|
||||||
"watchPostEffect": true,
|
|
||||||
"watchSyncEffect": true,
|
|
||||||
"DirectiveBinding": true,
|
|
||||||
"MaybeRef": true,
|
|
||||||
"MaybeRefOrGetter": true,
|
|
||||||
"onWatcherCleanup": true,
|
|
||||||
"useId": true,
|
|
||||||
"useModel": true,
|
|
||||||
"useTemplateRef": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,98 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
env: {
|
|
||||||
browser: true,
|
|
||||||
es2021: true,
|
|
||||||
node: true,
|
|
||||||
},
|
|
||||||
extends: [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:vue/vue3-essential',
|
|
||||||
// eslint-plugin-import 插件, @see https://www.npmjs.com/package/eslint-plugin-import
|
|
||||||
'plugin:import/recommended',
|
|
||||||
// eslint-config-airbnb-base 插件 已经改用 eslint-config-standard 插件
|
|
||||||
'standard',
|
|
||||||
// 1. 接入 prettier 的规则
|
|
||||||
'prettier',
|
|
||||||
'plugin:prettier/recommended',
|
|
||||||
'./.eslintrc-auto-import.json',
|
|
||||||
],
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
env: {
|
|
||||||
node: true,
|
|
||||||
},
|
|
||||||
files: ['.eslintrc.{js,cjs}'],
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: 'script',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 'latest',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
sourceType: 'module',
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint',
|
|
||||||
'vue',
|
|
||||||
// 2. 加入 prettier 的 eslint 插件
|
|
||||||
'prettier',
|
|
||||||
// eslint-import-resolver-typescript 插件,@see https://www.npmjs.com/package/eslint-import-resolver-typescript
|
|
||||||
'import',
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
// 3. 注意要加上这一句,开启 prettier 自动修复的功能
|
|
||||||
'prettier/prettier': 'error',
|
|
||||||
// turn on errors for missing imports
|
|
||||||
'import/no-unresolved': 'off',
|
|
||||||
// 对后缀的检测,否则 import 一个ts文件也会报错,需要手动添加'.ts', 增加了下面的配置后就不用了
|
|
||||||
'import/extensions': [
|
|
||||||
'error',
|
|
||||||
'ignorePackages',
|
|
||||||
{ js: 'never', jsx: 'never', ts: 'never', tsx: 'never' },
|
|
||||||
],
|
|
||||||
// 只允许1个默认导出,关闭,否则不能随意export xxx
|
|
||||||
'import/prefer-default-export': ['off'],
|
|
||||||
'no-console': ['off'],
|
|
||||||
// 'no-unused-vars': ['off'],
|
|
||||||
// '@typescript-eslint/no-unused-vars': ['off'],
|
|
||||||
// 解决vite.config.ts报错问题
|
|
||||||
'import/no-extraneous-dependencies': 'off',
|
|
||||||
'no-plusplus': 'off',
|
|
||||||
'no-shadow': 'off',
|
|
||||||
'vue/multi-word-component-names': 'off',
|
|
||||||
'vue/no-unused-vars': 'off',
|
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
'no-underscore-dangle': 'off',
|
|
||||||
'no-use-before-define': 'off',
|
|
||||||
'no-undef': 'off',
|
|
||||||
'no-unused-vars': 'off',
|
|
||||||
'no-param-reassign': 'off',
|
|
||||||
// 避免 `eslint` 对于 `typescript` 函数重载的误报
|
|
||||||
'no-redeclare': 'off',
|
|
||||||
'@typescript-eslint/no-redeclare': 'error',
|
|
||||||
},
|
|
||||||
// eslint-import-resolver-typescript 插件,@see https://www.npmjs.com/package/eslint-import-resolver-typescript
|
|
||||||
settings: {
|
|
||||||
'import/parsers': {
|
|
||||||
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
||||||
},
|
|
||||||
'import/resolver': {
|
|
||||||
typescript: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
globals: {
|
|
||||||
$t: true,
|
|
||||||
uni: true,
|
|
||||||
UniApp: true,
|
|
||||||
wx: true,
|
|
||||||
WechatMiniprogram: true,
|
|
||||||
getCurrentPages: true,
|
|
||||||
UniHelper: true,
|
|
||||||
Page: true,
|
|
||||||
App: true,
|
|
||||||
NodeJS: true,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
# Run the commit-msg hook
|
|
||||||
npx --no-install commitlint --edit
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
# Run the pre-commit hook
|
|
||||||
npx --no-install -- lint-staged
|
|
@ -1 +0,0 @@
|
|||||||
src/uni_modules/
|
|
@ -1,58 +0,0 @@
|
|||||||
// .stylelintrc.cjs
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: [
|
|
||||||
// stylelint-config-standard 替换成了更宽松的 stylelint-config-recommended
|
|
||||||
'stylelint-config-recommended',
|
|
||||||
// stylelint-config-standard-scss 替换成了更宽松的 stylelint-config-recommended-scss
|
|
||||||
'stylelint-config-recommended-scss',
|
|
||||||
'stylelint-config-recommended-vue/scss',
|
|
||||||
'stylelint-config-html/vue',
|
|
||||||
'stylelint-config-recess-order',
|
|
||||||
],
|
|
||||||
plugins: ['stylelint-prettier'],
|
|
||||||
overrides: [
|
|
||||||
// 扫描 .vue/html 文件中的<style>标签内的样式
|
|
||||||
{
|
|
||||||
files: ['**/*.{vue,html}'],
|
|
||||||
customSyntax: 'postcss-html',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ['**/*.{css,scss}'],
|
|
||||||
customSyntax: 'postcss-scss',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 自定义规则
|
|
||||||
rules: {
|
|
||||||
'prettier/prettier': true,
|
|
||||||
// 允许 global 、export 、v-deep等伪类
|
|
||||||
'selector-pseudo-class-no-unknown': [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
ignorePseudoClasses: ['global', 'export', 'v-deep', 'deep'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'unit-no-unknown': [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
ignoreUnits: ['rpx'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 处理小程序page标签不认识的问题
|
|
||||||
'selector-type-no-unknown': [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
ignoreTypes: ['page'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'comment-empty-line-before': 'never', // never|always|always-multi-line|never-multi-line
|
|
||||||
'custom-property-empty-line-before': 'never',
|
|
||||||
'no-empty-source': null,
|
|
||||||
'comment-no-empty': null,
|
|
||||||
'no-duplicate-selectors': null,
|
|
||||||
'scss/comment-no-empty': null,
|
|
||||||
'selector-class-pattern': null,
|
|
||||||
'font-family-no-missing-generic-family-keyword': null,
|
|
||||||
},
|
|
||||||
}
|
|
@ -89,6 +89,6 @@ Copyright (c) 2025 菲鸽
|
|||||||
## 捐赠
|
## 捐赠
|
||||||
|
|
||||||
<p align='center'>
|
<p align='center'>
|
||||||
<img alt="special sponsor appwrite" src="./screenshots/pay-1.png" height="330" style="display:inline-block; height:330px;">
|
<img alt="special sponsor appwrite" src="https://oss.laf.run/ukw0y1-site/pay/wepay.png" height="330" style="display:inline-block; height:330px;">
|
||||||
<img alt="special sponsor appwrite" src="./screenshots/pay-2.png" height="330" style="display:inline-block; height:330px; margin-left:10px;">
|
<img alt="special sponsor appwrite" src="https://oss.laf.run/ukw0y1-site/pay/alipay.jpg" height="330" style="display:inline-block; height:330px; margin-left:10px;">
|
||||||
</p>
|
</p>
|
||||||
|
75
package.json
75
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unibest",
|
"name": "unibest",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "2.6.4",
|
"version": "2.8.0",
|
||||||
"description": "unibest - 最好的 uniapp 开发模板",
|
"description": "unibest - 最好的 uniapp 开发模板",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "feige996",
|
"name": "feige996",
|
||||||
@ -67,41 +67,37 @@
|
|||||||
"build:quickapp-webview": "uni build -p quickapp-webview",
|
"build:quickapp-webview": "uni build -p quickapp-webview",
|
||||||
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
|
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
|
||||||
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
|
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
|
||||||
"prepare": "git init && husky install",
|
|
||||||
"type-check": "vue-tsc --noEmit",
|
"type-check": "vue-tsc --noEmit",
|
||||||
"cz": "czg",
|
|
||||||
"openapi-ts-request": "openapi-ts"
|
"openapi-ts-request": "openapi-ts"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"**/*.{html,vue,ts,cjs,json,md}": [
|
"**/*.{html,vue,ts,cjs,json,md}": [
|
||||||
"prettier --write"
|
"prettier --write"
|
||||||
],
|
],
|
||||||
"**/*.{vue,js,ts,jsx,tsx}": [
|
"**/*.{vue,js,ts,jsx,tsx,vue,css,scss,html}": [
|
||||||
"eslint --cache --fix"
|
"oxlint --fix"
|
||||||
],
|
|
||||||
"**/*.{vue,css,scss,html}": [
|
|
||||||
"stylelint --fix"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"bin-wrapper": "npm:bin-wrapper-china"
|
"bin-wrapper": "npm:bin-wrapper-china"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dcloudio/uni-app": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-app-harmony": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app-harmony": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-app-plus": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app-plus": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-components": "3.0.0-4020920240930001",
|
"@dcloudio/uni-components": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-h5": "3.0.0-4020920240930001",
|
"@dcloudio/uni-h5": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-alipay": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-alipay": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-baidu": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-baidu": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-jd": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-harmony": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-jd": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-lark": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-kuaishou": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-qq": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-lark": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-qq": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-toutiao": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-weixin": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
|
"@dcloudio/uni-mp-xhs": "3.0.0-4060520250512001",
|
||||||
|
"@dcloudio/uni-quickapp-webview": "3.0.0-4060520250512001",
|
||||||
"@tanstack/vue-query": "^5.62.16",
|
"@tanstack/vue-query": "^5.62.16",
|
||||||
"abortcontroller-polyfill": "^1.7.8",
|
"abortcontroller-polyfill": "^1.7.8",
|
||||||
"dayjs": "1.11.10",
|
"dayjs": "1.11.10",
|
||||||
@ -113,57 +109,38 @@
|
|||||||
"z-paging": "^2.8.4"
|
"z-paging": "^2.8.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^18.6.1",
|
|
||||||
"@commitlint/config-conventional": "^18.6.3",
|
|
||||||
"@dcloudio/types": "^3.4.14",
|
"@dcloudio/types": "^3.4.14",
|
||||||
"@dcloudio/uni-automator": "3.0.0-4020920240930001",
|
"@dcloudio/uni-automator": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-cli-shared": "3.0.0-4020920240930001",
|
"@dcloudio/uni-cli-shared": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/uni-stacktracey": "3.0.0-4020920240930001",
|
"@dcloudio/uni-stacktracey": "3.0.0-4060520250512001",
|
||||||
"@dcloudio/vite-plugin-uni": "3.0.0-4020920240930001",
|
"@dcloudio/vite-plugin-uni": "3.0.0-4060520250512001",
|
||||||
"@esbuild/darwin-arm64": "0.20.2",
|
"@esbuild/darwin-arm64": "0.20.2",
|
||||||
"@esbuild/darwin-x64": "0.20.2",
|
"@esbuild/darwin-x64": "0.20.2",
|
||||||
"@iconify-json/carbon": "^1.2.4",
|
"@iconify-json/carbon": "^1.2.4",
|
||||||
"@rollup/rollup-darwin-x64": "^4.28.0",
|
"@rollup/rollup-darwin-x64": "^4.28.0",
|
||||||
"@types/node": "^20.17.9",
|
"@types/node": "^20.17.9",
|
||||||
"@types/wechat-miniprogram": "^3.4.8",
|
"@types/wechat-miniprogram": "^3.4.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
||||||
"@typescript-eslint/parser": "^6.21.0",
|
|
||||||
"@uni-helper/uni-types": "1.0.0-alpha.3",
|
"@uni-helper/uni-types": "1.0.0-alpha.3",
|
||||||
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
|
||||||
"@uni-helper/vite-plugin-uni-manifest": "^0.2.7",
|
"@uni-helper/vite-plugin-uni-manifest": "^0.2.8",
|
||||||
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
|
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
|
||||||
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
|
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
|
||||||
"@unocss/preset-legacy-compat": "^0.59.4",
|
"@unocss/preset-legacy-compat": "^0.59.4",
|
||||||
"@vue/runtime-core": "^3.5.13",
|
"@vue/runtime-core": "^3.5.13",
|
||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"commitlint": "^18.6.1",
|
|
||||||
"czg": "^1.9.4",
|
|
||||||
"eslint": "^8.57.1",
|
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"eslint-config-standard": "^17.1.0",
|
|
||||||
"eslint-import-resolver-typescript": "^3.7.0",
|
|
||||||
"eslint-plugin-import": "^2.31.0",
|
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
|
||||||
"eslint-plugin-vue": "^9.32.0",
|
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"lint-staged": "^15.2.10",
|
"lint-staged": "^15.2.10",
|
||||||
"openapi-ts-request": "^1.1.2",
|
"openapi-ts-request": "^1.1.2",
|
||||||
|
"oxlint": "^0.1.0",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"postcss-html": "^1.7.0",
|
"postcss-html": "^1.7.0",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"sass": "1.77.8",
|
"sass": "1.77.8",
|
||||||
"stylelint": "^16.11.0",
|
|
||||||
"stylelint-config-html": "^1.1.0",
|
|
||||||
"stylelint-config-recess-order": "^4.6.0",
|
|
||||||
"stylelint-config-recommended": "^14.0.1",
|
|
||||||
"stylelint-config-recommended-scss": "^14.1.0",
|
|
||||||
"stylelint-config-recommended-vue": "^1.5.0",
|
|
||||||
"stylelint-prettier": "^5.0.2",
|
|
||||||
"terser": "^5.36.0",
|
"terser": "^5.36.0",
|
||||||
"typescript": "^5.7.2",
|
"typescript": "^5.7.2",
|
||||||
"unocss": "^0.58.9",
|
"unocss": "0.58.9",
|
||||||
"unocss-applet": "^0.7.8",
|
"unocss-applet": "^0.7.8",
|
||||||
"unplugin-auto-import": "^0.17.8",
|
"unplugin-auto-import": "^0.17.8",
|
||||||
"vite": "5.2.8",
|
"vite": "5.2.8",
|
||||||
|
@ -16,6 +16,7 @@ export default defineUniPages({
|
|||||||
'z-paging/components/z-paging$1/z-paging$1.vue',
|
'z-paging/components/z-paging$1/z-paging$1.vue',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// 如果不需要tabBar,可以注释掉这个配置,或者直接删除
|
||||||
tabBar: {
|
tabBar: {
|
||||||
color: '#999999',
|
color: '#999999',
|
||||||
selectedColor: '#018d71',
|
selectedColor: '#018d71',
|
||||||
|
3796
pnpm-lock.yaml
generated
3796
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 116 KiB |
Binary file not shown.
Before Width: | Height: | Size: 134 KiB |
@ -15,6 +15,7 @@
|
|||||||
鸽友们好,我是
|
鸽友们好,我是
|
||||||
<text class="text-red-500">菲鸽</text>
|
<text class="text-red-500">菲鸽</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="test-css">测试 scss 样式</view>
|
||||||
<RequestComp />
|
<RequestComp />
|
||||||
<UploadComp />
|
<UploadComp />
|
||||||
</view>
|
</view>
|
||||||
@ -30,7 +31,10 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.test-css {
|
.test-css {
|
||||||
|
// 16rpx=>0.5rem
|
||||||
|
padding-bottom: 16rpx;
|
||||||
// mt-4=>1rem=>16px;
|
// mt-4=>1rem=>16px;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { TestEnum } from '@/typings'
|
|
||||||
import PLATFORM from '@/utils/platform'
|
import PLATFORM from '@/utils/platform'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -46,8 +45,7 @@ const description = ref(
|
|||||||
)
|
)
|
||||||
// 测试 uni API 自动引入
|
// 测试 uni API 自动引入
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
console.log(author)
|
console.log('项目作者:', author.value)
|
||||||
console.log(TestEnum.A)
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -84,6 +84,41 @@ export const httpPost = <T>(
|
|||||||
header,
|
header,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* PUT 请求
|
||||||
|
*/
|
||||||
|
export const httpPut = <T>(
|
||||||
|
url: string,
|
||||||
|
data?: Record<string, any>,
|
||||||
|
query?: Record<string, any>,
|
||||||
|
header?: Record<string, any>,
|
||||||
|
) => {
|
||||||
|
return http<T>({
|
||||||
|
url,
|
||||||
|
data,
|
||||||
|
query,
|
||||||
|
method: 'PUT',
|
||||||
|
header,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DELETE 请求(无请求体,仅 query)
|
||||||
|
*/
|
||||||
|
export const httpDelete = <T>(
|
||||||
|
url: string,
|
||||||
|
query?: Record<string, any>,
|
||||||
|
header?: Record<string, any>,
|
||||||
|
) => {
|
||||||
|
return http<T>({
|
||||||
|
url,
|
||||||
|
query,
|
||||||
|
method: 'DELETE',
|
||||||
|
header,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
http.get = httpGet
|
http.get = httpGet
|
||||||
http.post = httpPost
|
http.post = httpPost
|
||||||
|
http.put = httpPut
|
||||||
|
http.delete = httpDelete
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { pages, subPackages, tabBar } from '@/pages.json'
|
import pagesConfig from '@/pages.json'
|
||||||
import { isMpWeixin } from './platform'
|
import { isMpWeixin } from './platform'
|
||||||
|
|
||||||
|
const { pages, subPackages, tabBar = { list: [] } } = { ...pagesConfig }
|
||||||
|
|
||||||
export const getLastPage = () => {
|
export const getLastPage = () => {
|
||||||
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
||||||
// const lastPage = getCurrentPages().at(-1)
|
// const lastPage = getCurrentPages().at(-1)
|
||||||
@ -11,16 +13,14 @@ export const getLastPage = () => {
|
|||||||
|
|
||||||
/** 判断当前页面是否是 tabbar 页 */
|
/** 判断当前页面是否是 tabbar 页 */
|
||||||
export const getIsTabbar = () => {
|
export const getIsTabbar = () => {
|
||||||
if (!tabBar) {
|
try {
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (!tabBar.list.length) {
|
|
||||||
// 通常有 tabBar 的话,list 不能有空,且至少有2个元素,这里其实不用处理
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
const lastPage = getLastPage()
|
const lastPage = getLastPage()
|
||||||
const currPath = lastPage.route
|
const currPath = lastPage?.route
|
||||||
return !!tabBar.list.find((e) => e.pagePath === currPath)
|
|
||||||
|
return Boolean(tabBar?.list?.some((item) => item.pagePath === currPath))
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +80,6 @@ export default ({ command, mode }) => {
|
|||||||
imports: ['vue', 'uni-app'],
|
imports: ['vue', 'uni-app'],
|
||||||
dts: 'src/types/auto-import.d.ts',
|
dts: 'src/types/auto-import.d.ts',
|
||||||
dirs: ['src/hooks'], // 自动导入 hooks
|
dirs: ['src/hooks'], // 自动导入 hooks
|
||||||
eslintrc: { enabled: true },
|
|
||||||
vueTemplate: true, // default false
|
vueTemplate: true, // default false
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user