This commit is contained in:
icssoa
2025-08-20 17:05:34 +08:00
parent 1be694b124
commit 195c2f0316
9 changed files with 40 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -11,17 +11,18 @@
<cl-footer>
<!-- #ifdef H5 -->
<cl-button type="primary" @click="previewImage">预览图片</cl-button>
<cl-button type="primary" @click="previewImage">{{ t("预览图片") }}</cl-button>
<!-- #endif -->
<!-- #ifndef H5 -->
<cl-button type="primary" @click="saveImage">保存图片</cl-button>
<cl-button type="primary" @click="saveImage">{{ t("保存图片") }}</cl-button>
<!-- #endif -->
</cl-footer>
</cl-page>
</template>
<script lang="ts" setup>
import { t } from "@/locale";
import { Canvas } from "@/uni_modules/cool-canvas";
import { useUi } from "@/uni_modules/cool-ui";
import { ref } from "vue";
@@ -219,9 +220,9 @@ onReady(() => {
width.value = uni.getWindowInfo().windowWidth;
ui.showConfirm({
title: "提示",
message: "本页面内容由 canvas 渲染生成,是否立即预览图片效果?",
confirmText: "预览",
title: t("提示"),
message: t("本页面内容由 canvas 渲染生成,是否立即预览图片效果?"),
confirmText: t("预览"),
callback(action) {
if (action == "confirm") {
canvasRef.value!.previewImage();

View File

@@ -14,11 +14,6 @@
:key="child.label"
:label="child.label"
:arrow="child.path != null"
:pt="{
label: {
className: '!w-auto'
}
}"
@tap="toPath(child)"
>
</cl-list-item>

View File

@@ -300,7 +300,7 @@ function onCategoryChange(index: number) {
setTimeout(() => {
scrollLock.value = false;
}, 50);
}, 350);
}
// 滚动时,更新当前选中的分类

28
types/uni-app.d.ts vendored
View File

@@ -73,6 +73,34 @@ declare interface UniInputEvent extends UniEvent {
};
}
declare interface UniInputFocusEvent extends UniEvent {
detail: {
value: string;
height: number;
};
}
declare interface UniTextareaFocusEvent extends UniEvent {
detail: {
value: string;
height: number;
};
}
declare interface UniInputBlurEvent extends UniEvent {
detail: {
value: string;
cursor: number;
};
}
declare interface UniTextareaBlurEvent extends UniEvent {
detail: {
value: string;
cursor: number;
};
}
declare interface UniInputConfirmEvent extends UniEvent {
type: "confirm";
detail: {

View File

@@ -41,7 +41,8 @@
v-if="label"
:pt="{
className: parseClass([
'cl-list-item__label w-24 whitespace-nowrap overflow-visible',
'cl-list-item__label whitespace-nowrap overflow-visible',
[justify == 'start', 'w-24'],
pt.label?.className
])
}"

View File

@@ -161,7 +161,6 @@ function refresh() {
// 获取容器高度和宽度
const boxHeight = (box as NodeInfo).height ?? 0;
const boxWidth = (box as NodeInfo).width ?? 0;
console.log(boxWidth);
// 查询文本节点尺寸
uni.createSelectorQuery()