no message

Former-commit-id: a8eedd7adb445496ea8c379c44d345177e48ba7e
Former-commit-id: ee9798c5c6e9aec53895e9c83f605ce5052321c2
Former-commit-id: 4b13e4bf2f99ca15163fdc85eae32c561d55d3bc
This commit is contained in:
liyang
2018-06-09 22:39:05 +08:00
parent 6740663337
commit 75d5500f22
46 changed files with 86 additions and 84 deletions

View File

@@ -57,7 +57,7 @@ module.exports = {
loader: 'svg-sprite-loader',
include: [resolve('src/assets/icons/svg')],
options: {
symbolId: 'dd-[name]'
symbolId: 'd2-[name]'
}
},
{

View File

@@ -8,6 +8,8 @@
* [ 修改 ] 顶栏和侧边栏菜单新的结构生成方式,新的方案使用 `数据` + `递归组件` 实现无限制多级菜单
* [ 修改 ] 路由注册回归最简单的写法
* [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀
* [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-`
## v1.0.0

View File

@@ -2,7 +2,7 @@
@import '~@/assets/style/unit/_size.scss';
// 工具类名统一前缀
$prefix: dd;
$prefix: d2;
// 禁止用户选中 鼠标变为手形
%unable-select {

View File

@@ -28,12 +28,12 @@ $theme-container-full-border-color: #d8dfea;
.el-menu--horizontal .el-menu .el-submenu__title:hover {
@include theme-menu-hover-style;
}
// [组件] dd-container-full
.dd-container-full {
.dd-container-full__header {
// [组件] d2-container-full
.d2-container-full {
.d2-container-full__header {
border-bottom: 1px solid $theme-container-full-border-color;
}
.dd-container-full__footer {
.d2-container-full__footer {
border-top: 1px solid $theme-container-full-border-color;
}
}
@@ -80,7 +80,7 @@ $theme-container-full-border-color: #d8dfea;
}
}
// 顶栏右侧
.dd-header-right {
.d2-header-right {
.btn-text {
color: #FFF;
}

View File

@@ -46,7 +46,7 @@
}
}
// 顶栏右侧的按钮
.dd-header-right {
.d2-header-right {
float: right;
height: 60px;
display: flex;
@@ -64,7 +64,7 @@
transition: width .3s;
overflow: inherit;
// 空菜单
.dd-side-menu-empty {
.d2-side-menu-empty {
background-color: rgba(#000, .03);
margin: $margin;
margin-top: 0px;
@@ -109,8 +109,8 @@
overflow: hidden;
}
}
// [组件] dd-container-full
.dd-container-full {
// [组件] d2-container-full
.d2-container-full {
position: absolute;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
@@ -120,7 +120,7 @@
&:hover {
box-shadow: none;
}
.dd-container-full__header {
.d2-container-full__header {
position: absolute;
top: 0px;
left: 0px;
@@ -128,7 +128,7 @@
padding: 18px 20px;
box-sizing: border-box;
}
.dd-container-full__body {
.d2-container-full__body {
position: absolute;
padding: 20px;
left: 0px;
@@ -136,7 +136,7 @@
bottom: 0px;
overflow: auto;
}
.dd-container-full__footer {
.d2-container-full__footer {
position: absolute;
bottom: 0px;
left: 0px;

View File

@@ -1,12 +1,12 @@
<template>
<div class="container-component" :class="{responsive}">
<!-- [card] 卡片容器 -->
<el-card v-if="type === 'card'" class="dd-mr dd-mb">
<el-card v-if="type === 'card'" class="d2-mr d2-mb">
<slot v-if="$slots.header" name="header" slot="header"></slot>
<slot></slot>
</el-card>
<!-- [ghost] 隐形的容器 -->
<div v-if="type === 'ghost'" class="dd-mr dd-mb">
<div v-if="type === 'ghost'" class="d2-mr d2-mb">
<slot name="header"></slot>
<slot></slot>
</div>

View File

@@ -1,12 +1,12 @@
<template>
<div class="dd-container-full" :style="cardStyle">
<div v-if="$slots.header" class="dd-container-full__header" ref="header">
<div class="d2-container-full" :style="cardStyle">
<div v-if="$slots.header" class="d2-container-full__header" ref="header">
<slot name="header"></slot>
</div>
<div class="dd-container-full__body" :style="bodyStyle">
<div class="d2-container-full__body" :style="bodyStyle">
<slot></slot>
</div>
<div v-if="$slots.footer" class="dd-container-full__footer" ref="footer">
<div v-if="$slots.footer" class="d2-container-full__footer" ref="footer">
<slot name="footer"></slot>
</div>
</div>

View File

@@ -6,8 +6,8 @@
:placement="placement"
width="300"
trigger="click">
<div class="header dd-clearfix dd-mb-10" v-if="clearable">
<el-button type="danger" icon="el-icon-delete" size="mini" class="dd-fr" @click="selectIcon()">清空</el-button>
<div class="header d2-clearfix d2-mb-10" v-if="clearable">
<el-button type="danger" icon="el-icon-delete" size="mini" class="d2-fr" @click="selectIcon()">清空</el-button>
</div>
<el-input
v-model="searchText"

View File

@@ -14,7 +14,7 @@ export default {
},
computed: {
icon () {
return `#dd-${this.name}`
return `#d2-${this.name}`
}
}
}

