合并代码
This commit is contained in:
parent
cd330b7fa8
commit
c9d484f7b4
|
|
@ -2049,7 +2049,7 @@
|
|||
|
||||
/* background-color: red; */
|
||||
.packtarget-blue {
|
||||
color: #0089FE;
|
||||
/* color: #0089FE; */
|
||||
}
|
||||
|
||||
.packtarget-shu {
|
||||
|
|
|
|||
|
|
@ -1698,10 +1698,10 @@
|
|||
const emotionTagList = ref([]);
|
||||
const bodyTagList = ref([]);
|
||||
const geteverything = () => {
|
||||
console.log("为啥",uni.getStorageSync('nuId'))
|
||||
// console.log("为啥",uni.getStorageSync('nuId'))
|
||||
if (uni.getStorageSync('nuId')) {
|
||||
getNclist(uni.getStorageSync('nuId')).then((res : any) => {
|
||||
console.log("通了吗",res)
|
||||
// console.log("通了吗",res)
|
||||
timearr.value = Array.from({ length: 24 }, (_, hour) => ({
|
||||
positioning: hour.toString(),
|
||||
children: minuteArr.map(time => ({
|
||||
|
|
|
|||
|
|
@ -1724,8 +1724,9 @@
|
|||
margin-top: 20rpx;
|
||||
width: 97%;
|
||||
margin-left: 3%;
|
||||
height: 510rpx;
|
||||
height: 410rpx;
|
||||
display: flex;
|
||||
/* background-color: red; */
|
||||
|
||||
/* 禁止元素拖动 */
|
||||
.tree-item {
|
||||
|
|
@ -1734,7 +1735,7 @@
|
|||
|
||||
.tree-card {
|
||||
width: 100%;
|
||||
height: 20%;
|
||||
height: 25%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -2054,7 +2055,7 @@
|
|||
|
||||
/* background-color: red; */
|
||||
.packtarget-blue {
|
||||
color: #0089FE;
|
||||
/* color: #0089FE; */
|
||||
}
|
||||
|
||||
.packtarget-shu {
|
||||
|
|
@ -2329,4 +2330,9 @@
|
|||
font-size: 1.4vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
.changerulertype{
|
||||
width: 100%;
|
||||
height: 125rpx;
|
||||
/* background-color: red; */
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -389,6 +389,9 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="changerulertype" v-show="!ruleritem.directiveName && !servertype">
|
||||
|
||||
</view>
|
||||
<view class="three-items" v-show="!ruleritem.directiveName && servertype"
|
||||
style="flex-direction: column;margin-left: 25rpx;width: 91.8%;">
|
||||
|
|
@ -1132,6 +1135,7 @@
|
|||
}
|
||||
}
|
||||
const doChangeNew = () => {
|
||||
console.log("啥啊")
|
||||
let object = postitem.value;
|
||||
indexsave.value = [Number(props.sendxy[0]), Number(props.sendxy[1])]
|
||||
// 旧的tagName保存了
|
||||
|
|
@ -2202,6 +2206,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
console.log("测试新增")
|
||||
addDirective(postdata).then((res) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
|
|
|
|||
|
|
@ -2048,7 +2048,7 @@
|
|||
|
||||
/* background-color: red; */
|
||||
.packtarget-blue {
|
||||
color: #0089FE;
|
||||
/* color: #0089FE; */
|
||||
}
|
||||
|
||||
.packtarget-shu {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<!-- <div class="page">
|
||||
<div class="controls">
|
||||
<div class="row">
|
||||
<button class="btn" @click="generate(2000)">生成 2000 项</button>
|
||||
|
|
@ -23,103 +23,103 @@
|
|||
</div>
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
// FPS 测量
|
||||
measuring: false,
|
||||
fpsDisplay: 0,
|
||||
avgFrameMsDisplay: 0,
|
||||
// export default {
|
||||
// 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}%)`
|
||||
},
|
||||
// // 内部用
|
||||
// _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) {
|
||||
// 每次 scroll 事件触发时重置空闲计时器
|
||||
// 开始/继续测量 FPS
|
||||
if (!this.measuring) this._startMeasure()
|
||||
clearTimeout(this._idleTO)
|
||||
this._idleTO = setTimeout(() => {
|
||||
this._stopMeasure()
|
||||
}, 300)
|
||||
},
|
||||
// // 滚动回调(来自原生 nvue scroll-view)
|
||||
// onScroll(e) {
|
||||
// // 每次 scroll 事件触发时重置空闲计时器
|
||||
// // 开始/继续测量 FPS
|
||||
// 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)
|
||||
// 保持最近 120 帧
|
||||
if (this._frames.length > 120) this._frames.shift()
|
||||
this._rafId = requestAnimationFrame(pushFrame)
|
||||
}
|
||||
this._rafId = requestAnimationFrame(pushFrame)
|
||||
},
|
||||
// _startMeasure() {
|
||||
// this.measuring = true
|
||||
// this._frames = []
|
||||
// const pushFrame = (t) => {
|
||||
// this._frames.push(t)
|
||||
// // 保持最近 120 帧
|
||||
// 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
|
||||
}
|
||||
// 计算 FPS 与平均帧时长
|
||||
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 = 1000 / avg
|
||||
this.avgFrameMsDisplay = avg.toFixed(2)
|
||||
this.fpsDisplay = Math.round(fps)
|
||||
}
|
||||
}
|
||||
}
|
||||
// _stopMeasure() {
|
||||
// this.measuring = false
|
||||
// if (this._rafId) {
|
||||
// cancelAnimationFrame(this._rafId)
|
||||
// this._rafId = null
|
||||
// }
|
||||
// // 计算 FPS 与平均帧时长
|
||||
// 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 = 1000 / avg
|
||||
// this.avgFrameMsDisplay = avg.toFixed(2)
|
||||
// this.fpsDisplay = Math.round(fps)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
/* .page {
|
||||
flex: 1;
|
||||
background-color: #f5f6fa;
|
||||
}
|
||||
|
|
@ -189,11 +189,9 @@
|
|||
color: #666;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
/* ensure full-height page in nvue */
|
||||
page,
|
||||
body,
|
||||
.page {
|
||||
height: 100%;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
<view class="rentou">
|
||||
<view class="rentou-left">
|
||||
<image class="rentou-left-img" src="/static/shouye/old.png" />
|
||||
|
||||
</view>
|
||||
<view class="rentou-right">
|
||||
{{ uni.getStorageSync('realname') }}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
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 _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);
|
||||
}
|
||||
}
|
||||
};
|
||||
const _style_0 = {};
|
||||
const _sfc_main = {};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
const _component_button = resolveComponent("button");
|
||||
return openBlock(), createElementBlock("scroll-view", {
|
||||
scrollY: true,
|
||||
showScrollbar: true,
|
||||
|
|
@ -91,120 +10,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
bubble: "true",
|
||||
style: { flexDirection: "column" }
|
||||
}, [
|
||||
createElementVNode("div", { class: "page" }, [
|
||||
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 */
|
||||
)
|
||||
])
|
||||
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> ')
|
||||
]);
|
||||
}
|
||||
const ceshi = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/login/ceshi.nvue"]]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue