save
This commit is contained in:
parent
d3893c682e
commit
427ffba725
8
.gitignore
vendored
8
.gitignore
vendored
@ -21,3 +21,11 @@ pnpm-debug.log*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
.tmp
|
||||
|
||||
.s.*
|
||||
log*
|
||||
config.json
|
||||
.direnv
|
||||
.envrc
|
4
.prettierrc
Normal file
4
.prettierrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"useTabs": false
|
||||
}
|
24
README.md
24
README.md
@ -1,24 +0,0 @@
|
||||
# mail
|
||||
|
||||
## Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
@ -1,92 +1,135 @@
|
||||
const Imap = require('imap');
|
||||
const {simpleParser} = require('mailparser');
|
||||
const inspect = require('util').inspect;
|
||||
const saveMessage = require('./storeMessage').saveMessage;
|
||||
|
||||
const Imap = require("imap");
|
||||
const { simpleParser } = require("mailparser");
|
||||
const inspect = require("util").inspect;
|
||||
const saveMessage = require("./storeMessage").saveMessage;
|
||||
const imapConfig = require("./config.json").mail;
|
||||
|
||||
const fs = require("fs");
|
||||
const imap = new Imap({
|
||||
user: '',
|
||||
password: '',
|
||||
user: imapConfig.user,
|
||||
password: imapConfig.password,
|
||||
tlsOptions: { servername: "imap.gmail.com" },
|
||||
host: 'imap.gmail.com',
|
||||
host: "imap.gmail.com",
|
||||
port: 993,
|
||||
tls: true
|
||||
tls: true,
|
||||
});
|
||||
|
||||
|
||||
imap.once('ready', function() {
|
||||
imap.once("ready", function () {
|
||||
const readOnly = true;
|
||||
imap.openBox('INBOX', readOnly, (err, box) => {
|
||||
imap.openBox("INBOX", readOnly, (err, box) => {
|
||||
// console.log(box); // uidvalidty uidnext, messages total and new
|
||||
|
||||
if (err) throw err;
|
||||
const f = imap.seq.fetch('2:2', {
|
||||
bodies: ['HEADER.FIELDS (FROM)','TEXT'],
|
||||
struct: true,
|
||||
envelope: true,
|
||||
extensions: true
|
||||
imap.search(["ALL"], function (err, results) {
|
||||
console.log(results[results.length - 1]);
|
||||
});
|
||||
|
||||
f.on('message', function(msg, seqno) {
|
||||
// console.log('Message #%d', seqno);
|
||||
var prefix = '(#' + seqno + ') ';
|
||||
let attributes = undefined;
|
||||
let body = undefined;
|
||||
|
||||
msg.on('body', function(stream, info) {
|
||||
simpleParser(stream, async (err, parsed) => {
|
||||
body = parsed;
|
||||
if (attributes) {
|
||||
saveMessage(body, attributes);
|
||||
};
|
||||
// console.log(parsed.headers)
|
||||
// const {from, subject, textAsHtml, text} = parsed;
|
||||
// console.log(parsed.attachments)
|
||||
// console.log(prefix + parsed.text)
|
||||
// console.log(parsed.from.value);
|
||||
const f = imap.fetch(969, { size: true, struct: true, envelope: true });
|
||||
// var f = imap.seq.fetch('1:3', {
|
||||
// bodies: 'HEADER.FIELDS (FROM TO SUBJECT DATE)',
|
||||
// struct: true
|
||||
// });
|
||||
f.on("message", function (msg, seqno) {
|
||||
// console.log("Message #%d", seqno);
|
||||
// var prefix = "(#" + seqno + ") ";
|
||||
// msg.on("body", function (stream, info) {
|
||||
// simpleParser(stream, async (err, parsed) => {
|
||||
// // find box id;
|
||||
// console.log(parsed)
|
||||
// const boxId = 1;
|
||||
// // saveMessage(parsed, boxId);
|
||||
// console.log(parsed.subject);
|
||||
// console.log(parsed.date)
|
||||
// console.log(parsed.replyTo.value);
|
||||
// console.log(parsed.messageId);
|
||||
// console.log(parsed.html);
|
||||
// console.log(parsed.text);
|
||||
// console.log(parsed.textAsHtml);
|
||||
});
|
||||
});
|
||||
|
||||
// fs.writeFileSync("./test.json", JSON.stringify(parsed));
|
||||
// });
|
||||
// // console.log(prefix + 'Body');
|
||||
// // stream.pipe(fs.createWriteStream('msg-' + seqno + '-body.txt'));
|
||||
// });
|
||||
msg.once('attributes', attrs => {
|
||||
attributes = attrs;
|
||||
if (body) {
|
||||
saveMessage(body, attributes);
|
||||
};
|
||||
// console.log(prefix + 'Attributes: %s', inspect(attrs, false, 8));
|
||||
|
||||
});
|
||||
|
||||
msg.once('end', function() {
|
||||
console.log(prefix + 'Finished');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
f.once('error', function(err) {
|
||||
console.log('Fetch error: ' + err);
|
||||
});
|
||||
|
||||
f.once('end', function() {
|
||||
console.log('Done fetching all messages!');
|
||||
imap.end();
|
||||
});
|
||||
|
||||
// todo find boxId
|
||||
const boxId = 1;
|
||||
saveMessage(attrs, boxId, imap);
|
||||
});
|
||||
});
|
||||
|
||||
imap.once('error', function(err) {
|
||||
|
||||
|
||||
|
||||
f.once("error", function (err) {
|
||||
console.log("Fetch error: " + err);
|
||||
});
|
||||
f.once("end", function () {
|
||||
console.log("Done fetching all messages!");
|
||||
// imap.end();
|
||||
});
|
||||
// });
|
||||
return;
|
||||
// if (err) throw err;
|
||||
// const f = imap.seq.fetch('2:2', {
|
||||
// bodies: ['HEADER.FIELDS (FROM)','TEXT'],
|
||||
// struct: true,
|
||||
// envelope: true,
|
||||
// extensions: true
|
||||
// });
|
||||
|
||||
// f.on('message', function(msg, seqno) {
|
||||
// // console.log('Message #%d', seqno);
|
||||
// var prefix = '(#' + seqno + ') ';
|
||||
// let attributes = undefined;
|
||||
// let body = undefined;
|
||||
|
||||
// msg.on('body', function(stream, info) {
|
||||
// simpleParser(stream, async (err, parsed) => {
|
||||
// body = parsed;
|
||||
// // console.log(body)
|
||||
// if (attributes) {
|
||||
// saveMessage(body, attributes);
|
||||
// };
|
||||
// // console.log(parsed.headers)
|
||||
// // const {from, subject, textAsHtml, text} = parsed;
|
||||
// // console.log(parsed.attachments)
|
||||
// // console.log(prefix + parsed.text)
|
||||
// // console.log(parsed.from.value);
|
||||
// // console.log(parsed.subject);
|
||||
// // console.log(parsed.date)
|
||||
// // console.log(parsed.replyTo.value);
|
||||
// // console.log(parsed.messageId);
|
||||
// // console.log(parsed.html);
|
||||
// // console.log(parsed.text);
|
||||
// // console.log(parsed.textAsHtml);
|
||||
// });
|
||||
// });
|
||||
|
||||
// msg.once('attributes', attrs => {
|
||||
// attributes = attrs;
|
||||
// console.log(attributes)
|
||||
// if (body) {
|
||||
// saveMessage(body, attributes);
|
||||
// };
|
||||
// // console.log(prefix + 'Attributes: %s', inspect(attrs, false, 8));
|
||||
|
||||
// });
|
||||
|
||||
// msg.once('end', function() {
|
||||
// console.log(prefix + 'Finished');
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
// f.once('error', function(err) {
|
||||
// console.log('Fetch error: ' + err);
|
||||
// });
|
||||
|
||||
// f.once('end', function() {
|
||||
// console.log('Done fetching all messages!');
|
||||
// imap.end();
|
||||
// });
|
||||
});
|
||||
});
|
||||
|
||||
imap.once("error", function (err) {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
imap.once('end', function() {
|
||||
console.log('Connection ended');
|
||||
imap.once("end", function () {
|
||||
console.log("Connection ended");
|
||||
});
|
||||
|
||||
imap.connect();
|
||||
@ -158,5 +201,5 @@ function isValidEmail(email) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isValidEmail
|
||||
}
|
||||
isValidEmail,
|
||||
};
|
||||
|
@ -1,59 +1,126 @@
|
||||
const { getAddresseId } = require("../sql/mail");
|
||||
const { DEBUG } = require("../utils/debug");
|
||||
const { simpleParser } = require("mailparser");
|
||||
|
||||
const { registerMessage, registerMailbox_message, saveHeader_fields, saveAddress_fields } = require('../sql/saveMessage');
|
||||
const { getMailboxId, getField } = require('../sql/mail');
|
||||
const {
|
||||
registerMessage,
|
||||
registerMailbox_message,
|
||||
saveHeader_fields,
|
||||
saveAddress_fields,
|
||||
} = require("../sql/saveMessage");
|
||||
const { getMailboxId, getField } = require("../sql/mail");
|
||||
|
||||
function saveMessage(message, attributes, mailbox) {
|
||||
const timestamp = new Date(attributes.envelope.date).getTime();
|
||||
const rfc822size = 0; // todo
|
||||
registerMessage(timestamp, rfc822size).then((messageId) => {
|
||||
getMailboxId(mailbox).then((mailboxId) => {
|
||||
const seen = attributes.flags.includes('Seen') ? 1 : 0; // todo verify
|
||||
const deleted = attributes.flags.includes('Deleted') ? 1 : 0; // todo verify
|
||||
registerMailbox_message(mailboxId, attributes.uid, messageId, attributes.modseq, seen, deleted).then(() => {
|
||||
attributes.struct.forEach(part => {
|
||||
// saveBodyparts().then((bodypartId) => {
|
||||
// const partText = undefined;
|
||||
// savePart_numbers(messageId, partText, bodypartId, part.size, part.lines)
|
||||
function saveMessage(attrs, mailboxId, imap) {
|
||||
console.log("SAVE MSG")
|
||||
// console.log(attrs.struct);
|
||||
const envelope = attrs.envelope;
|
||||
const timestamp = new Date(envelope.date).getTime();
|
||||
const rfc822size = attrs.size;
|
||||
registerMessage(timestamp, rfc822size, envelope.messageId).then(
|
||||
(messageId) => {
|
||||
const seen = attrs.flags.includes("Seen") ? 1 : 0; // todo verify
|
||||
const deleted = attrs.flags.includes("Deleted") ? 1 : 0; // todo verify
|
||||
|
||||
registerMailbox_message(
|
||||
mailboxId,
|
||||
attrs.uid,
|
||||
messageId,
|
||||
attrs.modseq,
|
||||
seen,
|
||||
deleted
|
||||
);
|
||||
// // attributes.struct.forEach(part => {
|
||||
// // // saveBodyparts().then((bodypartId) => {
|
||||
// // // const partText = undefined;
|
||||
// // // savePart_numbers(messageId, partText, bodypartId, part.size, part.lines)
|
||||
// // // });
|
||||
// // });
|
||||
const len = attrs.struct.length;
|
||||
console.log(attrs.struct);
|
||||
// // attrs.struct.forEach((part) => {
|
||||
// // console.log(part)
|
||||
// console.log("----------");
|
||||
// if (len > 1) part = part[0];
|
||||
// if (part?.type == "text") {
|
||||
// console.log(part.partID);
|
||||
// console.log(attrs.uid);
|
||||
// const uid = attrs.uid;
|
||||
// const bodies = ["HEADER", "1.TEXT", "2.TEXT", "2.HTML"];
|
||||
|
||||
// const fetchOptions = {
|
||||
// bodies: bodies,
|
||||
// };
|
||||
|
||||
const fetch = imap.fetch(attrs.uid, { bodies: ["HEADER.FIELDS (FROM)", 2] });
|
||||
|
||||
fetch.on("message", (msg) => {
|
||||
msg.on("body", (stream, info) => {
|
||||
simpleParser(stream, async (err, parsed) => {
|
||||
console.log(parsed);
|
||||
});
|
||||
});
|
||||
|
||||
msg.once("end", () => {
|
||||
console.log("Finished fetching message");
|
||||
});
|
||||
});
|
||||
|
||||
fetch.once("error", (err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
fetch.once("end", () => {
|
||||
console.log("Done fetching all messages");
|
||||
});
|
||||
// }
|
||||
// });
|
||||
});
|
||||
const part = ''; // todo
|
||||
Object.keys(attributes.envelope).forEach(key => {
|
||||
const newKey = keyNormalizer(key);
|
||||
if (isHeader(newKey)) {
|
||||
getField(newKey).then((fieldId) => {
|
||||
saveHeader_fields(messageId, part, 2, fieldId, attributes.envelope[key]);
|
||||
});
|
||||
} else {
|
||||
getField(newKey).then((fieldId) => {
|
||||
if (attributes.envelope[key]) {
|
||||
attributes.envelope[key].forEach((elt, index) => {
|
||||
saveAddress_fields(messageId, part, fieldId, index, getAddresseId(`${elt.mailbox}@${elt.host}`, elt.name));
|
||||
});
|
||||
|
||||
// // const part = ''; // todo when transfered
|
||||
|
||||
// // save envelope (header + from, to, subject, date, cc)
|
||||
// Object.keys(attributes.envelope).forEach(key => {
|
||||
// const newKey = keyNormalizer(key);
|
||||
// if (isHeader(newKey)) {
|
||||
// getField(newKey).then((fieldId) => {
|
||||
// saveHeader_fields(messageId, part, 2, fieldId, attributes.envelope[key]);
|
||||
// });
|
||||
// } else {
|
||||
// getField(newKey).then((fieldId) => {
|
||||
// if (attributes.envelope[key]) {
|
||||
// attributes.envelope[key].forEach((elt, index) => {
|
||||
// saveAddress_fields(messageId, part, fieldId, index, getAddresseId(`${elt.mailbox}@${elt.host}`, elt.name));
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // // save more header
|
||||
// // message.headerLines.forEach(elt => {
|
||||
// // const newKey = keyNormalizer(elt.key);
|
||||
// // getField(newKey).then((fieldId) => {
|
||||
// // saveHeader_fields(messageId, part, 2, fieldId, elt[line]);
|
||||
// // });
|
||||
// // });
|
||||
|
||||
// // // todo add date field
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// todo add date field
|
||||
});
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
function isHeader(key) {
|
||||
switch (key) {
|
||||
case 'date':
|
||||
case 'subject':
|
||||
case 'messageId':
|
||||
case "date":
|
||||
case "subject":
|
||||
case "messageId":
|
||||
return true;
|
||||
case 'from':
|
||||
case 'sender':
|
||||
case 'replyTo':
|
||||
case 'to':
|
||||
case 'cc':
|
||||
case 'bcc':
|
||||
case 'inReplyTo':
|
||||
case "from":
|
||||
case "sender":
|
||||
case "replyTo":
|
||||
case "to":
|
||||
case "cc":
|
||||
case "bcc":
|
||||
case "inReplyTo":
|
||||
return false;
|
||||
default:
|
||||
DEBUG.log("Unknown header key: " + key);
|
||||
@ -66,7 +133,6 @@ function keyNormalizer(key) {
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
saveMessage
|
||||
}
|
||||
saveMessage,
|
||||
};
|
||||
|
@ -1,26 +1,21 @@
|
||||
const bdd = require("./bdd.js").bdd;
|
||||
const DEBUG = require("../utils/debug").DEBUG;
|
||||
|
||||
function registerMessage(timestamp, rfc822size) {
|
||||
function registerMessage(timestamp, rfc822size, messageId) {
|
||||
// todo messageId
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(0);
|
||||
//todo
|
||||
const query = `INSERT INTO messages (idate, rfc822size) VALUES (UNIX_TIMESTAMP('${timestamp}'), '${rfc822size}')`;
|
||||
const query = `INSERT INTO messages (idate, rfc822size) VALUES (${timestamp}, '${rfc822size}')`;
|
||||
bdd.query(query, (err, results, fields) => {
|
||||
if (err) reject(err);
|
||||
// resolve(results.insertId);
|
||||
resolve(results.insertId);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function registerMailbox_message(mailboxId, uid, messageId, modseq, seen, deleted) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const query = `INSERT IGNORE INTO mailbox_messages (mailbox, uid, message, modseq, seen, deleted) VALUES ('${mailboxId}', '${uid}', '${messageId}', '${modseq}', '${seen}', '${deleted}')`;
|
||||
bdd.query(query, (err, results, fields) => {
|
||||
if (err) reject(err);
|
||||
resolve();
|
||||
// resolve(results.insertId);
|
||||
});
|
||||
if (err) DEBUG.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
43
package.json
43
package.json
@ -1,43 +0,0 @@
|
||||
{
|
||||
"name": "mail",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"vue": "^3.2.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<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">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</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 -->
|
||||
</body>
|
||||
</html>
|
26
src/App.vue
26
src/App.vue
@ -1,26 +0,0 @@
|
||||
<template>
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
@ -1,4 +0,0 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
createApp(App).mount('#app')
|
@ -1,4 +0,0 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
Loading…
Reference in New Issue
Block a user