提交 6cb567ae 作者: 方治民

合并分支 '3.x' 到 'main'

3.x

查看合并请求 hntq/zjtq-v5!3
node_modules node_modules
.DS_Store .DS_Store
dist dist
.npmrc
.cache .cache
tests/server/static tests/server/static
......
strict-peer-dependencies=false
shell-emulator=true
/dist/* /dist/*
.local .local
.output.js .output.js
.npmrc
.nvmrc
/node_modules/** /node_modules/**
**/*.svg **/*.svg
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
* Get the configuration file variable name * Get the configuration file variable name
* @param env * @param env
*/ */
export const getConfigFileName = (env: Record<string, any>) => { export function getConfigFileName(env: Record<string, any>) {
return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '') return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '')
} }
...@@ -4,6 +4,7 @@ import prettier from 'prettier' ...@@ -4,6 +4,7 @@ import prettier from 'prettier'
// uni-app // uni-app
import uni from '@dcloudio/vite-plugin-uni' import uni from '@dcloudio/vite-plugin-uni'
// @dcloudio/uni-helper-json // @dcloudio/uni-helper-json
import tags from '@dcloudio/uni-helper-json/dist/tags.json' import tags from '@dcloudio/uni-helper-json/dist/tags.json'
...@@ -21,7 +22,9 @@ function generateUniComponentsTypes() { ...@@ -21,7 +22,9 @@ function generateUniComponentsTypes() {
type ComponentCustomOptions = Hooks type ComponentCustomOptions = Hooks
// uni-app components // uni-app components
type UniComponent = HTMLElement interface UniComponent {
[key in string]: any
}
export interface GlobalComponents { export interface GlobalComponents {
${components.join(',\n\t')} ${components.join(',\n\t')}
} }
...@@ -31,6 +34,7 @@ function generateUniComponentsTypes() { ...@@ -31,6 +34,7 @@ function generateUniComponentsTypes() {
const formatted = prettier.format(content, { const formatted = prettier.format(content, {
parser: 'typescript', parser: 'typescript',
// eslint-disable-next-line @typescript-eslint/no-require-imports
...require('../../prettier.config'), ...require('../../prettier.config'),
}) })
fs.writeFileSync('./types/uni.d.ts', formatted, 'utf8') fs.writeFileSync('./types/uni.d.ts', formatted, 'utf8')
......
...@@ -3,6 +3,7 @@ import type { Plugin } from 'vite' ...@@ -3,6 +3,7 @@ import type { Plugin } from 'vite'
// https://github.com/antfu/unplugin-auto-import // https://github.com/antfu/unplugin-auto-import
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
// https://github.com/antfu/unplugin-vue-components // https://github.com/antfu/unplugin-vue-components
import Components from 'unplugin-vue-components/vite' import Components from 'unplugin-vue-components/vite'
...@@ -39,7 +40,7 @@ export function configComponentsImportPlugin(): Plugin { ...@@ -39,7 +40,7 @@ export function configComponentsImportPlugin(): Plugin {
(name: string) => { (name: string) => {
// FIX: 修复 easycom 在 APP 下不生效问题(原因不明 // FIX: 修复 easycom 在 APP 下不生效问题(原因不明
if (name.startsWith('fui-')) { if (name.startsWith('fui-')) {
return path.resolve(__dirname, `src/components/FirstUI/${name}/${name}.vue`).replaceAll('\\', '/') return path.resolve(__dirname, `src/components/firstui/${name}/${name}.vue`).replaceAll('\\', '/')
} }
// if (name.startsWith('uni-')) { // if (name.startsWith('uni-')) {
// return `@dcloudio/uni-ui/lib/${name}/${name}.vue` // return `@dcloudio/uni-ui/lib/${name}/${name}.vue`
......
...@@ -66,29 +66,29 @@ ...@@ -66,29 +66,29 @@
} }
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-app": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-app-plus": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-components": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-components": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-h5": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-h5": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-alipay": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-baidu": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-jd": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-jd": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-lark": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-qq": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-ui": "^1.4.26", "@dcloudio/uni-ui": "^1.4.27",
"@faker-js/faker": "^7.6.0", "@faker-js/faker": "^7.6.0",
"@vue/runtime-core": "^3.2.47", "@vue/runtime-core": "^3.2.47",
"@vueuse/core": "^9.13.0", "@vueuse/core": "^10.1.0",
"axios": "^0.26.1", "axios": "^0.26.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"nanoid": "^4.0.2", "nanoid": "^4.0.2",
"pinia": "^2.0.33", "pinia": "^2.0.35",
"qs": "~6.9.7", "qs": "~6.9.7",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"urijs": "^1.19.11", "urijs": "^1.19.11",
...@@ -98,25 +98,25 @@ ...@@ -98,25 +98,25 @@
"vue-types": "^5.0.2" "vue-types": "^5.0.2"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^0.38.2", "@antfu/eslint-config": "^0.38.5",
"@commitlint/cli": "^17.5.1", "@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.4.4", "@commitlint/config-conventional": "^17.6.1",
"@dcloudio/types": "^3.3.2", "@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-automator": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-cli-shared": "3.0.0-alpha-3071320230417001",
"@dcloudio/uni-helper-json": "^1.0.13", "@dcloudio/uni-helper-json": "^1.0.13",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3071220230331002", "@dcloudio/uni-stacktracey": "3.0.0-alpha-3071320230417001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3071220230331002", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3071320230417001",
"@iconify/json": "^2.2.43", "@iconify/json": "^2.2.54",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/node": "^18.15.11", "@types/node": "^18.15.13",
"@types/prettier": "^2.7.2", "@types/prettier": "^2.7.2",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/stompjs": "^2.3.5", "@types/stompjs": "^2.3.5",
"@types/urijs": "^1.19.19", "@types/urijs": "^1.19.19",
"@typescript-eslint/eslint-plugin": "^5.57.0", "@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.57.0", "@typescript-eslint/parser": "^5.59.0",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^2.2.2",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
...@@ -124,37 +124,36 @@ ...@@ -124,37 +124,36 @@
"cz-git": "^1.6.1", "cz-git": "^1.6.1",
"czg": "^1.6.1", "czg": "^1.6.1",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"eslint": "^8.37.0", "eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.10.0", "eslint-plugin-vue": "^9.11.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"jest": "27.0.4", "jest": "27.0.4",
"jest-environment-node": "27.5.1", "jest-environment-node": "27.5.1",
"less": "^4.1.3", "less": "^4.1.3",
"lint-staged": "^13.2.0", "lint-staged": "^13.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pont-engine": "^1.5.7", "pont-engine": "^1.5.7",
"postcss": "^8.4.21", "postcss": "^8.4.23",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.7", "prettier": "^2.8.7",
"rimraf": "^4.4.1", "rimraf": "^5.0.0",
"sass": "^1.60.0", "sass": "^1.62.0",
"sort-package-json": "^2.4.1", "sort-package-json": "^2.4.1",
"stylelint": "^15.4.0", "stylelint": "^15.6.0",
"stylelint-config-html": "^1.1.0", "stylelint-config-html": "^1.1.0",
"stylelint-config-recommended": "^11.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-standard": "^32.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-order": "^6.0.3", "stylelint-order": "^6.0.3",
"terser": "^5.16.8", "typescript": "^5.0.4",
"typescript": "^5.0.3", "unocss": "^0.50.8",
"unocss": "^0.50.6", "unocss-preset-weapp": "^0.5.3",
"unocss-preset-weapp": "^0.5.2", "unplugin-auto-import": "^0.15.3",
"unplugin-auto-import": "^0.15.2",
"unplugin-vue-components": "^0.24.1", "unplugin-vue-components": "^0.24.1",
"vite": "^4.2.1", "vite": "^4.3.1",
"vue-eslint-parser": "^9.1.1" "vue-eslint-parser": "^9.1.1"
}, },
"engines": { "engines": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,6 +8,7 @@ const API_URL_PREFIX = '/api' ...@@ -8,6 +8,7 @@ const API_URL_PREFIX = '/api'
export default class BasicGenerator extends CodeGenerator { export default class BasicGenerator extends CodeGenerator {
checkJsonParam(inter: Interface, paramsCode: string): boolean { checkJsonParam(inter: Interface, paramsCode: string): boolean {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const prettier = require('prettier') const prettier = require('prettier')
const requestParams = inter.getRequestParams(this.surrounding) const requestParams = inter.getRequestParams(this.surrounding)
const code = prettier.format(paramsCode, { parser: 'typescript' }) const code = prettier.format(paramsCode, { parser: 'typescript' })
...@@ -29,6 +30,7 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -29,6 +30,7 @@ export default class BasicGenerator extends CodeGenerator {
let requestParams = inter.getRequestParams(this.surrounding) let requestParams = inter.getRequestParams(this.surrounding)
let bodyTypeDef = '' let bodyTypeDef = ''
// eslint-disable-next-line @typescript-eslint/no-require-imports
const prettier = require('prettier') const prettier = require('prettier')
if (prettier.format(paramsCode, { parser: 'typescript' }).includes('{}')) { if (prettier.format(paramsCode, { parser: 'typescript' }).includes('{}')) {
if (!requestParams.includes('form')) { if (!requestParams.includes('form')) {
......
<script setup lang="ts"> <script setup lang="ts">
import { checkUpgrade } from '@/utils/upgrade' import { checkUpgrade } from '@/utils/upgrade'
// import * as Push from '@/utils/push' // import * as Push from '@/utils/push'
onLaunch(() => { onLaunch(() => {
......
<script> <script setup lang="ts">
export default { defineProps({
props: { /**
* 提示内容
*/
tips: { tips: {
type: String, type: String,
default: '', default: '',
}, },
/**
* 提示内容颜色
*/
tipsColor: { tipsColor: {
type: String, type: String,
default: '#9C9C9C', default: '#9C9C9C',
}, },
/**
* 背景颜色
*/
bgColor: { bgColor: {
type: String, type: String,
default: 'transparent', default: 'transparent',
}, },
}, })
}
</script> </script>
<template> <template>
......
# 组件更新说明
1. 从 https://firstui.cn/user/order 下载更新版本包
2. 在本地解压,找到 \FirstUI\components\firstui 目录,使用 vscode 打开当前目录
3. 清理掉组件文件头部的 license 信息,使用 vscode 全局替换
4. 全局替换换行符 \r\n\n [引用](https://segmentfault.com/q/1010000011799577)
5. 将文件拷贝到 src\components\FirstUI\ 目录下,检查 git diff,手动处理哪些文件需要更新
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
default: false default: false
} }
}, },
data() {
return {}
},
methods: { methods: {
getColor(type) { getColor(type) {
const color = "#465CFF" const color = "#465CFF"
......
<!--本文件由FirstUI授权予长沙壹润信息科技发展有限公司(手机号:1 5616 2 6 019 5,身份证尾号: 5 0 375T)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
<template> <template>
<view class="fui-autograph__wrap" :style="{ width: w + 'px', height:h + 'px',background:background }" <view class="fui-autograph__wrap" :style="{ width: w + 'px', height:h + 'px',background:background }"
ref="fui_gcanvas_ag"> ref="fui_gcanvas_ag">
......
import GCanvas from './env/canvas'; import GCanvas from './env/canvas';
import GImage from './env/image'; import GImage from './env/image';
import GWebGLRenderingContext from './context-webgl/RenderingContext'; import GWebGLRenderingContext from './context-webgl/RenderingContext';// 2021-5-6变更
import GContext2D from './context-2d/RenderingContext'; import GContext2D from './context-2d/RenderingContext';
import GBridgeWeex from './bridge/bridge-weex'; import GBridgeWeex from './bridge/bridge-weex';
...@@ -12,12 +12,12 @@ export let WeexBridge = GBridgeWeex; ...@@ -12,12 +12,12 @@ export let WeexBridge = GBridgeWeex;
export function enable(el, { export function enable(el, {
bridge, bridge,
debug, debug,// 2021-5-6变更
disableAutoSwap, disableAutoSwap,
disableComboCommands disableComboCommands
} = {}) { } = {}) {
const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge; const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge;// 功能需要优化
GBridge.callEnable(el.ref, [ GBridge.callEnable(el.ref, [
0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY 0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY
...@@ -29,7 +29,7 @@ export function enable(el, { ...@@ -29,7 +29,7 @@ export function enable(el, {
false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level
]); ]);
if (debug === true) { if (debug === true) {// echo建议
GBridge.callEnableDebug(); GBridge.callEnableDebug();
} }
if (disableComboCommands) { if (disableComboCommands) {
...@@ -41,7 +41,7 @@ export function enable(el, { ...@@ -41,7 +41,7 @@ export function enable(el, {
}); });
let pixelRatio = uni.getSystemInfoSync().pixelRatio; let pixelRatio = uni.getSystemInfoSync().pixelRatio;
canvas.width = el.style.width * pixelRatio; canvas.width = el.style.width * pixelRatio;
canvas.height = el.style.height * pixelRatio; canvas.height = el.style.height * pixelRatio;// 新特性待增加
return canvas; return canvas;
}; };
...@@ -159,11 +159,11 @@ ...@@ -159,11 +159,11 @@
styl += `width:${this.width}rpx;` styl += `width:${this.width}rpx;`
} }
if (this.position === 'fixed') { if (this.position === 'fixed') {
let tb = this.top ? `top:${this.top}rpx;` : ''; let tb = Number(this.top) ? `top:${this.top}rpx;` : '';
tb += this.bottom ? `bottom:${this.bottom}rpx;` : ''; tb += Number(this.bottom) ? `bottom:${this.bottom}rpx;` : '';
styl += tb ? tb : `top:${this.top}rpx;` styl += tb ? tb : `top:${this.top}rpx;`
let lr = this.left ? `left:${this.left}rpx;` : ''; let lr = Number(this.left) ? `left:${this.left}rpx;` : '';
lr += this.right ? `right:${this.right}rpx;` : ''; lr += Number(this.right) ? `right:${this.right}rpx;` : '';
styl += lr ? lr : `left:${this.left}rpx;`; styl += lr ? lr : `left:${this.left}rpx;`;
} else { } else {
// #ifdef APP-NVUE // #ifdef APP-NVUE
...@@ -184,6 +184,13 @@ ...@@ -184,6 +184,13 @@
break; break;
} }
// #endif // #endif
let tb = Number(this.top) ? `margin-top:${this.top}rpx;` : '';
tb += Number(this.bottom) ? `margin-top:-${this.bottom}rpx;` : '';
styl += tb ? tb : `margin-top:${this.top}rpx;`
let lr = Number(this.left) ? `margin-left:${this.left}rpx;` : '';
lr += Number(this.right) ? `margin-left:-${this.right}rpx;` : '';
styl += lr ? lr : `margin-left:${this.left}rpx;`;
} }
return styl return styl
}, },
...@@ -320,6 +327,9 @@ ...@@ -320,6 +327,9 @@
/* #ifdef APP-NVUE */ /* #ifdef APP-NVUE */
transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out;
/* #endif */ /* #endif */
/* margin-top: -120rpx; */
/* margin-left: 20rpx; */
} }
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
default: false default: false
} }
}, },
data() {
return {}
},
created() { created() {
this.children = [] this.children = []
}, },
......
...@@ -203,9 +203,8 @@ ...@@ -203,9 +203,8 @@
let iphonex = false; let iphonex = false;
let models = ['iphonex', 'iphonexr', 'iphonexsmax', 'iphone11', 'iphone11pro', 'iphone11promax', let models = ['iphonex', 'iphonexr', 'iphonexsmax', 'iphone11', 'iphone11pro', 'iphone11promax',
'iphone12', 'iphone12mini', 'iphone12pro', 'iphone12promax', 'iphone13', 'iphone13mini', 'iphone12', 'iphone12mini', 'iphone12pro', 'iphone12promax', 'iphone13', 'iphone13mini',
'iphone13pro', 'iphone13promax', 'iphone14', 'iphone14mini', 'iphone14plus', 'iphone13pro', 'iphone13promax', 'iphone14', 'iphone14mini',
'iphone14pro', 'iphone14promax', 'iphone15', 'iphone15mini', 'iphone15plus', 'iphone14pro', 'iphone14promax'
'iphone15pro', 'iphone15promax'
] ]
const model = res.model.replace(/\s/g, "").toLowerCase() const model = res.model.replace(/\s/g, "").toLowerCase()
const newModel = model.split('<')[0] const newModel = model.split('<')[0]
......
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
default: '#F1F4FA' default: '#F1F4FA'
} }
}, },
data() {
return {}
},
computed: { computed: {
getTop() { getTop() {
return Number(this.height) / 2 + 'rpx' return Number(this.height) / 2 + 'rpx'
......
...@@ -5,22 +5,24 @@ ...@@ -5,22 +5,24 @@
:class="[dragging?'fui-drag-item__show':'fui-drag-item__hidden']"> :class="[dragging?'fui-drag-item__show':'fui-drag-item__hidden']">
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 --> <!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
<view class="fui-drag__wrap" :class="[dragging?'fui-drag-item__show':'fui-drag-item__hidden']" ref="fui_drag" <!-- #ifdef VUE2 -->
:id="elId" :style="{width:wrapWidth+'px',height:(rows * cellHeight)+'px'}" :list="list" <view class="fui-drag__wrap" :catch:touchmove="wxDrag?handler.stopTouchMove:''"
:class="[dragging?'fui-drag-item__show':'fui-drag-item__hidden']" ref="fui_drag" :id="elId"
:style="{width:wrapWidth+'px',height:(rows * cellHeight)+'px'}" :list="list"
:change:list="handler.listChange" :param="param" :change:param="handler.paramChange"> :change:list="handler.listChange" :param="param" :change:param="handler.paramChange">
<!-- #ifndef MP-WEIXIN --> <!-- #endif -->
<!-- #ifdef VUE3 -->
<!-- vue3下编译到小程序data数据与wxs混用中无法获取 $data数据无法直接应用到页面,uni-app官方编译bug-->
<view class="fui-drag__wrap" :catch:touchmove="wxDrag?true:''"
:class="[dragging?'fui-drag-item__show':'fui-drag-item__hidden']" ref="fui_drag" :id="elId"
:style="{width:wrapWidth+'px',height:(rows * cellHeight)+'px'}" :list="list"
:change:list="handler.listChange" :param="param" :change:param="handler.paramChange">
<!-- #endif -->
<view class="fui-drag-item__wrap" :style="{width:cellWidth+'px',height:cellHeight+'px'}" <view class="fui-drag-item__wrap" :style="{width:cellWidth+'px',height:cellHeight+'px'}"
v-for="(item, index) in list" :key="item.id" :data-index="index" @longpress="handler.longPress" v-for="(item, index) in list" :key="item.id" :data-index="index" @longpress="handler.longPress"
:data-param="param" :data-isdrag="isDrag && dragging?1:0" @touchstart="handler.touchStart" :data-param="param" :data-isdrag="isDrag && dragging?1:0" @touchstart="handler.touchStart"
@touchmove="handler.touchMove" @touchend="handler.touchEnd" @mousedown="handler.mousedown" @touchmove="handler.touchMove" @touchend="handler.touchEnd" @mousedown="handler.mousedown"
@tap="itemClick(index)"> @tap="itemClick(index)">
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="fui-drag-item__wrap" :style="{width:cellWidth+'px',height:cellHeight+'px'}"
v-for="(item, index) in list" :key="item.id" :data-index="index" @longpress="handler.longPress"
:data-param="param" :data-isdrag="isDrag && dragging?1:0" @touchstart="handler.touchStart"
:catch:touchmove="wxDrag?handler.touchMove:''" @touchend="handler.touchEnd" @tap="itemClick(index)">
<!-- #endif -->
<template v-if="custom"> <template v-if="custom">
<slot :model="item.entity" :width="cellWidth" :height="cellHeight" :index="index"></slot> <slot :model="item.entity" :width="cellWidth" :height="cellHeight" :index="index"></slot>
</template> </template>
......
...@@ -273,6 +273,10 @@ function mousedown(e, ins) { ...@@ -273,6 +273,10 @@ function mousedown(e, ins) {
} }
function stopTouchMove(e) {
return true
}
module.exports = { module.exports = {
longPress: longPress, longPress: longPress,
touchStart: touchStart, touchStart: touchStart,
...@@ -280,5 +284,6 @@ module.exports = { ...@@ -280,5 +284,6 @@ module.exports = {
touchEnd: touchEnd, touchEnd: touchEnd,
paramChange: paramChange, paramChange: paramChange,
listChange: listChange, listChange: listChange,
mousedown: mousedown mousedown: mousedown,
stopTouchMove:stopTouchMove
} }
...@@ -67,7 +67,10 @@ ...@@ -67,7 +67,10 @@
type: [Number, String], type: [Number, String],
default: 0 default: 0
} }
} },
data() {
return {}
},
} }
</script> </script>
......
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
type: Boolean, type: Boolean,
default: false default: false
} }
} },
data() {
return {}
},
} }
</script> </script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
:style="{paddingTop:padding[0] || 0,paddingRight:padding[1] || 0,paddingBottom:padding[2] || padding[0] || 0,paddingLeft:padding[3] || padding[1] || 0,background:background,marginTop:marginTop+'rpx',marginBottom:marginBottom+'rpx',borderRadius:radius}" :style="{paddingTop:padding[0] || 0,paddingRight:padding[1] || 0,paddingBottom:padding[2] || padding[0] || 0,paddingLeft:padding[3] || padding[1] || 0,background:background,marginTop:marginTop+'rpx',marginBottom:marginBottom+'rpx',borderRadius:radius}"
@tap="handleClick"> @tap="handleClick">
<!-- #ifdef APP-NVUE --> <!-- #ifdef APP-NVUE -->
<view class="fui-form__asterisk" v-if="asterisk"> <view class="fui-form__asterisk" :style="{left:getAkPosi}" v-if="asterisk">
<text :style="{color:asteriskColor || akColor || '#FF2B2B'}">*</text> <text :style="{color:asteriskColor || akColor || '#FF2B2B'}">*</text>
</view> </view>
<!-- #endif --> <!-- #endif -->
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
return `${this.labelWidth || this.lWidth || labelWidth}rpx` return `${this.labelWidth || this.lWidth || labelWidth}rpx`
}, },
getLabelRight() { getLabelRight() {
const labelRight = (uni.$fui && uni.$fui.fuiFormItem && uni.$fui.fuiFormItem.labelRight) || 16 const labelRight = (uni.$fui && uni.$fui.fuiFormItem && uni.$fui.fuiFormItem.labelRight) || 30
return `${this.labelRight || labelRight}rpx` return `${this.labelRight || labelRight}rpx`
}, },
getLabelAlign() { getLabelAlign() {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<script> <script>
export default { export default {
name: "fui-grid-item", name: "fui-grid-item",
emits: ['click'],
inject: ['grid'], inject: ['grid'],
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
options: { options: {
...@@ -79,11 +80,13 @@ ...@@ -79,11 +80,13 @@
} }
}, },
handleClick() { handleClick() {
this.grid.handleClick({ const e = {
detail: { detail: {
index: this.index index: this.index
} }
}) }
this.grid && this.grid.handleClick(e)
this.$emit('click', e)
} }
} }
} }
......
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
default: 0 default: 0
} }
}, },
data() {
return {}
},
methods: { methods: {
onClick() { onClick() {
this.$emit("itemClick", { this.$emit("itemClick", {
......
...@@ -307,6 +307,13 @@ ...@@ -307,6 +307,13 @@
font-weight: 500; font-weight: 500;
} }
/* #ifdef H5 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
/* #endif */
.fui-number__disabled { .fui-number__disabled {
opacity: 0.6; opacity: 0.6;
} }
......
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
default: false default: false
} }
}, },
data() {
return {}
},
created() { created() {
this.childrens = []; this.childrens = [];
}, },
......
...@@ -64,7 +64,7 @@ export default [{ ...@@ -64,7 +64,7 @@ export default [{
cn: '晋', cn: '晋',
en: 'P' en: 'P'
}] }]
}, { }, {// echo建议
id: 'f_p3', id: 'f_p3',
keys: [{ keys: [{
cn: '蒙', cn: '蒙',
...@@ -82,7 +82,7 @@ export default [{ ...@@ -82,7 +82,7 @@ export default [{
cn: '贵', cn: '贵',
en: 'G' en: 'G'
}, { }, {
cn: '粤', cn: '粤',// 功能需要优化
en: 'H' en: 'H'
}, { }, {
cn: '青', cn: '青',
...@@ -97,10 +97,10 @@ export default [{ ...@@ -97,10 +97,10 @@ export default [{
cn: '宁', cn: '宁',
en: '' en: ''
}] }]
}, { }, {// 新特性待增加
id: 'f_p4', id: 'f_p4',
keys: [{ keys: [{
cn: 'ABC', cn: 'ABC',// echo建议
en: '返回' en: '返回'
}, { }, {
cn: '琼', cn: '琼',
...@@ -119,7 +119,7 @@ export default [{ ...@@ -119,7 +119,7 @@ export default [{
en: 'B' en: 'B'
}, { }, {
cn: '港', cn: '港',
en: 'N' en: 'N'// 新特性待增加
}, { }, {
cn: '澳', cn: '澳',
en: 'M' en: 'M'
......
...@@ -114,6 +114,9 @@ ...@@ -114,6 +114,9 @@
default: 0 default: 0
} }
}, },
data() {
return {}
},
methods: { methods: {
handleClick() { handleClick() {
this.$emit('click', { this.$emit('click', {
......
...@@ -119,7 +119,10 @@ ...@@ -119,7 +119,10 @@
type: [Number, String], type: [Number, String],
default: 0 default: 0
} }
} },
data() {
return {}
},
} }
</script> </script>
......
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
type: Boolean, type: Boolean,
default: false default: false
} }
} },
data() {
return {}
},
} }
</script> </script>
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<view class="fui-modal__button" <view class="fui-modal__button"
:class="{'fui-modal__button-col':direction==='column' && index!==vals.length-1,'fui-modal__button-bg':!entity.plain && !entity.background,'fui-modal__button-border':entity.plain,'fui-modal__button-bc':entity.plain && !entity.background}" :class="{'fui-modal__button-col':direction==='column' && index!==vals.length-1,'fui-modal__button-bg':!entity.plain && !entity.background,'fui-modal__button-border':entity.plain,'fui-modal__button-bc':entity.plain && !entity.background}"
:style="{borderRadius:radius+'rpx',background:entity.plain?'transparent':(entity.background || '#465CFF'),borderColor:entity.plain?(entity.background || '#465CFF'):'transparent'}" :style="{borderRadius:radius+'rpx',background:entity.plain?'transparent':(entity.background || '#465CFF'),borderColor:entity.plain?(entity.background || '#465CFF'):'transparent'}"
v-for="(entity,index) in vals" :key="index" @tap.stop="handleClick($event,index)"> v-for="(entity,index) in vals" :key="index">
<text class="fui-modal__button-inner" <text class="fui-modal__button-inner"
:class="{'fui-modal__button-color': !entity.color && entity.plain}" :class="{'fui-modal__button-color': !entity.color && entity.plain}"
:style="{color:entity.color || (entity.plain?'#465CFF':'#fff')}">{{entity.text}}</text> :style="{color:entity.color || (entity.plain?'#465CFF':'#fff'),borderRadius:radius+'rpx'}" @tap.stop="handleClick($event,index)">{{entity.text}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -338,6 +338,9 @@ ...@@ -338,6 +338,9 @@
border-width: 1rpx; border-width: 1rpx;
transform: translateZ(0); transform: translateZ(0);
/* #endif */ /* #endif */
/* #ifdef H5 */
border-width: 1px;
/* #endif */
border-style: solid; border-style: solid;
} }
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
default: 0 default: 0
} }
}, },
data() {
return {}
},
computed: { computed: {
getGradientBgColor() { getGradientBgColor() {
// #ifdef APP-NVUE // #ifdef APP-NVUE
......
...@@ -34,9 +34,10 @@ ...@@ -34,9 +34,10 @@
<view class="fui-select__flex"> <view class="fui-select__flex">
<view class="fui-select__icon-box" <view class="fui-select__icon-box"
:class="{'fui-select__icon-ml':!isReverse && type==='select','fui-select__icon-mr':isReverse}" :class="{'fui-select__icon-ml':!isReverse && type==='select','fui-select__icon-mr':isReverse}"
:style="{width:iconWidth+'rpx',height:iconWidth+'rpx'}" v-if="model.src"> :style="{width:iconWidth+'rpx',height:iconWidth+'rpx',backgroundColor:iconBgColor}"
v-if="model.src">
<image :src="model.src" :style="{width:iconWidth+'rpx',height:iconWidth+'rpx'}" <image :src="model.src" :style="{width:iconWidth+'rpx',height:iconWidth+'rpx'}"
mode="widthFix"></image> :mode="iconMode"></image>
</view> </view>
<text class="fui-select__item-text" <text class="fui-select__item-text"
:class="{'fui-select__text-pl':!isReverse && (type==='select' || model.src),'fui-select__text-pr':isReverse && (type==='select' || model.src)}" :class="{'fui-select__text-pl':!isReverse && (type==='select' || model.src),'fui-select__text-pr':isReverse && (type==='select' || model.src)}"
...@@ -181,6 +182,14 @@ ...@@ -181,6 +182,14 @@
type: [Number, String], type: [Number, String],
default: 48 default: 48
}, },
iconBgColor: {
type: String,
default: 'rgba(0,0,0,0)'
},
iconMode: {
type: String,
default: 'widthFix'
},
size: { size: {
type: [Number, String], type: [Number, String],
default: 30 default: 30
...@@ -484,7 +493,9 @@ ...@@ -484,7 +493,9 @@
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
width: 100%; width: 100%;
/* #endif */ /* #endif */
flex: 1; /* #ifdef APP-NVUE */
width: 750rpx;
/* #endif */
} }
.fui-select__list { .fui-select__list {
...@@ -600,10 +611,12 @@ ...@@ -600,10 +611,12 @@
.fui-select__icon-box { .fui-select__icon-box {
overflow: hidden; overflow: hidden;
background-color: #F1F4FA;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
flex-shrink: 0; flex-shrink: 0;
display: flex;
/* #endif */ /* #endif */
align-items: center;
justify-content: center;
} }
.fui-select__icon-ml { .fui-select__icon-ml {
...@@ -619,13 +632,14 @@ ...@@ -619,13 +632,14 @@
width: 100%; width: 100%;
display: flex; display: flex;
/* #endif */ /* #endif */
flex: 1; /* #ifdef APP-NVUE */
width: 750rpx;
/* #endif */
height: 98rpx; height: 98rpx;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
} }
.fui-select__header-line { .fui-select__header-line {
......
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
}, },
watch: { watch: {
show(newVal) { show(newVal) {
// if (this.autoClose) return if (this.autoClose) return
if (this.stop) return if (this.stop) return
this.stop = true this.stop = true
if (newVal) { if (newVal) {
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
}) })
}, },
touchstart(e) { touchstart(e) {
if (this.disabled) return
// 每次只触发一次,避免多次监听造成闪烁 // 每次只触发一次,避免多次监听造成闪烁
if (this.stop) return if (this.stop) return
this.stop = true this.stop = true
...@@ -62,7 +63,7 @@ export default { ...@@ -62,7 +63,7 @@ export default {
this.group.closeAuto(this) this.group.closeAuto(this)
} }
const rightWidth = this.button.right.width const rightWidth = this.button.right.width || 0
let expression = this.range(this.x, -rightWidth, 0) let expression = this.range(this.x, -rightWidth, 0)
let rightExpression = this.range(this.x + rightWidth, 0, rightWidth) let rightExpression = this.range(this.x + rightWidth, 0, rightWidth)
...@@ -93,7 +94,7 @@ export default { ...@@ -93,7 +94,7 @@ export default {
}, },
bindTiming(x) { bindTiming(x) {
const left = this.x const left = this.x
const rightWidth = this.button.right.width const rightWidth = this.button.right.width || 0
const threshold = Number(this.threshold) const threshold = Number(this.threshold)
if (!this.isopen) { if (!this.isopen) {
if (left < -threshold) { if (left < -threshold) {
...@@ -102,7 +103,7 @@ export default { ...@@ -102,7 +103,7 @@ export default {
this.open(false) this.open(false)
} }
} else { } else {
if ((x < threshold && x > 0) || (x + leftWidth < -threshold)) { if ((x < threshold && x > 0) || (x < -threshold)) {
this.open(true) this.open(true)
} else { } else {
this.open(false) this.open(false)
...@@ -120,7 +121,7 @@ export default { ...@@ -120,7 +121,7 @@ export default {
}, },
animation(type) { animation(type) {
const time = 300 const time = 300
const rightWidth = this.button.right.width const rightWidth = this.button.right.width || 0
if (this.eventpan && this.eventpan.token) { if (this.eventpan && this.eventpan.token) {
BindingX.unbind({ BindingX.unbind({
token: this.eventpan.token, token: this.eventpan.token,
......
...@@ -113,6 +113,9 @@ ...@@ -113,6 +113,9 @@
default: 0 default: 0
} }
}, },
data() {
return {}
},
// #ifndef VUE3 // #ifndef VUE3
beforeDestroy() { beforeDestroy() {
if (this.__beforeUnmount) return if (this.__beforeUnmount) return
......
...@@ -24,8 +24,12 @@ function getDom(ins, ownerInstance) { ...@@ -24,8 +24,12 @@ function getDom(ins, ownerInstance) {
return; return;
} }
if (isH5 || isPC()) { if (isH5 || isPC()) {
if (rightDom['$el']) {
state.rightWidth = rightDom['$el'].offsetWidth || 0 state.rightWidth = rightDom['$el'].offsetWidth || 0
} else { } else {
state.rightWidth = 0
}
} else {
var rightStyles = rightDom.getBoundingClientRect() var rightStyles = rightDom.getBoundingClientRect()
state.rightWidth = rightStyles.width || 0 state.rightWidth = rightStyles.width || 0
} }
......
...@@ -25,9 +25,13 @@ export default { ...@@ -25,9 +25,13 @@ export default {
} }
}, },
mounted() { mounted() {
this.$nextTick(() => {
setTimeout(() => {
this.isShow = this.show this.isShow = this.show
this.isDisabled = this.disabled this.isDisabled = this.disabled
this.thresholdVal = Number(this.threshold) this.thresholdVal = Number(this.threshold)
}, 10)
})
}, },
methods: { methods: {
closeSwipe(e) { closeSwipe(e) {
...@@ -37,7 +41,7 @@ export default { ...@@ -37,7 +41,7 @@ export default {
change(e) { change(e) {
this.$emit('change', { this.$emit('change', {
isOpen: e.open === 'right', isOpen: e.open === 'right',
param:this.param param: this.param
}) })
if (this.isShow !== e.open) { if (this.isShow !== e.open) {
this.isShow = e.open this.isShow = e.open
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="fui-switch__input-def" :style="{background:val?color:'#dfdfdf',borderColor:val?color:borderColor}" <view class="fui-switch__input-def" :style="{background:val?color:'#dfdfdf',borderColor:val?color:borderColor}"
:class="{'fui-switch__input--checked':val,'fui-checkbox__disabled':disabled,'fui-switch__color':val && !color}" :class="{'fui-switch__input--checked':val,'fui-checkbox__disabled':disabled,'fui-switch__color':val && !color}"
v-if="type==='switch'"> v-if="type==='switch'">
<switch class="fui-switch__hidden" @change="change" :name="name" :checked="val" :disabled="disabled" <switch class="fui-switch__hidden" :class="{'fui-pointer__events':isLabel}" @change="change" :name="name" :checked="val" :disabled="disabled"
:color="color"> :color="color">
</switch> </switch>
</view> </view>
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
:style="{background:val?color:'#fff',border:val?`1px solid ${color}`:`1px solid ${borderColor}`}" v-else> :style="{background:val?color:'#fff',border:val?`1px solid ${color}`:`1px solid ${borderColor}`}" v-else>
<view class="fui-check__mark" :style="{borderBottomColor:checkMarkColor,borderRightColor:checkMarkColor}" <view class="fui-check__mark" :style="{borderBottomColor:checkMarkColor,borderRightColor:checkMarkColor}"
v-if="val"></view> v-if="val"></view>
<switch class="fui-switch__hidden" style="opacity: 0;position: absolute;" @change="change" :name="name" :type="isNvue?'switch':'checkbox'" <switch class="fui-switch__hidden" :class="{'fui-pointer__events':isLabel}"
style="opacity: 0;position: absolute;" @change="change" :name="name" :type="isNvue?'switch':'checkbox'"
:checked="val" :disabled="disabled"></switch> :checked="val" :disabled="disabled"></switch>
</view> </view>
</view> </view>
...@@ -87,7 +88,8 @@ ...@@ -87,7 +88,8 @@
// #endif // #endif
return { return {
val: false, val: false,
isNvue: isNvue isNvue: isNvue,
isLabel: false
}; };
}, },
watch: { watch: {
...@@ -99,6 +101,7 @@ ...@@ -99,6 +101,7 @@
this.val = this.checked; this.val = this.checked;
this.label = this.getParent(); this.label = this.getParent();
if (this.label) { if (this.label) {
this.isLabel = true
this.label.childrens.push(this) this.label.childrens.push(this)
} }
}, },
...@@ -273,6 +276,13 @@ ...@@ -273,6 +276,13 @@
/* #endif */ /* #endif */
} }
/* #ifdef H5 */
.fui-pointer__events {
pointer-events: none;
}
/* #endif */
.fui-checkbox__disabled { .fui-checkbox__disabled {
opacity: 0.6; opacity: 0.6;
} }
......
...@@ -482,6 +482,7 @@ ...@@ -482,6 +482,7 @@
.fui-tabs__line-center { .fui-tabs__line-center {
justify-content: center; justify-content: center;
left: 0;
} }
.fui-tabs__ac-line { .fui-tabs__ac-line {
...@@ -492,10 +493,6 @@ ...@@ -492,10 +493,6 @@
width: 45rpx !important; width: 45rpx !important;
} }
.fui-tabs__line-center {
left: 0;
}
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
.fui-tabs__selected-color { .fui-tabs__selected-color {
color: var(--fui-color-primary, #465CFF) !important; color: var(--fui-color-primary, #465CFF) !important;
......
...@@ -110,6 +110,9 @@ ...@@ -110,6 +110,9 @@
default: '' default: ''
} }
}, },
data() {
return {}
},
computed: { computed: {
getSize() { getSize() {
const size = (uni.$fui && uni.$fui.fuiText && uni.$fui.fuiText.size) || 32 const size = (uni.$fui && uni.$fui.fuiText && uni.$fui.fuiText.size) || 32
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
// #endif // #endif
} }
}, },
data() {
return {}
},
provide() { provide() {
return { return {
timeaxis: this timeaxis: this
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
default: 0 default: 0
} }
}, },
data() {
return {}
},
mounted() { mounted() {
if (this.vtabs && this.vtabs.linkage) { if (this.vtabs && this.vtabs.linkage) {
this.vtabs.children.push(this) this.vtabs.children.push(this)
......
...@@ -6,7 +6,7 @@ import App from './App.vue' ...@@ -6,7 +6,7 @@ import App from './App.vue'
import { setupAppConfig } from '@/config/app' import { setupAppConfig } from '@/config/app'
import { setupStore } from '@/store' import { setupStore } from '@/store'
import { setupI18n } from '@/locales' import { setupI18n } from '@/locales'
import FuiConfig from '@/components/FirstUI/fui-config' import FuiConfig from '@/components/firstui/fui-config'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"autoscan": true, "autoscan": true,
"custom": { "custom": {
// https://doc.firstui.cn/docs/introduce.html // https://doc.firstui.cn/docs/introduce.html
"^fui-(.*)": "@/components/FirstUI/fui-$1/fui-$1.vue", "^fui-(.*)": "@/components/firstui/fui-$1/fui-$1.vue",
// https://ext.dcloud.net.cn/plugin?id=55#detail // https://ext.dcloud.net.cn/plugin?id=55#detail
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
} }
......
...@@ -53,15 +53,17 @@ ...@@ -53,15 +53,17 @@
radius="14" radius="14"
size="large" size="large"
background="transparent" background="transparent"
class="!mb-5" class="!mb-3"
@click="surprise" @click="surprise"
/> />
<view class="flex-center flex-col mb-5"> <view class="flex-center flex-col mb-3">
<text class="title">{{ title }}</text> <text class="title">{{ title }}</text>
<text class="title">{{ $t('app.hello') }}</text> <text class="title">{{ $t('app.hello') }}</text>
<Icon icon="emojione:grinning-face" size="48" class="mt-3" /> <Icon icon="emojione:grinning-face" size="48" class="mt-3" />
<uni-icons type="hand-up" size="30" class="mt-3" :class="[animate]" @click="handUp" /> <fui-divider />
<uni-icons type="hand-up" size="30" :class="[animate]" @click="handUp" />
</view> </view>
<fui-footer isFixed> <fui-footer isFixed>
<template #text> <template #text>
......
import type { AxiosError, AxiosInstance } from 'axios' import type { AxiosError, AxiosInstance } from 'axios'
/** /**
* 请求重试机制 * 请求重试机制
*/ */
......
// #ifdef APP-PLUS // #ifdef APP-PLUS
import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update' import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif // #endif
export function checkUpgrade(toast = false) { export function checkUpgrade(toast = false) {
......
...@@ -6,7 +6,9 @@ declare module 'vue' { ...@@ -6,7 +6,9 @@ declare module 'vue' {
type ComponentCustomOptions = Hooks type ComponentCustomOptions = Hooks
// uni-app components // uni-app components
type UniComponent = HTMLElement interface UniComponent {
[key in string]: any
}
export interface GlobalComponents { export interface GlobalComponents {
block: UniComponent block: UniComponent
view: UniComponent view: UniComponent
......
import { defineConfig } from 'unocss' import { defineConfig } from 'unocss'
// https://github.com/MellowCo/unocss-preset-weapp
import presetWeapp from 'unocss-preset-weapp' import presetWeapp from 'unocss-preset-weapp'
import { defaultAttributes, transformerAttributify, transformerClass } from 'unocss-preset-weapp/transformer' import { defaultAttributes, transformerAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
......
...@@ -30,6 +30,9 @@ export default ({ mode }: ConfigEnv): UserConfig => { ...@@ -30,6 +30,9 @@ export default ({ mode }: ConfigEnv): UserConfig => {
optimizeDeps: { optimizeDeps: {
include: ['lodash-es', '@vueuse/core'], include: ['lodash-es', '@vueuse/core'],
}, },
esbuild: {
drop: ['console', 'debugger'],
},
build: { build: {
target: 'es2015', target: 'es2015',
sourcemap: !!isDevFn(mode), sourcemap: !!isDevFn(mode),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论