View File

@@ -4,7 +4,7 @@
effect="dark"
:content="isFullScreen ? '退出全屏' : '全屏'"
placement="bottom">
<el-button class="dd-mr btn-text" type="text" @click="toggleFullScreen">
<el-button class="d2-mr btn-text" type="text" @click="toggleFullScreen">
<Icon v-if="isFullScreen" name="compress"></Icon>
<Icon v-else name="arrows-alt"></Icon>
</el-button>

View File

@@ -1,5 +1,5 @@
<template>
<el-dropdown class="dd-mr">
<el-dropdown class="d2-mr">
<span class="el-dropdown-link">你好</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logOff"><Icon name="power-off"></Icon> 注销</el-dropdown-item>

View File

@@ -1,5 +1,5 @@
<template>
<div class="dd-header-right">
<div class="d2-header-right">
<FullScreen></FullScreen>
<UserDropdown></UserDropdown>
</div>

View File

@@ -9,7 +9,7 @@
<d2-submenu v-else :menu="menu" :key="menuIndex"/>
</template>
</el-menu>
<!-- <div v-if="sideMenu.filter(e => e.title).length === 0 && !collapse" class="dd-side-menu-empty">
<!-- <div v-if="sideMenu.filter(e => e.title).length === 0 && !collapse" class="d2-side-menu-empty">
没有菜单
</div> -->
</div>

View File

@@ -5,11 +5,11 @@
placement="top"
width="160"
v-model="popover.visible">
<p class="dd-mt-0 dd-mb-10">
<p class="d2-mt-0 d2-mb-10">
<i class="fa fa-github"></i>
github
</p>
<p class="dd-mt-0 dd-mb-10" style="font-size: 10px;">{{name}}</p>
<p class="d2-mt-0 d2-mb-10" style="font-size: 10px;">{{name}}</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="popover.visible = false">
取消

View File

@@ -1,7 +1,7 @@
<template>
<div class="dd-clearfix">
<span v-if="title" class="dd-fl">{{title}}</span>
<span class="dd-fr">
<div class="d2-clearfix">
<span v-if="title" class="d2-fl">{{title}}</span>
<span class="d2-fr">
<GithubLink v-if="url" :url="url"></GithubLink>
</span>
</div>

View File

@@ -4,7 +4,7 @@
<slot></slot>
</div>
<p class="page-index-article-body__title">{{title}}</p>
<p class="page-index-article-body__sub-title dd-mt-0">{{subTitle}}</p>
<p class="page-index-article-body__sub-title d2-mt-0">{{subTitle}}</p>
<a target="blank" href="https://github.com/FairyEver/d2admin-vue-element">
<img
style="position: absolute; top: 0; right: 0; border: 0;"

View File

@@ -1,7 +1,7 @@
<template>
<div>
{{title}}
<span class="dd-fr">
<span class="d2-fr">
<Icon
class="chart-card-header-icon"
:class="{active}"

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2PieBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2PieBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2AreaBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2AreaBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2BarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2BarBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2ColumnBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2ColumnBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2LineBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2LineStep slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineStep>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2NightingaleRoseBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2NightingaleRoseBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost" :responsive="true">
<ChartDemoCard class="dd-mb" v-bind="card" @resize="$refs.chart.resize()">
<ChartDemoCard class="d2-mb" v-bind="card" @resize="$refs.chart.resize()">
<G2RadarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2RadarBase>
</ChartDemoCard>
<el-card>

