Skip to content

Commit

Permalink
feat: scan: autoscroll chat, oneline form
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Dec 17, 2020
1 parent 34c6402 commit 47185fb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'@/plugins/element-ui',
'@/plugins/localStorage',
'@/plugins/vue-awesome',
'@/plugins/vue-chat-scroll',
'@/plugins/vue-tour',
{ src: '@/plugins/vue-tables', ssr: false },
{ src: '@/plugins/yametrika', ssr: false },
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"semantic-ui-vue": "^0.3.3",
"style-loader": "^0.23.1",
"vue-awesome": "^3.2.0",
"vue-chat-scroll": "^1.4.0",
"vue-style-loader": "^4.1.2",
"vue-tables-2": "^1.6.25",
"vue-tour": "^1.5.0",
Expand Down
15 changes: 11 additions & 4 deletions pages/scan.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<section class="container scan__container">
<el-form class="scan__form" ref="form" v-model="form" label-width="120px">
<el-form :inline="true" class="scan__form" ref="form" v-model="form">
<el-form-item label="URL">
<el-input v-model="form.url"></el-input>
</el-form-item>
Expand All @@ -12,7 +12,7 @@
</el-form-item>
</el-form>

<ul class="scan__log">
<ul class="scan__log" v-chat-scroll>
<li v-for="line of log" :key="line" v-html="line"></li>
</ul>
</section>
Expand All @@ -21,7 +21,12 @@
<style lang="scss">
.scan__form {
margin-top: 30px;
max-width: 640px;
max-width: 800px;
input {
padding: 0 10px;
min-width: 270px;
}
}
.scan__log {
Expand All @@ -31,6 +36,8 @@
list-style: none;
margin: 0;
padding: 5px 10px;
max-height: calc(100vh - 150px);
overflow-x: auto;
a {
color: #9ec8f0;
Expand All @@ -49,7 +56,7 @@ export default {
return {
form: {
url: "https://blog.popstas.ru",
args: '--max-requests 10 --upload'
args: '--max-requests 100 --upload'
},
log: []
};
Expand Down
4 changes: 4 additions & 0 deletions plugins/vue-chat-scroll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Vue from 'vue';
import VueChatScroll from 'vue-chat-scroll';

Vue.use(VueChatScroll);

0 comments on commit 47185fb

Please sign in to comment.