Upgrade eslint packages version and remove warnings.

This commit is contained in:
Jeremy Cui 2019-03-06 14:21:14 +08:00
parent fc9e7249e7
commit d38490d50d
111 changed files with 9352 additions and 278 deletions

View File

@ -21,6 +21,20 @@ module.exports = {
"allowFirstLine": false "allowFirstLine": false
} }
}], }],
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": "never"
}],
"vue/singleline-html-element-content-newline": ["error", {
"ignoreWhenNoAttributes": true,
"ignoreWhenEmpty": true,
"ignores": ["a", "abbr", "audio", "b", "bdi", "bdo", "canvas", "cite", "code", "data", "del", "dfn", "em", "i", "iframe", "ins", "kbd", "label", "map", "mark", "noscript", "object", "output", "picture", "q", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "svg", "time", "u", "var", "video", "div"]
}],
"vue/multiline-html-element-content-newline": ["error", {
"ignoreWhenEmpty": true,
"ignores": ["a", "abbr", "audio", "b", "bdi", "bdo", "canvas", "cite", "code", "data", "del", "dfn", "em", "i", "iframe", "ins", "kbd", "label", "map", "mark", "noscript", "object", "output", "picture", "q", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "svg", "time", "u", "var", "video"],
"allowEmptyLines": true
}],
"vue/name-property-casing": ["error", "PascalCase"], "vue/name-property-casing": ["error", "PascalCase"],
'accessor-pairs': 2, 'accessor-pairs': 2,
'arrow-spacing': [2, { 'arrow-spacing': [2, {

View File

@ -80,10 +80,10 @@
"copy-webpack-plugin": "4.5.2", "copy-webpack-plugin": "4.5.2",
"cross-env": "5.2.0", "cross-env": "5.2.0",
"css-loader": "1.0.0", "css-loader": "1.0.0",
"eslint": "4.19.1", "eslint": "^5.15.1",
"eslint-friendly-formatter": "4.0.1", "eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "2.0.0", "eslint-loader": "^2.1.2",
"eslint-plugin-vue": "4.7.1", "eslint-plugin-vue": "^5.2.2",
"file-loader": "1.1.11", "file-loader": "1.1.11",
"friendly-errors-webpack-plugin": "1.7.0", "friendly-errors-webpack-plugin": "1.7.0",
"hash-sum": "1.0.2", "hash-sum": "1.0.2",

View File

@ -2,8 +2,9 @@
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{ <span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">
generateTitle(item.meta.title) }}</span> {{ generateTitle(item.meta.title) }}
</span>
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a> <a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
</el-breadcrumb-item> </el-breadcrumb-item>
</transition-group> </transition-group>

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"/> <div :id="id" :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"/> <div :id="id" :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="className" :id="id" :style="{height:height,width:width}"/> <div :id="id" :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div :ref="id" :action="url" :id="id" class="dropzone"> <div :id="id" :ref="id" :action="url" class="dropzone">
<input type="file" name="file"> <input type="file" name="file">
</div> </div>
</template> </template>

View File

@ -6,8 +6,7 @@
viewBox="0 0 1024 1024" viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="64" width="64"
height="64" height="64">
>
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" /> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
</svg> </svg>
</div> </div>

View File

@ -4,9 +4,15 @@
<svg-icon class-name="international-icon" icon-class="language" /> <svg-icon class-name="international-icon" icon-class="language" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language==='zh'" command="zh">中文</el-dropdown-item> <el-dropdown-item :disabled="language==='zh'" command="zh">
<el-dropdown-item :disabled="language==='en'" command="en">English</el-dropdown-item> 中文
<el-dropdown-item :disabled="language==='es'" command="es">Español</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :disabled="language==='en'" command="en">
English
</el-dropdown-item>
<el-dropdown-item :disabled="language==='es'" command="es">
Español
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>

View File

@ -4,9 +4,9 @@
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" /> <i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" />
<input <input
v-if="type === 'email'" v-if="type === 'email'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autoComplete="autoComplete"
@ -18,9 +18,9 @@
@input="handleModelInput"> @input="handleModelInput">
<input <input
v-if="type === 'url'" v-if="type === 'url'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autoComplete="autoComplete"
@ -32,9 +32,9 @@
@input="handleModelInput"> @input="handleModelInput">
<input <input
v-if="type === 'number'" v-if="type === 'number'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:step="step" :step="step"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
@ -51,9 +51,9 @@
@input="handleModelInput"> @input="handleModelInput">
<input <input
v-if="type === 'password'" v-if="type === 'password'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autoComplete="autoComplete"
@ -67,9 +67,9 @@
@input="handleModelInput"> @input="handleModelInput">
<input <input
v-if="type === 'tel'" v-if="type === 'tel'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autoComplete="autoComplete"
@ -81,9 +81,9 @@
@input="handleModelInput"> @input="handleModelInput">
<input <input
v-if="type === 'text'" v-if="type === 'text'"
v-model="currentValue"
:name="name" :name="name"
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
v-model="currentValue"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autoComplete="autoComplete"

View File

@ -4,8 +4,9 @@
<svg-icon class-name="size-icon" icon-class="size" /> <svg-icon class-name="size-icon" icon-class="size" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">{{ <el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
item.label }}</el-dropdown-item> {{ item.label }}
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="upload-container"> <div class="upload-container">
<el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">上传图片 <el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">
上传图片
</el-button> </el-button>
<el-dialog :visible.sync="dialogVisible"> <el-dialog :visible.sync="dialogVisible">
<el-upload <el-upload

View File

@ -14,6 +14,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- Todo --> <!-- Todo -->
<!-- eslint-disable-next-line vue/no-confusing-v-for-v-if --> <!-- eslint-disable-next-line vue/no-confusing-v-for-v-if -->
<!-- eslint-disable-next-line -->
<span v-for="space in scope.row._level" v-if="index === 0" :key="space" class="ms-tree-space" /> <span v-for="space in scope.row._level" v-if="index === 0" :key="space" class="ms-tree-space" />
<span v-if="iconShow(index,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)"> <span v-if="iconShow(index,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
<i v-if="!scope.row._expanded" class="el-icon-plus" /> <i v-if="!scope.row._expanded" class="el-icon-plus" />

View File

@ -7,14 +7,15 @@
<pan-thumb :image="image" /> <pan-thumb :image="image" />
<el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">Change Avatar <el-button type="primary" icon="upload" style="position: absolute;bottom: 15px;margin-left: 40px;" @click="imagecropperShow=true">
Change Avatar
</el-button> </el-button>
<image-cropper <image-cropper
v-show="imagecropperShow" v-show="imagecropperShow"
:key="imagecropperKey"
:width="300" :width="300"
:height="300" :height="300"
:key="imagecropperKey"
url="https://httpbin.org/post" url="https://httpbin.org/post"
lang-type="en" lang-type="en"
@close="close" @close="close"

View File

@ -40,9 +40,11 @@
<input v-model="setSuffix" name="suffixInput"> <input v-model="setSuffix" name="suffixInput">
</label> </label>
</div> </div>
<code>&lt;count-to :start-val=&#x27;{{ _startVal }}&#x27; :end-val=&#x27;{{ _endVal }}&#x27; :duration=&#x27;{{ _duration }}&#x27; <code>
&lt;count-to :start-val=&#x27;{{ _startVal }}&#x27; :end-val=&#x27;{{ _endVal }}&#x27; :duration=&#x27;{{ _duration }}&#x27;
:decimals=&#x27;{{ _decimals }}&#x27; :separator=&#x27;{{ _separator }}&#x27; :prefix=&#x27;{{ _prefix }}&#x27; :suffix=&#x27;{{ _suffix }}&#x27; :decimals=&#x27;{{ _decimals }}&#x27; :separator=&#x27;{{ _separator }}&#x27; :prefix=&#x27;{{ _prefix }}&#x27; :suffix=&#x27;{{ _suffix }}&#x27;
:autoplay=false&gt;</code> :autoplay=false&gt;
</code>
</div> </div>
</template> </template>

View File

@ -2,7 +2,7 @@
<div class="components-container"> <div class="components-container">
<el-drag-select v-model="value" style="width:500px;" multiple placeholder="请选择"> <el-drag-select v-model="value" style="width:500px;" multiple placeholder="请选择">
<el-option v-for="item in options" :label="item.label" :value="item.value" :key="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-drag-select> </el-drag-select>
<div style="margin-top:30px;"> <div style="margin-top:30px;">

View File

@ -22,8 +22,7 @@
<markdown-editor <markdown-editor
ref="markdownEditor" ref="markdownEditor"
v-model="content" v-model="content"
:options="{ toolbarItems: ['heading','bold','italic']}" :options="{ toolbarItems: ['heading','bold','italic']}" />
/>
</div> </div>
<div class="editor-container"> <div class="editor-container">
@ -33,6 +32,7 @@
</div> </div>
<el-button style="margin-top:80px;" type="primary" icon="el-icon-document" @click="getHtml">Get HTML</el-button> <el-button style="margin-top:80px;" type="primary" icon="el-icon-document" @click="getHtml">Get HTML</el-button>
<!-- eslint-disable-next-line -->
<div v-html="html" /> <div v-html="html" />
</div> </div>

View File

@ -92,7 +92,6 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</template> </template>

View File

@ -7,7 +7,7 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="no-border"> <el-dropdown-menu slot="dropdown" class="no-border">
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;"> <el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key"> <el-checkbox v-for="item in platformsOptions" :key="item.key" :label="item.key">
{{ item.name }} {{ item.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@ -29,7 +29,8 @@
<el-date-picker v-model="time" :picker-options="pickerOptions" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Release time" /> <el-date-picker v-model="time" :picker-options="pickerOptions" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Release time" />
</div> </div>
<el-button style="margin-left: 10px;" type="success">publish <el-button style="margin-left: 10px;" type="success">
publish
</el-button> </el-button>
</sticky> </sticky>

View File

@ -5,8 +5,9 @@
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/component/rich-editor.html"> {{ $t('components.documentation') }}</a> <a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/component/rich-editor.html"> {{ $t('components.documentation') }}</a>
</code> </code>
<div> <div>
<tinymce :height="300" v-model="content"/> <tinymce v-model="content" :height="300" />
</div> </div>
<!-- eslint-disable-next-line -->
<div class="editor-content" v-html="content" /> <div class="editor-content" v-html="content" />
</div> </div>
</template> </template>

View File

@ -10,8 +10,8 @@
<button class="destroy" @click="deleteTodo( todo )" /> <button class="destroy" @click="deleteTodo( todo )" />
</div> </div>
<input <input
v-focus="editing"
v-show="editing" v-show="editing"
v-focus="editing"
:value="todo.text" :value="todo.text"
class="edit" class="edit"
@keyup.enter="doneEdit" @keyup.enter="doneEdit"

View File

@ -12,7 +12,9 @@
</el-table-column> </el-table-column>
<el-table-column label="Status" width="100" align="center"> <el-table-column label="Status" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilter"> {{ scope.row.status }}</el-tag> <el-tag :type="scope.row.status | statusFilter">
{{ scope.row.status }}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -1,7 +1,8 @@
<template> <template>
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<div class=" clearfix"> <div class=" clearfix">
<pan-thumb :image="avatar" style="float: left"> Your roles: <pan-thumb :image="avatar" style="float: left">
Your roles:
<span v-for="item in roles" :key="item" class="pan-info-roles">{{ item }}</span> <span v-for="item in roles" :key="item" class="pan-info-roles">{{ item }}</span>
</pan-thumb> </pan-thumb>
<github-corner style="position: absolute; top: 0px; border: 0; right: 0;" /> <github-corner style="position: absolute; top: 0px; border: 0; right: 0;" />

View File

@ -9,7 +9,8 @@
</div> </div>
<div class="bullshit"> <div class="bullshit">
<div class="bullshit__oops">OOPS!</div> <div class="bullshit__oops">OOPS!</div>
<div class="bullshit__info">版权所有 <div class="bullshit__info">
版权所有
<a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a> <a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a>
</div> </div>
<div class="bullshit__headline">{{ message }}</div> <div class="bullshit__headline">{{ message }}</div>

View File

@ -6,7 +6,8 @@
<CommentDropdown v-model="postForm.comment_disabled" /> <CommentDropdown v-model="postForm.comment_disabled" />
<PlatformDropdown v-model="postForm.platforms" /> <PlatformDropdown v-model="postForm.platforms" />
<SourceUrlDropdown v-model="postForm.source_uri" /> <SourceUrlDropdown v-model="postForm.source_uri" />
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">发布 <el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">
发布
</el-button> </el-button>
<el-button v-loading="loading" type="warning" @click="draftForm">草稿</el-button> <el-button v-loading="loading" type="warning" @click="draftForm">草稿</el-button>
</sticky> </sticky>
@ -56,12 +57,12 @@
</el-row> </el-row>
<el-form-item style="margin-bottom: 40px;" label-width="45px" label="摘要:"> <el-form-item style="margin-bottom: 40px;" label-width="45px" label="摘要:">
<el-input :rows="1" v-model="postForm.content_short" type="textarea" class="article-textarea" autosize placeholder="请输入内容"/> <el-input v-model="postForm.content_short" :rows="1" type="textarea" class="article-textarea" autosize placeholder="请输入内容" />
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span> <span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span>
</el-form-item> </el-form-item>
<el-form-item prop="content" style="margin-bottom: 30px;"> <el-form-item prop="content" style="margin-bottom: 30px;">
<Tinymce ref="editor" :height="400" v-model="postForm.content" /> <Tinymce ref="editor" v-model="postForm.content" :height="400" />
</el-form-item> </el-form-item>
<el-form-item prop="image_uri" style="margin-bottom: 30px;"> <el-form-item prop="image_uri" style="margin-bottom: 30px;">

View File

@ -1,13 +1,18 @@
<template> <template>
<el-dropdown :show-timeout="100" trigger="click"> <el-dropdown :show-timeout="100" trigger="click">
<el-button plain>{{ !comment_disabled?'评论已打开':'评论已关闭' }} <el-button plain>
{{ !comment_disabled?'评论已打开':'评论已关闭' }}
<i class="el-icon-caret-bottom el-icon--right" /> <i class="el-icon-caret-bottom el-icon--right" />
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="no-padding"> <el-dropdown-menu slot="dropdown" class="no-padding">
<el-dropdown-item> <el-dropdown-item>
<el-radio-group v-model="comment_disabled" style="padding: 10px;"> <el-radio-group v-model="comment_disabled" style="padding: 10px;">
<el-radio :label="true">关闭评论</el-radio> <el-radio :label="true">
<el-radio :label="false">打开评论</el-radio> 关闭评论
</el-radio>
<el-radio :label="false">
打开评论
</el-radio>
</el-radio-group> </el-radio-group>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>

View File

@ -6,7 +6,7 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="no-border"> <el-dropdown-menu slot="dropdown" class="no-border">
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;"> <el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
<el-checkbox v-for="item in platformsOptions" :label="item.key" :key="item.key"> <el-checkbox v-for="item in platformsOptions" :key="item.key" :label="item.key">
{{ item.name }} {{ item.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>

View File

@ -7,7 +7,9 @@
<el-dropdown-menu slot="dropdown" class="no-padding no-border" style="width:400px"> <el-dropdown-menu slot="dropdown" class="no-padding no-border" style="width:400px">
<el-form-item label-width="0px" style="margin-bottom: 0px" prop="source_uri"> <el-form-item label-width="0px" style="margin-bottom: 0px" prop="source_uri">
<el-input v-model="source_uri" placeholder="请输入内容"> <el-input v-model="source_uri" placeholder="请输入内容">
<template slot="prepend">填写url</template> <template slot="prepend">
填写url
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-dropdown-menu> </el-dropdown-menu>

View File

@ -2,7 +2,7 @@
<div style="display:inline-block;"> <div style="display:inline-block;">
<!-- $t is vue-i18n global function to translate lang --> <!-- $t is vue-i18n global function to translate lang -->
<label class="radio-label" style="padding-left:0;">Filename: </label> <label class="radio-label" style="padding-left:0;">Filename: </label>
<el-input :placeholder="$t('excel.placeholder')" v-model="filename" style="width:340px;" prefix-icon="el-icon-document"/> <el-input v-model="filename" :placeholder="$t('excel.placeholder')" style="width:340px;" prefix-icon="el-icon-document" />
</div> </div>
</template> </template>

View File

@ -1,14 +1,14 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- $t is vue-i18n global function to translate lang --> <!-- $t is vue-i18n global function to translate lang -->
<el-input :placeholder="$t('excel.placeholder')" v-model="filename" style="width:340px;" prefix-icon="el-icon-document"/> <el-input v-model="filename" :placeholder="$t('excel.placeholder')" style="width:340px;" prefix-icon="el-icon-document" />
<el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="document" @click="handleDownload">{{ $t('excel.selectedExport') }}</el-button> <el-button :loading="downloadLoading" style="margin-bottom:20px" type="primary" icon="document" @click="handleDownload">{{ $t('excel.selectedExport') }}</el-button>
<a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;"> <a href="https://panjiachen.github.io/vue-element-admin-site/feature/component/excel.html" target="_blank" style="margin-left:15px;">
<el-tag type="info">Documentation</el-tag> <el-tag type="info">Documentation</el-tag>
</a> </a>
<el-table <el-table
v-loading="listLoading"
ref="multipleTable" ref="multipleTable"
v-loading="listLoading"
:data="list" :data="list"
element-loading-text="拼命加载中" element-loading-text="拼命加载中"
border border

View File

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<upload-excel-component :on-success="handleSuccess" :before-upload="beforeUpload" /> <upload-excel-component :on-success="handleSuccess" :before-upload="beforeUpload" />
<el-table :data="tableData" border highlight-current-row style="width: 100%;margin-top:20px;"> <el-table :data="tableData" border highlight-current-row style="width: 100%;margin-top:20px;">
<el-table-column v-for="item of tableHeader" :prop="item" :label="item" :key="item"/> <el-table-column v-for="item of tableHeader" :key="item" :prop="item" :label="item" />
</el-table> </el-table>
</div> </div>
</template> </template>

View File

@ -15,9 +15,9 @@
</template> </template>
<sidebar-item <sidebar-item
v-for="child in item.children" v-for="child in item.children"
:key="child.path"
:is-nest="true" :is-nest="true"
:item="child" :item="child"
:key="child.path"
:base-path="resolvePath(child.path)" :base-path="resolvePath(child.path)"
class="nest-menu" /> class="nest-menu" />
</el-submenu> </el-submenu>

View File

@ -6,8 +6,7 @@
:background-color="variables.menuBg" :background-color="variables.menuBg"
:text-color="variables.menuText" :text-color="variables.menuText"
:active-text-color="variables.menuActiveText" :active-text-color="variables.menuActiveText"
mode="vertical" mode="vertical">
>
<sidebar-item v-for="route in permission_routers" :key="route.path" :item="route" :base-path="route.path" /> <sidebar-item v-for="route in permission_routers" :key="route.path" :item="route" :base-path="route.path" />
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>

View File

@ -4,9 +4,9 @@
<router-link <router-link
v-for="tag in visitedViews" v-for="tag in visitedViews"
ref="tag" ref="tag"
:key="tag.path"
:class="isActive(tag)?'active':''" :class="isActive(tag)?'active':''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
:key="tag.path"
tag="span" tag="span"
class="tags-view-item" class="tags-view-item"
@click.middle.native="closeSelectedTag(tag)" @click.middle.native="closeSelectedTag(tag)"
@ -17,8 +17,9 @@
</scroll-pane> </scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)">{{ $t('tagsView.refresh') }}</li> <li @click="refreshSelectedTag(selectedTag)">{{ $t('tagsView.refresh') }}</li>
<li v-if="!(selectedTag.meta&&selectedTag.meta.affix)" @click="closeSelectedTag(selectedTag)">{{ <li v-if="!(selectedTag.meta&&selectedTag.meta.affix)" @click="closeSelectedTag(selectedTag)">
$t('tagsView.close') }}</li> {{ $t('tagsView.close') }}
</li>
<li @click="closeOthersTags">{{ $t('tagsView.closeOthers') }}</li> <li @click="closeOthersTags">{{ $t('tagsView.closeOthers') }}</li>
<li @click="closeAllTags(selectedTag)">{{ $t('tagsView.closeAll') }}</li> <li @click="closeAllTags(selectedTag)">{{ $t('tagsView.closeAll') }}</li>
</ul> </ul>

View File

@ -17,8 +17,7 @@
:placeholder="$t('login.username')" :placeholder="$t('login.username')"
name="username" name="username"
type="text" type="text"
auto-complete="on" auto-complete="on" />
/>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
@ -31,8 +30,7 @@
:placeholder="$t('login.password')" :placeholder="$t('login.password')"
name="password" name="password"
auto-complete="on" auto-complete="on"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin" />
/>
<span class="show-pwd" @click="showPwd"> <span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" /> <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span> </span>

View File

@ -6,6 +6,7 @@
<div style="color: #ccc;"> <div style="color: #ccc;">
This article is from Evan You on <a target="_blank" href="https://medium.com/the-vue-point/plans-for-the-next-iteration-of-vue-js-777ffea6fabf">medium</a> This article is from Evan You on <a target="_blank" href="https://medium.com/the-vue-point/plans-for-the-next-iteration-of-vue-js-777ffea6fabf">medium</a>
</div> </div>
<!-- eslint-disable-next-line -->
<div ref="content" class="node-article-content" v-html="article.content" /> <div ref="content" class="node-article-content" v-html="article.content" />
</div> </div>
</template> </template>

View File

@ -45,7 +45,9 @@
<el-table-column class-name="status-col" label="Status" width="110"> <el-table-column class-name="status-col" label="Status" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag> <el-tag :type="scope.row.status | statusFilter">
{{ scope.row.status }}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -3,7 +3,7 @@
<el-tag>mounted times {{ createdTimes }}</el-tag> <el-tag>mounted times {{ createdTimes }}</el-tag>
<el-alert :closable="false" style="width:200px;display:inline-block;vertical-align: middle;margin-left:30px;" title="Tab with keep-alive" type="success" /> <el-alert :closable="false" style="width:200px;display:inline-block;vertical-align: middle;margin-left:30px;" title="Tab with keep-alive" type="success" />
<el-tabs v-model="activeName" style="margin-top:15px;" type="border-card"> <el-tabs v-model="activeName" style="margin-top:15px;" type="border-card">
<el-tab-pane v-for="item in tabMapOptions" :label="item.label" :key="item.key" :name="item.key"> <el-tab-pane v-for="item in tabMapOptions" :key="item.key" :label="item.label" :name="item.key">
<keep-alive> <keep-alive>
<tab-pane v-if="activeName==item.key" :type="item.key" @create="showCreatedTimes" /> <tab-pane v-if="activeName==item.key" :type="item.key" @create="showCreatedTimes" />
</keep-alive> </keep-alive>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input :placeholder="$t('table.title')" v-model="listQuery.title" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter"/> <el-input v-model="listQuery.title" :placeholder="$t('table.title')" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
<el-select v-model="listQuery.importance" :placeholder="$t('table.importance')" clearable style="width: 90px" class="filter-item"> <el-select v-model="listQuery.importance" :placeholder="$t('table.importance')" clearable style="width: 90px" class="filter-item">
<el-option v-for="item in importanceOptions" :key="item" :label="item" :value="item" /> <el-option v-for="item in importanceOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
@ -18,8 +18,8 @@
</div> </div>
<el-table <el-table
v-loading="listLoading"
:key="tableKey" :key="tableKey"
v-loading="listLoading"
:data="list" :data="list"
border border
fit fit
@ -71,11 +71,14 @@
<el-table-column :label="$t('table.actions')" align="center" width="230" class-name="small-padding fixed-width"> <el-table-column :label="$t('table.actions')" align="center" width="230" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button> <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button>
<el-button v-if="scope.row.status!='published'" size="mini" type="success" @click="handleModifyStatus(scope.row,'published')">{{ $t('table.publish') }} <el-button v-if="scope.row.status!='published'" size="mini" type="success" @click="handleModifyStatus(scope.row,'published')">
{{ $t('table.publish') }}
</el-button> </el-button>
<el-button v-if="scope.row.status!='draft'" size="mini" @click="handleModifyStatus(scope.row,'draft')">{{ $t('table.draft') }} <el-button v-if="scope.row.status!='draft'" size="mini" @click="handleModifyStatus(scope.row,'draft')">
{{ $t('table.draft') }}
</el-button> </el-button>
<el-button v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }} <el-button v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
{{ $t('table.delete') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -105,7 +108,7 @@
<el-rate v-model="temp.importance" :colors="['#99A9BF', '#F7BA2A', '#FF9900']" :max="3" style="margin-top:8px;" /> <el-rate v-model="temp.importance" :colors="['#99A9BF', '#F7BA2A', '#FF9900']" :max="3" style="margin-top:8px;" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('table.remark')"> <el-form-item :label="$t('table.remark')">
<el-input :autosize="{ minRows: 2, maxRows: 4}" v-model="temp.remark" type="textarea" placeholder="Please input"/> <el-input v-model="temp.remark" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="Please input" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- Note that row-key is necessary to get a correct row order. --> <!-- Note that row-key is necessary to get a correct row order. -->
<el-table v-loading="listLoading" ref="dragTable" :data="list" row-key="id" border fit highlight-current-row style="width: 100%"> <el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%">
<el-table-column align="center" label="ID" width="65"> <el-table-column align="center" label="ID" width="65">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -9,7 +9,7 @@
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<el-table :data="tableData" :key="key" border fit highlight-current-row style="width: 100%"> <el-table :key="key" :data="tableData" border fit highlight-current-row style="width: 100%">
<el-table-column prop="name" label="fruitName" width="180" /> <el-table-column prop="name" label="fruitName" width="180" />
<el-table-column v-for="fruit in formThead" :key="fruit" :label="fruit"> <el-table-column v-for="fruit in formThead" :key="fruit" :label="fruit">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -33,7 +33,7 @@
</div> </div>
<div class="block"> <div class="block">
<el-tag v-for="tag in tags" :type="tag.type" :key="tag.type" class="tag-item"> <el-tag v-for="tag in tags" :key="tag.type" :type="tag.type" class="tag-item">
{{ tag.name }} {{ tag.name }}
</el-tag> </el-tag>
</div> </div>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- $t is vue-i18n global function to translate lang --> <!-- $t is vue-i18n global function to translate lang -->
<el-input :placeholder="$t('zip.placeholder')" v-model="filename" style="width:300px;" prefix-icon="el-icon-document"/> <el-input v-model="filename" :placeholder="$t('zip.placeholder')" style="width:300px;" prefix-icon="el-icon-document" />
<el-button :loading="downloadLoading" style="margin-bottom:20px;" type="primary" icon="document" @click="handleDownload">{{ $t('zip.export') }} zip</el-button> <el-button :loading="downloadLoading" style="margin-bottom:20px;" type="primary" icon="document" @click="handleDownload">{{ $t('zip.export') }} zip</el-button>
<el-table v-loading="listLoading" :data="list" element-loading-text="拼命加载中" border fit highlight-current-row> <el-table v-loading="listLoading" :data="list" element-loading-text="拼命加载中" border fit highlight-current-row>
<el-table-column align="center" label="ID" width="95"> <el-table-column align="center" label="ID" width="95">

9031
yarn.lock Normal file

File diff suppressed because it is too large Load Diff