提交 aa8055dc 作者: 方治民

合并分支 '3.0' 到 'main'

3.0

查看合并请求 !8
File added
......@@ -105,7 +105,7 @@
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3070620230227001",
"@types/lodash-es": "^4.17.6",
"@types/mockjs": "^1.0.7",
"@types/node": "^18.14.6",
"@types/node": "^18.15.0",
"@types/prettier": "^2.7.2",
"@types/qs": "^6.9.7",
"@types/stompjs": "^2.3.5",
......@@ -119,7 +119,7 @@
"cz-git": "^1.5.3",
"czg": "^1.5.3",
"dotenv": "^16.0.3",
"eslint": "^8.35.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.9.0",
......@@ -127,7 +127,7 @@
"jest": "27.0.4",
"jest-environment-node": "27.5.1",
"less": "^4.1.3",
"lint-staged": "^13.1.2",
"lint-staged": "^13.2.0",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"pont-engine": "^1.5.7",
......@@ -136,7 +136,7 @@
"postcss-less": "^6.0.0",
"prettier": "^2.8.4",
"rimraf": "^4.4.0",
"sass": "^1.58.3",
"sass": "^1.59.2",
"sort-package-json": "^2.4.1",
"stylelint": "^14.16.1",
"stylelint-config-html": "^1.1.0",
......@@ -145,7 +145,7 @@
"stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0",
"stylus": "^0.59.0",
"terser": "^5.16.5",
"terser": "^5.16.6",
"typescript": "^4.9.5",
"unplugin-auto-import": "^0.15.1",
"unplugin-vue-components": "^0.24.1",
......
......@@ -103,6 +103,21 @@
watch: {
open(val) {
this.isOpen = val
},
isOpen(val) {
this.$nextTick(async () => {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== 'PageBody') {
if (parentName === 'fui-collapse-item') {
await parent.init()
}
parent = parent.$parent;
if (!parent) return false;
parentName = parent.$options.name;
}
})
}
},
updated(e) {
......@@ -135,12 +150,14 @@
},
methods: {
init() {
const promise = []
// #ifndef APP-NVUE
this.getCollapseHeight()
promise.push(this.getCollapseHeight())
// #endif
// #ifdef APP-NVUE
this.getNvueHeight()
promise.push(this.getNvueHeight())
// #endif
return Promise.all(promise)
},
uninstall() {
if (this.collapse) {
......@@ -164,41 +181,49 @@
}
},
getCollapseHeight(index = 0) {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
.select(`#${this.elId}`)
.fields({
size: true
}, data => {
if (index >= 10) return
if (!data) {
index++
this.getCollapseHeight(index)
return
}
// #ifdef APP-NVUE
this.height = data.height + 1
// #endif
// #ifndef APP-NVUE
this.height = data.height
return new Promise((resolve) => {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
this.isHeight = true
})
.exec()
.select(`#${this.elId}`)
.fields({
size: true
}, data => {
if (index >= 10) return
if (!data) {
index++
this.getCollapseHeight(index)
return
}
// #ifdef APP-NVUE
this.height = data.height + 1
// #endif
// #ifndef APP-NVUE
this.height = data.height
// #endif
this.isHeight = true
resolve(this.height)
})
.exec()
})
},
getNvueHeight() {
const result = dom.getComponentRect(this.$refs['fui_collapse__el'], option => {
if (option && option.result && option.size) {
// #ifdef APP-NVUE
this.height = option.size.height + 1
// #endif
// #ifndef APP-NVUE
this.height = option.size.height
// #endif
this.isHeight = true
}
return new Promise((resolve) => {
const result = dom.getComponentRect(this.$refs['fui_collapse__el'], option => {
if (option && option.result && option.size) {
// #ifdef APP-NVUE
this.height = option.size.height + 1
// #endif
// #ifndef APP-NVUE
this.height = option.size.height
// #endif
this.isHeight = true
resolve(this.height)
}
})
})
},
getCollapse(name = 'fui-collapse') {
......
......@@ -8,7 +8,7 @@
<view class="fui-il__checkmark" v-if="model.checked"></view>
</view>
<view class="fui-il__img-box" v-if="isSrc">
<image v-if="model.src" :src="model.src" class="fui-index__list-img" mode="widthFix"></image>
<fLazyload v-if="model.src" :src="model.src" class="fui-index__list-img" width="72" height="72" mode="widthFix"></fLazyload>
</view>
<text class="fui-index__list-main">{{model.text || ''}}</text>
</view>
......@@ -18,9 +18,13 @@
</template>
<script>
import fLazyload from '../fui-lazyload/fui-lazyload.vue'
//此组件为索引列表item项,若不满足要求可自行调整样式
export default {
name: 'f-index-list-item',
components: {
fLazyload
},
props: {
model: {
type: Object,
......
......@@ -282,6 +282,7 @@
}
this.idtHeight = height;
this.styles = `height:${height}rpx;`;
this.lists = lists;
// #ifndef APP-NVUE
uni.createSelectorQuery()
......
......@@ -30,8 +30,9 @@
let iphonex = false;
let models = ['iphonex', 'iphonexr', 'iphonexsmax', 'iphone11', 'iphone11pro', 'iphone11promax',
'iphone12', 'iphone12mini', 'iphone12pro', 'iphone12promax', 'iphone13', 'iphone13mini',
'iphone13pro', 'iphone13promax', 'iphone14', 'iphone14mini',
'iphone14pro', 'iphone14promax'
'iphone13pro', 'iphone13promax', 'iphone14', 'iphone14mini', 'iphone14plus',
'iphone14pro', 'iphone14promax', 'iphone15', 'iphone15mini', 'iphone15plus',
'iphone15pro', 'iphone15promax'
]
const model = res.model.replace(/\s/g, "").toLowerCase()
const newModel = model.split('<')[0]
......
......@@ -129,5 +129,6 @@ declare module '@vue/runtime-core' {
FuiWaterfallItem: typeof import('./../src/components/firstui/fui-waterfall-item/fui-waterfall-item.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ThumbnailPreview: typeof import('./../src/components/ThumbnailPreview/index.vue')['default']
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论