no message

Former-commit-id: afef3af60139bd559aa150052fc3a72ec2f384a4
Former-commit-id: e2b324d8476ca2a52c625f2aee16972708a43bec
Former-commit-id: ab3a3d9097c684c0fb1b54b1a5f228157b2f81ff
This commit is contained in:
liyang
2018-06-10 08:39:06 +08:00
parent 75d5500f22
commit 8cc55e1bf7
54 changed files with 121 additions and 115 deletions

View File

@@ -19,12 +19,12 @@
``` vue ``` vue
<template> <template>
<Container> <d2-container>
<template slot="header"> <template slot="header">
可选的 header 内容 ... 可选的 header 内容 ...
</template> </template>
主体内容 ... 主体内容 ...
</Container> </d2-container>
</template> </template>
<script> <script>
@@ -44,18 +44,18 @@ export default {
高度根据内容适应 高度根据内容适应
``` vue ``` vue
<Container> <d2-container>
主体内容 主体内容
</Container> </d2-container>
``` ```
使用 `slot` 使用 `slot`
``` vue ``` vue
<Container> <d2-container>
<template slot="header">我是插入到 header 中的内容</template> <template slot="header">我是插入到 header 中的内容</template>
主体内容 主体内容
</Container> </d2-container>
``` ```
## 自适应填充页面容器 ## 自适应填充页面容器
@@ -66,7 +66,7 @@ export default {
``` vue ``` vue
<template> <template>
<Container type="full"> <d2-container type="full">
<template slot="header"> <template slot="header">
可选的 header 内容 ... 可选的 header 内容 ...
</template> </template>
@@ -74,7 +74,7 @@ export default {
<template slot="footer"> <template slot="footer">
可选的 footer 内容 ... 可选的 footer 内容 ...
</template> </template>
</Container> </d2-container>
</template> </template>
``` ```
@@ -83,7 +83,7 @@ export default {
不显示任何背景色和边框 不显示任何背景色和边框
``` vue ``` vue
<Container type="ghost"> <d2-container type="ghost">
主体内容 主体内容
</Container> </d2-container>
``` ```

View File

@@ -10,6 +10,7 @@
* [ 修改 ] 路由注册回归最简单的写法 * [ 修改 ] 路由注册回归最简单的写法
* [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀 * [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀
* [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-` * [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-`
* [ 修复 ] 修复 `highlight` 组件和 `markdown` 组件的样式冲突
## v1.0.0 ## v1.0.0

View File

@@ -10,10 +10,6 @@ html, body {
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;
right: 0px; right: 0px;
pre {
margin: 0px;
border-radius: 4px;
}
a { a {
text-decoration: none; text-decoration: none;
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<pre v-html="highlightHTML"></pre> <pre class="high-light-component" v-html="highlightHTML"></pre>
</template> </template>
<script> <script>
@@ -34,3 +34,10 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
.high-light-component {
margin: 0px;
border-radius: 4px;
}
</style>

View File

@@ -14,6 +14,7 @@
<script> <script>
export default { export default {
name: 'd2-container-full',
props: { props: {
// //
top: { top: {

View File

@@ -11,16 +11,17 @@
<slot></slot> <slot></slot>
</div> </div>
<!-- [container-full] 撑满 --> <!-- [container-full] 撑满 -->
<container-full v-if="type === 'full'" :right="20" :bottom="0"> <d2-container-full v-if="type === 'full'" :right="20" :bottom="0">
<slot v-if="$slots.header" name="header" slot="header"></slot> <slot v-if="$slots.header" name="header" slot="header"></slot>
<slot></slot> <slot></slot>
<slot v-if="$slots.footer" name="footer" slot="footer"></slot> <slot v-if="$slots.footer" name="footer" slot="footer"></slot>
</container-full> </d2-container-full>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-container',
props: { props: {
// //
type: { type: {
@@ -36,7 +37,7 @@ export default {
} }
}, },
components: { components: {
containerFull: () => import('../ContainerFull/index.vue') 'd2-container-full': () => import('../d2-container-full/index.vue')
} }
} }
</script> </script>

View File

@@ -1,6 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
Vue.component('Container', resolve => { require(['@/components/core/Container'], resolve) }) Vue.component('d2-container', resolve => { require(['@/components/core/d2-container'], resolve) })
Vue.component('CountUp', resolve => { require(['@/components/core/CountUp'], resolve) }) Vue.component('CountUp', resolve => { require(['@/components/core/CountUp'], resolve) })
Vue.component('Highlight', resolve => { require(['@/components/core/Highlight'], resolve) }) Vue.component('Highlight', resolve => { require(['@/components/core/Highlight'], resolve) })
Vue.component('Icon', resolve => { require(['@/components/core/Icon'], resolve) }) Vue.component('Icon', resolve => { require(['@/components/core/Icon'], resolve) })

View File

@@ -1,9 +1,9 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<PageIndexArticle <PageIndexArticle
title="I AM D2ADMIN" title="I AM D2ADMIN"
sub-title="追求简约美感 & 上手即用的后台管理系统模板"> sub-title="追求简约美感 & 上手即用的后台管理系统模板">
<img src="@/assets/image/logo/w500.png"> <img src="@/assets/image/logo/w500.png">
</PageIndexArticle> </PageIndexArticle>
</Container> </d2-container>
</template> </template>

View File

@@ -1,9 +1,9 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<PageIndexArticle <PageIndexArticle
title="示例业务页面" title="示例业务页面"
sub-title="如果用不到 建议删除相关代码"> sub-title="如果用不到 建议删除相关代码">
<img src="@/assets/image/logo/w500-business.png"> <img src="@/assets/image/logo/w500-business.png">
</PageIndexArticle> </PageIndexArticle>
</Container> </d2-container>
</template> </template>

View File

@@ -1,8 +1,8 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<template slot="header"> <template slot="header">
用户中心 用户中心
</template> </template>
doing... doing...
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost" :responsive="true" class="demo-chart-index"> <d2-container type="ghost" :responsive="true" class="demo-chart-index">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col class="col" :span="8"> <el-col class="col" :span="8">
<el-card class="header-in"> <el-card class="header-in">
@@ -50,7 +50,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2PieBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2PieBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2AreaBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2AreaBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2BarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2BarBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2ColumnBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2ColumnBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2LineBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2LineStep slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineStep>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2NightingaleRoseBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2NightingaleRoseBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<Container type="ghost" :responsive="true"> <d2-container type="ghost" :responsive="true">
<ChartDemoCard class="d2-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> <G2RadarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2RadarBase>
</ChartDemoCard> </ChartDemoCard>
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图表.md"></Markdown> <Markdown url="/static/md/组件 - 图表.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost" :responsive="true" class="demo-chart-index"> <d2-container type="ghost" :responsive="true" class="demo-chart-index">
<GridLayout v-bind="layout" @layout-updated="layoutUpdatedHandler"> <GridLayout v-bind="layout" @layout-updated="layoutUpdatedHandler">
<!-- 卡片 --> <!-- 卡片 -->
<GridItem v-bind="layout.layout[0]" @resized="handleResized(chart[0].refName)"> <GridItem v-bind="layout.layout[0]" @resized="handleResized(chart[0].refName)">
@@ -58,7 +58,7 @@
</el-card> </el-card>
</GridItem> </GridItem>
</GridLayout> </GridLayout>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,9 +1,9 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<PageIndexArticle <PageIndexArticle
title="内置 G2 图表库" title="内置 G2 图表库"
sub-title="如果用不到 建议删除相关代码和依赖"> sub-title="如果用不到 建议删除相关代码和依赖">
<img src="@/assets/image/logo/w500-chart.png"> <img src="@/assets/image/logo/w500-chart.png">
</PageIndexArticle> </PageIndexArticle>
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<template slot="header"> <template slot="header">
我是插入到 header 中的内容 我是插入到 header 中的内容
</template> </template>
@@ -7,5 +7,5 @@
<template slot="footer"> <template slot="footer">
我是插入到 footer 中的内容 我是插入到 footer 中的内容
</template> </template>
</Container> </d2-container>
</template> </template>

View File

@@ -1,7 +1,7 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card style="width: 50%;"> <el-card style="width: 50%;">
<Markdown url="/static/md/组件 - 页面容器 - 隐形.md"></Markdown> <Markdown url="/static/md/组件 - 页面容器 - 隐形.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<Container> <d2-container>
<template slot="header">我是插入到 header 中的内容</template> <template slot="header">我是插入到 header 中的内容</template>
<Markdown url="/static/md/组件 - 页面容器 - 基础.md"></Markdown> <Markdown url="/static/md/组件 - 页面容器 - 基础.md"></Markdown>
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost" class="page"> <d2-container type="ghost" class="page">
<el-card> <el-card>
<PageHeader <PageHeader
title="数字动画组件" title="数字动画组件"
@@ -59,7 +59,7 @@
<el-card> <el-card>
<Markdown url="/static/md/组件 - 数字动画.md"></Markdown> <Markdown url="/static/md/组件 - 数字动画.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -18,7 +18,7 @@
<template slot="header">输出</template> <template slot="header">输出</template>
<Highlight :code="formated"></Highlight> <Highlight :code="formated"></Highlight>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -15,7 +15,7 @@
<template slot="header">输出</template> <template slot="header">输出</template>
<pre>{{text}}</pre> <pre>{{text}}</pre>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
title="代码高亮组件" title="代码高亮组件"
@@ -33,7 +33,7 @@
<el-card> <el-card>
<Markdown url="/static/md/组件 - 代码高亮.md"></Markdown> <Markdown url="/static/md/组件 - 代码高亮.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -14,7 +14,7 @@
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图标组件.md"></Markdown> <Markdown url="/static/md/组件 - 图标组件.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<style lang="scss"> <style lang="scss">

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card> <el-card>
<template slot="header"> <template slot="header">
<el-radio-group v-model="showIndex" size="mini"> <el-radio-group v-model="showIndex" size="mini">
@@ -23,7 +23,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -32,7 +32,7 @@
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图标选择器.md"></Markdown> <Markdown url="/static/md/组件 - 图标选择器.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -17,7 +17,7 @@
<el-card> <el-card>
<Markdown url="/static/md/组件 - 图标组件 - svg.md"></Markdown> <Markdown url="/static/md/组件 - 图标组件 - svg.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,9 +1,9 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<PageIndexArticle <PageIndexArticle
title="内置组件" title="内置组件"
sub-title="D2Admin 为你提供了一些上手即用的组件"> sub-title="D2Admin 为你提供了一些上手即用的组件">
<img src="@/assets/image/logo/w500-component.png"> <img src="@/assets/image/logo/w500-component.png">
</PageIndexArticle> </PageIndexArticle>
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost" class="demo-plugins-vue-grid-layout-demo"> <d2-container type="ghost" class="demo-plugins-vue-grid-layout-demo">
<GridLayout <GridLayout
v-bind="layout" v-bind="layout"
@layout-updated="layoutUpdatedHandler"> @layout-updated="layoutUpdatedHandler">
@@ -26,7 +26,7 @@
</el-card> </el-card>
</GridItem> </GridItem>
</GridLayout> </GridLayout>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="基本示例" title="基本示例"
@@ -16,7 +16,7 @@
</template> </template>
</SplitPane> </SplitPane>
</div> </div>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,10 +1,10 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="效果演示" title="效果演示"
url="https://github.com/FairyEver/d2admin-vue-element/blob/master/src/components/core/Markdown/index.vue"> url="https://github.com/FairyEver/d2admin-vue-element/blob/master/src/components/core/Markdown/index.vue">
</PageHeader> </PageHeader>
<markdown url="/static/md/组件 - markdown - 演示.md"></markdown> <markdown url="/static/md/组件 - markdown - 演示.md"></markdown>
</Container> </d2-container>
</template> </template>

View File

@@ -1,8 +1,8 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<template slot="header"> <template slot="header">
多环境发布 多环境发布
</template> </template>
<p>当前是{{$env ? '开发' : '生产'}}环境</p> <p>当前是{{$env ? '开发' : '生产'}}环境</p>
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="基本示例" title="基本示例"
@@ -31,7 +31,7 @@
<el-input type="textarea" placeholder="在这里检验你的剪贴板 ( text/plain 数据 )"></el-input> <el-input type="textarea" placeholder="在这里检验你的剪贴板 ( text/plain 数据 )"></el-input>
</el-col> </el-col>
</el-row> </el-row>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="导出表格"> title="导出表格">
@@ -23,7 +23,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<Markdown url="/static/md/插件 - 导出.md"></Markdown> <Markdown url="/static/md/插件 - 导出.md"></Markdown>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="导出文本"> title="导出文本">
@@ -17,7 +17,7 @@
</el-button> </el-button>
</div> </div>
<Markdown url="/static/md/插件 - 导出.md"></Markdown> <Markdown url="/static/md/插件 - 导出.md"></Markdown>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
:title="`${$t('pub.pageHeader.demo')} 1`" :title="`${$t('pub.pageHeader.demo')} 1`"
@@ -7,7 +7,7 @@
</PageHeader> </PageHeader>
<DemoI18nControl></DemoI18nControl> <DemoI18nControl></DemoI18nControl>
<DemoI18n></DemoI18n> <DemoI18n></DemoI18n>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
:title="`${$t('pub.pageHeader.demo')} 2`" :title="`${$t('pub.pageHeader.demo')} 2`"
@@ -7,7 +7,7 @@
</PageHeader> </PageHeader>
<DemoI18nControl></DemoI18nControl> <DemoI18nControl></DemoI18nControl>
<DemoI18n></DemoI18n> <DemoI18n></DemoI18n>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="导入 csv" title="导入 csv"
@@ -28,7 +28,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<Markdown url="/static/md/插件 - 导入.md"></Markdown> <Markdown url="/static/md/插件 - 导入.md"></Markdown>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container> <d2-container>
<PageHeader <PageHeader
slot="header" slot="header"
title="导入 xlsx" title="导入 xlsx"
@@ -28,7 +28,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<Markdown url="/static/md/插件 - 导入.md"></Markdown> <Markdown url="/static/md/插件 - 导入.md"></Markdown>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,9 +1,9 @@
<template> <template>
<Container type="full"> <d2-container type="full">
<PageIndexArticle <PageIndexArticle
title="插件演示" title="插件演示"
sub-title="D2Admin 集成了许多实用插件"> sub-title="D2Admin 集成了许多实用插件">
<img src="@/assets/image/logo/w500-plugin.png"> <img src="@/assets/image/logo/w500-plugin.png">
</PageIndexArticle> </PageIndexArticle>
</Container> </d2-container>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -17,7 +17,7 @@
<p>获取所有可以获得的数据</p> <p>获取所有可以获得的数据</p>
<el-button type="info" @click="getAll">getAll</el-button> <el-button type="info" @click="getAll">getAll</el-button>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card> <el-card>
<div slot="header"> <div slot="header">
<el-button @click="ajax">发送请求</el-button> <el-button @click="ajax">发送请求</el-button>
@@ -14,7 +14,7 @@
</el-table> </el-table>
<Markdown url="/static/md/插件 - mock拦截ajax.md"></Markdown> <Markdown url="/static/md/插件 - mock拦截ajax.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -16,7 +16,7 @@
:mock="mockResult[index]" :mock="mockResult[index]"
@reload="doMock(index)"> @reload="doMock(index)">
</MockDemoCard> </MockDemoCard>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
slot="header" slot="header"
@@ -28,7 +28,7 @@
:mock="regexp.mocked" :mock="regexp.mocked"
@reload="regexpMock()"> @reload="regexpMock()">
</MockDemoCard> </MockDemoCard>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Container type="ghost"> <d2-container type="ghost">
<el-card class="d2-mb"> <el-card class="d2-mb">
<PageHeader <PageHeader
title="基本示例" title="基本示例"
@@ -27,7 +27,7 @@
<el-card> <el-card>
<Markdown url="/static/md/插件 - timeago.md"></Markdown> <Markdown url="/static/md/插件 - timeago.md"></Markdown>
</el-card> </el-card>
</Container> </d2-container>
</template> </template>
<script> <script>

View File

@@ -3,16 +3,16 @@
高度根据内容适应 高度根据内容适应
``` ```
<Container> <d2-container>
主体内容 主体内容
</Container> </d2-container>
``` ```
使用 `slot` 使用 `slot`
``` ```
<Container> <d2-container>
<template slot="header">我是插入到 header 中的内容</template> <template slot="header">我是插入到 header 中的内容</template>
主体内容 主体内容
</Container> </d2-container>
``` ```

View File

@@ -6,7 +6,7 @@
``` ```
<template> <template>
<Container type="card-full"> <d2-container type="card-full">
<template slot="header"> <template slot="header">
可选的 header 内容 ... 可选的 header 内容 ...
</template> </template>
@@ -14,7 +14,7 @@
<template slot="footer"> <template slot="footer">
可选的 footer 内容 ... 可选的 footer 内容 ...
</template> </template>
</Container> </d2-container>
</template> </template>
``` ```

View File

@@ -3,7 +3,7 @@
不显示任何背景色和边框 不显示任何背景色和边框
``` ```
<Container type="ghost"> <d2-container type="ghost">
主体内容 主体内容
</Container> </d2-container>
``` ```

View File

@@ -15,12 +15,12 @@
``` ```
<template> <template>
<Container> <d2-container>
<template slot="header"> <template slot="header">
可选的 header 内容 ... 可选的 header 内容 ...
</template> </template>
主体内容 ... 主体内容 ...
</Container> </d2-container>
</template> </template>
<script> <script>