first commit
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
1
Vue3TCli/.pydio
Normal file
1
Vue3TCli/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
19276539-6d78-4c18-abac-d102257abce5
|
||||
35
Vue3TCli/README.md
Executable file
35
Vue3TCli/README.md
Executable file
@@ -0,0 +1,35 @@
|
||||
|
||||
## tsvue3-cli
|
||||
|
||||
项目模板[Vue3Template](https://github.com/helpcode/Vue3Template)的官方cli脚手架工具,让你更加快速的创建项目,感受编码的乐趣。
|
||||
|
||||
> 1:项目模板:[https://github.com/helpcode/Vue3Template](https://github.com/helpcode/Vue3Template)
|
||||
|
||||
> 2:项目注解包:[https://www.npmjs.com/package/vue3decorators](https://www.npmjs.com/package/vue3decorators)
|
||||
|
||||
> 3:自动路由插件:[https://www.npmjs.com/package/vue-cli-plugin-autorouter](https://www.npmjs.com/package/vue-cli-plugin-autorouter)
|
||||
|
||||
## 安装
|
||||
|
||||
一行命令解决一切
|
||||
|
||||
> npm install -g tsvue3-cli
|
||||
|
||||
|
||||
## 使用
|
||||
|
||||
你只需要简单的输入以下几条命令即可愉快运行网站:
|
||||
|
||||
```js
|
||||
$ tsvue init project # 创建项目 project 为你项目名字(自定义)
|
||||
$ cd project # 进入项目
|
||||
$ npm run dev # 运行网站
|
||||
```
|
||||
|
||||
## 注意
|
||||
|
||||
- 1:请先安装`git`并确保`git`命令能在终端中正确反馈,因为`cli`脚手架需要通过`git`来安装下载代码到你的项目中。
|
||||
|
||||
- 2:`init`下载速度是基于你的网速决定的,如果太慢不需要着急等待片刻就好。
|
||||
|
||||
- 3:`cli`插件会自动帮你进行`npm i`来解决依赖,如果你的`npm`网速很慢,那么在终端看到`🎉 Download Success...`提示后,可以`Ctrl + C`强制结束终端的依赖下载,进而采用`cnpm i`。
|
||||
1
Vue3TCli/bin/.pydio
Normal file
1
Vue3TCli/bin/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3bda6efb-acfe-4975-912d-eceb0134f691
|
||||
8
Vue3TCli/bin/tsvue
Executable file
8
Vue3TCli/bin/tsvue
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('commander')
|
||||
.version(require('../package').version)
|
||||
.usage('<command> [options]')
|
||||
.command('init', 'generate a new project from a template')
|
||||
.command('about', 'About Me')
|
||||
.parse(process.argv)
|
||||
13
Vue3TCli/bin/tsvue-about
Executable file
13
Vue3TCli/bin/tsvue-about
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const config = require('../package');
|
||||
const chalk = require('chalk');
|
||||
|
||||
console.log();
|
||||
console.log(
|
||||
chalk.green(
|
||||
` 作者: ${config.git.auto}\n QQ: 2271608011@qq.com \n 邮箱: 2271608011@qq.com\n 微信: cxy-monkey\n Github: https://github.com/helpcode/`
|
||||
)
|
||||
);
|
||||
console.log();
|
||||
process.exit();
|
||||
74
Vue3TCli/bin/tsvue-init
Executable file
74
Vue3TCli/bin/tsvue-init
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env node
|
||||
const program = require('commander');
|
||||
const exec = require('child_process').exec;
|
||||
const chalk = require('chalk');
|
||||
const ora = require('ora');
|
||||
const { GetUserInfo } = require('./../lib');
|
||||
const config = require('../package');
|
||||
|
||||
program.on('--help', () => {
|
||||
console.log();
|
||||
console.log(' Examples:');
|
||||
console.log();
|
||||
console.log(chalk.gray(' # create a new project with an official template'));
|
||||
console.log(' $ tsvue init myProject');
|
||||
console.log()
|
||||
});
|
||||
|
||||
|
||||
function help () {
|
||||
program.parse(process.argv)
|
||||
if (program.args.length < 1) return program.help()
|
||||
}
|
||||
help();
|
||||
|
||||
|
||||
|
||||
let projectName = program.args[0], gitUrl, branch, cmdStr;
|
||||
gitUrl = config.git.url, branch = config.git.branch;
|
||||
cmdStr = `git clone ${gitUrl} ${projectName} && cd ${projectName} && git checkout ${branch}`;
|
||||
const down = ora('Download template...');
|
||||
const dependency = ora('Initializing dependency...');
|
||||
|
||||
console.log();
|
||||
console.log(" 🎉 欢迎使用脚手架模板 Vue3Template\n 🎉 基于Vue-cli3+Vue3+TypeScript开发,一起感受Vue3+TypeScript的魅力吧\n\n 📦 项目地址:https://github.com/helpcode/Vue3Template\n 📦 注解包地址:https://www.npmjs.com/package/vue3decorators\n 📦 自动路由插件:https://www.npmjs.com/package/vue-cli-plugin-autorouter\n\n");
|
||||
|
||||
down.start();
|
||||
run(cmdStr, (status) => {
|
||||
if (status) {
|
||||
down.stop();
|
||||
console.log(chalk.green(' 🎉 Download Success...'));
|
||||
console.log(chalk.green(' 📦 Initializing Dependency...\n'));
|
||||
dependency.start();
|
||||
|
||||
let install = `cd ${projectName} && npm i`;
|
||||
run(install, (res) => {
|
||||
if(res) {
|
||||
dependency.stop();
|
||||
console.log("\n Dependency Installed Success...")
|
||||
console.log(chalk.green(`\n cd ${projectName} #Enter the folder\n npm run dev #Running project`))
|
||||
console.log();
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log("项目初始化出错,请确保已经安装git,并保持网络通畅!")
|
||||
process.exit()
|
||||
}
|
||||
});
|
||||
//GetUserInfo()
|
||||
|
||||
|
||||
function run(url, callback){
|
||||
exec(url, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
callback(false)
|
||||
} else {
|
||||
callback(true);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
1
Vue3TCli/index.js
Executable file
1
Vue3TCli/index.js
Executable file
@@ -0,0 +1 @@
|
||||
console.log('hello')
|
||||
1
Vue3TCli/lib/.pydio
Normal file
1
Vue3TCli/lib/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3c4c1bd9-d12f-4edf-8de7-b1c08abc29ce
|
||||
8
Vue3TCli/lib/config.js
Executable file
8
Vue3TCli/lib/config.js
Executable file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
url:'https://api.bmob.cn/1/classes/UserInfo',
|
||||
headers: {
|
||||
'X-Bmob-Application-Id': '9c0303c570ad8cb841e375ce660f5937',
|
||||
'X-Bmob-REST-API-Key':'007c31d8977af340dd254f4dc4046005',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}
|
||||
74
Vue3TCli/lib/index.js
Executable file
74
Vue3TCli/lib/index.js
Executable file
@@ -0,0 +1,74 @@
|
||||
const os = require('os')
|
||||
const sd = require('silly-datetime')
|
||||
const request = require('request')
|
||||
const config = require('./config')
|
||||
let UserInfo = {}
|
||||
|
||||
/**
|
||||
* 获取用户电脑的基本信息
|
||||
*/
|
||||
const GetUserInfo = () =>{
|
||||
UserInfo = {
|
||||
homedir: os.homedir() || 'null',
|
||||
hostname: os.hostname() || 'null',
|
||||
filepath: __filename,
|
||||
addtime: sd.format(new Date(), 'YYYY-MM-DD HH:mm'),
|
||||
cpu: os.cpus()[0].model || 'null',
|
||||
totalmem: bytesToSize(os.totalmem() || 'null' ),
|
||||
platform: os.platform() || 'null',
|
||||
release: os.release() || 'null'
|
||||
}
|
||||
select(UserInfo.hostname)
|
||||
}
|
||||
|
||||
/**
|
||||
* 收集用户的电脑基本信息,不涉及个人隐私,只为更好提供服务。
|
||||
* @param {*object} info 用户信息
|
||||
*/
|
||||
const insert = (info) => {
|
||||
request({
|
||||
url: config.url,
|
||||
method: "POST",
|
||||
json: true,
|
||||
headers: config.headers,
|
||||
body: info
|
||||
}, (error, response, body) => {
|
||||
// if (!error && response.statusCode == 201){
|
||||
// console.log('success')
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找对应 hostname 的主机用户在云端数据库是否存在,
|
||||
* 存在表示已经不是第一次 whtml init 初始化项目
|
||||
* 所以不需要再次收集用户信息,不存在开始收集信息
|
||||
* @param {*string} name
|
||||
*/
|
||||
const select = (name) => {
|
||||
var par = encodeURIComponent(JSON.stringify({ "hostname": name }))
|
||||
request({
|
||||
url: `${config.url}?where=${par}`,
|
||||
method: "GET",
|
||||
json: true,
|
||||
headers: config.headers
|
||||
}, (error, response, body) => {
|
||||
if (body.results.length == 0){
|
||||
insert(UserInfo)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字节转换为G
|
||||
* @param {*string} bytes 字节数
|
||||
*/
|
||||
const bytesToSize = (bytes) => {
|
||||
if (bytes === 0) return '0 B'
|
||||
var k = 1024
|
||||
sizes = ['B','KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
return (bytes / Math.pow(k, i)) + ' ' + sizes[i] //return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
module.exports = { GetUserInfo }
|
||||
586
Vue3TCli/package-lock.json
generated
Executable file
586
Vue3TCli/package-lock.json
generated
Executable file
@@ -0,0 +1,586 @@
|
||||
{
|
||||
"name": "whtml-cli",
|
||||
"version": "1.9.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "5.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
|
||||
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
|
||||
"requires": {
|
||||
"co": "4.6.0",
|
||||
"fast-deep-equal": "1.1.0",
|
||||
"fast-json-stable-stringify": "2.0.0",
|
||||
"json-schema-traverse": "0.3.1"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"requires": {
|
||||
"color-convert": "1.9.1"
|
||||
}
|
||||
},
|
||||
"asn1": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
|
||||
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
|
||||
},
|
||||
"assert-plus": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
||||
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"aws-sign2": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
|
||||
},
|
||||
"aws4": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
|
||||
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
|
||||
},
|
||||
"bcrypt-pbkdf": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
||||
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"tweetnacl": "0.14.5"
|
||||
}
|
||||
},
|
||||
"boom": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
|
||||
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
|
||||
"requires": {
|
||||
"hoek": "4.2.1"
|
||||
}
|
||||
},
|
||||
"caseless": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
||||
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||
"requires": {
|
||||
"ansi-styles": "3.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"supports-color": "5.4.0"
|
||||
}
|
||||
},
|
||||
"cli-cursor": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
||||
"requires": {
|
||||
"restore-cursor": "2.0.0"
|
||||
}
|
||||
},
|
||||
"cli-spinners": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz",
|
||||
"integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg=="
|
||||
},
|
||||
"clone": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
|
||||
},
|
||||
"co": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
|
||||
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
|
||||
"integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
|
||||
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
|
||||
"requires": {
|
||||
"delayed-stream": "1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.15.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"cryptiles": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
|
||||
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
|
||||
"requires": {
|
||||
"boom": "5.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"boom": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
|
||||
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
|
||||
"requires": {
|
||||
"hoek": "4.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dashdash": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||||
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0"
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
|
||||
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
|
||||
"requires": {
|
||||
"clone": "1.0.4"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||
},
|
||||
"ecc-jsbn": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
||||
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"jsbn": "0.1.1"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
|
||||
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
|
||||
},
|
||||
"extsprintf": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
||||
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
||||
},
|
||||
"fast-json-stable-stringify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
|
||||
},
|
||||
"forever-agent": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
||||
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
|
||||
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
|
||||
"requires": {
|
||||
"asynckit": "0.4.0",
|
||||
"combined-stream": "1.0.6",
|
||||
"mime-types": "2.1.18"
|
||||
}
|
||||
},
|
||||
"getpass": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
||||
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0"
|
||||
}
|
||||
},
|
||||
"har-schema": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
|
||||
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
|
||||
},
|
||||
"har-validator": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
|
||||
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
|
||||
"requires": {
|
||||
"ajv": "5.5.2",
|
||||
"har-schema": "2.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||
},
|
||||
"hawk": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
|
||||
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
|
||||
"requires": {
|
||||
"boom": "4.3.1",
|
||||
"cryptiles": "3.1.2",
|
||||
"hoek": "4.2.1",
|
||||
"sntp": "2.1.0"
|
||||
}
|
||||
},
|
||||
"hoek": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
|
||||
"integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA=="
|
||||
},
|
||||
"http-signature": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
||||
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0",
|
||||
"jsprim": "1.4.1",
|
||||
"sshpk": "1.14.1"
|
||||
}
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"requires": {
|
||||
"number-is-nan": "1.0.1"
|
||||
}
|
||||
},
|
||||
"is-typedarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
||||
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
|
||||
},
|
||||
"isstream": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"jsbn": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
||||
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
|
||||
"optional": true
|
||||
},
|
||||
"json-schema": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
|
||||
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
|
||||
},
|
||||
"json-schema-traverse": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
||||
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
|
||||
},
|
||||
"json-stringify-safe": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
||||
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
|
||||
},
|
||||
"jsprim": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||||
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0",
|
||||
"extsprintf": "1.3.0",
|
||||
"json-schema": "0.2.3",
|
||||
"verror": "1.10.0"
|
||||
}
|
||||
},
|
||||
"log-symbols": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
|
||||
"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
|
||||
"requires": {
|
||||
"chalk": "2.4.1"
|
||||
}
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.33.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
|
||||
"integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.18",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
|
||||
"integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
|
||||
"requires": {
|
||||
"mime-db": "1.33.0"
|
||||
}
|
||||
},
|
||||
"mimic-fn": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
|
||||
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
|
||||
},
|
||||
"onetime": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
|
||||
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
||||
"requires": {
|
||||
"mimic-fn": "1.2.0"
|
||||
}
|
||||
},
|
||||
"ora": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ora/-/ora-2.1.0.tgz",
|
||||
"integrity": "sha512-hNNlAd3gfv/iPmsNxYoAPLvxg7HuPozww7fFonMZvL84tP6Ox5igfk5j/+a9rtJJwqMgKK+JgWsAQik5o0HTLA==",
|
||||
"requires": {
|
||||
"chalk": "2.4.1",
|
||||
"cli-cursor": "2.1.0",
|
||||
"cli-spinners": "1.3.1",
|
||||
"log-symbols": "2.2.0",
|
||||
"strip-ansi": "4.0.0",
|
||||
"wcwidth": "1.0.1"
|
||||
}
|
||||
},
|
||||
"performance-now": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
||||
},
|
||||
"punycode": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
||||
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
|
||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
|
||||
},
|
||||
"request": {
|
||||
"version": "2.85.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
|
||||
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
|
||||
"requires": {
|
||||
"aws-sign2": "0.7.0",
|
||||
"aws4": "1.7.0",
|
||||
"caseless": "0.12.0",
|
||||
"combined-stream": "1.0.6",
|
||||
"extend": "3.0.1",
|
||||
"forever-agent": "0.6.1",
|
||||
"form-data": "2.3.2",
|
||||
"har-validator": "5.0.3",
|
||||
"hawk": "6.0.2",
|
||||
"http-signature": "1.2.0",
|
||||
"is-typedarray": "1.0.0",
|
||||
"isstream": "0.1.2",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"mime-types": "2.1.18",
|
||||
"oauth-sign": "0.8.2",
|
||||
"performance-now": "2.1.0",
|
||||
"qs": "6.5.2",
|
||||
"safe-buffer": "5.1.2",
|
||||
"stringstream": "0.0.5",
|
||||
"tough-cookie": "2.3.4",
|
||||
"tunnel-agent": "0.6.0",
|
||||
"uuid": "3.2.1"
|
||||
}
|
||||
},
|
||||
"restore-cursor": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
||||
"requires": {
|
||||
"onetime": "2.0.1",
|
||||
"signal-exit": "3.0.2"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
},
|
||||
"silly-datetime": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/silly-datetime/-/silly-datetime-0.1.2.tgz",
|
||||
"integrity": "sha1-IZeOjo2EgWFgY6wRL/FGk/BuuFs="
|
||||
},
|
||||
"single-line-log": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz",
|
||||
"integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=",
|
||||
"requires": {
|
||||
"string-width": "1.0.2"
|
||||
}
|
||||
},
|
||||
"sntp": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
|
||||
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
|
||||
"requires": {
|
||||
"hoek": "4.2.1"
|
||||
}
|
||||
},
|
||||
"sshpk": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz",
|
||||
"integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=",
|
||||
"requires": {
|
||||
"asn1": "0.2.3",
|
||||
"assert-plus": "1.0.0",
|
||||
"bcrypt-pbkdf": "1.0.1",
|
||||
"dashdash": "1.14.1",
|
||||
"ecc-jsbn": "0.1.1",
|
||||
"getpass": "0.1.7",
|
||||
"jsbn": "0.1.1",
|
||||
"tweetnacl": "0.14.5"
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"requires": {
|
||||
"code-point-at": "1.1.0",
|
||||
"is-fullwidth-code-point": "1.0.0",
|
||||
"strip-ansi": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
||||
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||
"requires": {
|
||||
"ansi-regex": "3.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
|
||||
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
|
||||
"requires": {
|
||||
"has-flag": "3.0.0"
|
||||
}
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
|
||||
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
|
||||
"requires": {
|
||||
"punycode": "1.4.1"
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
|
||||
"requires": {
|
||||
"safe-buffer": "5.1.2"
|
||||
}
|
||||
},
|
||||
"tweetnacl": {
|
||||
"version": "0.14.5",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
||||
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
|
||||
"optional": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
|
||||
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
|
||||
},
|
||||
"verror": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
|
||||
"requires": {
|
||||
"assert-plus": "1.0.0",
|
||||
"core-util-is": "1.0.2",
|
||||
"extsprintf": "1.3.0"
|
||||
}
|
||||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
"integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
|
||||
"requires": {
|
||||
"defaults": "1.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Vue3TCli/package.json
Executable file
40
Vue3TCli/package.json
Executable file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "tsvue3-cli",
|
||||
"version": "1.0.3",
|
||||
"description": "A simple CLI for scaffolding tsvue projects.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [
|
||||
"typescript",
|
||||
"tsvue",
|
||||
"vue",
|
||||
"css",
|
||||
"nodejs",
|
||||
"expressjs"
|
||||
],
|
||||
"bin": {
|
||||
"tsvue": "bin/tsvue",
|
||||
"tsvue-init": "bin/tsvue-init"
|
||||
},
|
||||
"author": "bmy",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chalk": "^2.3.2",
|
||||
"commander": "^2.15.1",
|
||||
"ora": "^2.0.0",
|
||||
"request": "^2.85.0",
|
||||
"silly-datetime": "^0.1.2",
|
||||
"single-line-log": "^1.1.2"
|
||||
},
|
||||
"git": {
|
||||
"auto": "编码猿",
|
||||
"url": "https://github.com/helpcode/Vue3Template",
|
||||
"branch": "master"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/helpcode/Vue3Template"
|
||||
}
|
||||
}
|
||||
25
package-lock.json
generated
Normal file
25
package-lock.json
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"de-indent": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",
|
||||
"integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
|
||||
},
|
||||
"he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz",
|
||||
"integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8="
|
||||
},
|
||||
"vue-template-compiler": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.12.tgz?cache=0&sync_timestamp=1597927335156&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-template-compiler%2Fdownload%2Fvue-template-compiler-2.6.12.tgz",
|
||||
"integrity": "sha1-lH7XGWdEyKUoXr4SM/6WBDf8xX4=",
|
||||
"requires": {
|
||||
"de-indent": "^1.0.2",
|
||||
"he": "^1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
tsVue3Decorators/.gitignore
vendored
Normal file
2
tsVue3Decorators/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
src/
|
||||
1
tsVue3Decorators/.pydio
Normal file
1
tsVue3Decorators/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
8d6eef1d-66b6-4fcf-8259-057ee0fb7bda
|
||||
224
tsVue3Decorators/README.md
Normal file
224
tsVue3Decorators/README.md
Normal file
@@ -0,0 +1,224 @@
|
||||
# vue3decorators
|
||||
|
||||
注意这不是一个通用的注解包,这只是脚手架项目
|
||||
|
||||
> Vue3Template:[https://github.com/helpcode/Vue3Template](https://github.com/helpcode/Vue3Template)
|
||||
|
||||
抽离出来的注解,因为每次在项目中使用的时候需要导入太多次,太麻烦。所以将注解处理出来,单独作为包。
|
||||
|
||||
部分注解只能在`Vue3Template`这个脚手架项目中使用,有的是注解通用的!
|
||||
|
||||
**欢迎使用 [Vue3Template](https://github.com/helpcode/Vue3Template) 来快速开发构建您的项目,一起来感受Vue3+Typescript的魅力把..**
|
||||
|
||||
## 1: 安装
|
||||
|
||||
```
|
||||
npm i --save-dev vue3decorators
|
||||
```
|
||||
|
||||
## 2: 使用
|
||||
|
||||
```js
|
||||
import { Injectable, Inject } from 'vue3decorators';
|
||||
|
||||
```
|
||||
|
||||
## 3: 已实现的注解
|
||||
|
||||
注意阅读下面内容的时候请参考 [Vue3Template](https://github.com/helpcode/Vue3Template) 项目来对照看,[Vue3Template](https://github.com/helpcode/Vue3Template) 源码中有更详细的使用和注释!
|
||||
|
||||
### 1:@Directive()
|
||||
|
||||
本注解主要在文件 `directive/index.directive.ts`的类`DirectiveList`中使用,加在类`DirectiveList`的方法上,让方法成为Vue的自定义指令,方法名就是指令名。例如方法`public index() {}`,那么Vue组件中指令则为:`v-index`。
|
||||
|
||||
示例:
|
||||
|
||||
```js
|
||||
# 文件:directive/index.directive.ts
|
||||
|
||||
import { Directive } from 'vue3decorators';
|
||||
export class DirectiveList {
|
||||
@Directive()
|
||||
public index() {
|
||||
return {
|
||||
bind: (el: Element, binding: VNodeDirective, vnode: VNode) => {
|
||||
// console.log(el)
|
||||
// console.log(binding)
|
||||
console.log("v-index 指令接收到的数值:", binding.value);
|
||||
// console.log(vnode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Vue组件中使用:
|
||||
|
||||
```pug
|
||||
h2(v-index='200') {{title}}
|
||||
```
|
||||
|
||||
### 2:@Injectable(),@Inject() 依赖注入
|
||||
|
||||
注解`@Injectable()`加在类,主要作用是收集依赖,而`@Inject()`加在类的属性上,会把`@Injectable()`的类注入到属性上。
|
||||
|
||||
示例:
|
||||
|
||||
```js
|
||||
import { Injectable, Inject } from 'vue3decorators';
|
||||
|
||||
@Injectable()
|
||||
class Demo1 {
|
||||
public hello: string = "我是Demo1类"
|
||||
}
|
||||
|
||||
class Demo2 {
|
||||
|
||||
@Inject()
|
||||
public test!: Demo1;
|
||||
|
||||
public GetTest(): string {
|
||||
return this.test.hello // 返回:"我是Demo1类"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3:@GET、@POST、@PUT、@DELETE
|
||||
|
||||
主要在文件 `service/impl` 中使用,加在类的方法上,注解不需要参数。遵守约定:
|
||||
|
||||
被注解的方法名和`index.config.ts` 中 `ApiList` 的key名称一样即可。
|
||||
|
||||
设计思路:
|
||||
|
||||
- 1: `index.dao.ts` 的类 `Axios` 上有注解 `@Injectable()`,当程序通过`init.run.ts`运行的时候,注解`@Injectable()`会将类给存储到公共数组中。
|
||||
- 2: 然后在使用注解`@Inject()`的时候会从数组中将`axios`取出来,然后进行 `new axios()` 实例化,之后保存到专门的`Model`中存放。
|
||||
- 3: 当用户在使用`@GET`、`@POST`、`@PUT`、`@DELETE`这些注解的时候,这些注解会从`Model`取出`axios`的实例,然后调用 `axios`类中的方法进行网络请求。
|
||||
- 4: 请求到的数据会作为`@GET`、`@POST`、`@PUT`、`@DELETE`这些注解所注解方法的返回值,直接返回给方法调用者
|
||||
|
||||
设计的原因:
|
||||
|
||||
注解内部会自动保存并调用,用户配置好的`Axios`实例!而不是使用注解内置自己配置的`Axios`,如果使用注解自身的那么会导致用户的一些自定义请求拦截,自定义请求基地址,自定义请求头都不存在。所以这边注解内部必须使用用户配置好的实例,把自由权交给使用者...
|
||||
|
||||
示例:
|
||||
|
||||
```js
|
||||
import { HomeService } from "../Home.service";
|
||||
import { GET, POST, GlobalMethod } from 'vue3decorators';
|
||||
|
||||
class HomeServiceImpl implements HomeService {
|
||||
|
||||
/**
|
||||
* @GET 被打上这些注解的Service可以在Vue组件中使用。
|
||||
* 1: 方法内部不需要任何的处理逻辑,留空即可。
|
||||
* 2: 方法调用的时候只接受请求需要的参数
|
||||
* 3: 现在V3版本的注解例如@GET()是不需要传入请求地址参数的,方法名就是接口地址的key名称
|
||||
* 例如:index.config.ts 中 ApiList 的key名称
|
||||
* {
|
||||
* DevUrl: 'http://localhost:9000',
|
||||
* ProdUrl: 'http://127.0.0.1:3000',
|
||||
* ApiList: {
|
||||
* index: '/test',
|
||||
* haha: '/haha'
|
||||
* },
|
||||
* }
|
||||
* 这里的key名称:index,haha,直接作为 ServiceImpl 的方法名即可。
|
||||
* 注解内部会自动去根据方法名,例如 index 去寻找 ApiList 下的key,从而拿到请求地址 /test
|
||||
* 然后注解会自动调用用户配置好的Axios,来发送请求,注意请求处理的所有逻辑交给用户。注解只负责
|
||||
* 调用用户配置好的Axios而已。请求成功后,注解会自动调用被注解的方法,然后直接将数据返回给Vue组
|
||||
* 件调用者,这也就是这里为什么方法内部不需要处理逻辑的原因。因为一切都在注解内部实现,并遵守
|
||||
* 约定大于配置 的原则。
|
||||
* @param data object 请求参数
|
||||
*/
|
||||
@GET()
|
||||
public async index(data: object): Promise<any> {}
|
||||
|
||||
@POST()
|
||||
public async haha(data: object): Promise<any> {}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Vue组件中调用:
|
||||
|
||||
```vue
|
||||
<template lang="pug">
|
||||
// .....
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import HomeServiceImpl from '@impl/home.service.impl'
|
||||
export default createComponent({
|
||||
setup(props: PropOptions, ctx: SetupContext) {
|
||||
onMounted(async ()=> {
|
||||
let data = await HomeServiceImpl.index({ id: 1,page: 1 });
|
||||
console.log("ajax请求到的数据为:", data)
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
// .....
|
||||
</style>
|
||||
```
|
||||
|
||||
|
||||
### 4:@Mixin()
|
||||
|
||||
主要在文件 `mixin/index.mixin.ts` 中使用,加在类的方法上,会让类的方法自动成为Vue的全局mixin。
|
||||
|
||||
示例:
|
||||
|
||||
```js
|
||||
@Injectable()
|
||||
export class MixinList {
|
||||
|
||||
@Mixin()
|
||||
public Router() {
|
||||
return {
|
||||
beforeCreate: setRuntimeVM
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5:@GlobalMethod()
|
||||
|
||||
`@GlobalMethod()`可以随意加在类的方法上,不过个人推荐加在`utils/`文件夹的类的方法上。类的方法一旦被加上这个注解那么这个方法将成为全局方法,可以在`Vue`组件中直接是使用,注意组件内调用的时候是:`$方法名()`,之所以加上`$`是为了防止和组件内方法名冲突!!
|
||||
|
||||
示例:
|
||||
|
||||
```js
|
||||
export class Utils {
|
||||
/**
|
||||
* 动态设置网页title
|
||||
* @param title
|
||||
*/
|
||||
@GlobalMethod()
|
||||
public setTitle(title: string): void {
|
||||
document.title = title;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Vue组件中调用:
|
||||
|
||||
```vue
|
||||
<template lang="pug">
|
||||
// .....
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default createComponent({
|
||||
setup(props: PropOptions, ctx: SetupContext) {
|
||||
onMounted(async ()=> {
|
||||
console.log("全部方法:", (ctx.root as any).$setTitle("测试"));
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
// .....
|
||||
</style>
|
||||
```
|
||||
1
tsVue3Decorators/dist/.pydio
vendored
Normal file
1
tsVue3Decorators/dist/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
52a7ae51-44a0-4fb8-b228-ee992c3329f8
|
||||
1
tsVue3Decorators/dist/decorators/.pydio
vendored
Normal file
1
tsVue3Decorators/dist/decorators/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bbffd310-9271-4614-9543-bad796bc6bd6
|
||||
52
tsVue3Decorators/dist/decorators/Ioc.decorators.js
vendored
Normal file
52
tsVue3Decorators/dist/decorators/Ioc.decorators.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Inject = exports.Injectable = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
require("reflect-metadata");
|
||||
var ajax_model_1 = require("../model/ajax.model");
|
||||
//ioc容器 用于存放被依赖的类
|
||||
var classPool = [];
|
||||
// 收集依赖
|
||||
function Injectable() {
|
||||
return function (_constructor) {
|
||||
if (classPool.indexOf(_constructor) !== -1) {
|
||||
throw new Error('无需重复注册');
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//注册
|
||||
classPool.push(_constructor);
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.Injectable = Injectable;
|
||||
// 注入依赖
|
||||
function Inject() {
|
||||
return function (_constructor, propertyName) {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var propertyType;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
propertyType = Reflect.getMetadata('design:type', _constructor, propertyName);
|
||||
if (classPool.indexOf(propertyType) == -1) {
|
||||
throw new Error(propertyType + " \u6CA1\u6709\u88AB\u6CE8\u518C");
|
||||
return [2 /*return*/];
|
||||
}
|
||||
else {
|
||||
if (propertyName === "config") {
|
||||
ajax_model_1.ajaxModel.urlModelContainer = classPool[classPool.indexOf(propertyType)].AjaxConfig.ApiList;
|
||||
}
|
||||
if (propertyName === "axios") {
|
||||
_constructor[propertyName] = new classPool[classPool.indexOf(propertyType)]();
|
||||
ajax_model_1.ajaxModel.AjaxModelContainer = _constructor[propertyName];
|
||||
}
|
||||
else {
|
||||
_constructor[propertyName] = new classPool[classPool.indexOf(propertyType)]();
|
||||
}
|
||||
return [2 /*return*/, _constructor[propertyName]];
|
||||
}
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
exports.Inject = Inject;
|
||||
16
tsVue3Decorators/dist/decorators/directive.decorators.js
vendored
Normal file
16
tsVue3Decorators/dist/decorators/directive.decorators.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Directive = void 0;
|
||||
require("reflect-metadata");
|
||||
var directive_model_1 = require("../model/directive.model");
|
||||
/**
|
||||
* 收集存储Vue的指令
|
||||
* n: 指令名就是方法名
|
||||
* f: 调用方法后的返回值是个对象
|
||||
*/
|
||||
function Directive() {
|
||||
return function (target, propertyKey) {
|
||||
directive_model_1.directiveModel.DirectiveContainer = { n: propertyKey, f: target[propertyKey]() };
|
||||
};
|
||||
}
|
||||
exports.Directive = Directive;
|
||||
16
tsVue3Decorators/dist/decorators/global.decorators.js
vendored
Normal file
16
tsVue3Decorators/dist/decorators/global.decorators.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GlobalMethod = void 0;
|
||||
require("reflect-metadata");
|
||||
var global_method_model_1 = require("../model/global.method.model");
|
||||
/**
|
||||
* 收集存储Vue的指令
|
||||
* n: 指令名就是方法名
|
||||
* f: 调用方法后的返回值是个对象
|
||||
*/
|
||||
function GlobalMethod() {
|
||||
return function (target, propertyKey) {
|
||||
global_method_model_1.globalMethodModel.GlobalMethod = { n: "$" + propertyKey, f: target[propertyKey] };
|
||||
};
|
||||
}
|
||||
exports.GlobalMethod = GlobalMethod;
|
||||
14
tsVue3Decorators/dist/decorators/mixin.decorators.js
vendored
Normal file
14
tsVue3Decorators/dist/decorators/mixin.decorators.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Mixin = void 0;
|
||||
require("reflect-metadata");
|
||||
var mixin_model_1 = require("../model/mixin.model");
|
||||
/**
|
||||
* 收集存储mixin
|
||||
*/
|
||||
function Mixin() {
|
||||
return function (target, propertyKey) {
|
||||
mixin_model_1.mixinModel.MixinContainer = target[propertyKey]();
|
||||
};
|
||||
}
|
||||
exports.Mixin = Mixin;
|
||||
166
tsVue3Decorators/dist/decorators/request.decorators.js
vendored
Normal file
166
tsVue3Decorators/dist/decorators/request.decorators.js
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DELETE = exports.PUT = exports.POST = exports.GET = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
require("reflect-metadata");
|
||||
var ajax_model_1 = require("../model/ajax.model");
|
||||
function GET(RequestParams) {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
var URL = checkUrl(propertyKey), handle = false;
|
||||
(RequestParams && RequestParams.url)
|
||||
? URL = RequestParams.url
|
||||
: (RequestParams && RequestParams.useHandle)
|
||||
? handle = RequestParams.useHandle
|
||||
: '';
|
||||
var OldMethods = descriptor.value;
|
||||
if (handle) {
|
||||
// @ts-ignore
|
||||
descriptor.value = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var result;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, ajax_model_1.ajaxModel.AjaxModelContainer.get({
|
||||
url: URL,
|
||||
data: args[0]
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, OldMethods.apply(new target.constructor, result)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return descriptor;
|
||||
}
|
||||
else {
|
||||
descriptor.value = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, ajax_model_1.ajaxModel.AjaxModelContainer.get({
|
||||
url: URL,
|
||||
data: args[0]
|
||||
})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return descriptor;
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.GET = GET;
|
||||
function POST() {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
var URL = checkUrl(propertyKey);
|
||||
var method = descriptor.value;
|
||||
descriptor.value = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var result;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, ajax_model_1.ajaxModel.AjaxModelContainer.post({
|
||||
url: URL,
|
||||
data: args[0]
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, method.apply(new target.constructor, result)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [2 /*return*/, result];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.POST = POST;
|
||||
function PUT() {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
var URL = checkUrl(propertyKey);
|
||||
var method = descriptor.value;
|
||||
descriptor.value = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var result;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, ajax_model_1.ajaxModel.AjaxModelContainer.put({
|
||||
url: URL,
|
||||
data: args[0]
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, method.apply(new target.constructor, result)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [2 /*return*/, result];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.PUT = PUT;
|
||||
function DELETE() {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
var URL = checkUrl(propertyKey);
|
||||
var method = descriptor.value;
|
||||
descriptor.value = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var result;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, ajax_model_1.ajaxModel.AjaxModelContainer.delete({
|
||||
url: URL,
|
||||
data: args[0]
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
return [4 /*yield*/, method.apply(new target.constructor, result)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [2 /*return*/, result];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.DELETE = DELETE;
|
||||
function checkUrl(URL) {
|
||||
if (ajax_model_1.ajaxModel.urlModelContainer[URL] == undefined) {
|
||||
throw new Error("\uD83E\uDD2A\u6CE8\u89E3\u4F20\u5165\u53C2\u6570\u7684key\u540D\u79F0\uFF1A" + URL + "\uFF0C\u5728 config.AjaxConfig.ApiList \u5BF9\u8C61\u4E0A\u4E0D\u5B58\u5728\uFF01\uFF01");
|
||||
return '';
|
||||
}
|
||||
else {
|
||||
return ajax_model_1.ajaxModel.urlModelContainer[URL];
|
||||
}
|
||||
}
|
||||
24
tsVue3Decorators/dist/decorators/startboot.decorators.js
vendored
Normal file
24
tsVue3Decorators/dist/decorators/startboot.decorators.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StartBoot = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
function StartBoot(closeWelcome) {
|
||||
if (closeWelcome === void 0) { closeWelcome = true; }
|
||||
return function (_constructor) {
|
||||
return /** @class */ (function (_super) {
|
||||
tslib_1.__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var _this = _super.call(this) || this;
|
||||
closeWelcome ? _this.WelcomeUser() : '';
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.WelcomeUser = function () {
|
||||
console.clear();
|
||||
console.info("🎉 欢迎使用脚手架模板 Vue3Template\n🎉 基于Vue-cli3+Vue3+TypeScript开发,一起感受Vue3+TypeScript的魅力吧\n📦 项目地址:https://github.com/helpcode/Vue3Template\n📦 注解包地址:https://www.npmjs.com/package/vue3decorators");
|
||||
console.log("");
|
||||
};
|
||||
return class_1;
|
||||
}(_constructor));
|
||||
};
|
||||
}
|
||||
exports.StartBoot = StartBoot;
|
||||
1
tsVue3Decorators/dist/model/.pydio
vendored
Normal file
1
tsVue3Decorators/dist/model/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
67991ae4-3d3c-4efe-ae47-832c0548118d
|
||||
29
tsVue3Decorators/dist/model/ajax.model.js
vendored
Normal file
29
tsVue3Decorators/dist/model/ajax.model.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ajaxModel = void 0;
|
||||
var AjaxModel = /** @class */ (function () {
|
||||
function AjaxModel() {
|
||||
}
|
||||
Object.defineProperty(AjaxModel.prototype, "urlModelContainer", {
|
||||
get: function () {
|
||||
return this._urlModelContainer;
|
||||
},
|
||||
set: function (AjaxUrl) {
|
||||
this._urlModelContainer = AjaxUrl;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AjaxModel.prototype, "AjaxModelContainer", {
|
||||
get: function () {
|
||||
return this._AjaxModelContainer;
|
||||
},
|
||||
set: function (AjaxObjecy) {
|
||||
this._AjaxModelContainer = AjaxObjecy;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return AjaxModel;
|
||||
}());
|
||||
exports.ajaxModel = new AjaxModel();
|
||||
20
tsVue3Decorators/dist/model/directive.model.js
vendored
Normal file
20
tsVue3Decorators/dist/model/directive.model.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.directiveModel = void 0;
|
||||
var DirectiveModel = /** @class */ (function () {
|
||||
function DirectiveModel() {
|
||||
this._DirectiveContainer = [];
|
||||
}
|
||||
Object.defineProperty(DirectiveModel.prototype, "DirectiveContainer", {
|
||||
get: function () {
|
||||
return this._DirectiveContainer;
|
||||
},
|
||||
set: function (Directive) {
|
||||
this._DirectiveContainer.push(Directive);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return DirectiveModel;
|
||||
}());
|
||||
exports.directiveModel = new DirectiveModel();
|
||||
20
tsVue3Decorators/dist/model/global.method.model.js
vendored
Normal file
20
tsVue3Decorators/dist/model/global.method.model.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.globalMethodModel = void 0;
|
||||
var GlobalMethod = /** @class */ (function () {
|
||||
function GlobalMethod() {
|
||||
this._GlobalMethod = [];
|
||||
}
|
||||
Object.defineProperty(GlobalMethod.prototype, "GlobalMethod", {
|
||||
get: function () {
|
||||
return this._GlobalMethod;
|
||||
},
|
||||
set: function (globalMethod) {
|
||||
this._GlobalMethod.push(globalMethod);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return GlobalMethod;
|
||||
}());
|
||||
exports.globalMethodModel = new GlobalMethod();
|
||||
19
tsVue3Decorators/dist/model/injectable.model.js
vendored
Normal file
19
tsVue3Decorators/dist/model/injectable.model.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var InjectableModel = /** @class */ (function () {
|
||||
function InjectableModel() {
|
||||
this._InjectableModelContainer = [];
|
||||
}
|
||||
Object.defineProperty(InjectableModel.prototype, "InjectableModel", {
|
||||
get: function () {
|
||||
return this._InjectableModelContainer;
|
||||
},
|
||||
set: function (constructor) {
|
||||
this._InjectableModelContainer.push(constructor);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return InjectableModel;
|
||||
}());
|
||||
exports.InjectModel = new InjectableModel();
|
||||
20
tsVue3Decorators/dist/model/mixin.model.js
vendored
Normal file
20
tsVue3Decorators/dist/model/mixin.model.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mixinModel = void 0;
|
||||
var MixinModel = /** @class */ (function () {
|
||||
function MixinModel() {
|
||||
this._MixinContainer = [];
|
||||
}
|
||||
Object.defineProperty(MixinModel.prototype, "MixinContainer", {
|
||||
get: function () {
|
||||
return this._MixinContainer;
|
||||
},
|
||||
set: function (Mixin) {
|
||||
this._MixinContainer.push(Mixin);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return MixinModel;
|
||||
}());
|
||||
exports.mixinModel = new MixinModel();
|
||||
19
tsVue3Decorators/dist/model/startboot.model.js
vendored
Normal file
19
tsVue3Decorators/dist/model/startboot.model.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var StartbootModel = /** @class */ (function () {
|
||||
function StartbootModel() {
|
||||
this._StartbootModelContainer = [];
|
||||
}
|
||||
Object.defineProperty(StartbootModel.prototype, "StartbootModelContainer", {
|
||||
get: function () {
|
||||
return this._StartbootModelContainer;
|
||||
},
|
||||
set: function (constructor) {
|
||||
this._StartbootModelContainer.push(constructor);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return StartbootModel;
|
||||
}());
|
||||
exports.ajaxModel = new StartbootModel();
|
||||
29
tsVue3Decorators/index.js
Normal file
29
tsVue3Decorators/index.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const { Injectable, Inject } = require("./dist/decorators/Ioc.decorators");
|
||||
const { Directive } = require('./dist/decorators/directive.decorators');
|
||||
const { GlobalMethod } = require('./dist/decorators/global.decorators');
|
||||
const { Mixin } = require('./dist/decorators/mixin.decorators');
|
||||
const { GET, POST, PUT, DELETE } = require('./dist/decorators/request.decorators');
|
||||
const { StartBoot } = require('./dist/decorators/startboot.decorators');
|
||||
|
||||
|
||||
const { directiveModel } = require('./dist/model/directive.model');
|
||||
const { mixinModel } = require('./dist/model/mixin.model');
|
||||
const { globalMethodModel } = require('./dist/model/global.method.model');
|
||||
const { ajaxModel } = require('./dist/model/ajax.model');
|
||||
|
||||
module.exports = {
|
||||
Injectable,
|
||||
Inject,
|
||||
Directive,
|
||||
GlobalMethod,
|
||||
Mixin,
|
||||
GET,
|
||||
POST,
|
||||
PUT,
|
||||
DELETE,
|
||||
StartBoot,
|
||||
directiveModel,
|
||||
mixinModel,
|
||||
globalMethodModel,
|
||||
ajaxModel
|
||||
};
|
||||
20
tsVue3Decorators/package.json
Normal file
20
tsVue3Decorators/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "vue3decorators",
|
||||
"version": "1.2.8",
|
||||
"description": "基于Vue3+TypeScript写的注解,推荐搭配Vue3Template使用",
|
||||
"main": "index.js",
|
||||
"typings": "types/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"tslib": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^13.7.1"
|
||||
}
|
||||
}
|
||||
40
tsVue3Decorators/tsconfig.json
Normal file
40
tsVue3Decorators/tsconfig.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "dist/",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"importHelpers": true,
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "types",
|
||||
"sourceMap": false,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"tests/**/*.ts",
|
||||
"tests/**/*.tsx", "test.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
1
tsVue3Decorators/types/.pydio
Normal file
1
tsVue3Decorators/types/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3e0e68cc-2a37-4abb-9d84-be7c0039fe78
|
||||
1
tsVue3Decorators/types/decorators/.pydio
Normal file
1
tsVue3Decorators/types/decorators/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
5e424772-d2d2-4c07-946f-0f474faf539b
|
||||
3
tsVue3Decorators/types/decorators/Ioc.decorators.d.ts
vendored
Normal file
3
tsVue3Decorators/types/decorators/Ioc.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import "reflect-metadata";
|
||||
export declare function Injectable(): (_constructor: Function) => void;
|
||||
export declare function Inject(): (_constructor: any, propertyName: string) => any;
|
||||
7
tsVue3Decorators/types/decorators/directive.decorators.d.ts
vendored
Normal file
7
tsVue3Decorators/types/decorators/directive.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import "reflect-metadata";
|
||||
/**
|
||||
* 收集存储Vue的指令
|
||||
* n: 指令名就是方法名
|
||||
* f: 调用方法后的返回值是个对象
|
||||
*/
|
||||
export declare function Directive(): (target: any, propertyKey: string) => void;
|
||||
7
tsVue3Decorators/types/decorators/global.decorators.d.ts
vendored
Normal file
7
tsVue3Decorators/types/decorators/global.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import "reflect-metadata";
|
||||
/**
|
||||
* 收集存储Vue的指令
|
||||
* n: 指令名就是方法名
|
||||
* f: 调用方法后的返回值是个对象
|
||||
*/
|
||||
export declare function GlobalMethod(): (target: any, propertyKey: string) => void;
|
||||
5
tsVue3Decorators/types/decorators/mixin.decorators.d.ts
vendored
Normal file
5
tsVue3Decorators/types/decorators/mixin.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
/**
|
||||
* 收集存储mixin
|
||||
*/
|
||||
export declare function Mixin(): (target: any, propertyKey: string) => void;
|
||||
8
tsVue3Decorators/types/decorators/request.decorators.d.ts
vendored
Normal file
8
tsVue3Decorators/types/decorators/request.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import "reflect-metadata";
|
||||
export declare function GET(RequestParams?: {
|
||||
url?: string;
|
||||
useHandle?: boolean;
|
||||
}): (target: any, propertyKey: string, descriptor: any) => any;
|
||||
export declare function POST(): (target: any, propertyKey: string, descriptor: any) => void;
|
||||
export declare function PUT(): (target: any, propertyKey: string, descriptor: any) => void;
|
||||
export declare function DELETE(): (target: any, propertyKey: string, descriptor: any) => void;
|
||||
7
tsVue3Decorators/types/decorators/startboot.decorators.d.ts
vendored
Normal file
7
tsVue3Decorators/types/decorators/startboot.decorators.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare function StartBoot(closeWelcome?: boolean): (_constructor: any) => {
|
||||
new (): {
|
||||
[x: string]: any;
|
||||
WelcomeUser(): void;
|
||||
};
|
||||
[x: string]: any;
|
||||
};
|
||||
79
tsVue3Decorators/types/index.d.ts
vendored
Normal file
79
tsVue3Decorators/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
/**
|
||||
* 存储Vue全局指令的容器
|
||||
*/
|
||||
export const directiveModel: {
|
||||
DirectiveContainer: any[];
|
||||
};
|
||||
|
||||
/**
|
||||
* 存储全局方法的容器
|
||||
*/
|
||||
export const globalMethodModel: {
|
||||
GlobalMethod: any[];
|
||||
};
|
||||
|
||||
/**
|
||||
* 存储Vue全局Mixin的容器
|
||||
*/
|
||||
export const mixinModel: {
|
||||
MixinContainer: any[];
|
||||
};
|
||||
|
||||
export const ajaxModel: {
|
||||
AjaxModelContainer: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* 发送 DELETE 请求
|
||||
*/
|
||||
export function DELETE(...args: any[]): any;
|
||||
|
||||
/**
|
||||
* 保存ajax实例
|
||||
* @param args
|
||||
*/
|
||||
export function SaveApi(...args: any[]): any;
|
||||
|
||||
/**
|
||||
* 收集存储指令
|
||||
*/
|
||||
export function Directive(): any;
|
||||
|
||||
/**
|
||||
* 发送 GET 请求
|
||||
*/
|
||||
export function GET(...args: any[]): any;
|
||||
|
||||
/**
|
||||
* 收集全局方法
|
||||
*/
|
||||
export function GlobalMethod(): any;
|
||||
|
||||
/**
|
||||
* 向类的属性注入依赖
|
||||
*/
|
||||
export function Inject(): any;
|
||||
|
||||
/**
|
||||
* 收集依赖
|
||||
*/
|
||||
export function Injectable(): any;
|
||||
|
||||
export function StartBoot(b?: boolean): any;
|
||||
|
||||
/**
|
||||
* 收集全局Mixin
|
||||
*/
|
||||
export function Mixin(): any;
|
||||
|
||||
/**
|
||||
* 发送 POST 请求
|
||||
*/
|
||||
export function POST(...args: any[]): any;
|
||||
|
||||
/**
|
||||
* 发送 PUT 请求
|
||||
*/
|
||||
export function PUT(...args: any[]): any;
|
||||
1
tsVue3Decorators/types/model/.pydio
Normal file
1
tsVue3Decorators/types/model/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
4ae5a038-3437-460d-ba8f-db070e2678d8
|
||||
10
tsVue3Decorators/types/model/ajax.model.d.ts
vendored
Normal file
10
tsVue3Decorators/types/model/ajax.model.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
declare class AjaxModel {
|
||||
private _AjaxModelContainer;
|
||||
private _urlModelContainer;
|
||||
get urlModelContainer(): object;
|
||||
set urlModelContainer(AjaxUrl: object);
|
||||
get AjaxModelContainer(): any;
|
||||
set AjaxModelContainer(AjaxObjecy: any);
|
||||
}
|
||||
export declare const ajaxModel: AjaxModel;
|
||||
export {};
|
||||
7
tsVue3Decorators/types/model/directive.model.d.ts
vendored
Normal file
7
tsVue3Decorators/types/model/directive.model.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare class DirectiveModel {
|
||||
private _DirectiveContainer;
|
||||
get DirectiveContainer(): object;
|
||||
set DirectiveContainer(Directive: object);
|
||||
}
|
||||
export declare const directiveModel: DirectiveModel;
|
||||
export {};
|
||||
7
tsVue3Decorators/types/model/global.method.model.d.ts
vendored
Normal file
7
tsVue3Decorators/types/model/global.method.model.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare class GlobalMethod {
|
||||
private _GlobalMethod;
|
||||
get GlobalMethod(): any;
|
||||
set GlobalMethod(globalMethod: any);
|
||||
}
|
||||
export declare const globalMethodModel: GlobalMethod;
|
||||
export {};
|
||||
7
tsVue3Decorators/types/model/mixin.model.d.ts
vendored
Normal file
7
tsVue3Decorators/types/model/mixin.model.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare class MixinModel {
|
||||
private _MixinContainer;
|
||||
get MixinContainer(): object;
|
||||
set MixinContainer(Mixin: object);
|
||||
}
|
||||
export declare const mixinModel: MixinModel;
|
||||
export {};
|
||||
2
tsvue/.browserslistrc
Normal file
2
tsvue/.browserslistrc
Normal file
@@ -0,0 +1,2 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
22
tsvue/.gitignore
vendored
Normal file
22
tsvue/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
./memo.txt
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
1
tsvue/.pydio
Normal file
1
tsvue/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ff6b35d1-5690-47d0-a0e9-b9e1ade44fdc
|
||||
82
tsvue/README.md
Normal file
82
tsvue/README.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# 1:Vue3Template
|
||||
|
||||
使用Vue-cli3,并基于 Vue3.0 Composition-Api + TypeScript 改造搭建的基础项目骨架(符合我的使用习惯),可以直接下载运行。
|
||||
|
||||
快来感受Vue3.0的魅力吧...
|
||||
|
||||
- 1: Vue3.0 Composition-Api 访问地址:[https://github.com/vuejs/composition-api](https://github.com/vuejs/composition-api)
|
||||
- 2: TypeScript 中文网:[https://www.tslang.cn/docs/home.html](https://www.tslang.cn/docs/home.html)
|
||||
|
||||
## 运行
|
||||
```
|
||||
# 1:下载
|
||||
git clone https://github.com/helpcode/Vue3Template.git
|
||||
|
||||
# 2:运行
|
||||
npm run serve
|
||||
|
||||
# 3:打包构建-发布
|
||||
npm run build
|
||||
```
|
||||
|
||||
## 2:项目结构
|
||||
|
||||
项目的大致结构如下,具体更详细的请自行看源码!!!
|
||||
|
||||
```
|
||||
├── dist 打包后用于部署到服务器上的版本
|
||||
├── public 公共静态资源,图片,字体体积较大的放这!!
|
||||
└── src
|
||||
├── application 项目的页面组件部分
|
||||
│ ├── assets 较小的且需要被webpack处理的资源放这!!
|
||||
│ │ └── stylus stylus 样式
|
||||
│ │ ├── color 公共全局样色
|
||||
│ │ ├── common 公共css
|
||||
│ │ ├── components 页面样式
|
||||
│ │ └── mixin 公共css方法
|
||||
│ ├── components Vue公共组件
|
||||
│ └── page Vue页面组件
|
||||
└── core
|
||||
├── config 站点的核心配置文件,必看代码
|
||||
├── dao Axios的封装
|
||||
├── decorators 【已被抽离项目作为单独包】自定义的一些注解
|
||||
├── directive Vue自定义指令
|
||||
├── hooks Vue3 hooks
|
||||
├── mixin Vue自定义mixin
|
||||
├── run 项目的启动配置/启动文件
|
||||
├── service Ajax请求的中间层,实现接口规范,主要给组件页面调用
|
||||
│ └── impl 接口的具体实现逻辑
|
||||
├── types 一些Typescript的声明文件
|
||||
└── utils 公共方法
|
||||
```
|
||||
|
||||
## 3:注解包
|
||||
|
||||
这里不做篇幅介绍了,已实现的注解被抽离出去作为了一个单独的`npm`包,可以使用`npm`进行安装然后使用,具体注解用法看下面链接:
|
||||
|
||||
> vue3decorators 项目地址:[https://www.npmjs.com/package/vue3decorators](https://www.npmjs.com/package/vue3decorators)
|
||||
|
||||
## 4:自动生成路由配置
|
||||
|
||||
借鉴 [Nuxt.js](https://zh.nuxtjs.org/) 的路由源码实现,可以根据存放Vue-Router页面的文件夹结构自动生成Vue-Router配置文件。
|
||||
|
||||
> 插件包地址:[https://www.npmjs.com/package/vue-cli-plugin-autorouter](https://www.npmjs.com/package/vue-cli-plugin-autorouter)
|
||||
|
||||
## 5:tsvue3-cli 脚手架
|
||||
|
||||
一键创建 `Vue3Template`项目,更加快速的享受编码的乐趣。
|
||||
|
||||
> 插件包地址:[https://www.npmjs.com/package/tsvue3-cli](https://www.npmjs.com/package/tsvue3-cli)
|
||||
|
||||
## 6:项目运行思路
|
||||
|
||||
- 1: `vue.config.js` 中 `config.entry.app = './src/core/run/index.ts';` 设置了程序的入口文件,程序从这启动!
|
||||
- 2: `class Index` 继承 父类 `Init`, 这里 `index.ts` 只负责做初始化`Vue`的工作,所有的Vue参数插件等具体装载都在`init.ts`中
|
||||
- 3: `init.ts` 主要负责装载`Vue`和非`Vue`插件,`Vue Mixin`,`vue Directive`,`Vue-Router`等工作。而`init.ts`用到的一系列东西大部分都从`config/index.ts`中来。
|
||||
- 4: `config/index.ts`很核心,例如我们要安装UI框架`Vant`,那么请安装后再`config/index.ts`中导入,然后修改静态属性`VuePlugs`即可。具体请看代码,其它类似指令都类似。
|
||||
|
||||
额....好像就没有了,简单很。可以自己按照上面思路来看代码,代码里面都有注释。
|
||||
|
||||
**对了,记得看`src/application/page/Home.vue`里面的代码,还就是配置文件: `vue.config.js`也记得看下!**
|
||||
|
||||
|
||||
5
tsvue/babel.config.js
Normal file
5
tsvue/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
};
|
||||
1
tsvue/build/.pydio
Normal file
1
tsvue/build/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
a6b359f5-33a6-4d08-90b1-2ac337507262
|
||||
72
tsvue/build/dev.js
Normal file
72
tsvue/build/dev.js
Normal file
@@ -0,0 +1,72 @@
|
||||
const path = require('path');
|
||||
const VariableConfig = require('./variable');
|
||||
|
||||
/**
|
||||
* 开发阶段的一些基础配置
|
||||
*/
|
||||
class DevConfig {
|
||||
constructor(chainWebpack) {
|
||||
this.chainWebpack = chainWebpack;
|
||||
this.pubSetting();
|
||||
}
|
||||
|
||||
pubSetting() {
|
||||
|
||||
/**
|
||||
* 移除不必要的 prefetch 和 preload请求
|
||||
*/
|
||||
this.chainWebpack.plugins.delete('prefetch');
|
||||
this.chainWebpack.plugins.delete('preload');
|
||||
|
||||
/**
|
||||
* html 模板引擎 pug 配置
|
||||
*/
|
||||
this.chainWebpack.module.rule('pug')
|
||||
.test(/\.pug$/)
|
||||
.use('pug-html-loader')
|
||||
.loader('pug-html-loader')
|
||||
.end();
|
||||
|
||||
this.chainWebpack.module
|
||||
.rule('images')
|
||||
.use('url-loader')
|
||||
.loader('url-loader')
|
||||
.tap(options => Object.assign(options, { limit: 10240 }));
|
||||
|
||||
/**
|
||||
* 导入全局css
|
||||
* @type {*[]}
|
||||
*/
|
||||
const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
|
||||
types.forEach(type => this.addStyleResource(this.chainWebpack.module.rule('less').oneOf(type)));
|
||||
|
||||
/**
|
||||
* 配置路径别名,项目中引用资源的时候路径可以更简短
|
||||
* 但是ts文件在用的时候,编译器会报错,需要添加 @ts-ignore
|
||||
* 忽略开发工具的错误。
|
||||
*/
|
||||
this.chainWebpack.resolve.alias
|
||||
.set('@public', this.resolve(VariableConfig.PublicConfig.alias.public))
|
||||
.set('@core', this.resolve(VariableConfig.PublicConfig.alias.core))
|
||||
.set('@', this.resolve(VariableConfig.PublicConfig.alias.root))
|
||||
.set('@assets', this.resolve(VariableConfig.PublicConfig.alias.assets))
|
||||
.set('@less', this.resolve(VariableConfig.PublicConfig.alias.less))
|
||||
.set('@impl', this.resolve(VariableConfig.PublicConfig.alias.impl))
|
||||
}
|
||||
|
||||
addStyleResource(rule) {
|
||||
rule.use('style-resource')
|
||||
.loader('style-resources-loader')
|
||||
.options({
|
||||
patterns: [
|
||||
path.resolve(__dirname, VariableConfig.PublicConfig.alias.globalStyl)
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
resolve(dir) {
|
||||
return path.join(__dirname, dir);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DevConfig;
|
||||
72
tsvue/build/prod.js
Normal file
72
tsvue/build/prod.js
Normal file
@@ -0,0 +1,72 @@
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const VariableConfig = require('./variable');
|
||||
|
||||
/**
|
||||
* 正式阶段的一些配置
|
||||
*/
|
||||
class ProdConfig {
|
||||
|
||||
constructor(configureWebpack) {
|
||||
this.configureWebpack = configureWebpack
|
||||
|
||||
this.RemoveCommonPackage();
|
||||
this.CompressedCode();
|
||||
this.GzipCompressedCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* 去除这些公共包,让webpack不打包到项目源码的js中,减小项目js体积
|
||||
* 然后使用cdn 数组里面的资源外链来引入。
|
||||
*/
|
||||
RemoveCommonPackage() {
|
||||
this.configureWebpack.externals = {
|
||||
'vue': 'Vue',
|
||||
'vue-router': 'VueRouter',
|
||||
'axios': 'axios',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 部署阶段 代码压缩
|
||||
*/
|
||||
CompressedCode() {
|
||||
this.configureWebpack.plugins.push(
|
||||
// 生产环境自动删除 console,如果需要显示 console 请修改
|
||||
// drop_console 为 false
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false,
|
||||
drop_debugger: true,
|
||||
drop_console: true,
|
||||
},
|
||||
},
|
||||
sourceMap: false,
|
||||
parallel: true,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gzip压缩,开启 BundleAnalyzerPlugin(分析打包后的js文件体积)
|
||||
*/
|
||||
GzipCompressedCode() {
|
||||
this.configureWebpack.mode = 'production';
|
||||
return {
|
||||
plugins: [
|
||||
new CompressionPlugin({
|
||||
test: /\.js$|\.html$|\.css/, //匹配文件名
|
||||
threshold: 10240, //对超过10k的数据进行压缩
|
||||
deleteOriginalAssets: false //是否删除原文件
|
||||
}),
|
||||
new BundleAnalyzerPlugin(),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports = ProdConfig;
|
||||
25
tsvue/build/variable.js
Normal file
25
tsvue/build/variable.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// 基础变量配置
|
||||
module.exports = {
|
||||
PublicConfig: {
|
||||
// 入口
|
||||
entry: './src/core/run/index.run.ts',
|
||||
// 别名
|
||||
alias: {
|
||||
public: '../public',
|
||||
core: '../src/core',
|
||||
impl: '../src/core/service/impl',
|
||||
root: '../src/application',
|
||||
assets: '../src/application/assets',
|
||||
less: '../src/application/assets/less/components',
|
||||
globalStyl: '../src/application/assets/less/imports.less'
|
||||
}
|
||||
},
|
||||
cdn: {
|
||||
css: [],
|
||||
js: [
|
||||
'https://cdn.bootcss.com/vue/2.6.11/vue.runtime.min.js',
|
||||
'https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js',
|
||||
'https://cdn.bootcss.com/axios/0.19.2/axios.min.js',
|
||||
]
|
||||
}
|
||||
};
|
||||
4
tsvue/build/zip
Normal file
4
tsvue/build/zip
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
require('compressing').zip.compressDir('dist/', 'dist.zip')
|
||||
.then(() => console.log('zip Success'))
|
||||
.catch(err => console.error(err));
|
||||
1
tsvue/dist/.pydio
vendored
Normal file
1
tsvue/dist/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
e66e0c37-8305-4c6e-a54e-dcb568a3deed
|
||||
1
tsvue/dist/css/.pydio
vendored
Normal file
1
tsvue/dist/css/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2550847f-7b6f-402a-9b76-8ea246f9f9b2
|
||||
1
tsvue/dist/css/about.9e5e16dc.css
vendored
Normal file
1
tsvue/dist/css/about.9e5e16dc.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html[data-v-00d9bb7c]{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body[data-v-00d9bb7c]{margin:0;line-height:1.5;font-size:.37333rem;font-weight:400;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:#fafafa;color:rgba(0,0,0,.87)}li[data-v-00d9bb7c]{list-style:none}article[data-v-00d9bb7c],aside[data-v-00d9bb7c],footer[data-v-00d9bb7c],header[data-v-00d9bb7c],nav[data-v-00d9bb7c],section[data-v-00d9bb7c]{display:block}h1[data-v-00d9bb7c]{font-size:2em;margin:.67em 0}figcaption[data-v-00d9bb7c],figure[data-v-00d9bb7c],main[data-v-00d9bb7c]{display:block}figure[data-v-00d9bb7c]{margin:1em 1.06667rem}hr[data-v-00d9bb7c]{box-sizing:content-box;height:0;overflow:visible}pre[data-v-00d9bb7c]{font-family:monospace,monospace;font-size:1em;white-space:pre-wrap;word-break:break-all;margin:0}a[data-v-00d9bb7c]{text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}a[data-v-00d9bb7c]:active,a[data-v-00d9bb7c]:hover{outline-width:0}abbr[title][data-v-00d9bb7c]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b[data-v-00d9bb7c],strong[data-v-00d9bb7c]{font-weight:inherit;font-weight:bolder}code[data-v-00d9bb7c],kbd[data-v-00d9bb7c],samp[data-v-00d9bb7c]{font-family:monospace,monospace;font-size:1em}dfn[data-v-00d9bb7c]{font-style:italic}mark[data-v-00d9bb7c]{background-color:#ff0;color:#000}small[data-v-00d9bb7c]{font-size:80%}sub[data-v-00d9bb7c],sup[data-v-00d9bb7c]{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub[data-v-00d9bb7c]{bottom:-.25em}sup[data-v-00d9bb7c]{top:-.5em}audio[data-v-00d9bb7c],video[data-v-00d9bb7c]{display:inline-block}audio[data-v-00d9bb7c]:not([controls]){display:none;height:0}img[data-v-00d9bb7c]{border-style:none}svg[data-v-00d9bb7c]:not(:root){overflow:hidden}button[data-v-00d9bb7c],input[data-v-00d9bb7c],optgroup[data-v-00d9bb7c],select[data-v-00d9bb7c],textarea[data-v-00d9bb7c]{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button[data-v-00d9bb7c],input[data-v-00d9bb7c]{overflow:visible}button[data-v-00d9bb7c],select[data-v-00d9bb7c]{text-transform:none}[type=reset][data-v-00d9bb7c],[type=submit][data-v-00d9bb7c],button[data-v-00d9bb7c],html [type=button][data-v-00d9bb7c]{-webkit-appearance:button}[type=button][data-v-00d9bb7c]::-moz-focus-inner,[type=reset][data-v-00d9bb7c]::-moz-focus-inner,[type=submit][data-v-00d9bb7c]::-moz-focus-inner,button[data-v-00d9bb7c]::-moz-focus-inner{border-style:none;padding:0}[type=button][data-v-00d9bb7c]:-moz-focusring,[type=reset][data-v-00d9bb7c]:-moz-focusring,[type=submit][data-v-00d9bb7c]:-moz-focusring,button[data-v-00d9bb7c]:-moz-focusring{outline:.02667rem dotted ButtonText}fieldset[data-v-00d9bb7c]{border:.02667rem solid silver;margin:0 .05333rem;padding:.35em .625em .75em}legend[data-v-00d9bb7c]{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress[data-v-00d9bb7c]{display:inline-block;vertical-align:baseline}textarea[data-v-00d9bb7c]{overflow:auto;resize:vertical}[type=checkbox][data-v-00d9bb7c],[type=radio][data-v-00d9bb7c]{box-sizing:border-box;padding:0}[type=number][data-v-00d9bb7c]::-webkit-inner-spin-button,[type=number][data-v-00d9bb7c]::-webkit-outer-spin-button{height:auto}[type=search][data-v-00d9bb7c]{-webkit-appearance:textfield;outline-offset:-.05333rem}[type=search][data-v-00d9bb7c]::-webkit-search-cancel-button,[type=search][data-v-00d9bb7c]::-webkit-search-decoration{-webkit-appearance:none}[data-v-00d9bb7c]::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details[data-v-00d9bb7c],menu[data-v-00d9bb7c]{display:block}summary[data-v-00d9bb7c]{display:list-item}canvas[data-v-00d9bb7c]{display:inline-block}[hidden][data-v-00d9bb7c],template[data-v-00d9bb7c]{display:none}h1[data-v-00d9bb7c]{color:#ff0}
|
||||
1
tsvue/dist/css/chunk-vendors.ca93d528.css
vendored
Normal file
1
tsvue/dist/css/chunk-vendors.ca93d528.css
vendored
Normal file
File diff suppressed because one or more lines are too long
3
tsvue/dist/css/index.ac99156d.css
vendored
Normal file
3
tsvue/dist/css/index.ac99156d.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html[data-v-76ad04b1]{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body[data-v-76ad04b1]{margin:0;line-height:1.5;font-size:.37333rem;font-weight:400;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:#fafafa;color:rgba(0,0,0,.87)}li[data-v-76ad04b1]{list-style:none}article[data-v-76ad04b1],aside[data-v-76ad04b1],footer[data-v-76ad04b1],header[data-v-76ad04b1],nav[data-v-76ad04b1],section[data-v-76ad04b1]{display:block}h1[data-v-76ad04b1]{font-size:2em;margin:.67em 0}figcaption[data-v-76ad04b1],figure[data-v-76ad04b1],main[data-v-76ad04b1]{display:block}figure[data-v-76ad04b1]{margin:1em 1.06667rem}hr[data-v-76ad04b1]{box-sizing:content-box;height:0;overflow:visible}pre[data-v-76ad04b1]{font-family:monospace,monospace;font-size:1em;white-space:pre-wrap;word-break:break-all;margin:0}a[data-v-76ad04b1]{text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}a[data-v-76ad04b1]:active,a[data-v-76ad04b1]:hover{outline-width:0}abbr[title][data-v-76ad04b1]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b[data-v-76ad04b1],strong[data-v-76ad04b1]{font-weight:inherit;font-weight:bolder}code[data-v-76ad04b1],kbd[data-v-76ad04b1],samp[data-v-76ad04b1]{font-family:monospace,monospace;font-size:1em}dfn[data-v-76ad04b1]{font-style:italic}mark[data-v-76ad04b1]{background-color:#ff0;color:#000}small[data-v-76ad04b1]{font-size:80%}sub[data-v-76ad04b1],sup[data-v-76ad04b1]{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub[data-v-76ad04b1]{bottom:-.25em}sup[data-v-76ad04b1]{top:-.5em}audio[data-v-76ad04b1],video[data-v-76ad04b1]{display:inline-block}audio[data-v-76ad04b1]:not([controls]){display:none;height:0}img[data-v-76ad04b1]{border-style:none}svg[data-v-76ad04b1]:not(:root){overflow:hidden}button[data-v-76ad04b1],input[data-v-76ad04b1],optgroup[data-v-76ad04b1],select[data-v-76ad04b1],textarea[data-v-76ad04b1]{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button[data-v-76ad04b1],input[data-v-76ad04b1]{overflow:visible}button[data-v-76ad04b1],select[data-v-76ad04b1]{text-transform:none}[type=reset][data-v-76ad04b1],[type=submit][data-v-76ad04b1],button[data-v-76ad04b1],html [type=button][data-v-76ad04b1]{-webkit-appearance:button}[type=button][data-v-76ad04b1]::-moz-focus-inner,[type=reset][data-v-76ad04b1]::-moz-focus-inner,[type=submit][data-v-76ad04b1]::-moz-focus-inner,button[data-v-76ad04b1]::-moz-focus-inner{border-style:none;padding:0}[type=button][data-v-76ad04b1]:-moz-focusring,[type=reset][data-v-76ad04b1]:-moz-focusring,[type=submit][data-v-76ad04b1]:-moz-focusring,button[data-v-76ad04b1]:-moz-focusring{outline:.02667rem dotted ButtonText}fieldset[data-v-76ad04b1]{border:.02667rem solid silver;margin:0 .05333rem;padding:.35em .625em .75em}legend[data-v-76ad04b1]{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress[data-v-76ad04b1]{display:inline-block;vertical-align:baseline}textarea[data-v-76ad04b1]{overflow:auto;resize:vertical}[type=checkbox][data-v-76ad04b1],[type=radio][data-v-76ad04b1]{box-sizing:border-box;padding:0}[type=number][data-v-76ad04b1]::-webkit-inner-spin-button,[type=number][data-v-76ad04b1]::-webkit-outer-spin-button{height:auto}[type=search][data-v-76ad04b1]{-webkit-appearance:textfield;outline-offset:-.05333rem}[type=search][data-v-76ad04b1]::-webkit-search-cancel-button,[type=search][data-v-76ad04b1]::-webkit-search-decoration{-webkit-appearance:none}[data-v-76ad04b1]::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details[data-v-76ad04b1],menu[data-v-76ad04b1]{display:block}summary[data-v-76ad04b1]{display:list-item}canvas[data-v-76ad04b1]{display:inline-block}[hidden][data-v-76ad04b1],template[data-v-76ad04b1]{display:none}h3[data-v-76ad04b1]{margin:1.06667rem 0 0}
|
||||
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html[data-v-37acbc26]{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body[data-v-37acbc26]{margin:0;line-height:1.5;font-size:.37333rem;font-weight:400;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:#fafafa;color:rgba(0,0,0,.87)}li[data-v-37acbc26]{list-style:none}article[data-v-37acbc26],aside[data-v-37acbc26],footer[data-v-37acbc26],header[data-v-37acbc26],nav[data-v-37acbc26],section[data-v-37acbc26]{display:block}h1[data-v-37acbc26]{font-size:2em;margin:.67em 0}figcaption[data-v-37acbc26],figure[data-v-37acbc26],main[data-v-37acbc26]{display:block}figure[data-v-37acbc26]{margin:1em 1.06667rem}hr[data-v-37acbc26]{box-sizing:content-box;height:0;overflow:visible}pre[data-v-37acbc26]{font-family:monospace,monospace;font-size:1em;white-space:pre-wrap;word-break:break-all;margin:0}a[data-v-37acbc26]{text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}a[data-v-37acbc26]:active,a[data-v-37acbc26]:hover{outline-width:0}abbr[title][data-v-37acbc26]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b[data-v-37acbc26],strong[data-v-37acbc26]{font-weight:inherit;font-weight:bolder}code[data-v-37acbc26],kbd[data-v-37acbc26],samp[data-v-37acbc26]{font-family:monospace,monospace;font-size:1em}dfn[data-v-37acbc26]{font-style:italic}mark[data-v-37acbc26]{background-color:#ff0;color:#000}small[data-v-37acbc26]{font-size:80%}sub[data-v-37acbc26],sup[data-v-37acbc26]{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub[data-v-37acbc26]{bottom:-.25em}sup[data-v-37acbc26]{top:-.5em}audio[data-v-37acbc26],video[data-v-37acbc26]{display:inline-block}audio[data-v-37acbc26]:not([controls]){display:none;height:0}img[data-v-37acbc26]{border-style:none}svg[data-v-37acbc26]:not(:root){overflow:hidden}button[data-v-37acbc26],input[data-v-37acbc26],optgroup[data-v-37acbc26],select[data-v-37acbc26],textarea[data-v-37acbc26]{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button[data-v-37acbc26],input[data-v-37acbc26]{overflow:visible}button[data-v-37acbc26],select[data-v-37acbc26]{text-transform:none}[type=reset][data-v-37acbc26],[type=submit][data-v-37acbc26],button[data-v-37acbc26],html [type=button][data-v-37acbc26]{-webkit-appearance:button}[type=button][data-v-37acbc26]::-moz-focus-inner,[type=reset][data-v-37acbc26]::-moz-focus-inner,[type=submit][data-v-37acbc26]::-moz-focus-inner,button[data-v-37acbc26]::-moz-focus-inner{border-style:none;padding:0}[type=button][data-v-37acbc26]:-moz-focusring,[type=reset][data-v-37acbc26]:-moz-focusring,[type=submit][data-v-37acbc26]:-moz-focusring,button[data-v-37acbc26]:-moz-focusring{outline:.02667rem dotted ButtonText}fieldset[data-v-37acbc26]{border:.02667rem solid silver;margin:0 .05333rem;padding:.35em .625em .75em}legend[data-v-37acbc26]{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress[data-v-37acbc26]{display:inline-block;vertical-align:baseline}textarea[data-v-37acbc26]{overflow:auto;resize:vertical}[type=checkbox][data-v-37acbc26],[type=radio][data-v-37acbc26]{box-sizing:border-box;padding:0}[type=number][data-v-37acbc26]::-webkit-inner-spin-button,[type=number][data-v-37acbc26]::-webkit-outer-spin-button{height:auto}[type=search][data-v-37acbc26]{-webkit-appearance:textfield;outline-offset:-.05333rem}[type=search][data-v-37acbc26]::-webkit-search-cancel-button,[type=search][data-v-37acbc26]::-webkit-search-decoration{-webkit-appearance:none}[data-v-37acbc26]::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details[data-v-37acbc26],menu[data-v-37acbc26]{display:block}summary[data-v-37acbc26]{display:list-item}canvas[data-v-37acbc26]{display:inline-block}[hidden][data-v-37acbc26],template[data-v-37acbc26]{display:none}h2[data-v-37acbc26]{color:red}p[data-v-37acbc26]{font-size:.50667rem}
|
||||
BIN
tsvue/dist/favicon.ico
vendored
Normal file
BIN
tsvue/dist/favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
1
tsvue/dist/img/.pydio
vendored
Normal file
1
tsvue/dist/img/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
177a874c-3090-4c2d-b147-d4ee0bace377
|
||||
BIN
tsvue/dist/img/logo.82b9c7a5.png
vendored
Normal file
BIN
tsvue/dist/img/logo.82b9c7a5.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
BIN
tsvue/dist/img/logo.png
vendored
Normal file
BIN
tsvue/dist/img/logo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
1
tsvue/dist/index.html
vendored
Normal file
1
tsvue/dist/index.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><link href=css/chunk-vendors.ca93d528.css rel=stylesheet></head><body><noscript><strong>We're sorry but tsvue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=https://cdn.bootcss.com/vue/2.6.11/vue.runtime.min.js></script><script src=https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js></script><script src=https://cdn.bootcss.com/axios/0.19.2/axios.min.js></script><script src=js/chunk-vendors.57a59dbc.js></script><script src=js/app.bfef82a2.js></script></body></html>
|
||||
1
tsvue/dist/js/.pydio
vendored
Normal file
1
tsvue/dist/js/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
6dd9e7db-d7cf-4b85-a1eb-832e4455de84
|
||||
1
tsvue/dist/js/about.7b6e1759.js
vendored
Normal file
1
tsvue/dist/js/about.7b6e1759.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([["about"],{"1e21":function(t,e,n){"use strict";var c=n("2850");n.n(c).a},2850:function(t,e,n){},"584e":function(t,e,n){"use strict";n.r(e);var c=n("5530"),u=(n("96cf"),n("1da1")),o=n("750b"),a=Object(o.a)({props:{},setup:function(t,e){var n=Object(o.f)({title:Object(o.g)("关于我页面"),count:Object(o.g)(0)}),a=Object(o.g)("张三");return Object(o.d)(Object(u.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case 1:case"end":return t.stop()}}),t)})))),Object(c.a)({},Object(o.h)(n),{Test:a,addCount:function(){n.count+=1}})}}),r=(n("1e21"),n("2877")),s=n("8148"),i=n.n(s),b=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("h1",{on:{click:t.addCount}},[t._v(t._s(t.title))]),n("p",[t._v(t._s(t.count))]),n("p",[t._v("Test: "+t._s(t.Test))])])}),[],!1,null,"00d9bb7c",null);"function"==typeof i.a&&i()(b),e.default=b.exports},8148:function(t,e){}}]);
|
||||
1
tsvue/dist/js/app.bfef82a2.js
vendored
Normal file
1
tsvue/dist/js/app.bfef82a2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
45
tsvue/dist/js/chunk-vendors.57a59dbc.js
vendored
Normal file
45
tsvue/dist/js/chunk-vendors.57a59dbc.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
tsvue/dist/js/index.c70d4b6b.js
vendored
Normal file
1
tsvue/dist/js/index.c70d4b6b.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([["index"],{"0b51":function(e,t,n){"use strict";n.r(t);var r,a,c,i=n("5530"),o=(n("96cf"),n("1da1")),u=n("b650"),s=n("750b"),p=(n("d3b7"),n("d4ec")),d=n("bee2"),f=n("9ab4"),l=n("659f"),b=function(){function e(){Object(p.a)(this,e)}return Object(d.a)(e,[{key:"index",value:function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"haha",value:function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"Login",value:function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}();Object(f.__decorate)([Object(l.GET)(),Object(f.__metadata)("design:type",Function),Object(f.__metadata)("design:paramtypes",[Object]),Object(f.__metadata)("design:returntype","function"==typeof(r="undefined"!=typeof Promise&&Promise)?r:Object)],b.prototype,"index",null),Object(f.__decorate)([Object(l.POST)(),Object(f.__metadata)("design:type",Function),Object(f.__metadata)("design:paramtypes",[Object]),Object(f.__metadata)("design:returntype","function"==typeof(a="undefined"!=typeof Promise&&Promise)?a:Object)],b.prototype,"haha",null),Object(f.__decorate)([Object(l.PUT)(),Object(f.__metadata)("design:type",Function),Object(f.__metadata)("design:paramtypes",[Object]),Object(f.__metadata)("design:returntype","function"==typeof(c="undefined"!=typeof Promise&&Promise)?c:Object)],b.prototype,"Login",null);var m=new b,O=Object(s.a)({name:"hello-word",props:{title:{type:String,default:"HelloWorld 子组件的默认Props值"}},setup:function(){}}),j=(n("cbec"),n("2877")),_=Object(j.a)(O,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"hello"},[t("h1",[this._v(this._s(this.title))])])}),[],!1,null,"76ad04b1",null).exports,v=Object(s.a)({name:"index",props:{},filters:{gets:function(e){return e+" | 过滤器"}},setup:function(e,t){Object(s.c)("Broadcast");var n=Object(s.f)({title:Object(s.g)("首页"),list:Object(s.g)([])});Object(s.d)(Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.root.$setTitle("测试"),e.next=3,m.haha({name:"bmy",age:[18,19,17]});case 3:e.sent;case 5:case"end":return e.stop()}}),e)}))));var r=function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.index({id:1,page:1});case 2:t=e.sent,n.list=t.result;case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(i.a)({},Object(s.h)(n),{loadData:r})},components:{"v-hellowold":_,Button:u.a}}),g=(n("8e1f"),n("a89a")),h=n.n(g),y=Object(j.a)(v,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"home"},[r("img",{attrs:{alt:"Vue logo",src:n("c780")}}),r("h2",{directives:[{name:"index",rawName:"v-index",value:200,expression:"200"}]},[e._v(e._s(e._f("gets")(e.title)))]),r("p",{directives:[{name:"test",rawName:"v-test"}]},[e._v("请打开控制台查看更多")]),r("v-hellowold",{attrs:{title:"父向子传递数据"}}),r("Button",{attrs:{type:"primary"},on:{click:e.loadData}},[e._v("点击请求数据")]),r("ul",e._l(e.list,(function(t,n){return r("li",{key:n},[r("p",[e._v(e._s(t.id)+" : "+e._s(t.name))])])})),0)],1)}),[],!1,null,"37acbc26",null);"function"==typeof h.a&&h()(y),t.default=y.exports},"3bb4":function(e,t,n){},"4b6d":function(e,t,n){},"8e1f":function(e,t,n){"use strict";var r=n("4b6d");n.n(r).a},a89a:function(e,t){},c780:function(e,t,n){e.exports=n.p+"img/logo.82b9c7a5.png"},cbec:function(e,t,n){"use strict";var r=n("3bb4");n.n(r).a}}]);
|
||||
1
tsvue/dist/js/user.f1653b87.js
vendored
Normal file
1
tsvue/dist/js/user.f1653b87.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([["user"],{"9b15":function(t,e,s){"use strict";s.r(e);var n=s("5530"),i=s("750b"),c=Object(i.a)({props:{},setup:function(t,e){var s=Object(i.f)({title:Object(i.g)("用户中心")});return Object(n.a)({},Object(i.h)(s))}}),r=s("2877"),u=s("f862"),a=s.n(u),o=Object(r.a)(c,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"user-list"},[e("h1",[this._v(this._s(this.title))]),e("router-view")],1)}),[],!1,null,"0354f574",null);"function"==typeof a.a&&a()(o),e.default=o.exports},f862:function(t,e){}}]);
|
||||
1
tsvue/dist/js/user_id.a0612f10.js
vendored
Normal file
1
tsvue/dist/js/user_id.a0612f10.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([["user_id"],{"0eef":function(t,e,n){"use strict";n.r(e);var s=n("5530"),c=n("750b"),i=Object(c.a)({props:{},setup:function(t,e){var n=Object(c.f)({title:Object(c.g)("用户详情页面")});return Object(s.a)({},Object(c.h)(n))}}),u=n("2877"),r=n("f52d"),a=n.n(r),f=Object(u.a)(i,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"user-info"},[e("h1",[this._v(this._s(this.title))])])}),[],!1,null,"7edc454c",null);"function"==typeof a.a&&a()(f),e.default=f.exports},f52d:function(t,e){}}]);
|
||||
1
tsvue/dist/js/userindex.0f146701.js
vendored
Normal file
1
tsvue/dist/js/userindex.0f146701.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([["userindex"],{"04e9":function(t,e,n){"use strict";n.r(e);var i=n("5530"),s=n("750b"),c=Object(s.a)({props:{},setup:function(t,e){var n=Object(s.f)({title:Object(s.g)("用户index页面")});return Object(i.a)({},Object(s.h)(n))}}),u=n("2877"),r=n("b32f"),a=n.n(r),o=Object(u.a)(c,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"user-info"},[e("h1",[this._v(this._s(this.title))])])}),[],!1,null,"14d773d8",null);"function"==typeof a.a&&a()(o),e.default=o.exports},b32f:function(t,e){}}]);
|
||||
25
tsvue/gulpfile.js
Normal file
25
tsvue/gulpfile.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const gulp = require('gulp');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
/**
|
||||
* 执行 vue-cli-service route 命令进行路由编译
|
||||
*/
|
||||
gulp.task('AutoCompileRouter', function(cb) {
|
||||
return exec('npm run route', (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.log("编译失败: ", err);
|
||||
cb(err)
|
||||
} else {
|
||||
console.log("编译成功");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 监听 page 所有文件的修改,自动触发 AutoCompileRouter 任务
|
||||
*/
|
||||
gulp.task('auto', function () {
|
||||
gulp.watch('src/application/page/**/*', gulp.parallel('AutoCompileRouter'));
|
||||
});
|
||||
|
||||
gulp.task('default', gulp.parallel('auto'));
|
||||
15
tsvue/jsconfig.json
Normal file
15
tsvue/jsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/application"],
|
||||
"@core/*": ["src/core"],
|
||||
"@assets/*": ["src/application/assets"]
|
||||
},
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
34
tsvue/memo.txt
Normal file
34
tsvue/memo.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
【实现】1: 指令的实现可以考虑采用注解的方式实现
|
||||
|
||||
思路:
|
||||
1: decorators/ 文件夹实现一个注解,可以放在 directive 的方法上
|
||||
2: 注解收集到方法名,作为指令名,方法函数作为处理函数,然后保存到数组
|
||||
3: init.ts 初始化文件中加载数组自动装入Vue中
|
||||
|
||||
【实现】2: 通过注解实现mixin自动注入
|
||||
|
||||
【实现】3: 非Vue插件也使用注解进行全局注入并挂载到Vue原型上。
|
||||
|
||||
【未实现/放弃】4:简化init.run.ts注入运行类过程
|
||||
|
||||
状态:尝试过了,不行,已放弃....
|
||||
|
||||
【实现】5:浏览器控制台console启动的Banner和vue-cli-plugin-autorouter合并到一起,作为一个插件包。
|
||||
|
||||
【实现】6:简化 @GET,@POST等注解,去除参数,用方法名作为ApiList的Key。
|
||||
|
||||
【实现】7:每次添加新的组件时,都需要手动执行命令 vue-cli-service route 进而重新生成路由配置文件,对懒人而言,太TM麻烦了!!
|
||||
|
||||
解决思路:
|
||||
|
||||
1:使用 gulp,监听 /src/application/page 文件夹,当发生文件的增,删,改的时候都在后台自动执行命令 vue-cli-service route
|
||||
2:vue-cli-service route 会重新生成配置文件,然后 vue-cli-service serve 会自动重启当前网站
|
||||
3:开发者只需要手动刷新一下页面,新路由配置即刻生效。
|
||||
|
||||
【未实现】8:完善vue-cli-plugin-autorouter,继续实现可以自定义参数,并能够作为单独的依赖包被使用到其他Vue项目上。
|
||||
|
||||
问题:如果要能在其他Vue项目上也被使用,那么现在的插件包就不能基于 vue-cli-service,因为Vue cli 2.x 或者其他手配的
|
||||
Vue项目没有,vue-cli-service。
|
||||
所以需要脱离vue-cli-service作为一个单独的 nodejs 包,才可以实现所有Vue项目全部通用。
|
||||
|
||||
【实现】9:cli脚手架一键创建项目
|
||||
13862
tsvue/package-lock.json
generated
Normal file
13862
tsvue/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
44
tsvue/package.json
Normal file
44
tsvue/package.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "tsvue",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm run route && npm run serve\" \"gulp\" ",
|
||||
"serve": "cross-env NODE_ENV=dev vue-cli-service serve",
|
||||
"build": "cross-env NODE_ENV=production vue-cli-service build && node ./build/zip",
|
||||
"route": "vue-cli-service route"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/composition-api": "^0.3.4",
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"axios": "^0.19.2",
|
||||
"js-md5": "^0.7.3",
|
||||
"vant": "^2.5.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.1.5",
|
||||
"weixin-js-sdk": "^1.4.0-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.2.0",
|
||||
"@vue/cli-plugin-typescript": "^4.2.0",
|
||||
"@vue/cli-service": "^4.2.0",
|
||||
"babel-plugin-import": "^1.13.0",
|
||||
"compression-webpack-plugin": "^3.1.0",
|
||||
"concurrently": "^5.1.0",
|
||||
"core-js": "^3.6.4",
|
||||
"glob": "^7.1.3",
|
||||
"gulp": "^4.0.2",
|
||||
"less": "^3.11.1",
|
||||
"less-loader": "^5.0.0",
|
||||
"pify": "^4.0.1",
|
||||
"pug-html-loader": "^1.1.5",
|
||||
"pug-plain-loader": "^1.0.0",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"style-resources-loader": "^1.3.3",
|
||||
"uglifyjs-webpack-plugin": "^1.1.1",
|
||||
"typescript": "~3.9.3",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"vue-cli-plugin-autorouter": "^1.3.3",
|
||||
"vue3decorators": "^1.2.6"
|
||||
}
|
||||
}
|
||||
1
tsvue/public/.pydio
Normal file
1
tsvue/public/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
1793136b-5bfc-453f-b558-8f4a373a3114
|
||||
BIN
tsvue/public/favicon.ico
Normal file
BIN
tsvue/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
1
tsvue/public/font/.pydio
Normal file
1
tsvue/public/font/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
4c591313-31d6-4621-aba7-bd370ed50da2
|
||||
1
tsvue/public/img/.pydio
Normal file
1
tsvue/public/img/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
519f4ac5-7319-4146-ba2d-2fb1df09f1d2
|
||||
BIN
tsvue/public/img/logo.png
Normal file
BIN
tsvue/public/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
19
tsvue/public/index.html
Normal file
19
tsvue/public/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
|
||||
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
|
||||
<% } %>
|
||||
</body>
|
||||
</html>
|
||||
1
tsvue/src/.pydio
Normal file
1
tsvue/src/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f74b83ff-edd8-4aca-851f-bb4dd4c2a4a4
|
||||
1
tsvue/src/application/.pydio
Normal file
1
tsvue/src/application/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c64556f5-462f-4e5c-b30b-ec23e77fe440
|
||||
28
tsvue/src/application/App.vue
Normal file
28
tsvue/src/application/App.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template lang="pug">
|
||||
#app
|
||||
#nav
|
||||
router-link(to='/') Home |
|
||||
router-link(to='/about') About
|
||||
router-view
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { toRefs, Ref, ref, reactive, createComponent, provide, onMounted, SetupContext } from '@vue/composition-api';
|
||||
//@ts-ignore
|
||||
import { HelpingPopupMessageChannel } from '@core/hooks/MessageChannel.hooks';
|
||||
|
||||
export default createComponent({
|
||||
setup() {
|
||||
// 向所有组件共享 广播,避免所有页面都导入文件
|
||||
provide("Broadcast", HelpingPopupMessageChannel());
|
||||
|
||||
onMounted(() => {});
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/* 导入全局css样式 */
|
||||
@import "~@assets/less/common/normalize";
|
||||
</style>
|
||||
1
tsvue/src/application/assets/.pydio
Normal file
1
tsvue/src/application/assets/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
4d715ade-7441-4c5f-bab9-4f0aab8e8c15
|
||||
1
tsvue/src/application/assets/less/.pydio
Normal file
1
tsvue/src/application/assets/less/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
069b2d07-7f2f-40ad-900b-419eac4f814b
|
||||
1
tsvue/src/application/assets/less/color/.pydio
Normal file
1
tsvue/src/application/assets/less/color/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
7db75ead-4586-483c-abc8-69f29a7bdecb
|
||||
309
tsvue/src/application/assets/less/color/index.less
Normal file
309
tsvue/src/application/assets/less/color/index.less
Normal file
@@ -0,0 +1,309 @@
|
||||
// 公共css样式,可以在 页面组件中直接使用变量名称
|
||||
// 具体看 components/home.styl
|
||||
@theme-color: red;
|
||||
@test-color: yellow;
|
||||
|
||||
@red50: #ffebee;
|
||||
@red100: #ffcdd2;
|
||||
@red200: #ef9a9a;
|
||||
@red300: #e57373;
|
||||
@red400: #ef5350;
|
||||
@red500: #f44336;
|
||||
@red600: #e53935;
|
||||
@red700: #d32f2f;
|
||||
@red800: #c62828;
|
||||
@red900: #b71c1c;
|
||||
@redA100: #ff8a80;
|
||||
@redA200: #ff5252;
|
||||
@redA400: #ff1744;
|
||||
@redA700: #d50000;
|
||||
@red: @red500;
|
||||
|
||||
@pink50: #fce4ec;
|
||||
@pink100: #f8bbd0;
|
||||
@pink200: #f48fb1;
|
||||
@pink300: #f06292;
|
||||
@pink400: #ec407a;
|
||||
@pink500: #e91e63;
|
||||
@pink600: #d81b60;
|
||||
@pink700: #c2185b;
|
||||
@pink800: #ad1457;
|
||||
@pink900: #880e4f;
|
||||
@pinkA100: #ff80ab;
|
||||
@pinkA200: #ff4081;
|
||||
@pinkA400: #f50057;
|
||||
@pinkA700: #c51162;
|
||||
@pink: @pink500;
|
||||
|
||||
@purple50: #f3e5f5;
|
||||
@purple100: #e1bee7;
|
||||
@purple200: #ce93d8;
|
||||
@purple300: #ba68c8;
|
||||
@purple400: #ab47bc;
|
||||
@purple500: #9c27b0;
|
||||
@purple600: #8e24aa;
|
||||
@purple700: #7b1fa2;
|
||||
@purple800: #6a1b9a;
|
||||
@purple900: #4a148c;
|
||||
@purpleA100: #ea80fc;
|
||||
@purpleA200: #e040fb;
|
||||
@purpleA400: #d500f9;
|
||||
@purpleA700: #aa00ff;
|
||||
@purple: @purple500;
|
||||
|
||||
@deepPurple50: #ede7f6;
|
||||
@deepPurple100: #d1c4e9;
|
||||
@deepPurple200: #b39ddb;
|
||||
@deepPurple300: #9575cd;
|
||||
@deepPurple400: #7e57c2;
|
||||
@deepPurple500: #673ab7;
|
||||
@deepPurple600: #5e35b1;
|
||||
@deepPurple700: #512da8;
|
||||
@deepPurple800: #4527a0;
|
||||
@deepPurple900: #311b92;
|
||||
@deepPurpleA100: #b388ff;
|
||||
@deepPurpleA200: #7c4dff;
|
||||
@deepPurpleA400: #651fff;
|
||||
@deepPurpleA700: #6200ea;
|
||||
@deepPurple: @deepPurple500;
|
||||
|
||||
@indigo50: #e8eaf6;
|
||||
@indigo100: #c5cae9;
|
||||
@indigo200: #9fa8da;
|
||||
@indigo300: #7986cb;
|
||||
@indigo400: #5c6bc0;
|
||||
@indigo500: #3f51b5;
|
||||
@indigo600: #3949ab;
|
||||
@indigo700: #303f9f;
|
||||
@indigo800: #283593;
|
||||
@indigo900: #1a237e;
|
||||
@indigoA100: #8c9eff;
|
||||
@indigoA200: #536dfe;
|
||||
@indigoA400: #3d5afe;
|
||||
@indigoA700: #304ffe;
|
||||
@indigo: @indigo500;
|
||||
|
||||
@blue50: #e3f2fd;
|
||||
@blue100: #bbdefb;
|
||||
@blue200: #90caf9;
|
||||
@blue300: #64b5f6;
|
||||
@blue400: #42a5f5;
|
||||
@blue500: #2196f3;
|
||||
@blue600: #1e88e5;
|
||||
@blue700: #1976d2;
|
||||
@blue800: #1565c0;
|
||||
@blue900: #0d47a1;
|
||||
@blueA100: #82b1ff;
|
||||
@blueA200: #448aff;
|
||||
@blueA400: #2979ff;
|
||||
@blueA700: #2962ff;
|
||||
@blue: @blue500;
|
||||
|
||||
@lightBlue50: #e1f5fe;
|
||||
@lightBlue100: #b3e5fc;
|
||||
@lightBlue200: #81d4fa;
|
||||
@lightBlue300: #4fc3f7;
|
||||
@lightBlue400: #29b6f6;
|
||||
@lightBlue500: #03a9f4;
|
||||
@lightBlue600: #039be5;
|
||||
@lightBlue700: #0288d1;
|
||||
@lightBlue800: #0277bd;
|
||||
@lightBlue900: #01579b;
|
||||
@lightBlueA100: #80d8ff;
|
||||
@lightBlueA200: #40c4ff;
|
||||
@lightBlueA400: #00b0ff;
|
||||
@lightBlueA700: #0091ea;
|
||||
@lightBlue: @lightBlue500;
|
||||
|
||||
@cyan50: #e0f7fa;
|
||||
@cyan100: #b2ebf2;
|
||||
@cyan200: #80deea;
|
||||
@cyan300: #4dd0e1;
|
||||
@cyan400: #26c6da;
|
||||
@cyan500: #00bcd4;
|
||||
@cyan600: #00acc1;
|
||||
@cyan700: #0097a7;
|
||||
@cyan800: #00838f;
|
||||
@cyan900: #006064;
|
||||
@cyanA100: #84ffff;
|
||||
@cyanA200: #18ffff;
|
||||
@cyanA400: #00e5ff;
|
||||
@cyanA700: #00b8d4;
|
||||
@cyan: @cyan500;
|
||||
|
||||
@teal50: #e0f2f1;
|
||||
@teal100: #b2dfdb;
|
||||
@teal200: #80cbc4;
|
||||
@teal300: #4db6ac;
|
||||
@teal400: #26a69a;
|
||||
@teal500: #009688;
|
||||
@teal600: #00897b;
|
||||
@teal700: #00796b;
|
||||
@teal800: #00695c;
|
||||
@teal900: #004d40;
|
||||
@tealA100: #a7ffeb;
|
||||
@tealA200: #64ffda;
|
||||
@tealA400: #1de9b6;
|
||||
@tealA700: #00bfa5;
|
||||
@teal: @teal500;
|
||||
|
||||
@green50: #e8f5e9;
|
||||
@green100: #c8e6c9;
|
||||
@green200: #a5d6a7;
|
||||
@green300: #81c784;
|
||||
@green400: #66bb6a;
|
||||
@green500: #4caf50;
|
||||
@green600: #43a047;
|
||||
@green700: #388e3c;
|
||||
@green800: #2e7d32;
|
||||
@green900: #1b5e20;
|
||||
@greenA100: #b9f6ca;
|
||||
@greenA200: #69f0ae;
|
||||
@greenA400: #00e676;
|
||||
@greenA700: #00c853;
|
||||
@green: @green500;
|
||||
|
||||
@lightGreen50: #f1f8e9;
|
||||
@lightGreen100: #dcedc8;
|
||||
@lightGreen200: #c5e1a5;
|
||||
@lightGreen300: #aed581;
|
||||
@lightGreen400: #9ccc65;
|
||||
@lightGreen500: #8bc34a;
|
||||
@lightGreen600: #7cb342;
|
||||
@lightGreen700: #689f38;
|
||||
@lightGreen800: #558b2f;
|
||||
@lightGreen900: #33691e;
|
||||
@lightGreenA100: #ccff90;
|
||||
@lightGreenA200: #b2ff59;
|
||||
@lightGreenA400: #76ff03;
|
||||
@lightGreenA700: #64dd17;
|
||||
@lightGreen: @lightGreen500;
|
||||
|
||||
@lime50: #f9fbe7;
|
||||
@lime100: #f0f4c3;
|
||||
@lime200: #e6ee9c;
|
||||
@lime300: #dce775;
|
||||
@lime400: #d4e157;
|
||||
@lime500: #cddc39;
|
||||
@lime600: #c0ca33;
|
||||
@lime700: #afb42b;
|
||||
@lime800: #9e9d24;
|
||||
@lime900: #827717;
|
||||
@limeA100: #f4ff81;
|
||||
@limeA200: #eeff41;
|
||||
@limeA400: #c6ff00;
|
||||
@limeA700: #aeea00;
|
||||
@lime: @lime500;
|
||||
|
||||
@yellow50: #fffde7;
|
||||
@yellow100: #fff9c4;
|
||||
@yellow200: #fff59d;
|
||||
@yellow300: #fff176;
|
||||
@yellow400: #ffee58;
|
||||
@yellow500: #ffeb3b;
|
||||
@yellow600: #fdd835;
|
||||
@yellow700: #fbc02d;
|
||||
@yellow800: #f9a825;
|
||||
@yellow900: #f57f17;
|
||||
@yellowA100: #ffff8d;
|
||||
@yellowA200: #ffff00;
|
||||
@yellowA400: #ffea00;
|
||||
@yellowA700: #ffd600;
|
||||
@yellow: @yellow500;
|
||||
|
||||
@amber50: #fff8e1;
|
||||
@amber100: #ffecb3;
|
||||
@amber200: #ffe082;
|
||||
@amber300: #ffd54f;
|
||||
@amber400: #ffca28;
|
||||
@amber500: #ffc107;
|
||||
@amber600: #ffb300;
|
||||
@amber700: #ffa000;
|
||||
@amber800: #ff8f00;
|
||||
@amber900: #ff6f00;
|
||||
@amberA100: #ffe57f;
|
||||
@amberA200: #ffd740;
|
||||
@amberA400: #ffc400;
|
||||
@amberA700: #ffab00;
|
||||
@amber: @amber500;
|
||||
|
||||
@orange50: #fff3e0;
|
||||
@orange100: #ffe0b2;
|
||||
@orange200: #ffcc80;
|
||||
@orange300: #ffb74d;
|
||||
@orange400: #ffa726;
|
||||
@orange500: #ff9800;
|
||||
@orange600: #fb8c00;
|
||||
@orange700: #f57c00;
|
||||
@orange800: #ef6c00;
|
||||
@orange900: #e65100;
|
||||
@orangeA100: #ffd180;
|
||||
@orangeA200: #ffab40;
|
||||
@orangeA400: #ff9100;
|
||||
@orangeA700: #ff6d00;
|
||||
@orange: @orange500;
|
||||
|
||||
@deepOrange50: #fbe9e7;
|
||||
@deepOrange100: #ffccbc;
|
||||
@deepOrange200: #ffab91;
|
||||
@deepOrange300: #ff8a65;
|
||||
@deepOrange400: #ff7043;
|
||||
@deepOrange500: #ff5722;
|
||||
@deepOrange600: #f4511e;
|
||||
@deepOrange700: #e64a19;
|
||||
@deepOrange800: #d84315;
|
||||
@deepOrange900: #bf360c;
|
||||
@deepOrangeA100: #ff9e80;
|
||||
@deepOrangeA200: #ff6e40;
|
||||
@deepOrangeA400: #ff3d00;
|
||||
@deepOrangeA700: #dd2c00;
|
||||
@deepOrange: @deepOrange500;
|
||||
|
||||
@brown50: #efebe9;
|
||||
@brown100: #d7ccc8;
|
||||
@brown200: #bcaaa4;
|
||||
@brown300: #a1887f;
|
||||
@brown400: #8d6e63;
|
||||
@brown500: #795548;
|
||||
@brown600: #6d4c41;
|
||||
@brown700: #5d4037;
|
||||
@brown800: #4e342e;
|
||||
@brown900: #3e2723;
|
||||
@brown: @brown500;
|
||||
|
||||
@blueGrey50: #eceff1;
|
||||
@blueGrey100: #cfd8dc;
|
||||
@blueGrey200: #b0bec5;
|
||||
@blueGrey300: #90a4ae;
|
||||
@blueGrey400: #78909c;
|
||||
@blueGrey500: #607d8b;
|
||||
@blueGrey600: #546e7a;
|
||||
@blueGrey700: #455a64;
|
||||
@blueGrey800: #37474f;
|
||||
@blueGrey900: #263238;
|
||||
@blueGrey: @blueGrey500;
|
||||
|
||||
@grey50: #fafafa;
|
||||
@grey100: #f5f5f5;
|
||||
@grey200: #eeeeee;
|
||||
@grey300: #e0e0e0;
|
||||
@grey400: #bdbdbd;
|
||||
@grey500: #9e9e9e;
|
||||
@grey600: #757575;
|
||||
@grey700: #616161;
|
||||
@grey800: #424242;
|
||||
@grey900: #212121;
|
||||
@grey: @grey500;
|
||||
|
||||
@black: #000000;
|
||||
@white: #ffffff;
|
||||
|
||||
@transparent: rgba(0, 0, 0, 0);
|
||||
@fullBlack: rgba(0, 0, 0, 1);
|
||||
@darkBlack: rgba(0, 0, 0, 0.87);
|
||||
@lightBlack: rgba(0, 0, 0, 0.54);
|
||||
@minBlack: rgba(0, 0, 0, 0.26);
|
||||
@faintBlack: rgba(0, 0, 0, 0.12);
|
||||
@fullWhite: rgba(255, 255, 255, 1);
|
||||
@darkWhite: rgba(255, 255, 255, 0.87);
|
||||
@lightWhite: rgba(255, 255, 255, 0.54);
|
||||
1
tsvue/src/application/assets/less/common/.pydio
Normal file
1
tsvue/src/application/assets/less/common/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
832fd82a-000e-4751-8e35-b8e9bfa0c542
|
||||
1
tsvue/src/application/assets/less/common/index.less
Normal file
1
tsvue/src/application/assets/less/common/index.less
Normal file
@@ -0,0 +1 @@
|
||||
@import "rem";
|
||||
458
tsvue/src/application/assets/less/common/normalize.less
vendored
Normal file
458
tsvue/src/application/assets/less/common/normalize.less
vendored
Normal file
@@ -0,0 +1,458 @@
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
line-height: 1.15; /* 2 */
|
||||
-ms-text-size-adjust: 100%; /* 3 */
|
||||
-webkit-text-size-adjust: 100%; /* 3 */
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 540px;
|
||||
min-width: 320px;
|
||||
line-height: 1.5;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
width: 100%;
|
||||
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
|
||||
background-color: #fafafa;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the outline on focused links when they are also active or hovered
|
||||
* in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the border, margin, and padding in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct display in IE 9-.
|
||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
*/
|
||||
|
||||
details, /* 1 */
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Scripting
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hidden
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
16
tsvue/src/application/assets/less/common/rem.less
Normal file
16
tsvue/src/application/assets/less/common/rem.less
Normal file
@@ -0,0 +1,16 @@
|
||||
@vm_fontsize: 75;
|
||||
@vm_design: 750;
|
||||
|
||||
.rem(@px) {
|
||||
@result: (@px / @vm_fontsize ) * 1rem;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: (@vm_fontsize / (@vm_design / 2) ) * 100vw;
|
||||
@media screen and (max-width: 320px) {
|
||||
font-size: 64px;
|
||||
}
|
||||
@media screen and (min-width: 540px) {
|
||||
font-size: 108px;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user