View File

@@ -1,7 +1,7 @@
<template>
<div>
{{title}}
<span class="dd-fr">
<span class="d2-fr">
<Icon
class="chart-card-header-icon"
:class="{active}"

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="基本示例"

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="基本示例"

View File

@@ -1,30 +1,30 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
title="代码高亮组件"
url="https://github.com/isagalaev/highlight.js">
</PageHeader>
</el-card>
<el-card class="dd-mb">
<el-card class="d2-mb">
<p slot="title">javascript</p>
<Highlight :code="codeJavascript"></Highlight>
</el-card>
<el-row :gutter="20">
<el-col :span="8">
<el-card class="dd-mb">
<el-card class="d2-mb">
<p slot="title">css</p>
<Highlight :code="codeCSS"></Highlight>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="dd-mb">
<el-card class="d2-mb">
<p slot="title">scss</p>
<Highlight :code="codeSCSS"></Highlight>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="dd-mb">
<el-card class="d2-mb">
<p slot="title">html</p>
<Highlight :code="codeHTML"></Highlight>
</el-card>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="图标组件"

View File

@@ -15,10 +15,10 @@
<el-alert
title="点击图标复制代码"
type="info"
class="dd-m-10"
class="d2-m-10"
style="width: auto;">
</el-alert>
<el-col v-for="(iconItem, iconIndex) in iconShow.icon" :key="iconIndex" :span="6" class="dd-p-10">
<el-col v-for="(iconItem, iconIndex) in iconShow.icon" :key="iconIndex" :span="6" class="d2-p-10">
<IconCell :icon="iconItem"></IconCell>
</el-col>
</el-row>

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="图标选择器"

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="SVG图标组件">

View File

@@ -14,9 +14,9 @@
<el-card>
<el-tag size="mini" type="info" slot="header">Card {{item.i}}</el-tag>
<template v-if="item.i === '0'">
<div class="dd-mb">拖拽卡片调整位置</div>
<div class="dd-mb">拖拽卡片右下角的手柄调整卡片大小</div>
<div class="dd-mb">在控制台打印出数据变化</div>
<div class="d2-mb">拖拽卡片调整位置</div>
<div class="d2-mb">拖拽卡片右下角的手柄调整卡片大小</div>
<div class="d2-mb">在控制台打印出数据变化</div>
<GithubLinkButton
name="vue-grid-layout"
url="https://github.com/jbaysolutions/vue-grid-layout"

View File

@@ -7,7 +7,7 @@
</PageHeader>
<el-row :gutter="10">
<el-col :span="12">
<div class="dd-mb">
<div class="d2-mb">
<el-input v-model="text" style="width: 200px;"></el-input>
<el-button @click="copyText()">将左侧输入框内的文字复制进剪贴板</el-button>
</div>
@@ -15,12 +15,12 @@
</el-col>
<el-col :span="12">
<el-alert
class="dd-mb"
class="d2-mb"
title="只有在 IE 浏览器下你才可以通过下面这两个按钮获取剪贴板数据"
type="warning"
show-icon>
</el-alert>
<div class="dd-mb">
<div class="d2-mb">
<el-tooltip content="需要 IE 浏览器" placement="top">
<el-button @click="readText">readText( )</el-button>
</el-tooltip>

View File

@@ -4,7 +4,7 @@
slot="header"
title="导出表格">
</PageHeader>
<div class="dd-mb">
<div class="d2-mb">
<el-button type="primary" @click="exportCsv">
<Icon name="download"></Icon>
导出 CSV
@@ -14,7 +14,7 @@
导出 Excel
</el-button>
</div>
<el-table v-bind="table" style="width: 100%" class="dd-mb">
<el-table v-bind="table" style="width: 100%" class="d2-mb">
<el-table-column
v-for="(item, index) in table.columns"
:key="index"

View File

@@ -10,7 +10,7 @@
placeholder="请输入内容 然后点击保存按钮导出文本文档"
v-model="text">
</el-input>
<div class="dd-mt dd-mb">
<div class="d2-mt d2-mb">
<el-button type="primary" @click="exportTxt">
<Icon name="download"></Icon>
保存为 txt

