vscode扩展代码,将dist文件放入目录,资源连接过后,即可在vscode中运行查看

This commit is contained in:
xlmessage 2025-02-14 10:52:29 +08:00
commit b3f555c4e5
48 changed files with 4104 additions and 0 deletions

5
.gitignore vendored Normal file

@ -0,0 +1,5 @@
out
dist
node_modules
.vscode-test/
*.vsix

5
.vscode-test.mjs Normal file

@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';
export default defineConfig({
files: 'out/test/**/*.test.js',
});

8
.vscode/extensions.json vendored Normal file

@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}

21
.vscode/launch.json vendored Normal file

@ -0,0 +1,21 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}

12
.vscode/settings.json vendored Normal file

@ -0,0 +1,12 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"liveServer.settings.port": 5501
}

20
.vscode/tasks.json vendored Normal file

@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

11
.vscodeignore Normal file

@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*

9
CHANGELOG.md Normal file

@ -0,0 +1,9 @@
# Change Log
All notable changes to the "theend" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release

71
README.md Normal file

@ -0,0 +1,71 @@
# theend README
This is the README for your extension "theend". After writing up a brief description, we recommend including the following sections.
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
---
## Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
## Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
## For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**

@ -0,0 +1 @@
.box[data-v-1c409f96]{width:100%;height:100%;display:flex;flex-direction:column;background-color:var(--my-common-bgc-2)!important}.chartsinfo[data-v-1c409f96]{min-height:calc(100vh - 52px);box-sizing:border-box}.typelist[data-v-1c409f96]{margin-top:auto;position:relative;z-index:99;width:100%;background-color:var(--my-common-bgc-2)!important;color:var(--my-common-fc-1);font-size:12px;display:flex;list-style:none;padding:0}.typelist>li[data-v-1c409f96]{padding:2px 8px;cursor:pointer}.typelist>li[data-v-1c409f96]:hover{color:gold}.active[data-v-1c409f96]{color:#2d98b9}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
.box[data-v-9bf0c95e]{width:100%;height:100%;display:flex;flex-direction:column;background-color:var(--my-common-bgc-2)!important}.chartsinfo[data-v-9bf0c95e]{height:100%;min-height:calc(100vh - 52px);box-sizing:border-box;display:flex;flex-direction:column}.newk[data-v-9bf0c95e]{flex:2;border-bottom:1px solid rgb(190,187,187)}.newd[data-v-9bf0c95e]{flex:2;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}.typelist[data-v-9bf0c95e]{margin-top:auto;position:relative;z-index:99;width:100%;background-color:var(--my-common-bgc-2)!important;color:var(--my-common-fc-1);font-size:12px;display:flex;list-style:none;padding:0}.typelist>li[data-v-9bf0c95e]{padding:2px 8px;cursor:pointer}.typelist>li[data-v-9bf0c95e]:hover{color:gold}.active[data-v-9bf0c95e]{color:#2d98b9}

@ -0,0 +1 @@
import{_ as t}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as o,d as s,b as a}from"./index-BO9WyeNZ.js";const c={},d={class:"con"};function r(n,e){return a(),o("div",d,e[0]||(e[0]=[s("div",{class:"nodata"},[s("div",{class:"text"},"当前股票没有数据!")],-1)]))}const f=t(c,[["render",r],["__scopeId","data-v-c4240df7"]]);export{f as default};

@ -0,0 +1 @@
.con[data-v-c4240df7]{width:100%;height:100%;background-color:var(--my-common-bgc-2)}.nodata[data-v-c4240df7]{min-height:calc(100vh - 50px);display:flex;flex-direction:column;justify-content:center;align-items:center}.text[data-v-c4240df7]{font-size:30px;font-weight:700;-webkit-text-stroke:1px var(--my-common-fc-1);-webkit-text-fill-color:transparent}

@ -0,0 +1 @@
.content[data-v-0d3f4bd5]{height:100vh;display:flex;flex-direction:column;box-sizing:border-box}.timelist[data-v-0d3f4bd5]{background-color:var(--my-common-bgc-2)!important;color:var(--my-common-fc-1);font-size:13px;display:flex;list-style:none;border-bottom:1px solid rgb(175,173,173);box-sizing:border-box;margin:0;padding:2px 0}.timelist>li[data-v-0d3f4bd5]{padding:0 8px;cursor:pointer}.timelist>li[data-v-0d3f4bd5]:nth-child(6){margin-left:auto}.active[data-v-0d3f4bd5]{color:#2d98b9}.view[data-v-0d3f4bd5]{height:calc(100vh - 27px)}[data-v-0d3f4bd5]::-webkit-scrollbar{width:0}.container[data-v-afa4aec4]{width:100vw;height:100vh;display:flex}.box[data-v-afa4aec4]{width:300px;height:100vh;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;background-color:var(--my-common-bgc-2);position:relative;border-right:1px solid var(--my-light-br-1)}.shape[data-v-afa4aec4]{flex:1;height:100vh}iframe[data-v-afa4aec4]{width:100%;height:100%}.head[data-v-afa4aec4]{background-color:var(--my-common-bgc-2);color:var(--my-common-bgc-1);display:flex;justify-content:space-around;align-items:center;padding:2px 0 0 12px;position:sticky;top:0;z-index:999}.item[data-v-afa4aec4]{font-size:13px;width:52px;text-align:center;cursor:pointer}.all[data-v-afa4aec4]{display:flex;align-items:center;font-size:13px;padding:10px 12px;box-sizing:border-box;position:sticky;top:17px;z-index:99;color:var(--my-common-bgc-1);background-color:var(--my-common-bgc-2)}.showchange[data-v-afa4aec4]{flex:1;cursor:pointer}.onedialog[data-v-afa4aec4]{display:flex;height:376px;padding:10px;overflow:auto}.onecontitle[data-v-afa4aec4]{font-size:13px;font-weight:550;position:sticky;top:0;z-index:999;background-color:#fff}.onestocks[data-v-afa4aec4]{margin-top:10px;font-size:12px;background-color:#ececec;border-radius:5px;cursor:pointer}.oneadd[data-v-afa4aec4]{display:flex;justify-content:center;padding:10px 0}.one-item-name[data-v-afa4aec4]{padding:5px 10px;background-color:#e7ebf3}.one-item[data-v-afa4aec4]{padding:5px 10px;display:flex;align-items:center}.one-items[data-v-afa4aec4]{height:277px;overflow:auto}.oneconleft[data-v-afa4aec4]{flex:2;min-width:158px;box-sizing:border-box;padding-right:10px;height:376px;overflow:auto;position:relative}.oneconcenter[data-v-afa4aec4]{flex:3;max-width:320px;padding:0 10px;border-left:2px solid #ececec;box-sizing:border-box;height:376px;overflow:hidden;position:relative}.onetable[data-v-afa4aec4]{font-size:12px;margin-top:10px;box-sizing:border-box}.oneconright[data-v-afa4aec4]{flex:2;box-sizing:border-box;padding-left:10px;position:relative}.add[data-v-afa4aec4]{margin-top:10px;width:100%;max-width:300px;box-sizing:border-box}.addtext[data-v-afa4aec4]{padding:10px 20px}.addtext>div[data-v-afa4aec4]{margin-bottom:20px}.listedit[data-v-afa4aec4]{font-size:13px;font-weight:550;margin-top:10px}.listedit>div[data-v-afa4aec4]{margin-bottom:10px}.stock[data-v-afa4aec4]{flex:1;display:flex;justify-content:space-around;align-items:center;margin-bottom:5px;cursor:pointer}[data-v-afa4aec4] .el-collapse-item__header{background-color:var(--my-common-bgc-2)!important;color:var(--my-common-bgc-1)}.stock1[data-v-afa4aec4]{flex:1;display:flex;align-items:center;margin-bottom:5px;cursor:pointer}.stock2[data-v-afa4aec4]{flex:1;display:flex;justify-content:left;align-items:center;margin-bottom:5px;cursor:pointer}.stockname[data-v-afa4aec4]{width:52px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upcolor[data-v-afa4aec4]{color:#cc2a2a}.stockchangeup[data-v-afa4aec4]{color:#cc2a2a;background-color:#ff00001f;border-radius:4px;width:50px;text-align:center}.downcolor[data-v-afa4aec4]{color:#50a548}.stockchangedown[data-v-afa4aec4]{color:#50a548;background-color:#3cff001f;border-radius:4px;width:50px;text-align:center}[data-v-afa4aec4] .el-collapse-item__content{padding-bottom:0;max-height:250px;overflow-y:auto;background-color:var(--my-common-bgc-2)!important;color:var(--my-common-fc-1)}[data-v-afa4aec4] .el-collapse-item__content::-webkit-scrollbar{width:0!important}[data-v-afa4aec4] .demo-collapse{padding-left:12px}.fixed[data-v-afa4aec4]{outline:none;border:none;background-color:transparent;font-size:12px;color:#585757;cursor:pointer}.isfixed[data-v-afa4aec4]{border:none;outline:1px solid rgb(131,200,218);font-size:12px}[data-v-afa4aec4]::-webkit-scrollbar{width:0}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};

@ -0,0 +1 @@
function x(a,o){if(a.length<o)return null;let i=[];for(let u=0;u<=a.length-o;u++){let l=0;for(let t=0;t<o;t++)l+=a[u+t];i.push(l/o)}return i=i.map(u=>parseFloat(u.toFixed(2))),i}function M(a){if(a.length===0)throw new Error("价格数组不能为空");const o=a.reduce((t,h)=>t+h,0)/a.length,u=a.reduce((t,h)=>t+Math.pow(h-o,2),0)/(a.length-1);return parseFloat(Math.sqrt(u).toFixed(2))}function j(a,o=12,i=26,u=9){function l(s,r){let c=[],m=2/(r+1),g=0;for(let p=0;p<r;p++)g+=s[p];let F=g/r;c.push(F);for(let p=r;p<s.length;p++){let d=(s[p]-F)*m+F;c.push(d),F=d}return c}let t=l(a,o),h=l(a,i),n=[];for(let s=0;s<Math.min(t.length,h.length);s++)n.push(t[s]-h[s]);let e=l(n,u),f=[];for(let s=0;s<Math.min(n.length,e.length);s++)f.push((n[s]-e[s])*2);return n=n.map(s=>parseFloat(s.toFixed(2))),e=e.map(s=>parseFloat(s.toFixed(2))),f=f.map(s=>parseFloat(s.toFixed(2))),{dif:n,dea:e,macd:f}}function v(a){let o=[];const i=Object.keys(a.date);for(let u of i){const l=parseInt(u,10),t=[a.date[l],a.low[l],a.high[l],a.close[l]];o.push(t)}return o}function w(a){a=v(a);let o=[],i=[],u=[];a.forEach(e=>{o.push(e[1]),i.push(e[2]),u.push(e[3])});let l=[],t=[],h=[],n=9;for(let e=0;e<u.length;e++){if(e<n-1){l.push(10),t.push(10),h.push(10);continue}let f=Math.min(...o.slice(e-n+1,e+1)),s=Math.max(...i.slice(e-n+1,e+1)),r=(u[e]-f)/(s-f)*100;if(e===n-1)l.push(r),t.push(r);else{let m=.6666666666666666*l[e-1]+.3333333333333333*r;l.push(m);let g=2/3*t[e-1]+1/3*m;t.push(g)}let c=3*l[e]-2*t[e];h.push(c)}return l=l.map(e=>parseFloat(e.toFixed(2))),t=t.map(e=>parseFloat(e.toFixed(2))),h=h.map(e=>parseFloat(e.toFixed(2))),{kValues:l,dValues:t,jValues:h}}function A(a,o=6){let i=[],u=[],l=[];for(let t=0;t<a.length;t++){if(t===0)i.push(0),u.push(0);else{let h=a[t]-a[t-1];h>0?(i.push(h),u.push(0)):(i.push(0),u.push(Math.abs(h)))}if(t>=o-1){let h=0,n=0;for(let r=t-(o-1);r<=t;r++)h+=i[r],n+=u[r];let e=h/o,f=n/o,s=e/f;l.push(100-100/(1+s))}}return l=l.map(t=>parseFloat(t.toFixed(2))),l}function E(a,o,i){let u=[],l=Object.values(a),t=Object.values(o),h=Object.values(i);for(let n=0;n<l.length;n++){let e=(t[n]+h[n])/2;u.push({value:l[n],itemStyle:{color:l[n]>=e?"#FF0000":"#00FF00"}})}return u}export{M as a,j as b,x as c,E as d,w as e,A as f};

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

BIN
dist8/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

22
dist8/index.html Normal file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<link rel="icon" href="./favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<style>
body{
margin: 0;
padding: 0;
overflow: hidden;
background-color: var(--my-common-bgc-2);
}
</style>
<script type="module" crossorigin src="./assets/index-BO9WyeNZ.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Cj3DiBUD.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

28
eslint.config.mjs Normal file

@ -0,0 +1,28 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [{
files: ["**/*.ts"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],
curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
},
}];

3486
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

58
package.json Normal file

@ -0,0 +1,58 @@
{
"name": "my-extension",
"displayName": "My Extension",
"description": "A sample extension to open a full-screen webview.",
"version": "1.0.0",
"publisher": "your-publisher-name",
"engines": {
"vscode": "^1.96.0"
},
"activationEvents": [
"onCommand:myExtension.openWebview"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "myExtension.openWebview",
"title": "Open Full-Screen Webview"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "myExtension",
"title": "My Extension",
"icon": "resources/kline.svg"
}
]
},
"views": {
"myExtension": [
{
"id": "myExtensionView",
"name": "My Extension"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test"
},
"devDependencies": {
"@types/vscode": "^1.96.0",
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"eslint": "^9.16.0",
"typescript": "^5.7.2",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1"
}
}

BIN
resources/dark/next.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

1
resources/dark/next.svg Normal file

@ -0,0 +1 @@
<svg t="1597223342042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7041" width="32" height="32"><path d="M758.528 512L384 886.528l-60.330667-60.330667 313.984-314.453333-310.954666-310.912L386.986667 140.501333z" p-id="7042"></path></svg>

After

Width:  |  Height:  |  Size: 286 B

BIN
resources/dark/prev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

1
resources/dark/prev.svg Normal file

@ -0,0 +1 @@
<svg t="1597223402918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7848" width="32" height="32"><path d="M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z" p-id="7849"></path></svg>

After

Width:  |  Height:  |  Size: 763 B

1
resources/delete.svg Normal file

@ -0,0 +1 @@
<svg t="1735093655956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3252" width="24" height="24"><path d="M202.666667 256h-42.666667a32 32 0 0 1 0-64h704a32 32 0 0 1 0 64H266.666667v565.333333a53.333333 53.333333 0 0 0 53.333333 53.333334h384a53.333333 53.333333 0 0 0 53.333333-53.333334V352a32 32 0 0 1 64 0v469.333333c0 64.8-52.533333 117.333333-117.333333 117.333334H320c-64.8 0-117.333333-52.533333-117.333333-117.333334V256z m224-106.666667a32 32 0 0 1 0-64h170.666666a32 32 0 0 1 0 64H426.666667z m-32 288a32 32 0 0 1 64 0v256a32 32 0 0 1-64 0V437.333333z m170.666666 0a32 32 0 0 1 64 0v256a32 32 0 0 1-64 0V437.333333z" fill="#2c2c2c" p-id="3253"></path></svg>

After

Width:  |  Height:  |  Size: 715 B

1
resources/deletea.svg Normal file

@ -0,0 +1 @@
<svg t="1735093655956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3252" width="24" height="24"><path d="M202.666667 256h-42.666667a32 32 0 0 1 0-64h704a32 32 0 0 1 0 64H266.666667v565.333333a53.333333 53.333333 0 0 0 53.333333 53.333334h384a53.333333 53.333333 0 0 0 53.333333-53.333334V352a32 32 0 0 1 64 0v469.333333c0 64.8-52.533333 117.333333-117.333333 117.333334H320c-64.8 0-117.333333-52.533333-117.333333-117.333334V256z m224-106.666667a32 32 0 0 1 0-64h170.666666a32 32 0 0 1 0 64H426.666667z m-32 288a32 32 0 0 1 64 0v256a32 32 0 0 1-64 0V437.333333z m170.666666 0a32 32 0 0 1 64 0v256a32 32 0 0 1-64 0V437.333333z" fill="#ffffff" p-id="3253"></path></svg>

After

Width:  |  Height:  |  Size: 715 B

1
resources/down.svg Normal file

@ -0,0 +1 @@
<svg t="1731316372156" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1311" width="128" height="128"><path d="M533.333333 298.666667v426.666666a21.333333 21.333333 0 0 1-42.666666 0V298.666667a21.333333 21.333333 0 0 1 42.666666 0z" p-id="1312" fill="#d81e06"></path><path d="M746.666667 512a20.053333 20.053333 0 0 1-6.4 14.933333l-213.333334 213.333334a20.48 20.48 0 0 1-29.866666 0 20.48 20.48 0 0 1 0-29.866667l213.333333-213.333333a21.333333 21.333333 0 0 1 36.266667 14.933333z" p-id="1313" fill="#d81e06"></path><path d="M533.333333 725.333333a21.333333 21.333333 0 0 1-36.266666 14.933334l-213.333334-213.333334a20.48 20.48 0 0 1 0-29.866666 20.48 20.48 0 0 1 29.866667 0l213.333333 213.333333a20.053333 20.053333 0 0 1 6.4 14.933333z" p-id="1314" fill="#d81e06"></path></svg>

After

Width:  |  Height:  |  Size: 829 B

1
resources/edit.svg Normal file

@ -0,0 +1 @@
<svg t="1735093580523" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2898" width="24" height="24"><path d="M862.709333 116.042667a32 32 0 1 1 45.248 45.248L455.445333 613.813333a32 32 0 1 1-45.258666-45.258666L862.709333 116.053333zM853.333333 448a32 32 0 0 1 64 0v352c0 64.8-52.533333 117.333333-117.333333 117.333333H224c-64.8 0-117.333333-52.533333-117.333333-117.333333V224c0-64.8 52.533333-117.333333 117.333333-117.333333h341.333333a32 32 0 0 1 0 64H224a53.333333 53.333333 0 0 0-53.333333 53.333333v576a53.333333 53.333333 0 0 0 53.333333 53.333333h576a53.333333 53.333333 0 0 0 53.333333-53.333333V448z" fill="#2c2c2c" p-id="2899"></path></svg>

After

Width:  |  Height:  |  Size: 698 B

1
resources/edita.svg Normal file

@ -0,0 +1 @@
<svg t="1735093828388" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3558" width="24" height="24"><path d="M862.709333 116.042667a32 32 0 1 1 45.248 45.248L455.445333 613.813333a32 32 0 1 1-45.258666-45.258666L862.709333 116.053333zM853.333333 448a32 32 0 0 1 64 0v352c0 64.8-52.533333 117.333333-117.333333 117.333333H224c-64.8 0-117.333333-52.533333-117.333333-117.333333V224c0-64.8 52.533333-117.333333 117.333333-117.333333h341.333333a32 32 0 0 1 0 64H224a53.333333 53.333333 0 0 0-53.333333 53.333333v576a53.333333 53.333333 0 0 0 53.333333 53.333333h576a53.333333 53.333333 0 0 0 53.333333-53.333333V448z" fill="#ffffff" p-id="3559"></path></svg>

After

Width:  |  Height:  |  Size: 698 B

1
resources/kline.svg Normal file

@ -0,0 +1 @@
<svg t="1734941977727" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5443" width="24" height="24"><path d="M713.6 407.3l-110.4-16.1c-1.6-0.2-3.1-1.3-3.8-2.8l-49.3-100.3c-7.1-14.3-21.4-23.2-37.3-23.2s-30.2 8.9-37.2 23.2l-49.3 100.3c-0.8 1.5-2.2 2.6-3.9 2.8L312 407.3c-15.7 2.3-28.6 13.2-33.5 28.3-4.9 15.2-0.9 31.6 10.5 42.7l79.8 78c1.2 1.2 1.8 2.9 1.5 4.6l-18.9 110.2c-2.1 12.2 1.2 24.5 9.1 33.8 12.4 14.7 34.1 19.1 51.2 10.1l98.7-52c1.4-0.8 3.2-0.8 4.7 0l98.7 52c6.1 3.2 12.6 4.8 19.3 4.8 12.3 0 23.9-5.4 31.8-14.9 7.9-9.3 11.2-21.7 9.1-33.8l-18.8-110.2c-0.3-1.7 0.3-3.4 1.5-4.6l79.9-78c11.4-11.2 15.4-27.5 10.5-42.7-4.9-15.2-17.8-26-33.5-28.3z m-2.3 44.9l-79.9 78c-9.8 9.6-14.2 23.3-11.9 36.8l18.8 110.2c0.2 1.6-0.1 3-1.1 4.2-1.6 1.9-4.1 2.5-6.4 1.3l-98.7-52c-6-3.1-12.7-4.8-19.4-4.8s-13.4 1.7-19.2 4.9l-98.7 52c-2.3 1.3-4.8 0.6-6.4-1.3-1-1.2-1.4-2.6-1.1-4.2l18.9-110.2c2.3-13.5-2.1-27.2-11.9-36.8l-79.8-78c-1.9-1.9-1.8-4-1.3-5.4 0.4-1.4 1.5-3.1 4.1-3.5l110.3-16.1c13.6-2 25.3-10.5 31.3-22.8l49.3-100.3c2.3-4.8 6.9-4.7 9.2 0l49.3 100.2c6.1 12.3 17.8 20.8 31.3 22.8l110.4 16.1c2.7 0.4 3.7 2.1 4.2 3.5s0.6 3.5-1.3 5.4z" p-id="5444" fill="#707070"></path><path d="M794 139.6H231.4c-48.5 0-87.9 39.4-87.9 87.9v562.6c0 48.5 39.4 87.9 87.9 87.9H794c48.5 0 87.9-39.4 87.9-87.9V227.5c0-48.5-39.4-87.9-87.9-87.9z m52.7 650.5c0 29-23.6 52.7-52.7 52.7H231.4c-29 0-52.7-23.6-52.7-52.7V227.5c0-29 23.6-52.7 52.7-52.7H794c29 0 52.7 23.6 52.7 52.7v562.6z" p-id="5445" fill="#707070"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
resources/light/next.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

1
resources/light/next.svg Normal file

@ -0,0 +1 @@
<svg t="1597223342042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7041" width="32" height="32"><path d="M758.528 512L384 886.528l-60.330667-60.330667 313.984-314.453333-310.954666-310.912L386.986667 140.501333z" p-id="7042" fill="#e6e6e6"></path></svg>

After

Width:  |  Height:  |  Size: 301 B

BIN
resources/light/prev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

1
resources/light/prev.svg Normal file

@ -0,0 +1 @@
<svg t="1597223402918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7848" width="32" height="32"><path d="M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z" p-id="7849" fill="#e6e6e6"></path></svg>

After

Width:  |  Height:  |  Size: 778 B

1
resources/stock.svg Normal file

@ -0,0 +1 @@
<svg t="1734886583871" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3747" width="20" height="20"><path d="M511.998 0.693C229.419 0.693 0.345 229.767 0.345 512.346s229.074 511.653 511.653 511.653 511.653-229.074 511.653-511.653C1023.651 229.768 794.576 0.693 511.998 0.693z m0 986.468c-262.232 0-474.813-212.582-474.813-474.814S249.766 37.533 511.998 37.533c262.232 0 474.814 212.582 474.814 474.814S774.23 987.161 511.998 987.161z m285.926-692.598c-32.779 0-59.352 26.573-59.352 59.352a59.088 59.088 0 0 0 11.921 35.678L629.92 533.287a59.242 59.242 0 0 0-18.229-2.864c-14.317 0-27.45 5.07-37.703 13.513l-115.473-80.854a59.662 59.662 0 0 0 1.225-12.044c0-32.779-26.572-59.352-59.352-59.352s-59.352 26.572-59.352 59.352a59.062 59.062 0 0 0 10.618 33.862l-98.372 117.236a59.098 59.098 0 0 0-24.291-5.201c-32.778 0-59.352 26.573-59.352 59.352s26.573 59.352 59.352 59.352c32.78 0 59.352-26.573 59.352-59.352a59.05 59.05 0 0 0-7.777-29.356l100.502-119.773a59.221 59.221 0 0 0 19.318 3.233c15.267 0 29.184-5.769 39.699-15.239l114.097 79.892a59.375 59.375 0 0 0-1.847 14.732c0 32.778 26.573 59.352 59.352 59.352 32.78 0 59.353-26.573 59.353-59.352a59.069 59.069 0 0 0-11.261-34.766l121.044-144.255a59.316 59.316 0 0 0 17.098 2.512c32.779 0 59.352-26.573 59.352-59.352 0-32.779-26.57-59.352-59.349-59.352z" fill="#707070" p-id="3748"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

1
resources/up.svg Normal file

@ -0,0 +1 @@
<svg t="1731316549328" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1643" width="128" height="128"><path d="M490.666667 725.333333V298.666667a21.333333 21.333333 0 0 1 42.666666 0v426.666666a21.333333 21.333333 0 0 1-42.666666 0z" p-id="1644" fill="#1afa29"></path><path d="M277.333333 512a20.053333 20.053333 0 0 1 6.4-14.933333l213.333334-213.333334a20.48 20.48 0 0 1 29.866666 0 20.48 20.48 0 0 1 0 29.866667l-213.333333 213.333333A21.333333 21.333333 0 0 1 277.333333 512z" p-id="1645" fill="#1afa29"></path><path d="M490.666667 298.666667a21.333333 21.333333 0 0 1 36.266666-14.933334l213.333334 213.333334a20.48 20.48 0 0 1 0 29.866666 20.48 20.48 0 0 1-29.866667 0l-213.333333-213.333333A20.053333 20.053333 0 0 1 490.666667 298.666667z" p-id="1646" fill="#1afa29"></path></svg>

After

Width:  |  Height:  |  Size: 832 B

82
src/extension.ts Normal file

@ -0,0 +1,82 @@
import * as vscode from 'vscode';
// import { getWebviewContent } from './webviewContent';
export function activate(context: vscode.ExtensionContext) {
// 注册命令
const openWebviewCommand = vscode.commands.registerCommand('myExtension.openWebview', () => {
openFullScreenWebview(context);
});
// 将命令添加到订阅中
context.subscriptions.push(openWebviewCommand);
// 监听视图的点击事件
vscode.window.registerTreeDataProvider('myExtensionView', {
getTreeItem: () => new vscode.TreeItem('Open Webview', vscode.TreeItemCollapsibleState.None),
getChildren: () => Promise.resolve([]),
});
// 当用户点击活动栏图标时触发命令
vscode.commands.executeCommand('myExtension.openWebview');
}
function openFullScreenWebview(context: vscode.ExtensionContext) {
// 创建 Webview Panel
const panel = vscode.window.createWebviewPanel(
'myWebview', // 标识符
'股票', // 标题
vscode.ViewColumn.One, // 显示在编辑器的一侧
{
enableScripts: true, // 启用 JavaScript
retainContextWhenHidden: true, // 在隐藏时保留上下文
}
);
const scriptUri = panel.webview.asWebviewUri(
vscode.Uri.joinPath(context.extensionUri, 'dist8', 'assets', 'index-BO9WyeNZ.js')
);
const styleUri = panel.webview.asWebviewUri(
vscode.Uri.joinPath(context.extensionUri, 'dist8', 'assets', 'index-Cj3DiBUD.css')
);
// 设置 Webview 的内容
panel.webview.html = `
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
}
#app {
flex: 1;
}
::-webkit-scrollbar {
width: 0;
}
</style>
<script type="module" crossorigin src="${scriptUri}"></script>
<link rel="stylesheet" crossorigin href="${styleUri}">
</head>
<body>
<div id="app"></div>
</body>
</html>
`;
// 处理 Webview 关闭事件
panel.onDidDispose(
() => {
console.log('Webview closed');
},
null,
context.subscriptions
);
}
export function deactivate() {}

@ -0,0 +1,15 @@
import * as assert from 'assert';
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
// import * as myExtension from '../../extension';
suite('Extension Test Suite', () => {
vscode.window.showInformationMessage('Start all tests.');
test('Sample test', () => {
assert.strictEqual(-1, [1, 2, 3].indexOf(5));
assert.strictEqual(-1, [1, 2, 3].indexOf(0));
});
});

31
src/webviewContent.ts Normal file

@ -0,0 +1,31 @@
export function getWebviewContent(): string {
return `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Full-Screen Webview</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #1e1e1e;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h1 {
font-size: 2.5rem;
}
</style>
</head>
<body>
<h1>Welcome to the Full-Screen Webview!</h1>
</body>
</html>
`;
}

17
tsconfig.json Normal file

@ -0,0 +1,17 @@
{
"compilerOptions": {
"module": "Node16",
"target": "ES2022",
"outDir": "out",
"lib": [
"ES2022"
],
"sourceMap": true,
"rootDir": "src",
"strict": true, /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
}
}

@ -0,0 +1,44 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file in which you declare your extension and command.
* The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesnt yet need to load the plugin.
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
* The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
* We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
* Set breakpoints in your code inside `src/extension.ts` to debug your extension.
* Find output from your extension in the debug console.
## Make changes
* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Explore the API
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
## Run tests
* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner)
* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered.
* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A`
* See the output of the test result in the Test Results view.
* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder.
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
* You can create folders inside the `test` folder to structure your tests any way you want.
## Go further
* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns.
* Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace.
* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
* Integrate to the [report issue](https://code.visualstudio.com/api/get-started/wrapping-up#issue-reporting) flow to get issue and feature requests reported by users.