提交 611468cd 作者: 方治民

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

3.x

查看合并请求 !16
...@@ -34,4 +34,3 @@ ...@@ -34,4 +34,3 @@
- [x] 接入 [消息推送](https://uniapp.dcloud.net.cn/unipush.html) - [x] 接入 [消息推送](https://uniapp.dcloud.net.cn/unipush.html)
- [x] 接入 [APP 升级中心](https://uniapp.dcloud.net.cn/uniCloud/upgrade-center.html) - [x] 接入 [APP 升级中心](https://uniapp.dcloud.net.cn/uniCloud/upgrade-center.html)
- [ ] 适配上传/下载接口的自动化生成模板(包装 uni.uploadFile 与 uni.downloadFile 方法实现) - [ ] 适配上传/下载接口的自动化生成模板(包装 uni.uploadFile 与 uni.downloadFile 方法实现)
- [ ] f-index-list 组件重写为虚拟滚动,改进大列表性能,参考 [vue-virtual-scroller](https://github.com/Akryum/vue-virtual-scroller)
{ {
"name": "basic-app", "name": "basic-app",
"version": "3.0.2.5", "version": "3.0.3.0",
"description": "APP 基础工程", "description": "APP 基础工程",
"keywords": [ "keywords": [
"app", "app",
...@@ -66,26 +66,26 @@ ...@@ -66,26 +66,26 @@
} }
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-app": "3.0.0-3070820230322001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-app-plus": "3.0.0-3070820230322001",
"@dcloudio/uni-components": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-components": "3.0.0-3070820230322001",
"@dcloudio/uni-h5": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-h5": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-alipay": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-baidu": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-jd": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-jd": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-kuaishou": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-lark": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-qq": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-toutiao": "3.0.0-3070820230322001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-mp-weixin": "3.0.0-3070820230322001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-quickapp-webview": "3.0.0-3070820230322001",
"@dcloudio/uni-ui": "^1.4.26", "@dcloudio/uni-ui": "^1.4.26",
"@vue/runtime-core": "^3.2.47", "@vue/runtime-core": "^3.2.47",
"@vueuse/core": "^9.13.0", "@vueuse/core": "^9.13.0",
"axios": "^0.26.1", "axios": "^0.26.1",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
"nanoid": "^4.0.1", "nanoid": "^4.0.1",
"pinia": "^2.0.33", "pinia": "^2.0.33",
"qs": "~6.9.7", "qs": "~6.9.7",
...@@ -98,33 +98,33 @@ ...@@ -98,33 +98,33 @@
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^0.37.0", "@antfu/eslint-config": "^0.37.0",
"@commitlint/cli": "^17.4.4", "@commitlint/cli": "^17.5.0",
"@commitlint/config-conventional": "^17.4.4", "@commitlint/config-conventional": "^17.4.4",
"@dcloudio/types": "^3.3.2", "@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-automator": "3.0.0-3070820230322001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-cli-shared": "3.0.0-3070820230322001",
"@dcloudio/uni-helper-json": "^1.0.13", "@dcloudio/uni-helper-json": "^1.0.13",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3070720230316001", "@dcloudio/uni-stacktracey": "3.0.0-3070820230322001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3070720230316001", "@dcloudio/vite-plugin-uni": "3.0.0-3070820230322001",
"@iconify/json": "^2.2.36", "@iconify/json": "^2.2.38",
"@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/mockjs": "^1.0.7", "@types/node": "^18.15.5",
"@types/node": "^18.15.3",
"@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.55.0", "@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.55.0", "@typescript-eslint/parser": "^5.56.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",
"cz-customizable": "^7.0.0", "cz-customizable": "^7.0.0",
"cz-git": "^1.6.0", "cz-git": "^1.6.1",
"czg": "^1.6.0", "czg": "^1.6.1",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"eslint": "^8.36.0", "eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.9.0",
"husky": "^8.0.3", "husky": "^8.0.3",
...@@ -138,8 +138,8 @@ ...@@ -138,8 +138,8 @@
"postcss": "^8.4.21", "postcss": "^8.4.21",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.4", "prettier": "^2.8.6",
"rimraf": "^4.4.0", "rimraf": "^4.4.1",
"sass": "^1.59.3", "sass": "^1.59.3",
"sort-package-json": "^2.4.1", "sort-package-json": "^2.4.1",
"stylelint": "^14.16.1", "stylelint": "^14.16.1",
...@@ -152,11 +152,11 @@ ...@@ -152,11 +152,11 @@
"terser": "^5.16.6", "terser": "^5.16.6",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"unocss": "^0.50.6", "unocss": "^0.50.6",
"unocss-preset-weapp": "^0.5.1", "unocss-preset-weapp": "^0.5.2",
"unplugin-auto-import": "^0.15.1", "unplugin-auto-import": "^0.15.1",
"unplugin-imagemin": "^0.3.11", "unplugin-imagemin": "^0.3.11",
"unplugin-vue-components": "^0.24.1", "unplugin-vue-components": "^0.24.1",
"vite": "^4.2.0", "vite": "^4.2.1",
"vue-eslint-parser": "^9.1.0" "vue-eslint-parser": "^9.1.0"
}, },
"engines": { "engines": {
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
checkUpgrade() checkUpgrade()
// 清除消息角标 // 清除消息角标
// Push.setBadge() // Push.setBadge(0)
// 监听在线消息 // 监听在线消息
// Push.listenMessage() // Push.listen()
}) })
onShow(() => { onShow(() => {
...@@ -46,8 +46,10 @@ ...@@ -46,8 +46,10 @@
// 全局样式 // 全局样式
@import './common/public.less'; @import './common/public.less';
/** #ifdef H5 */
uni-page-body, uni-page-body,
page { page {
height: 100%; height: 100%;
} }
/** #endif */
</style> </style>
export const Message = { export const Message = {
/** /**
* 消息轻提示 * 消息轻提示
* @param text 消息内容 * @param title 消息内容
*/ */
toast: (text: string, duration?: 'short' | 'long'): void => { toast: (title: string, duration?: 'short' | 'long'): void => {
if (text) { if (title) {
// #ifndef APP-PLUS // #ifndef APP-PLUS
uni.showToast({ uni.showToast({
title: text, title,
icon: 'none', icon: 'none',
duration: duration === 'short' ? 2000 : 3500, duration: duration === 'short' ? 2000 : 3500,
}) })
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.nativeUI.toast(text, { plus.nativeUI.toast(title, {
duration: duration || 'short', duration: duration || 'short',
}) })
// #endif // #endif
...@@ -22,16 +22,16 @@ export const Message = { ...@@ -22,16 +22,16 @@ export const Message = {
}, },
/** /**
* 消息弹窗提示 * 消息弹窗提示
* @param message 消息内容 * @param content 消息内容
* @param title 标题 * @param title 标题
* @returns Promise<void> * @returns Promise<void>
*/ */
alert: (message: string, title = '提示', confirmText = '确定'): Promise<void> => { alert: (content: string, title = '提示', confirmText = '确定'): Promise<void> => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// #ifndef APP-PLUS // #ifndef APP-PLUS
uni.showModal({ uni.showModal({
title, title,
content: message, content,
showCancel: false, showCancel: false,
confirmText, confirmText,
success: () => resolve(), success: () => resolve(),
...@@ -40,24 +40,24 @@ export const Message = { ...@@ -40,24 +40,24 @@ export const Message = {
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.nativeUI.alert(message, resolve, title, confirmText) plus.nativeUI.alert(content, resolve, title, confirmText)
// #endif // #endif
}) })
}, },
/** /**
* 消息确认提示 * 消息确认提示
* @param title 标题 * @param title 标题
* @param message 提示内容 * @param content 提示内容
* @param confirmText 确认按钮文字 * @param confirmText 确认按钮文字
* @param showCancel 是否显示取消按钮 * @param showCancel 是否显示取消按钮
* @returns Promise<boolean> 是否点击了确认按钮 * @returns Promise<boolean> 是否点击了确认按钮
*/ */
confirm: (message: string, title = '提示', confirmText = '确定', showCancel = true): Promise<boolean> => { confirm: (content: string, title = '提示', confirmText = '确定', showCancel = true): Promise<boolean> => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// #ifndef APP-PLUS // #ifndef APP-PLUS
uni.showModal({ uni.showModal({
title, title,
content: message, content,
showCancel, showCancel,
confirmText, confirmText,
success: (res) => resolve(res.confirm), success: (res) => resolve(res.confirm),
...@@ -66,7 +66,7 @@ export const Message = { ...@@ -66,7 +66,7 @@ export const Message = {
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.nativeUI.confirm(message, ({ index }) => resolve(index === 0), { plus.nativeUI.confirm(content, ({ index }) => resolve(index === 0), {
title, title,
buttons: ['确认', '取消'], buttons: ['确认', '取消'],
verticalAlign: 'center', verticalAlign: 'center',
...@@ -76,11 +76,11 @@ export const Message = { ...@@ -76,11 +76,11 @@ export const Message = {
}, },
/** /**
* 加载中 * 加载中
* @param text 加载中文字 * @param title 加载中文字
*/ */
loading: (text = '加载中...'): void => { loading: (title = '加载中...'): void => {
uni.showLoading({ uni.showLoading({
title: text, title,
mask: true, mask: true,
}) })
}, },
......
...@@ -4,116 +4,3 @@ ...@@ -4,116 +4,3 @@
align-items: center; align-items: center;
height: 100vh; height: 100vh;
} }
// ================ mapbox-gl ================
// 自定义 popup 内容样式
.mapboxgl-popup-content {
box-shadow: 0 1px 5px #6e6e6e !important;
}
.mapboxgl-popup-content .mapboxgl-custom-popup {
position: relative;
}
.mapboxgl-custom-popup .popup-title {
font-weight: bold;
}
.mapboxgl-ctrl-group:not(:empty) {
box-shadow: 0 0 6px #000 !important;
}
.mapboxgl-ctrl-group button {
display: flex !important;
overflow: visible !important;
}
.mapboxgl-ctrl-logo {
display: none !important;
}
.mapboxgl-ctrl-bottom-left {
display: flex;
bottom: 0;
left: 2px;
}
.mapboxgl-ctrl-lnglat {
background: rgb(0 0 0 / 40%);
color: white;
line-height: 2em;
padding: 0 10px;
}
// 覆盖全屏控件的图标
.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon {
background-image: url('data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"%3E%3Cpath fill="currentColor" d="M3.75 3a.75.75 0 0 0-.75.75V5.5a.5.5 0 0 1-1 0V3.75C2 2.784 2.784 2 3.75 2H5.5a.5.5 0 0 1 0 1H3.75ZM10 2.5a.5.5 0 0 1 .5-.5h1.75c.966 0 1.75.784 1.75 1.75V5.5a.5.5 0 0 1-1 0V3.75a.75.75 0 0 0-.75-.75H10.5a.5.5 0 0 1-.5-.5ZM2.5 10a.5.5 0 0 1 .5.5v1.75c0 .414.336.75.75.75H5.5a.5.5 0 0 1 0 1H3.75A1.75 1.75 0 0 1 2 12.25V10.5a.5.5 0 0 1 .5-.5Zm11 0a.5.5 0 0 1 .5.5v1.75A1.75 1.75 0 0 1 12.25 14H10.5a.5.5 0 0 1 0-1h1.75a.75.75 0 0 0 .75-.75V10.5a.5.5 0 0 1 .5-.5Z"%2F%3E%3C%2Fsvg%3E') !important;
}
.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon {
background-image: url('data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"%3E%3Cpath fill="currentColor" d="M11 4a1 1 0 0 0 1 1h1.5a.5.5 0 0 1 0 1H12a2 2 0 0 1-2-2V2.5a.5.5 0 0 1 1 0V4Zm0 8a1 1 0 0 1 1-1h1.5a.5.5 0 0 0 0-1H12a2 2 0 0 0-2 2v1.5a.5.5 0 0 0 1 0V12Zm-7-1a1 1 0 0 1 1 1v1.5a.5.5 0 0 0 1 0V12a2 2 0 0 0-2-2H2.5a.5.5 0 0 0 0 1H4Zm1-7a1 1 0 0 1-1 1H2.5a.5.5 0 0 0 0 1H4a2 2 0 0 0 2-2V2.5a.5.5 0 0 0-1 0V4Z"%2F%3E%3C%2Fsvg%3E') !important;
}
.mapboxgl-ctrl .mapboxgl-ctrl-reset-button .mapboxgl-ctrl-icon {
background-image: url('data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="20" height="20" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"%3E%3Cpath fill="currentColor" d="M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3s-3 1.331-3 3s1.329 3 3 3z"%2F%3E%3Cpath fill="currentColor" d="M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219a9.053 9.053 0 0 0-2.43-2.43a8.95 8.95 0 0 0-3.219-1.355a9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053a7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725a7.11 7.11 0 0 1-.644 1.188a7.2 7.2 0 0 1-.858 1.039a7.028 7.028 0 0 1-3.536 1.907a7.13 7.13 0 0 1-2.822 0a6.961 6.961 0 0 1-2.503-1.054a7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034a9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183a9.014 9.014 0 0 0 3.218-1.355a8.886 8.886 0 0 0 1.331-1.099a9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"%2F%3E%3C%2Fsvg%3E') !important;
}
/* stylelint-disable-next-line selector-no-vendor-prefix */
.mapboxgl-map:-webkit-full-screen {
.mapboxgl-ctrl-bottom-left {
bottom: 0;
}
}
// 自定义图层控制器样式
.mapboxgl-ctrl button.-active svg {
color: #4264fb;
}
.mapboxgl-ctrl-layer-button {
position: relative;
.mapboxgl-ctrl-layer-wrap {
display: none;
justify-items: center;
align-items: center;
position: absolute;
right: 40px;
padding: 10px;
border-radius: 3px;
box-shadow: 0 0 3px #333;
background-color: #fff;
.mapboxgl-ctrl-layer {
width: 60px;
height: 60px;
display: flex;
justify-content: center;
border: 2px solid #fff;
position: relative;
&.active {
border-color: #3385ff;
}
img {
width: 100%;
height: 100%;
}
span {
display: inline-flex;
justify-content: center;
background-color: rgb(0 0 0 / 60%);
color: white;
position: absolute;
bottom: 0;
width: 100%;
}
}
}
&.-active .mapboxgl-ctrl-layer-wrap {
display: flex;
}
}
<script setup lang="ts">
import md5 from 'crypto-js/md5'
const props = defineProps({
width: {
type: [String, Number],
default: '320',
},
height: {
type: [String, Number],
default: '240',
},
radius: {
type: [String, Number],
default: 0,
},
mode: {
type: String,
default: 'scaleToFill',
},
src: {
type: String,
required: true,
},
})
const src = ref()
const hashCacheKey = ref()
onMounted(async () => {
// 尝试缓存图片,如果失败则使用原始图片
await tryCache()
})
async function tryCache() {
let url = props.src
// #ifdef APP-PLUS
const hash = md5(url).toString()
hashCacheKey.value = `G_CACHE_IMAGE_${hash}`
if (uni.getStorageSync(hashCacheKey.value)) {
console.log('CacheImage cache hit')
url = uni.getStorageSync(hashCacheKey.value)
} else {
console.log('CacheImage cache miss')
try {
const res = await uni.downloadFile({ url })
if (res.statusCode === 200) {
const { savedFilePath } = await new Promise<UniApp.SaveFileSuccess>((resolve, reject) => {
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (res) => resolve(res),
fail: (err) => reject(err),
})
})
url = `${savedFilePath}`
// 缓存图片本地地址
uni.setStorageSync(hashCacheKey.value, url)
}
} catch (e) {
console.error(e)
}
}
console.log(props.src, '=>', url, hash, hashCacheKey.value)
// #endif
src.value = url
}
const hasError = ref(false)
function onError() {
if (hasError.value) {
return
}
hasError.value = true
src.value = props.src
// 清除缓存
hashCacheKey.value && uni.removeStorageSync(hashCacheKey.value)
console.warn('CacheImage cache error')
}
</script>
<template>
<fui-lazyload
:mode="props.mode"
:width="props.width"
:height="props.height"
:radius="props.radius"
:src="src"
@error="onError"
/>
</template>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import { nanoid } from 'nanoid' import { nanoid } from 'nanoid'
import { getPoster, isImage, isVideo } from './utils' import { getPoster, isImage, isVideo } from './utils'
type URLs = { url: string }[] type Asset = Recordable & { url: string }
const props = defineProps({ const props = defineProps({
width: { width: {
type: [String, Number], type: [String, Number],
...@@ -17,8 +17,12 @@ ...@@ -17,8 +17,12 @@
type: String, type: String,
default: 'aspectFit', default: 'aspectFit',
}, },
background: {
type: String,
default: '#F7F7f7',
},
assets: { assets: {
type: Array as PropType<Recordable & URLs>, type: Array as PropType<Asset[]>,
}, },
}) })
...@@ -49,7 +53,8 @@ ...@@ -49,7 +53,8 @@
const videoFullScreenChange = (e: any) => { const videoFullScreenChange = (e: any) => {
// 非全屏状态下停止播放 // 非全屏状态下停止播放
if (!e.detail.fullScreen) { if (!e.detail.fullScreen) {
videoContext.value?.stop() videoContext.value.seek(0)
videoContext.value.pause()
} }
} }
...@@ -64,6 +69,7 @@ ...@@ -64,6 +69,7 @@
<!-- 视频预览 --> <!-- 视频预览 -->
<fui-lazyload <fui-lazyload
class="preview-video" class="preview-video"
:background="props.background"
:mode="props.mode" :mode="props.mode"
v-for="(item, index) in videos" v-for="(item, index) in videos"
:key="item.url" :key="item.url"
...@@ -81,6 +87,7 @@ ...@@ -81,6 +87,7 @@
<!-- 图片预览 --> <!-- 图片预览 -->
<fui-lazyload <fui-lazyload
class="preview-image" class="preview-image"
:background="props.background"
:mode="props.mode" :mode="props.mode"
v-for="(item, index) in images" v-for="(item, index) in images"
:key="item.url" :key="item.url"
......
<!--本文件由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">
...@@ -67,7 +68,11 @@ ...@@ -67,7 +68,11 @@
tips: { tips: {
type: String, type: String,
default: '请签名!' default: '请签名!'
} },
suffix: {
type: String,
default: 'png'
},
}, },
watch: { watch: {
width(val) { width(val) {
...@@ -310,7 +315,7 @@ ...@@ -310,7 +315,7 @@
x: 0, x: 0,
y: 0, y: 0,
canvasId: this.canvasId, canvasId: this.canvasId,
fileType: 'png', fileType: this.suffix,
quality: 1, quality: 1,
success: function(res) { success: function(res) {
callback && callback(res.tempFilePath) callback && callback(res.tempFilePath)
...@@ -329,7 +334,7 @@ ...@@ -329,7 +334,7 @@
this.h * 2, this.h * 2,
this.w * 2, this.w * 2,
this.h * 2, this.h * 2,
"png", this.suffix,
1, 1,
function(res) { function(res) {
callback && callback(res.tempFilePath) callback && callback(res.tempFilePath)
......
...@@ -26,7 +26,7 @@ const fuiConfig = { ...@@ -26,7 +26,7 @@ const fuiConfig = {
}, },
fuiFormItem: { fuiFormItem: {
labelSize: 32, labelSize: 32,
labelWidth: 140, labelWidth: 160,
labelRight: 16 labelRight: 16
} }
} }
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
return `${this.labelSize || this.lSize || labelSize}rpx` return `${this.labelSize || this.lSize || labelSize}rpx`
}, },
getLabelWidth() { getLabelWidth() {
const labelWidth = (uni.$fui && uni.$fui.fuiFormItem && uni.$fui.fuiFormItem.labelWidth) || 140 const labelWidth = (uni.$fui && uni.$fui.fuiFormItem && uni.$fui.fuiFormItem.labelWidth) || 160
return `${this.labelWidth || this.lWidth || labelWidth}rpx` return `${this.labelWidth || this.lWidth || labelWidth}rpx`
}, },
getLabelRight() { getLabelRight() {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
//背景颜色 //背景颜色
background: { background: {
type: String, type: String,
default: '#FFFFFF' default: 'transparent'
} }
}, },
created() { created() {
......
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
import * as Pinia from 'pinia' import * as Pinia from 'pinia'
import App from './App.vue'
import { setupAppConfig } from '/@/config/app'
import { setupStore } from '/@/store'
import { setupI18n } from '/@/locales'
import fuiConfig from './components/FirstUI/fui-config'
import 'uno.css' import 'uno.css'
import App from './App.vue'
import { setupAppConfig } from '@/config/app'
import { setupStore } from '@/store'
import { setupI18n } from '@/locales'
import FuiConfig from '@/components/FirstUI/fui-config'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
...@@ -24,7 +22,7 @@ export function createApp() { ...@@ -24,7 +22,7 @@ export function createApp() {
// 全局组件配置 // 全局组件配置
// @ts-expect-error // @ts-expect-error
uni.$fui = fuiConfig uni.$fui = FuiConfig
return { return {
app, app,
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"name" : "Beta App", "name" : "Beta App",
"appid" : "__UNI__2E9441A", "appid" : "__UNI__2E9441A",
"description" : "APP 基础工程", "description" : "APP 基础工程",
"versionName" : "3.0.2.5", "versionName" : "3.0.3.0",
"versionCode" : 111, "versionCode" : 112,
"transformPx" : false, "transformPx" : false,
"locale" : "zh-Hans", "locale" : "zh-Hans",
/* 5+App特有相关 */// 配置文件详细说明 /* 5+App特有相关 */// 配置文件详细说明
......
...@@ -10,7 +10,7 @@ export function setBadge(number = 0) { ...@@ -10,7 +10,7 @@ export function setBadge(number = 0) {
// #endif // #endif
} }
export function listenMessage() { export function listen() {
// 监听在线消息 // 监听在线消息
uni.onPushMessage((res) => { uni.onPushMessage((res) => {
if (res.type !== 'receive') { if (res.type !== 'receive') {
......
...@@ -9,6 +9,7 @@ export {} ...@@ -9,6 +9,7 @@ export {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
CacheImage: typeof import('./../src/components/CacheImage/index.vue')['default']
Empty: typeof import('./../src/components/Empty/index.vue')['default'] Empty: typeof import('./../src/components/Empty/index.vue')['default']
FDragItem: typeof import('./../src/components/FirstUI/fui-drag/f-drag-item.vue')['default'] FDragItem: typeof import('./../src/components/FirstUI/fui-drag/f-drag-item.vue')['default']
FIndexListItem: typeof import('./../src/components/FirstUI/fui-index-list/f-index-list-item.vue')['default'] FIndexListItem: typeof import('./../src/components/FirstUI/fui-index-list/f-index-list-item.vue')['default']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论