View File

@@ -1,5 +1,5 @@
<template>
<div class="dd-mb">
<div class="d2-mb">
<el-radio-group v-model="lang" @change="handleChange">
<el-radio-button label="cn">中文</el-radio-button>
<el-radio-button label="ja">日本語</el-radio-button>

View File

@@ -5,13 +5,13 @@
title="导入 csv"
url="https://github.com/mholt/PapaParse">
</PageHeader>
<div class="dd-mb">
<div class="d2-mb">
<el-button @click="download">
<Icon name="download"></Icon>
下载演示 .csv 表格
</el-button>
</div>
<div class="dd-mb">
<div class="d2-mb">
<el-upload :before-upload="handleUpload" action="default">
<el-button type="success">
<Icon name="file-o"></Icon>
@@ -19,7 +19,7 @@
</el-button>
</el-upload>
</div>
<el-table v-bind="table" class="dd-mb">
<el-table v-bind="table" class="d2-mb">
<el-table-column
v-for="(item, index) in table.columns"
:key="index"

View File

@@ -5,13 +5,13 @@
title="导入 xlsx"
url="https://github.com/SheetJS/js-xlsx">
</PageHeader>
<div class="dd-mb">
<div class="d2-mb">
<el-button @click="download">
<Icon name="download"></Icon>
下载演示 .xlsx 表格
</el-button>
</div>
<div class="dd-mb">
<div class="d2-mb">
<el-upload :before-upload="handleUpload" action="default">
<el-button type="success">
<Icon name="file-o"></Icon>
@@ -19,7 +19,7 @@
</el-button>
</el-upload>
</div>
<el-table v-bind="table" class="dd-mb">
<el-table v-bind="table" class="d2-mb">
<el-table-column
v-for="(item, index) in table.columns"
:key="index"

View File

@@ -1,12 +1,12 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="基本示例"
url="https://github.com/js-cookie/js-cookie">
</PageHeader>
<p class="dd-mt-0">基本读写删</p>
<p class="d2-mt-0">基本读写删</p>
<el-button type="primary" @click="set('test-user-name', 'test-user')">set('test-user-name', 'normalValue')</el-button>
<el-button type="info" @click="get('test-user-name')">get('test-user-name')</el-button>
<el-button type="error" @click="remove('test-user-name')">remove('test-user-name')</el-button>

View File

@@ -4,7 +4,7 @@
<div slot="header">
<el-button @click="ajax">发送请求</el-button>
</div>
<el-table v-bind="table" style="width: 100%" class="dd-mb">
<el-table v-bind="table" style="width: 100%" class="d2-mb">
<el-table-column
v-for="(item, index) in table.columns"
:key="index"

View File

@@ -1,9 +1,9 @@
<template>
<el-card class="dd-mb">
<div slot="header" class="dd-clearfix">
<el-card class="d2-mb">
<div slot="header" class="d2-clearfix">
<el-button type="text" size="mini">{{title}}</el-button>
<el-tooltip content="重新 mock 数据" placement="top-end">
<el-button type="primary" size="mini" @click="$emit('reload')" class="dd-fr">刷新</el-button>
<el-button type="primary" size="mini" @click="$emit('reload')" class="d2-fr">刷新</el-button>
</el-tooltip>
</div>
<el-row :gutter="10">

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="数据占位符"

View File

@@ -1,6 +1,6 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
slot="header"
title="数据模板"

View File

@@ -1,19 +1,19 @@
<template>
<Container type="ghost">
<el-card class="dd-mb">
<el-card class="d2-mb">
<PageHeader
title="基本示例"
url="https://github.com/hustcc/timeago.js">
</PageHeader>
</el-card>
<el-card class="dd-mb">
<div class="dd-text-center">
<el-card class="d2-mb">
<div class="d2-text-center">
<h1 style="font-size: 30px;">您在{{openPageDateAgo}}打开的此页面</h1>
<p style="font-size: 10px;">请稍等一下 10秒后会开始自动刷新</p>
</div>
</el-card>
<el-card class="dd-mb">
<div class="dd-text-center">
<el-card class="d2-mb">
<div class="d2-text-center">
<h1 style="font-size: 30px;">{{dateTimeRangeAgo}}</h1>
<el-date-picker
v-model="dateTimeRange"