vite-uni-dev-tool 0.0.48 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/const.cjs +1 -0
- package/dist/const.d.ts +78 -161
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -47
- package/dist/core-shared.d.ts +44 -0
- package/dist/core-shared.d.ts.map +1 -0
- package/dist/core-shared.js +1 -0
- package/dist/core.d.ts +2 -40
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +4 -159
- package/dist/i18n/index.cjs +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/instance.cjs +1 -0
- package/dist/i18n/instance.d.ts +15 -0
- package/dist/i18n/instance.d.ts.map +1 -0
- package/dist/i18n/instance.js +1 -0
- package/dist/i18n/locales/en.cjs +1 -0
- package/dist/i18n/locales/en.d.ts +470 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/zh-Hans.cjs +1 -0
- package/dist/i18n/locales/zh-Hans.d.ts +476 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hans.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/devConsole/index.cjs +4 -0
- package/dist/{devConsole → modules/devConsole}/index.d.ts +1 -1
- package/dist/modules/devConsole/index.d.ts.map +1 -0
- package/dist/modules/devConsole/index.js +4 -0
- package/dist/modules/devEvent/index.cjs +5 -0
- package/dist/modules/devEvent/index.d.ts +115 -0
- package/dist/modules/devEvent/index.d.ts.map +1 -0
- package/dist/modules/devEvent/index.js +5 -0
- package/dist/modules/devIntercept/index.cjs +13 -0
- package/dist/modules/devIntercept/index.d.ts +71 -0
- package/dist/modules/devIntercept/index.d.ts.map +1 -0
- package/dist/modules/devIntercept/index.js +13 -0
- package/dist/modules/devStore/index.cjs +1 -0
- package/dist/modules/devStore/index.d.ts +159 -0
- package/dist/modules/devStore/index.d.ts.map +1 -0
- package/dist/modules/devStore/index.js +1 -0
- package/dist/modules/devToolInfo/index.cjs +1 -0
- package/dist/modules/devToolInfo/index.d.ts +27 -0
- package/dist/modules/devToolInfo/index.d.ts.map +1 -0
- package/dist/modules/devToolInfo/index.js +1 -0
- package/dist/plugins/uniDevTool/transform/transformApp.cjs +44 -0
- package/dist/plugins/uniDevTool/transform/transformApp.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformApp.js +17 -17
- package/dist/plugins/uniDevTool/transform/transformMain.cjs +3 -0
- package/dist/plugins/uniDevTool/transform/transformMain.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformMain.js +3 -3
- package/dist/plugins/uniDevTool/transform/transformVue.cjs +41 -0
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts +1 -2
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformVue.js +32 -19
- package/dist/plugins/uniDevTool/uniDevTool.cjs +5 -0
- package/dist/plugins/uniDevTool/uniDevTool.d.ts +3 -11
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/uniDevTool.js +3 -3
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.cjs +19 -0
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +1 -1
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.js +11 -19
- package/dist/plugins/uniParseStock/index.d.ts +10 -0
- package/dist/plugins/uniParseStock/index.d.ts.map +1 -0
- package/dist/plugins/utils/index.cjs +2 -0
- package/dist/plugins/utils/index.d.ts +1 -3
- package/dist/plugins/utils/index.d.ts.map +1 -1
- package/dist/plugins/utils/index.js +2 -2
- package/dist/shims-uni.d.ts +140 -0
- package/dist/type.d.ts +174 -16
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/array.cjs +1 -0
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js +1 -12
- package/dist/utils/date.cjs +1 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +1 -59
- package/dist/utils/file.cjs +1 -0
- package/dist/utils/file.d.ts.map +1 -1
- package/dist/utils/file.js +1 -85
- package/dist/utils/function.cjs +1 -0
- package/dist/utils/function.d.ts +13 -0
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +1 -68
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -63
- package/dist/utils/ip.cjs +1 -0
- package/dist/utils/ip.d.ts +1 -1
- package/dist/utils/ip.d.ts.map +1 -1
- package/dist/utils/ip.js +1 -45
- package/dist/utils/language.cjs +1 -0
- package/dist/utils/language.d.ts +2 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +1 -63
- package/dist/utils/object.cjs +1 -0
- package/dist/utils/object.d.ts +4 -5
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -136
- package/dist/utils/openLink.cjs +1 -0
- package/dist/utils/openLink.d.ts.map +1 -1
- package/dist/utils/openLink.js +1 -28
- package/dist/utils/page.cjs +1 -0
- package/dist/utils/page.d.ts.map +1 -1
- package/dist/utils/page.js +1 -7
- package/dist/utils/platform.cjs +1 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +1 -17
- package/dist/utils/string.cjs +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -114
- package/dist/utils/utils.cjs +1 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +1 -126
- package/dist/v3/AppTransition/index.vue +170 -0
- package/dist/v3/AutoSizer/index.vue +4 -5
- package/dist/v3/AutoSizer/index1.vue +4 -6
- package/dist/v3/AutoSizer/utils.ts +1 -1
- package/dist/v3/CaptureScreen/index.vue +19 -8
- package/dist/v3/CircularButton/index.vue +64 -13
- package/dist/v3/ConsoleList/ConsoleItem.vue +56 -5
- package/dist/v3/ConsoleList/RunJSInput.vue +10 -6
- package/dist/v3/ConsoleList/index.vue +51 -35
- package/dist/v3/CustomSwiper/CustomSwiperItem.vue +49 -0
- package/dist/v3/CustomSwiper/index.vue +104 -0
- package/dist/v3/DevTool/fps-collector.render.ts +148 -0
- package/dist/v3/DevTool/index.vue +209 -102
- package/dist/v3/DevToolButton/index.vue +40 -59
- package/dist/v3/DevToolTitle/index.vue +4 -1
- package/dist/v3/DevToolWindow/DevToolOverlay.vue +182 -0
- package/dist/v3/DevToolWindow/const.ts +47 -69
- package/dist/v3/DevToolWindow/hooks/dataUtils.ts +48 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolData.ts +338 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolHandlers.ts +549 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolOverlay.ts +184 -0
- package/dist/v3/DevToolWindow/index.css +89 -0
- package/dist/v3/DevToolWindow/index.vue +800 -1450
- package/dist/v3/DraggableContainer/index.vue +456 -0
- package/dist/v3/ElEvent/ElEventItem.vue +4 -3
- package/dist/v3/ElEvent/index.vue +26 -9
- package/dist/v3/Empty/index.vue +1 -0
- package/dist/v3/FilterInput/index.vue +8 -22
- package/dist/v3/FilterSelect/index.vue +37 -24
- package/dist/v3/Instance/components/InstanceTreeNode.vue +265 -0
- package/dist/v3/Instance/flatten.ts +226 -0
- package/dist/v3/Instance/index.vue +94 -0
- package/dist/v3/Instance/registry.ts +49 -0
- package/dist/v3/Instance/transformTree.ts +375 -0
- package/dist/v3/Instance/transformTreeCtx.ts +268 -0
- package/dist/v3/{InstanceTree → Instance}/typing.d.ts +15 -2
- package/dist/v3/InstanceDetail/index.vue +433 -44
- package/dist/v3/JsonDetail/index.vue +12 -8
- package/dist/v3/JsonPretty/components/Brackets/index.vue +1 -0
- package/dist/v3/JsonPretty/components/Carets/index.vue +2 -1
- package/dist/v3/JsonPretty/components/CheckController/index.vue +26 -15
- package/dist/v3/JsonPretty/components/TreeNode/index.vue +42 -20
- package/dist/v3/JsonPretty/index.vue +60 -37
- package/dist/v3/JsonPretty/utils/index.ts +41 -44
- package/dist/v3/MovableContainer/index.vue +89 -0
- package/dist/v3/NFCList/NFCItem.vue +14 -14
- package/dist/v3/NFCList/NFCTool.vue +99 -81
- package/dist/v3/NFCList/index.vue +14 -10
- package/dist/v3/NetworkList/InterceptConfig.vue +154 -364
- package/dist/v3/NetworkList/InterceptItem.vue +14 -6
- package/dist/v3/NetworkList/NetworkDetail.vue +34 -29
- package/dist/v3/NetworkList/NetworkIntercept.vue +11 -8
- package/dist/v3/NetworkList/NetworkItem.vue +27 -11
- package/dist/v3/NetworkList/NetworkSend.vue +132 -290
- package/dist/v3/NetworkList/hooks/useNetworkForm.ts +86 -0
- package/dist/v3/NetworkList/index.vue +32 -24
- package/dist/v3/NetworkList/utils.ts +101 -0
- package/dist/v3/Performance/index.vue +495 -0
- package/dist/v3/Performance/modules/PerformanceMetrics.vue +153 -0
- package/dist/v3/Performance/modules/PerformanceWidget.vue +249 -0
- package/dist/v3/Performance/modules/usePerformanceChart.ts +460 -0
- package/dist/v3/Performance/modules/usePerformanceData.ts +258 -0
- package/dist/v3/Pick/index.vue +322 -0
- package/dist/v3/PiniaList/index.vue +38 -17
- package/dist/v3/RouteList/index.vue +32 -15
- package/dist/v3/RunJS/index.vue +30 -10
- package/dist/v3/ScanCodeList/ScanCodeItem.vue +2 -9
- package/dist/v3/ScanCodeList/index.vue +12 -9
- package/dist/v3/SettingButton/index.vue +45 -0
- package/dist/v3/SettingList/index.css +120 -0
- package/dist/v3/SettingList/index.vue +96 -537
- package/dist/v3/SettingList/modules/SettingDevTool.vue +208 -0
- package/dist/v3/SettingList/modules/SettingInfo.vue +119 -0
- package/dist/v3/SettingList/modules/SettingLanguage.vue +74 -0
- package/dist/v3/SettingList/modules/SettingLog.vue +230 -0
- package/dist/v3/SettingList/modules/SettingNetwork.vue +120 -0
- package/dist/v3/SettingList/modules/SettingTheme.vue +312 -0
- package/dist/v3/SourceCode/Line.vue +15 -2
- package/dist/v3/SourceCode/index.vue +25 -24
- package/dist/v3/SourceCode/parseCode.ts +114 -56
- package/dist/v3/StorageList/index.vue +33 -33
- package/dist/v3/Tabs/index.vue +31 -28
- package/dist/v3/Tag/index.vue +39 -20
- package/dist/v3/TransferList/TransferDetail.vue +268 -0
- package/dist/v3/TransferList/TransferItem.vue +125 -0
- package/dist/v3/TransferList/index.vue +181 -0
- package/dist/v3/UniEvent/UniEventItem.vue +1 -0
- package/dist/v3/UniEvent/index.vue +28 -29
- package/dist/v3/{VirtualListPro → VirtualList}/AutoSize.vue +1 -1
- package/dist/v3/VirtualList/index.vue +382 -82
- package/dist/v3/VuexList/index.vue +38 -17
- package/dist/v3/WebSocket/WebSocketDetail.vue +142 -80
- package/dist/v3/WebSocket/WebSocketItem.vue +10 -4
- package/dist/v3/WebSocket/index.vue +44 -30
- package/dist/v3/hooks/useNFC/index.ts +6 -6
- package/dist/v3/hooks/useNFC/typing.d.ts +2 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.ts +215 -626
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.ts +54 -85
- package/dist/v3/hooks/useNFC/utils.ts +3 -3
- package/dist/v3/hooks/useRequest/index.ts +2 -2
- package/dist/v3/hooks/useScanCode/index.ts +10 -8
- package/dist/v3/styles/theme.css +290 -0
- package/dist/v3/styles/theme.ts +12 -0
- package/package.json +25 -5
- package/dist/devConsole/index.d.ts.map +0 -1
- package/dist/devConsole/index.js +0 -273
- package/dist/devEvent/index.d.ts +0 -328
- package/dist/devEvent/index.d.ts.map +0 -1
- package/dist/devEvent/index.js +0 -697
- package/dist/devEventBus/index.d.ts +0 -42
- package/dist/devEventBus/index.d.ts.map +0 -1
- package/dist/devEventBus/index.js +0 -70
- package/dist/devIntercept/index.d.ts +0 -281
- package/dist/devIntercept/index.d.ts.map +0 -1
- package/dist/devIntercept/index.js +0 -949
- package/dist/devRunJS/index.d.ts +0 -67
- package/dist/devRunJS/index.d.ts.map +0 -1
- package/dist/devStore/index.d.ts +0 -199
- package/dist/devStore/index.d.ts.map +0 -1
- package/dist/devStore/index.js +0 -562
- package/dist/devToolInfo/index.d.ts +0 -17
- package/dist/devToolInfo/index.d.ts.map +0 -1
- package/dist/devToolInfo/index.js +0 -15
- package/dist/v3/AutoSizer/utils.d.ts +0 -5
- package/dist/v3/AutoSizer/utils.d.ts.map +0 -1
- package/dist/v3/ConsoleList/staticTips.d.ts +0 -13
- package/dist/v3/ConsoleList/staticTips.d.ts.map +0 -1
- package/dist/v3/DevToolWindow/const.d.ts +0 -46
- package/dist/v3/DevToolWindow/const.d.ts.map +0 -1
- package/dist/v3/InstanceTree/components/InstanceTreeNode.vue +0 -81
- package/dist/v3/InstanceTree/flatten.d.ts +0 -10
- package/dist/v3/InstanceTree/flatten.d.ts.map +0 -1
- package/dist/v3/InstanceTree/flatten.ts +0 -75
- package/dist/v3/InstanceTree/index.vue +0 -51
- package/dist/v3/InstanceTree/transformTree.d.ts +0 -17
- package/dist/v3/InstanceTree/transformTree.d.ts.map +0 -1
- package/dist/v3/InstanceTree/transformTree.ts +0 -237
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +0 -4
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +0 -1
- package/dist/v3/JsonPretty/hooks/useError.d.ts +0 -8
- package/dist/v3/JsonPretty/hooks/useError.d.ts.map +0 -1
- package/dist/v3/JsonPretty/type.d.ts +0 -94
- package/dist/v3/JsonPretty/type.d.ts.map +0 -1
- package/dist/v3/JsonPretty/utils/index.d.ts +0 -10
- package/dist/v3/JsonPretty/utils/index.d.ts.map +0 -1
- package/dist/v3/NFCList/const.d.ts +0 -13
- package/dist/v3/NFCList/const.d.ts.map +0 -1
- package/dist/v3/NetworkList/const.d.ts +0 -5
- package/dist/v3/NetworkList/const.d.ts.map +0 -1
- package/dist/v3/SourceCode/parseCode.d.ts +0 -27
- package/dist/v3/SourceCode/parseCode.d.ts.map +0 -1
- package/dist/v3/UploadList/UploadDetail.vue +0 -255
- package/dist/v3/UploadList/UploadItem.vue +0 -122
- package/dist/v3/UploadList/index.vue +0 -125
- package/dist/v3/VirtualListPro/index.vue +0 -229
- package/dist/v3/hooks/useContainerStyle.d.ts +0 -15
- package/dist/v3/hooks/useContainerStyle.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/index.d.ts +0 -5
- package/dist/v3/hooks/useNFC/index.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/utils.d.ts +0 -95
- package/dist/v3/hooks/useNFC/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/index.d.ts +0 -126
- package/dist/v3/hooks/useRequest/index.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/utils.d.ts +0 -35
- package/dist/v3/hooks/useRequest/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useScanCode/index.d.ts +0 -36
- package/dist/v3/hooks/useScanCode/index.d.ts.map +0 -1
- /package/dist/v3/{VirtualListPro → VirtualList}/readme.md +0 -0
|
@@ -1,96 +1,485 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
id="instance-detail-container"
|
|
4
|
+
class="instance-detail"
|
|
5
|
+
data-dev-tool="true"
|
|
6
|
+
:style="{ height: contentHeight - 32 + 'px' }">
|
|
7
|
+
<!-- 控制栏 -->
|
|
3
8
|
<view class="instance-detail-control">
|
|
4
|
-
<DevToolTitle>
|
|
5
|
-
|
|
9
|
+
<DevToolTitle>{{ t('instance.title') }}</DevToolTitle>
|
|
6
10
|
<Tag
|
|
7
11
|
mode="clear"
|
|
8
12
|
style="margin-left: auto"
|
|
9
13
|
customStyle="margin-left:auto"
|
|
10
|
-
@click="onRefresh"
|
|
11
|
-
|
|
12
|
-
刷新
|
|
14
|
+
@click="onRefresh">
|
|
15
|
+
{{ t('instance.refresh') }}
|
|
13
16
|
</Tag>
|
|
14
17
|
</view>
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
<!-- 主体内容:上下分层 -->
|
|
20
|
+
<view
|
|
21
|
+
class="instance-detail-body"
|
|
22
|
+
@touchmove="onResizeMove"
|
|
23
|
+
@mousemove="onResizeMove"
|
|
24
|
+
@touchend="onResizeEnd"
|
|
25
|
+
@mouseup="onResizeEnd">
|
|
26
|
+
<!-- 上部:组件树 -->
|
|
27
|
+
<view
|
|
28
|
+
class="instance-detail-top"
|
|
29
|
+
:style="{ flex: `calc(${topHeightPercent}% - 10px - 16px)` }">
|
|
30
|
+
<InstanceTree
|
|
31
|
+
v-if="showTree"
|
|
32
|
+
height="100%"
|
|
33
|
+
style="height: 100%"
|
|
34
|
+
:data="instanceRoot"
|
|
35
|
+
showLine
|
|
36
|
+
@select="onNodeSelect" />
|
|
37
|
+
<Empty v-else :text="text" />
|
|
38
|
+
</view>
|
|
39
|
+
|
|
40
|
+
<!-- 拖拽条 -->
|
|
41
|
+
<view
|
|
42
|
+
class="instance-detail-resizer"
|
|
43
|
+
@touchstart.stop.prevent="onResizeStart"
|
|
44
|
+
@mousedown.stop.prevent="onResizeStart">
|
|
45
|
+
<view class="resizer-handle"></view>
|
|
46
|
+
</view>
|
|
47
|
+
|
|
48
|
+
<!-- 下部:属性详情 -->
|
|
49
|
+
<view
|
|
50
|
+
class="instance-detail-bottom"
|
|
51
|
+
:style="{ flex: 100 - topHeightPercent }">
|
|
52
|
+
<view class="instance-detail-tabs-wrapper">
|
|
53
|
+
<scroll-view scroll-x class="instance-detail-tabs-scroll">
|
|
54
|
+
<view class="instance-detail-tabs">
|
|
55
|
+
<view
|
|
56
|
+
v-for="(tab, index) in internalTabItems"
|
|
57
|
+
:key="tab.key"
|
|
58
|
+
:class="[
|
|
59
|
+
'instance-detail-tab-item',
|
|
60
|
+
activeInternalTab === index ? 'active' : '',
|
|
61
|
+
]"
|
|
62
|
+
@click="activeInternalTab = index">
|
|
63
|
+
{{ tab.label }}
|
|
64
|
+
</view>
|
|
65
|
+
</view>
|
|
66
|
+
</scroll-view>
|
|
67
|
+
</view>
|
|
68
|
+
|
|
69
|
+
<view class="instance-detail-props-scroll">
|
|
70
|
+
<view v-if="selectedNodeData" class="instance-detail-props-content">
|
|
71
|
+
<template v-if="activeInternalTab === 0">
|
|
72
|
+
<JsonPretty
|
|
73
|
+
virtual
|
|
74
|
+
collapsed
|
|
75
|
+
:showDoubleQuotes="false"
|
|
76
|
+
:height="jsonPrettyHeight"
|
|
77
|
+
:data="selectedNodeData.props"
|
|
78
|
+
:nodeSelectable="() => false"
|
|
79
|
+
:pathCollapsible="() => false" />
|
|
80
|
+
</template>
|
|
81
|
+
<template v-else-if="activeInternalTab === 1">
|
|
82
|
+
<JsonPretty
|
|
83
|
+
virtual
|
|
84
|
+
collapsed
|
|
85
|
+
:showDoubleQuotes="false"
|
|
86
|
+
:height="jsonPrettyHeight"
|
|
87
|
+
:data="selectedNodeData.data"
|
|
88
|
+
:nodeSelectable="() => false"
|
|
89
|
+
:pathCollapsible="() => false" />
|
|
90
|
+
</template>
|
|
91
|
+
<template v-else-if="activeInternalTab === 2">
|
|
92
|
+
<JsonPretty
|
|
93
|
+
virtual
|
|
94
|
+
collapsed
|
|
95
|
+
:showDoubleQuotes="false"
|
|
96
|
+
:height="jsonPrettyHeight"
|
|
97
|
+
:data="selectedNodeData.provides"
|
|
98
|
+
:nodeSelectable="() => false"
|
|
99
|
+
:pathCollapsible="() => false" />
|
|
100
|
+
</template>
|
|
101
|
+
<template v-else-if="activeInternalTab === 3">
|
|
102
|
+
<JsonPretty
|
|
103
|
+
virtual
|
|
104
|
+
collapsed
|
|
105
|
+
:showDoubleQuotes="false"
|
|
106
|
+
:height="jsonPrettyHeight"
|
|
107
|
+
:data="selectedNodeData.functions"
|
|
108
|
+
:nodeSelectable="() => false"
|
|
109
|
+
:pathCollapsible="() => false" />
|
|
110
|
+
</template>
|
|
111
|
+
<template v-else-if="activeInternalTab === 4">
|
|
112
|
+
<JsonPretty
|
|
113
|
+
virtual
|
|
114
|
+
collapsed
|
|
115
|
+
:showDoubleQuotes="false"
|
|
116
|
+
:height="jsonPrettyHeight"
|
|
117
|
+
:data="selectedNodeData.emits"
|
|
118
|
+
:nodeSelectable="() => false"
|
|
119
|
+
:pathCollapsible="() => false" />
|
|
120
|
+
</template>
|
|
121
|
+
<template v-else-if="activeInternalTab === 5">
|
|
122
|
+
<JsonPretty
|
|
123
|
+
virtual
|
|
124
|
+
collapsed
|
|
125
|
+
:showDoubleQuotes="false"
|
|
126
|
+
:height="jsonPrettyHeight"
|
|
127
|
+
:data="selectedNodeData.other"
|
|
128
|
+
:nodeSelectable="() => false"
|
|
129
|
+
:pathCollapsible="() => false" />
|
|
130
|
+
</template>
|
|
131
|
+
</view>
|
|
132
|
+
<view v-else class="instance-detail-props-empty">
|
|
133
|
+
<text>{{ t('instance.selectNode') }}</text>
|
|
134
|
+
</view>
|
|
135
|
+
</view>
|
|
136
|
+
</view>
|
|
137
|
+
</view>
|
|
23
138
|
</view>
|
|
24
139
|
</template>
|
|
140
|
+
|
|
25
141
|
<script lang="ts" setup>
|
|
26
|
-
import Tag from '../Tag/index.vue';
|
|
27
|
-
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
28
|
-
import InstanceTree from '../InstanceTree/index.vue';
|
|
29
|
-
import Empty from '../Empty/index.vue';
|
|
30
142
|
import {
|
|
143
|
+
ref,
|
|
144
|
+
shallowRef,
|
|
145
|
+
computed,
|
|
146
|
+
onMounted,
|
|
31
147
|
getCurrentInstance,
|
|
32
148
|
nextTick,
|
|
33
|
-
|
|
34
|
-
shallowRef,
|
|
149
|
+
markRaw,
|
|
35
150
|
type ComponentInternalInstance,
|
|
36
151
|
} from 'vue';
|
|
152
|
+
import { useI18n } from '../../i18n';
|
|
153
|
+
import Tag from '../Tag/index.vue';
|
|
154
|
+
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
155
|
+
import InstanceTree from '../Instance/index.vue';
|
|
156
|
+
import Empty from '../Empty/index.vue';
|
|
157
|
+
import JsonPretty from '../JsonPretty/index.vue';
|
|
37
158
|
|
|
38
|
-
const
|
|
159
|
+
const { t } = useI18n();
|
|
160
|
+
|
|
161
|
+
const _props = defineProps<{
|
|
39
162
|
zIndex?: number;
|
|
40
163
|
contentHeight: number;
|
|
41
164
|
theme?: string;
|
|
42
165
|
}>();
|
|
43
166
|
|
|
44
|
-
const
|
|
167
|
+
const _emit = defineEmits<{
|
|
45
168
|
(e: 'close'): void;
|
|
46
169
|
}>();
|
|
47
170
|
|
|
48
|
-
const instanceRoot =
|
|
49
|
-
const
|
|
50
|
-
|
|
171
|
+
const instanceRoot = ref();
|
|
172
|
+
const showTree = ref(false);
|
|
173
|
+
const status = shallowRef<'getting' | 'noInfo'>('getting');
|
|
174
|
+
const selectedNodeData = ref<{
|
|
175
|
+
props: any;
|
|
176
|
+
styles: any;
|
|
177
|
+
uid: any;
|
|
178
|
+
type: any;
|
|
179
|
+
other: any;
|
|
180
|
+
provides: any;
|
|
181
|
+
data: any;
|
|
182
|
+
functions: any;
|
|
183
|
+
emits: any;
|
|
184
|
+
} | null>(null);
|
|
185
|
+
|
|
186
|
+
// 属性面板内部 Tab
|
|
187
|
+
const activeInternalTab = ref(0);
|
|
188
|
+
const internalTabItems = computed(() => [
|
|
189
|
+
{ label: t('instance.props'), key: 'props' },
|
|
190
|
+
{ label: t('instance.data'), key: 'data' },
|
|
191
|
+
{ label: t('instance.provides'), key: 'provides' },
|
|
192
|
+
{ label: t('instance.functions'), key: 'functions' },
|
|
193
|
+
{ label: t('instance.emits'), key: 'emits' },
|
|
194
|
+
{ label: t('instance.other'), key: 'other' },
|
|
195
|
+
]);
|
|
196
|
+
|
|
197
|
+
// 布局高度比例 (0-100)
|
|
198
|
+
const topHeightPercent = ref(60);
|
|
199
|
+
const isResizing = ref(false);
|
|
200
|
+
|
|
201
|
+
const text = computed(() => {
|
|
202
|
+
return status.value === 'getting'
|
|
203
|
+
? t('instance.gettingInfo')
|
|
204
|
+
: t('instance.noInfo');
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
let rootInstance: ComponentInternalInstance | null;
|
|
208
|
+
|
|
51
209
|
onMounted(() => {
|
|
52
|
-
|
|
210
|
+
rootInstance = getCurrentInstance();
|
|
211
|
+
refreshRoot();
|
|
212
|
+
|
|
213
|
+
// 全局监听移动和结束,保证拖拽流畅
|
|
214
|
+
// #ifdef H5
|
|
215
|
+
window.addEventListener('mousemove', onResizeMove);
|
|
216
|
+
window.addEventListener('mouseup', onResizeEnd);
|
|
217
|
+
// #endif
|
|
218
|
+
});
|
|
53
219
|
|
|
220
|
+
// #ifdef H5
|
|
221
|
+
import { onUnmounted } from 'vue';
|
|
222
|
+
onUnmounted(() => {
|
|
223
|
+
window.removeEventListener('mousemove', onResizeMove);
|
|
224
|
+
window.removeEventListener('mouseup', onResizeEnd);
|
|
225
|
+
});
|
|
226
|
+
// #endif
|
|
227
|
+
|
|
228
|
+
const containerRect = { top: 0, height: 0 };
|
|
229
|
+
|
|
230
|
+
function onResizeStart(_e: TouchEvent | MouseEvent) {
|
|
231
|
+
isResizing.value = true;
|
|
232
|
+
// 缓存容器位置信息
|
|
233
|
+
const query = uni.createSelectorQuery().in(rootInstance?.proxy);
|
|
234
|
+
query
|
|
235
|
+
.select('#instance-detail-container')
|
|
236
|
+
.boundingClientRect((data) => {
|
|
237
|
+
if (data) {
|
|
238
|
+
containerRect.top = (data as any).top;
|
|
239
|
+
containerRect.height = (data as any).height;
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
.exec();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function onResizeMove(e: TouchEvent | MouseEvent) {
|
|
246
|
+
if (!isResizing.value) return;
|
|
247
|
+
|
|
248
|
+
e.stopPropagation();
|
|
249
|
+
e.preventDefault();
|
|
250
|
+
|
|
251
|
+
const clientY = (e as TouchEvent).touches
|
|
252
|
+
? (e as TouchEvent).touches[0].clientY
|
|
253
|
+
: (e as MouseEvent).clientY;
|
|
254
|
+
|
|
255
|
+
// 使用缓存的容器位置
|
|
256
|
+
if (containerRect.height > 0) {
|
|
257
|
+
const relativeY = clientY - containerRect.top - 36;
|
|
258
|
+
const availableHeight = containerRect.height - 36;
|
|
259
|
+
|
|
260
|
+
const newPercent = (relativeY / availableHeight) * 100;
|
|
261
|
+
|
|
262
|
+
// 边界约束:15% - 85%
|
|
263
|
+
if (newPercent >= 15 && newPercent <= 85) {
|
|
264
|
+
topHeightPercent.value = newPercent;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function onResizeEnd() {
|
|
270
|
+
isResizing.value = false;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function refreshRoot() {
|
|
54
274
|
setTimeout(() => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
275
|
+
if (rootInstance?.root) {
|
|
276
|
+
// components 为 null 是正常的,只需保证 rootInstance.root 本身存在即可
|
|
277
|
+
// 使用 markRaw 防止深层响应式遍历,这对于大型组件树至关重要
|
|
278
|
+
showTree.value = true;
|
|
279
|
+
instanceRoot.value = rootInstance.root
|
|
280
|
+
? markRaw(rootInstance.root)
|
|
281
|
+
: null;
|
|
282
|
+
} else {
|
|
283
|
+
status.value = 'noInfo';
|
|
284
|
+
showTree.value = false;
|
|
58
285
|
}
|
|
59
|
-
},
|
|
60
|
-
}
|
|
286
|
+
}, 500);
|
|
287
|
+
}
|
|
61
288
|
|
|
62
289
|
function onRefresh() {
|
|
63
290
|
instanceRoot.value = null;
|
|
64
|
-
|
|
291
|
+
status.value = 'getting';
|
|
292
|
+
selectedNodeData.value = null;
|
|
65
293
|
nextTick(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
294
|
+
refreshRoot();
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function onNodeSelect(node: any) {
|
|
299
|
+
if (!node) {
|
|
300
|
+
selectedNodeData.value = null;
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// 解析 style 字符串为对象,以便 JsonPretty 更好展示
|
|
305
|
+
const rawStyles = node.styles || {};
|
|
306
|
+
const formattedStyles: any = {};
|
|
307
|
+
|
|
308
|
+
Object.keys(rawStyles).forEach((key) => {
|
|
309
|
+
if (key === 'style' && typeof rawStyles[key] === 'string') {
|
|
310
|
+
// 将 style 字符串 ("color: red; font-size: 12px") 解析为对象
|
|
311
|
+
const parts = rawStyles[key].split(';');
|
|
312
|
+
parts.forEach((item: string) => {
|
|
313
|
+
const [k, v] = item.split(':').map((s) => s.trim());
|
|
314
|
+
if (k && v) {
|
|
315
|
+
formattedStyles[k] = v;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
} else if (key !== 'style') {
|
|
319
|
+
// id 等保留
|
|
320
|
+
formattedStyles[key] = rawStyles[key];
|
|
69
321
|
}
|
|
70
322
|
});
|
|
323
|
+
|
|
324
|
+
selectedNodeData.value = {
|
|
325
|
+
props: node.props || {},
|
|
326
|
+
styles: formattedStyles,
|
|
327
|
+
uid: node.uid,
|
|
328
|
+
type: node.type,
|
|
329
|
+
other: node.other || {},
|
|
330
|
+
provides: node.provides || {},
|
|
331
|
+
data: node.data || {},
|
|
332
|
+
functions: node.functions || {},
|
|
333
|
+
emits: node.emits || {},
|
|
334
|
+
};
|
|
71
335
|
}
|
|
336
|
+
|
|
337
|
+
const jsonPrettyHeight = computed(() => {
|
|
338
|
+
const totalBodyHeight = _props.contentHeight - 32; // control bar
|
|
339
|
+
const resizerHeight = 10; // CSS height
|
|
340
|
+
const availableHeight = totalBodyHeight - resizerHeight;
|
|
341
|
+
const bottomHeight = availableHeight * ((100 - topHeightPercent.value) / 100);
|
|
342
|
+
const tabsHeight = 32; // CSS height (border-box)
|
|
343
|
+
// padding-top + padding-bottom = 24px
|
|
344
|
+
const padding = 24;
|
|
345
|
+
return Math.max(0, Math.floor(bottomHeight - tabsHeight - padding));
|
|
346
|
+
});
|
|
72
347
|
</script>
|
|
348
|
+
|
|
73
349
|
<style scoped>
|
|
74
350
|
.instance-detail {
|
|
75
|
-
|
|
76
|
-
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
width: 100%;
|
|
77
354
|
height: 100%;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
355
|
+
background-color: var(--dev-tool-bg-color);
|
|
356
|
+
box-sizing: border-box;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.instance-detail-control {
|
|
360
|
+
display: flex;
|
|
361
|
+
align-items: center;
|
|
81
362
|
padding: 0 16px;
|
|
363
|
+
height: 32px;
|
|
364
|
+
flex-shrink: 0;
|
|
365
|
+
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
366
|
+
background-color: var(--dev-tool-bg2-color);
|
|
367
|
+
box-sizing: border-box;
|
|
368
|
+
}
|
|
82
369
|
|
|
83
|
-
|
|
370
|
+
.instance-detail-body {
|
|
371
|
+
display: flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
flex: 1;
|
|
374
|
+
overflow: hidden;
|
|
375
|
+
}
|
|
84
376
|
|
|
85
|
-
|
|
377
|
+
.instance-detail-top {
|
|
378
|
+
min-height: 50px;
|
|
379
|
+
padding: 8px 0;
|
|
380
|
+
overflow: hidden;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.instance-detail-resizer {
|
|
384
|
+
height: 10px;
|
|
385
|
+
flex-shrink: 0;
|
|
386
|
+
background-color: var(--dev-tool-bg3-color);
|
|
387
|
+
border-top: 1px solid var(--dev-tool-border-color);
|
|
388
|
+
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
389
|
+
display: flex;
|
|
390
|
+
align-items: center;
|
|
391
|
+
justify-content: center;
|
|
392
|
+
cursor: row-resize;
|
|
393
|
+
position: relative;
|
|
394
|
+
z-index: 10;
|
|
86
395
|
box-sizing: border-box;
|
|
87
396
|
}
|
|
88
|
-
|
|
397
|
+
|
|
398
|
+
.resizer-handle {
|
|
399
|
+
width: 30px;
|
|
400
|
+
height: 2px;
|
|
401
|
+
background-color: var(--dev-tool-border-color);
|
|
402
|
+
border-radius: 1px;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.instance-detail-bottom {
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
background-color: var(--dev-tool-bg2-color);
|
|
409
|
+
min-height: 50px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.instance-detail-tabs-wrapper {
|
|
413
|
+
height: 32px;
|
|
414
|
+
background-color: var(--dev-tool-bg3-color);
|
|
415
|
+
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
416
|
+
box-sizing: border-box;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.instance-detail-tabs-scroll {
|
|
420
|
+
width: 100%;
|
|
421
|
+
white-space: nowrap;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.instance-detail-tabs {
|
|
89
425
|
display: flex;
|
|
426
|
+
height: 32px;
|
|
90
427
|
align-items: center;
|
|
91
|
-
|
|
428
|
+
padding: 0 8px;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.instance-detail-tab-item {
|
|
432
|
+
padding: 0 12px;
|
|
92
433
|
height: 32px;
|
|
93
|
-
|
|
434
|
+
line-height: 32px;
|
|
435
|
+
font-size: 12px;
|
|
436
|
+
color: var(--dev-tool-text-color-secondary);
|
|
437
|
+
cursor: pointer;
|
|
438
|
+
position: relative;
|
|
439
|
+
transition: color 0.2s;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.instance-detail-tab-item.active {
|
|
443
|
+
color: var(--dev-tool-main-color);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.instance-detail-tab-item.active::after {
|
|
447
|
+
content: '';
|
|
448
|
+
position: absolute;
|
|
449
|
+
bottom: 0;
|
|
450
|
+
left: 12px;
|
|
451
|
+
right: 12px;
|
|
452
|
+
height: 1px;
|
|
453
|
+
background-color: var(--dev-tool-main-color);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.instance-detail-props-scroll {
|
|
457
|
+
flex: 1;
|
|
458
|
+
overflow: hidden;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.instance-detail-props-content {
|
|
462
|
+
padding: 0 16px;
|
|
94
463
|
box-sizing: border-box;
|
|
95
464
|
}
|
|
465
|
+
|
|
466
|
+
.other-info {
|
|
467
|
+
display: flex;
|
|
468
|
+
flex-direction: column;
|
|
469
|
+
gap: 8px;
|
|
470
|
+
font-size: 12px;
|
|
471
|
+
color: var(--dev-tool-text-color);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.instance-detail-props-empty {
|
|
475
|
+
display: flex;
|
|
476
|
+
align-items: center;
|
|
477
|
+
justify-content: center;
|
|
478
|
+
flex: 1;
|
|
479
|
+
height: 100%;
|
|
480
|
+
min-height: 100px;
|
|
481
|
+
font-size: 12px;
|
|
482
|
+
color: var(--dev-tool-text-color-secondary);
|
|
483
|
+
font-style: italic;
|
|
484
|
+
}
|
|
96
485
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="json-view" :style="customStyle">
|
|
3
3
|
<view class="json-view-control">
|
|
4
|
-
<DevToolTitle>{{ data?.title ?? '
|
|
4
|
+
<DevToolTitle>{{ data?.title ?? t('common.jsonDetail') }}</DevToolTitle>
|
|
5
5
|
<CircularButton
|
|
6
6
|
style="margin-left: auto"
|
|
7
7
|
text="×"
|
|
@@ -23,12 +23,17 @@ import DevToolTitle from '../DevToolTitle/index.vue';
|
|
|
23
23
|
import CircularButton from '../CircularButton/index.vue';
|
|
24
24
|
import JsonPretty from '../JsonPretty/index.vue';
|
|
25
25
|
import type { DevTool } from '../../type';
|
|
26
|
+
import { useI18n } from '../../i18n';
|
|
26
27
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const { t } = useI18n();
|
|
29
|
+
|
|
30
|
+
const _props = defineProps<{
|
|
31
|
+
data?:
|
|
32
|
+
| {
|
|
33
|
+
title?: string;
|
|
34
|
+
data?: Record<string, any>;
|
|
35
|
+
}
|
|
36
|
+
| undefined;
|
|
32
37
|
zIndex?: number;
|
|
33
38
|
interceptNetworkList?: DevTool.NetworkItem[];
|
|
34
39
|
customStyle?: Record<string, any>;
|
|
@@ -49,12 +54,11 @@ const emit = defineEmits<{
|
|
|
49
54
|
top: 0;
|
|
50
55
|
left: 0;
|
|
51
56
|
padding: 0 16px;
|
|
52
|
-
|
|
53
57
|
overflow: auto;
|
|
54
|
-
|
|
55
58
|
background-color: var(--dev-tool-bg3-color);
|
|
56
59
|
box-sizing: border-box;
|
|
57
60
|
}
|
|
61
|
+
|
|
58
62
|
.json-view-control {
|
|
59
63
|
display: flex;
|
|
60
64
|
align-items: center;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
3
|
:class="`json-pretty-check-controller ${model ? 'is-checked' : ''}`"
|
|
4
|
-
@click="onClick"
|
|
5
|
-
>
|
|
4
|
+
@click="onClick">
|
|
6
5
|
<!-- <view
|
|
7
6
|
:class="`json-pretty-check-controller-inner is-${uiType}`"
|
|
8
7
|
@click="onChange"
|
|
@@ -18,20 +17,27 @@
|
|
|
18
17
|
<checkbox
|
|
19
18
|
v-if="uiType === 'checkbox'"
|
|
20
19
|
:checked="model"
|
|
20
|
+
:color="themeColor"
|
|
21
21
|
style="transform: scale(0.6)"
|
|
22
|
-
@change="onChange"
|
|
23
|
-
/>
|
|
22
|
+
@change="onChange" />
|
|
24
23
|
<radio
|
|
25
24
|
v-if="uiType === 'radio'"
|
|
26
25
|
:checked="model"
|
|
26
|
+
:color="themeColor"
|
|
27
27
|
style="transform: scale(0.6)"
|
|
28
|
-
@change="onChange"
|
|
29
|
-
/>
|
|
28
|
+
@change="onChange" />
|
|
30
29
|
</view>
|
|
31
30
|
</template>
|
|
32
31
|
<script lang="ts" setup>
|
|
33
32
|
import { computed } from 'vue';
|
|
34
|
-
|
|
33
|
+
import { getThemeMainColor } from '../../../styles/theme';
|
|
34
|
+
const props = defineProps<{
|
|
35
|
+
theme?: string;
|
|
36
|
+
checked: boolean;
|
|
37
|
+
isMultiple: boolean;
|
|
38
|
+
}>();
|
|
39
|
+
|
|
40
|
+
const themeColor = computed(() => getThemeMainColor(props.theme));
|
|
35
41
|
const emit = defineEmits<{
|
|
36
42
|
(e: 'change', value: boolean): void;
|
|
37
43
|
(e: 'update:modelValue', value: boolean): void;
|
|
@@ -57,18 +63,22 @@ function onClick(e: MouseEvent) {
|
|
|
57
63
|
position: absolute;
|
|
58
64
|
left: 0;
|
|
59
65
|
}
|
|
66
|
+
|
|
60
67
|
.json-pretty-check-controller.is-checked .json-pretty-check-controller-inner {
|
|
61
68
|
background-color: var(--json-pretty-color-primary);
|
|
62
69
|
border-color: var(--json-pretty-color-primary);
|
|
63
70
|
}
|
|
71
|
+
|
|
64
72
|
.json-pretty-check-controller.is-checked
|
|
65
|
-
.json-pretty-check-controller-inner.is-checkbox
|
|
73
|
+
.json-pretty-check-controller-inner.is-checkbox::after {
|
|
66
74
|
transform: rotate(45deg) scaleY(1);
|
|
67
75
|
}
|
|
76
|
+
|
|
68
77
|
.json-pretty-check-controller.is-checked
|
|
69
|
-
.json-pretty-check-controller-inner.is-radio
|
|
78
|
+
.json-pretty-check-controller-inner.is-radio::after {
|
|
70
79
|
transform: translate(-50%, -50%) scale(1);
|
|
71
80
|
}
|
|
81
|
+
|
|
72
82
|
.json-pretty-check-controller .json-pretty-check-controller-inner {
|
|
73
83
|
display: inline-block;
|
|
74
84
|
position: relative;
|
|
@@ -85,7 +95,8 @@ function onClick(e: MouseEvent) {
|
|
|
85
95
|
border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
|
|
86
96
|
background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
|
87
97
|
}
|
|
88
|
-
|
|
98
|
+
|
|
99
|
+
.json-pretty-check-controller .json-pretty-check-controller-inner::after {
|
|
89
100
|
box-sizing: content-box;
|
|
90
101
|
content: '';
|
|
91
102
|
border: 2px solid #fff;
|
|
@@ -100,26 +111,26 @@ function onClick(e: MouseEvent) {
|
|
|
100
111
|
transition: transform 0.15s cubic-bezier(0.71, -0.46, 0.88, 0.6) 0.05s;
|
|
101
112
|
transform-origin: center;
|
|
102
113
|
}
|
|
114
|
+
|
|
103
115
|
.json-pretty-check-controller .json-pretty-check-controller-inner.is-radio {
|
|
104
116
|
border-radius: 100%;
|
|
105
117
|
}
|
|
118
|
+
|
|
106
119
|
.json-pretty-check-controller
|
|
107
|
-
.json-pretty-check-controller-inner.is-radio
|
|
120
|
+
.json-pretty-check-controller-inner.is-radio::after {
|
|
108
121
|
border-radius: 100%;
|
|
109
122
|
height: 4px;
|
|
110
123
|
background-color: #fff;
|
|
111
124
|
left: 50%;
|
|
112
125
|
top: 50%;
|
|
113
126
|
}
|
|
127
|
+
|
|
114
128
|
.json-pretty-check-controller .json-pretty-check-controller-original {
|
|
115
129
|
opacity: 0;
|
|
116
130
|
outline: none;
|
|
117
131
|
position: absolute;
|
|
118
132
|
z-index: -1;
|
|
119
|
-
|
|
120
|
-
left: 0;
|
|
121
|
-
right: 0;
|
|
122
|
-
bottom: 0;
|
|
133
|
+
inset: 0;
|
|
123
134
|
margin: 0;
|
|
124
135
|
}
|
|
125
136
|
</style>
|