合并代码

This commit is contained in:
Teng 2026-03-11 14:38:29 +08:00
parent cd330b7fa8
commit c9d484f7b4
9 changed files with 2422 additions and 297 deletions

View File

@ -2049,7 +2049,7 @@
/* background-color: red; */ /* background-color: red; */
.packtarget-blue { .packtarget-blue {
color: #0089FE; /* color: #0089FE; */
} }
.packtarget-shu { .packtarget-shu {

View File

@ -1698,10 +1698,10 @@
const emotionTagList = ref([]); const emotionTagList = ref([]);
const bodyTagList = ref([]); const bodyTagList = ref([]);
const geteverything = () => { const geteverything = () => {
console.log("为啥",uni.getStorageSync('nuId')) // console.log("",uni.getStorageSync('nuId'))
if (uni.getStorageSync('nuId')) { if (uni.getStorageSync('nuId')) {
getNclist(uni.getStorageSync('nuId')).then((res : any) => { getNclist(uni.getStorageSync('nuId')).then((res : any) => {
console.log("通了吗",res) // console.log("",res)
timearr.value = Array.from({ length: 24 }, (_, hour) => ({ timearr.value = Array.from({ length: 24 }, (_, hour) => ({
positioning: hour.toString(), positioning: hour.toString(),
children: minuteArr.map(time => ({ children: minuteArr.map(time => ({

View File

@ -1724,8 +1724,9 @@
margin-top: 20rpx; margin-top: 20rpx;
width: 97%; width: 97%;
margin-left: 3%; margin-left: 3%;
height: 510rpx; height: 410rpx;
display: flex; display: flex;
/* background-color: red; */
/* 禁止元素拖动 */ /* 禁止元素拖动 */
.tree-item { .tree-item {
@ -1734,7 +1735,7 @@
.tree-card { .tree-card {
width: 100%; width: 100%;
height: 20%; height: 25%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -2054,7 +2055,7 @@
/* background-color: red; */ /* background-color: red; */
.packtarget-blue { .packtarget-blue {
color: #0089FE; /* color: #0089FE; */
} }
.packtarget-shu { .packtarget-shu {
@ -2329,4 +2330,9 @@
font-size: 1.4vw; font-size: 1.4vw;
color: #555555; color: #555555;
} }
}
.changerulertype{
width: 100%;
height: 125rpx;
/* background-color: red; */
} }

File diff suppressed because it is too large Load Diff

View File

@ -389,6 +389,9 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view>
<view class="changerulertype" v-show="!ruleritem.directiveName && !servertype">
</view> </view>
<view class="three-items" v-show="!ruleritem.directiveName && servertype" <view class="three-items" v-show="!ruleritem.directiveName && servertype"
style="flex-direction: column;margin-left: 25rpx;width: 91.8%;"> style="flex-direction: column;margin-left: 25rpx;width: 91.8%;">
@ -1132,6 +1135,7 @@
} }
} }
const doChangeNew = () => { const doChangeNew = () => {
console.log("啥啊")
let object = postitem.value; let object = postitem.value;
indexsave.value = [Number(props.sendxy[0]), Number(props.sendxy[1])] indexsave.value = [Number(props.sendxy[0]), Number(props.sendxy[1])]
// tagName // tagName
@ -2202,6 +2206,7 @@
} }
}) })
} else { } else {
console.log("测试新增")
addDirective(postdata).then((res) => { addDirective(postdata).then((res) => {
if (res.success) { if (res.success) {
geteverything() geteverything()

View File

@ -2048,7 +2048,7 @@
/* background-color: red; */ /* background-color: red; */
.packtarget-blue { .packtarget-blue {
color: #0089FE; /* color: #0089FE; */
} }
.packtarget-shu { .packtarget-shu {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="page"> <!-- <div class="page">
<div class="controls"> <div class="controls">
<div class="row"> <div class="row">
<button class="btn" @click="generate(2000)">生成 2000 项</button> <button class="btn" @click="generate(2000)">生成 2000 项</button>
@ -23,103 +23,103 @@
</div> </div>
</div> </div>
</scroll-view> </scroll-view>
</div> </div> -->
</template> </template>
<script> <script>
export default { // export default {
data() { // data() {
return { // return {
items: [], // items: [],
// FPS 测量 // // FPS 测量
measuring: false, // measuring: false,
fpsDisplay: 0, // fpsDisplay: 0,
avgFrameMsDisplay: 0, // avgFrameMsDisplay: 0,
// 内部用 // // 内部用
_frames: [], // _frames: [],
_rafId: null, // _rafId: null,
_idleTO: null // _idleTO: null
} // }
}, // },
methods: { // methods: {
generate(n) { // generate(n) {
// 生成带颜色的占位项(避免网络请求) // // 生成带颜色的占位项(避免网络请求)
const list = [] // const list = []
for (let i = 0; i < n; i++) { // for (let i = 0; i < n; i++) {
list.push({ // list.push({
id: i + 1, // id: i + 1,
color: this._randColor() // color: this._randColor()
}) // })
} // }
this.items = list // this.items = list
// 清除测量结果 // // 清除测量结果
this.fpsDisplay = 0 // this.fpsDisplay = 0
this.avgFrameMsDisplay = 0 // this.avgFrameMsDisplay = 0
}, // },
clearList() { // clearList() {
this.items = [] // this.items = []
this.fpsDisplay = 0 // this.fpsDisplay = 0
this.avgFrameMsDisplay = 0 // this.avgFrameMsDisplay = 0
}, // },
_randColor() { // _randColor() {
const h = Math.floor(Math.random() * 360) // const h = Math.floor(Math.random() * 360)
const s = 60 + Math.floor(Math.random() * 20) // const s = 60 + Math.floor(Math.random() * 20)
const l = 55 + Math.floor(Math.random() * 10) // const l = 55 + Math.floor(Math.random() * 10)
return `hsl(${h} ${s}% ${l}%)` // return `hsl(${h} ${s}% ${l}%)`
}, // },
// 滚动回调(来自原生 nvue scroll-view // // 滚动回调(来自原生 nvue scroll-view
onScroll(e) { // onScroll(e) {
// 每次 scroll 事件触发时重置空闲计时器 // // 每次 scroll 事件触发时重置空闲计时器
// 开始/继续测量 FPS // // 开始/继续测量 FPS
if (!this.measuring) this._startMeasure() // if (!this.measuring) this._startMeasure()
clearTimeout(this._idleTO) // clearTimeout(this._idleTO)
this._idleTO = setTimeout(() => { // this._idleTO = setTimeout(() => {
this._stopMeasure() // this._stopMeasure()
}, 300) // }, 300)
}, // },
_startMeasure() { // _startMeasure() {
this.measuring = true // this.measuring = true
this._frames = [] // this._frames = []
const pushFrame = (t) => { // const pushFrame = (t) => {
this._frames.push(t) // this._frames.push(t)
// 保持最近 120 帧 // // 保持最近 120 帧
if (this._frames.length > 120) this._frames.shift() // if (this._frames.length > 120) this._frames.shift()
this._rafId = requestAnimationFrame(pushFrame) // this._rafId = requestAnimationFrame(pushFrame)
} // }
this._rafId = requestAnimationFrame(pushFrame) // this._rafId = requestAnimationFrame(pushFrame)
}, // },
_stopMeasure() { // _stopMeasure() {
this.measuring = false // this.measuring = false
if (this._rafId) { // if (this._rafId) {
cancelAnimationFrame(this._rafId) // cancelAnimationFrame(this._rafId)
this._rafId = null // this._rafId = null
} // }
// 计算 FPS 与平均帧时长 // // 计算 FPS 与平均帧时长
if (this._frames.length < 2) { // if (this._frames.length < 2) {
this.fpsDisplay = 0 // this.fpsDisplay = 0
this.avgFrameMsDisplay = 0 // this.avgFrameMsDisplay = 0
return // return
} // }
const intervals = [] // const intervals = []
for (let i = 1; i < this._frames.length; i++) { // for (let i = 1; i < this._frames.length; i++) {
intervals.push(this._frames[i] - this._frames[i - 1]) // intervals.push(this._frames[i] - this._frames[i - 1])
} // }
const sum = intervals.reduce((a, b) => a + b, 0) // const sum = intervals.reduce((a, b) => a + b, 0)
const avg = sum / intervals.length // const avg = sum / intervals.length
const fps = 1000 / avg // const fps = 1000 / avg
this.avgFrameMsDisplay = avg.toFixed(2) // this.avgFrameMsDisplay = avg.toFixed(2)
this.fpsDisplay = Math.round(fps) // this.fpsDisplay = Math.round(fps)
} // }
} // }
} // }
</script> </script>
<style> <style>
.page { /* .page {
flex: 1; flex: 1;
background-color: #f5f6fa; background-color: #f5f6fa;
} }
@ -189,11 +189,9 @@
color: #666; color: #666;
line-height: 32px; line-height: 32px;
} }
/* ensure full-height page in nvue */
page, page,
body, body,
.page { .page {
height: 100%; height: 100%;
} } */
</style> </style>

View File

@ -4,7 +4,6 @@
<view class="rentou"> <view class="rentou">
<view class="rentou-left"> <view class="rentou-left">
<image class="rentou-left-img" src="/static/shouye/old.png" /> <image class="rentou-left-img" src="/static/shouye/old.png" />
</view> </view>
<view class="rentou-right"> <view class="rentou-right">
{{ uni.getStorageSync('realname') }} {{ uni.getStorageSync('realname') }}

View File

@ -1,89 +1,8 @@
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle } from "vue"; import { openBlock, createElementBlock, createCommentVNode } from "vue";
import { _ as _export_sfc } from "../../_plugin-vue_export-helper.js"; import { _ as _export_sfc } from "../../_plugin-vue_export-helper.js";
const _style_0 = { "page": { "": { "flex": 1, "backgroundColor": "#f5f6fa", "height": 100 } }, "controls": { "": { "paddingTop": 20, "paddingRight": 20, "paddingBottom": 20, "paddingLeft": 20, "backgroundColor": "#ffffff" } }, "row": { "": { "flexDirection": "row", "alignItems": "center", "marginBottom": 10 } }, "btn": { "": { "paddingTop": 10, "paddingRight": 14, "paddingBottom": 10, "paddingLeft": 14, "borderRadius": 6, "backgroundColor": "#2d8cf0", "color": "#ffffff", "marginRight": 10 } }, "stat": { "": { "marginRight": 14, "fontSize": 28 } }, "hint": { "": { "color": "#888888", "fontSize": 24, "marginTop": 6 } }, "list": { "": { "flex": 1 } }, "item": { "": { "height": 160, "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12, "flexDirection": "row", "alignItems": "center", "borderBottomWidth": 1, "borderBottomStyle": "solid", "borderBottomColor": "rgba(0,0,0,0.06)", "backgroundColor": "#ffffff" } }, "thumb": { "": { "width": 120, "height": 120, "borderRadius": 8, "marginRight": 12 } }, "meta": { "": { "flex": 1 } }, "title": { "": { "fontSize": 30, "fontWeight": "bold", "marginBottom": 8 } }, "desc": { "": { "fontSize": 24, "color": "#666666", "lineHeight": 32 } } }; const _style_0 = {};
const _sfc_main = { const _sfc_main = {};
data() {
return {
items: [],
// FPS 测量
measuring: false,
fpsDisplay: 0,
avgFrameMsDisplay: 0,
// 内部用
_frames: [],
_rafId: null,
_idleTO: null
};
},
methods: {
generate(n) {
const list = [];
for (let i = 0; i < n; i++) {
list.push({
id: i + 1,
color: this._randColor()
});
}
this.items = list;
this.fpsDisplay = 0;
this.avgFrameMsDisplay = 0;
},
clearList() {
this.items = [];
this.fpsDisplay = 0;
this.avgFrameMsDisplay = 0;
},
_randColor() {
const h = Math.floor(Math.random() * 360);
const s = 60 + Math.floor(Math.random() * 20);
const l = 55 + Math.floor(Math.random() * 10);
return `hsl(${h} ${s}% ${l}%)`;
},
// 滚动回调(来自原生 nvue scroll-view
onScroll(e) {
if (!this.measuring)
this._startMeasure();
clearTimeout(this._idleTO);
this._idleTO = setTimeout(() => {
this._stopMeasure();
}, 300);
},
_startMeasure() {
this.measuring = true;
this._frames = [];
const pushFrame = (t) => {
this._frames.push(t);
if (this._frames.length > 120)
this._frames.shift();
this._rafId = requestAnimationFrame(pushFrame);
};
this._rafId = requestAnimationFrame(pushFrame);
},
_stopMeasure() {
this.measuring = false;
if (this._rafId) {
cancelAnimationFrame(this._rafId);
this._rafId = null;
}
if (this._frames.length < 2) {
this.fpsDisplay = 0;
this.avgFrameMsDisplay = 0;
return;
}
const intervals = [];
for (let i = 1; i < this._frames.length; i++) {
intervals.push(this._frames[i] - this._frames[i - 1]);
}
const sum = intervals.reduce((a, b) => a + b, 0);
const avg = sum / intervals.length;
const fps = 1e3 / avg;
this.avgFrameMsDisplay = avg.toFixed(2);
this.fpsDisplay = Math.round(fps);
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_button = resolveComponent("button");
return openBlock(), createElementBlock("scroll-view", { return openBlock(), createElementBlock("scroll-view", {
scrollY: true, scrollY: true,
showScrollbar: true, showScrollbar: true,
@ -91,120 +10,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
bubble: "true", bubble: "true",
style: { flexDirection: "column" } style: { flexDirection: "column" }
}, [ }, [
createElementVNode("div", { class: "page" }, [ createCommentVNode(' <div class="page">\r\n <div class="controls">\r\n <div class="row">\r\n <button class="btn" @click="generate(2000)">生成 2000 项</button>\r\n <button class="btn" @click="generate(5000)">生成 5000 项</button>\r\n <button class="btn" @click="clearList">清空</button>\r\n </div>\r\n <div class="row">\r\n <text class="stat">FPS: {{fpsDisplay}}</text>\r\n <text class="stat">平均帧(ms): {{avgFrameMsDisplay}}</text>\r\n <text class="stat">items: {{items.length}}</text>\r\n </div>\r\n <div class="hint">说明:向下快速滚动列表以测试渲染/滚动性能nvue 将使用原生渲染。</div>\r\n </div>\r\n\r\n <scroll-view class="list" :scroll-y="true" show-scrollbar="true" @scroll="onScroll">\r\n <div class="item" v-for="item in items" :key="item.id">\r\n <div class="thumb" :style="{backgroundColor: item.color}"></div>\r\n <div class="meta">\r\n <text class="title">Item #{{item.id}}</text>\r\n <text class="desc">这是第 {{item.id}} 个条目,用于增加每个 DOM 的复杂度以测试渲染成本。多行文本强制布局多次换行,模拟真实列表。</text>\r\n </div>\r\n </div>\r\n </scroll-view>\r\n </div> ')
createElementVNode("div", { class: "controls" }, [
createElementVNode("div", { class: "row" }, [
createVNode(_component_button, {
class: "btn",
onClick: _cache[0] || (_cache[0] = ($event) => $options.generate(2e3))
}, {
default: withCtx(() => [
createTextVNode("生成 2000 项")
]),
_: 1
/* STABLE */
}),
createVNode(_component_button, {
class: "btn",
onClick: _cache[1] || (_cache[1] = ($event) => $options.generate(5e3))
}, {
default: withCtx(() => [
createTextVNode("生成 5000 项")
]),
_: 1
/* STABLE */
}),
createVNode(_component_button, {
class: "btn",
onClick: $options.clearList
}, {
default: withCtx(() => [
createTextVNode("清空")
]),
_: 1
/* STABLE */
}, 8, ["onClick"])
]),
createElementVNode("div", { class: "row" }, [
createElementVNode(
"u-text",
{ class: "stat" },
"FPS: " + toDisplayString($data.fpsDisplay),
1
/* TEXT */
),
createElementVNode(
"u-text",
{ class: "stat" },
"平均帧(ms): " + toDisplayString($data.avgFrameMsDisplay),
1
/* TEXT */
),
createElementVNode(
"u-text",
{ class: "stat" },
"items: " + toDisplayString($data.items.length),
1
/* TEXT */
)
]),
createElementVNode("div", { class: "hint" }, [
createElementVNode("u-text", null, "说明:向下快速滚动列表以测试渲染/滚动性能nvue 将使用原生渲染。")
])
]),
createElementVNode(
"scroll-view",
{
class: "list",
scrollY: true,
showScrollbar: "true",
onScroll: _cache[2] || (_cache[2] = (...args) => $options.onScroll && $options.onScroll(...args))
},
[
(openBlock(true), createElementBlock(
Fragment,
null,
renderList($data.items, (item) => {
return openBlock(), createElementBlock("div", {
class: "item",
key: item.id
}, [
createElementVNode(
"div",
{
class: "thumb",
style: normalizeStyle({ backgroundColor: item.color })
},
null,
4
/* STYLE */
),
createElementVNode("div", { class: "meta" }, [
createElementVNode(
"u-text",
{ class: "title" },
"Item #" + toDisplayString(item.id),
1
/* TEXT */
),
createElementVNode(
"u-text",
{ class: "desc" },
"这是第 " + toDisplayString(item.id) + " 个条目,用于增加每个 DOM 的复杂度以测试渲染成本。多行文本强制布局多次换行,模拟真实列表。",
1
/* TEXT */
)
])
]);
}),
128
/* KEYED_FRAGMENT */
))
],
32
/* NEED_HYDRATION */
)
])
]); ]);
} }
const ceshi = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/login/ceshi.nvue"]]); const ceshi = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/login/ceshi.nvue"]]);