Merge branch 'hotfix/i18n' into develop

Former-commit-id: 414c1f0a44a8ee6c1c3eb50a042e87354225335b [formerly 414c1f0a44a8ee6c1c3eb50a042e87354225335b [formerly 414c1f0a44a8ee6c1c3eb50a042e87354225335b [formerly 414c1f0a44a8ee6c1c3eb50a042e87354225335b [formerly 4f63f00e370b945077f68d903db642295397c674 [formerly c6a97d371ee3abff7ad1a004e2a8fb23d1c88760]]]]]
Former-commit-id: fb739959abe4731feccbb535fd4dddfb153f461e
Former-commit-id: 19e6a31983560d81d81eda6f39c74455904bceb7
Former-commit-id: 83b4ce57d48389f481d9c153871053fdc167e3bc [formerly c973e96b74650f73d7afb90a6fbcf95c8a5f0032]
Former-commit-id: 61c1d6c2aa3194ffd3ccfaf08906a117f1972bf3
Former-commit-id: 7e8641dea7f7b6e75419a360c2d73344ace500fd
Former-commit-id: f5707579d9f03b11b0c789147241947659477dbc
Former-commit-id: da3d5d1f9b813f4b7bc21bd984c228b042b160de
Former-commit-id: 639fe1aba52792a56e5ef6304c49c2e650c47877
This commit is contained in:
liyang
2019-05-23 09:37:44 +08:00
267 changed files with 1327 additions and 840 deletions

8
.env
View File

@@ -1,7 +1,5 @@
# 所有环境默认
# 页面 title 前缀
VUE_APP_TITLE=D2Admin
# 网络请求公用地址
VUE_APP_API=/api/
VUE_APP_REPO=https://github.com/d2-projects/d2-admin
VUE_APP_I18N_LOCALE=en
VUE_APP_I18N_FALLBACK_LOCALE=zh-chs

10
.env.netlify Normal file
View File

@@ -0,0 +1,10 @@
# travis
# 指定构建模式
NODE_ENV=production
# 标记当前构建方式
VUE_APP_BUILD_MODE=NETLIFY
# 显示源码按钮
VUE_APP_SCOURCE_LINK=TRUE

View File

@@ -4,4 +4,4 @@
NODE_ENV=production
# 标记当前是 No Mock 构建
VUE_APP_BUILD_MODE=nomock
VUE_APP_BUILD_MODE=NOMOCK

View File

@@ -3,5 +3,8 @@
# 指定构建模式
NODE_ENV=production
# 标记当前是 CI 自动构建
# 标记当前构建方式
VUE_APP_BUILD_MODE=TRAVIS
# 显示源码按钮
VUE_APP_SCOURCE_LINK=TRUE

View File

@@ -3,6 +3,9 @@ build/
tests/
node_modules/
# D2CRUD 演示
src/views/demo/d2-crud/
# node 覆盖率文件
coverage/

View File

@@ -3,7 +3,6 @@
<p align="center">
<a><img src="https://img.shields.io/github/release/d2-projects/d2-admin.svg"/></a>
<a><img src="https://img.shields.io/npm/v/@d2-admin/ice-scaffold.svg"/></a>
<a href="https://www.travis-ci.org/d2-projects/d2-admin"><img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/></a>
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
</p>
@@ -17,17 +16,27 @@
<a><img src="https://img.shields.io/github/stars/d2-projects/d2-admin.svg"/></a>
</p>
<p align="center">
<a href="https://www.travis-ci.org/d2-projects/d2-admin">
<img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/>
</a>
<a href="https://app.netlify.com/sites/d2-admin/deploys">
<img src="https://api.netlify.com/api/v1/badges/a5dd4bbd-da3f-4145-98a9-8012577bdcf5/deploy-status"/>
</a>
</p>
D2Admin is a fully open source and free enterprise back-end product front-end integration solution, using the latest front-end technology stack, has prepared most of the project preparations, and with a lot of sample code to help the management system agile development.
[中文介绍](https://github.com/d2-projects/d2-admin/blob/master/README.zh.md) | **English**
## Document
[document](https://doc.d2admin.fairyever.com)
[Document](https://doc.d2admin.fairyever.com)
## Preview
[preview](https://d2admin.fairyever.com)
* [Preview](https://d2-admin.netlify.com) Deployed in Netlify CDN
* [Preview For Chinese](https://d2admin.fairyever.com) Deployed in qiniu CDN
## Features
@@ -90,6 +99,7 @@ D2Admin is a fully open source and free enterprise back-end product front-end in
| Name | HomePage | Preview | Introduction |
| --- | --- | --- | --- |
| Starter template | [Github](https://github.com/d2-projects/d2-admin-start-kit) | [Preview](https://start-kit.d2admin.fairyever.com) | |
| D2 Admin Renren | [Github](https://github.com/d2-projects/d2-admin-renren-security-enterprise) | [Preview](https://renren.d2admin.fairyever.com) | [renren](https://www.renren.io) |
| Alibaba Ice scaffold | [Ice](https://alibaba.github.io/ice/scaffold?type=vue) | [Preview](https://ice.d2admin.fairyever.com) | [Introduction](https://juejin.im/post/5b6349716fb9a04f834669d6) |
## Ecology

View File

@@ -3,7 +3,6 @@
<p align="center">
<a><img src="https://img.shields.io/github/release/d2-projects/d2-admin.svg"/></a>
<a><img src="https://img.shields.io/npm/v/@d2-admin/ice-scaffold.svg"/></a>
<a href="https://www.travis-ci.org/d2-projects/d2-admin"><img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/></a>
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
</p>
@@ -17,6 +16,15 @@
<a><img src="https://img.shields.io/github/stars/d2-projects/d2-admin.svg"/></a>
</p>
<p align="center">
<a href="https://www.travis-ci.org/d2-projects/d2-admin">
<img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/>
</a>
<a href="https://app.netlify.com/sites/d2-admin/deploys">
<img src="https://api.netlify.com/api/v1/badges/a5dd4bbd-da3f-4145-98a9-8012577bdcf5/deploy-status"/>
</a>
</p>
[D2Admin](https://github.com/d2-projects/d2-admin) 是一个完全 **开源免费** 的企业中后台产品前端集成方案,使用最新的前端技术栈,已经做好大部分项目前期准备工作,并且带有大量示例代码,助力管理系统敏捷开发。
**中文介绍** | [English](https://github.com/d2-projects/d2-admin)
@@ -27,7 +35,8 @@
## 预览
[预览地址](https://d2admin.fairyever.com)
* [预览 | 中国](https://d2admin.fairyever.com) 在七牛 CDN 部署
* [预览 | 其它国家](https://d2-admin.netlify.com) 在 Netlify CDN 部署
## 码云仓库
@@ -96,6 +105,7 @@
| 名称 | Github / 主页 | 预览 | 介绍 |
| --- | --- | --- | --- |
| 简化版模板 | [Github](https://github.com/d2-projects/d2-admin-start-kit) | [预览](https://start-kit.d2admin.fairyever.com) | 无 |
| 人人开源适配 | [Github](https://github.com/d2-projects/d2-admin-renren-security-enterprise) | [预览](https://renren.d2admin.fairyever.com) | [人人开源](https://www.renren.io) |
| 飞冰脚手架 | [飞冰](https://alibaba.github.io/ice/scaffold?type=vue) | [预览](https://ice.d2admin.fairyever.com) | [介绍](https://juejin.im/post/5b6349716fb9a04f834669d6) |
## 生态

View File

@@ -1,9 +1,5 @@
module.exports = {
presets: [
'@vue/app'
],
plugins: [
// https://babeljs.io/docs/en/babel-plugin-transform-runtime/
'@babel/plugin-transform-runtime'
]
}

View File

@@ -0,0 +1 @@
681ffc71f82857c857c50891b8f73e04e345c7db

View File

@@ -0,0 +1 @@
b60dfdaf4dde7db3b323abf7d6bad7522b655862

View File

@@ -0,0 +1 @@
b3640a7bbe4c0dc38c99be5462d9663ade363433

View File

@@ -1 +1 @@
4bf0a6ad67e67ee39dd5594ca0e4d1965d5a2de6
fed37778e9514dc3dec6b8c767aa01b05250a597

View File

@@ -1,84 +1,77 @@
{
"name": "d2-admin",
"version": "1.6.18",
"private": true,
"version": "1.7.0",
"scripts": {
"serve": "vue-cli-service serve --open",
"start": "npm run serve",
"dev": "npm run serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint --fix",
"build:netlify": "vue-cli-service build --mode netlify",
"build:nomock": "vue-cli-service build --mode nomock",
"build:travis": "vue-cli-service build --mode travis",
"lint": "vue-cli-service lint --fix",
"dev": "npm run serve",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",
"start": "npm run serve",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
"@d2-admin/filters-dayjs": "^1.0.3",
"@d2-projects/d2-crud": "^2.0.3",
"@d2-projects/d2-crud": "^2.0.5",
"@d2-projects/vue-table-export": "^1.0.1",
"@d2-projects/vue-table-import": "^1.0.0",
"axios": "^0.17.1",
"better-scroll": "^1.12.1",
"clipboard-polyfill": "^2.4.1",
"countup.js": "^1.9.3",
"dayjs": "^1.6.7",
"echarts": "^4.1.0",
"element-ui": "^2.4.11",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"clipboard-polyfill": "^2.8.0",
"core-js": "^2.6.5",
"countup.js": "^2.0.4",
"dayjs": "^1.8.12",
"echarts": "^4.2.1",
"element-ui": "^2.7.2",
"flex.css": "^1.1.7",
"fuse.js": "^3.2.1",
"github-markdown-css": "^2.10.0",
"highlight.js": "^9.12.0",
"hotkeys-js": "^3.3.6",
"fuse.js": "^3.4.4",
"github-markdown-css": "^3.0.1",
"highlight.js": "^9.15.6",
"hotkeys-js": "^3.6.2",
"js-cookie": "^2.2.0",
"lodash": "^4.17.10",
"lodash": "^4.17.11",
"lowdb": "^1.0.0",
"marked": "^0.3.9",
"marked": "^0.6.2",
"mockjs": "^1.0.1-beta3",
"nprogress": "^0.2.0",
"qs": "^6.6.0",
"quill": "^1.3.4",
"screenfull": "^4.0.0",
"qs": "^6.7.0",
"quill": "^1.3.6",
"screenfull": "^4.2.0",
"simplemde": "^1.11.2",
"ua-parser-js": "^0.7.18",
"v-charts": "^1.17.6",
"v-contextmenu": "^2.7.0",
"vue": "^2.5.17",
"vue-grid-layout": "^2.1.11",
"vue-i18n": "^7.4.2",
"ua-parser-js": "^0.7.19",
"v-charts": "^1.19.0",
"v-contextmenu": "^2.8.0",
"vue": "^2.6.10",
"vue-grid-layout": "^2.3.4",
"vue-i18n": "^8.0.0",
"vue-json-tree-view": "^2.1.4",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.2",
"vue-ueditor-wrap": "^1.5.0",
"vue-router": "^3.0.3",
"vue-splitpane": "^1.0.4",
"vue-ueditor-wrap": "^2.4.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.2.0",
"@kazupon/vue-i18n-loader": "^0.3.0",
"@vue/cli-plugin-babel": "^3.0.0",
"@vue/cli-plugin-eslint": "^3.0.0",
"@vue/cli-plugin-unit-jest": "^3.2.3",
"@vue/cli-service": "^3.0.0",
"@vue/eslint-config-standard": "^3.0.0",
"@vue/test-utils": "^1.0.0-beta.28",
"@vue/cli-plugin-babel": "^3.6.0",
"@vue/cli-plugin-eslint": "^3.6.0",
"@vue/cli-plugin-unit-jest": "^3.6.0",
"@vue/cli-service": "^3.6.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.0.1",
"lint-staged": "^7.2.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"svg-sprite-loader": "^3.8.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"svg-sprite-loader": "^4.1.3",
"text-loader": "0.0.1",
"uglifyjs-webpack-plugin": "^2.1.1",
"vue-template-compiler": "^2.5.17"
},
"lint-staged": {
"*.js": [
"vue-cli-service lint",
"git add"
],
"*.vue": [
"vue-cli-service lint",
"git add"
]
"uglifyjs-webpack-plugin": "^2.1.2",
"vue-cli-plugin-i18n": "^0.6.0",
"vue-template-compiler": "^2.5.21"
}
}

View File

@@ -13,8 +13,6 @@
.d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; }
.d2-home__footer > a { font-size: 12px; color: #ABABAB; text-decoration: none; }
.d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; }
.d2-home__title { color: #FFF; font-size: 14px; margin-bottom: 10px; }
.d2-home__sub-title { color: #ABABAB; font-size: 12px; }
</style>
<script>
var _hmt = _hmt || [];
@@ -25,7 +23,7 @@
<body>
<noscript>
<strong>
很抱歉,如果没有 JavaScript 支持D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
Sorry, D2Admin will not work properly without JavaScript support. Enable JavaScript for browsers and continue.
</strong>
</noscript>
<div id="app">
@@ -35,12 +33,6 @@
class="d2-home__loading"
src="./image/loading/loading-spin.svg"
alt="loading">
<div class="d2-home__title">
正在加载资源
</div>
<div class="d2-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</div>
<div class="d2-home__footer">
<a

View File

@@ -5,8 +5,21 @@
</template>
<script>
import util from '@/libs/util'
export default {
name: 'app'
name: 'app',
watch: {
'$i18n.locale': 'i18nHandle'
},
created () {
this.i18nHandle(this.$i18n.locale)
},
methods: {
i18nHandle (val, oldVal) {
util.cookies.set('lang', val)
document.querySelector('html').setAttribute('lang', val)
}
}
}
</script>

View File

@@ -15,7 +15,7 @@
// 过渡动画 缩放渐变
.fade-scale-leave-active,
.fade-scale-enter-active {
transition: all .5s;
transition: all .3s;
}
.fade-scale-enter {
opacity: 0;

View File

@@ -4,8 +4,11 @@
<slot name="header"/>
</div>
<div class="d2-container-ghost-bs__body" ref="wrapper">
<!-- https://github.com/d2-projects/d2-admin/issues/181 -->
<div>
<slot/>
</div>
</div>
<div v-if="$slots.footer" class="d2-container-ghost-bs__footer" ref="footer">
<slot name="footer"/>
</div>

View File

@@ -9,22 +9,25 @@
</template>
<script>
import { last, get } from 'lodash'
export default {
props: {
// 文件路径
filename: {
type: String,
default: ''
}
},
data () {
return {
isActive: false
isActive: false,
path: ''
}
},
computed: {
show () {
return (process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.NODE_ENV === 'development') && this.filename
return process.env.VUE_APP_SCOURCE_LINK === 'TRUE'
}
},
watch: {
$route: {
handler (to) {
this.path = get(last(to.matched), 'components.default.__source')
},
immediate: true
}
},
mounted () {
@@ -36,11 +39,7 @@ export default {
methods: {
// 点击按钮的时候跳转到源代码
handleClick () {
const file = this.filename.split('?')[0]
const url = file
? `https://github.com/d2-projects/d2-admin/blob/master/${file}`
: 'https://github.com/d2-projects/d2-admin'
this.$open(url)
this.$open(`${process.env.VUE_APP_REPO}/blob/master/${this.path}`)
}
}
}

View File

@@ -52,9 +52,7 @@ export default {
scroll: e => this.$emit('scroll', e)
}
}, slots),
h(d2Source, {
props: this.$attrs
})
h(d2Source)
])
},
methods: {

View File

@@ -3,7 +3,7 @@
</template>
<script>
import CountUp from 'countup.js'
import { CountUp } from 'countup.js'
export default {
name: 'd2-count-up',
props: {

View File

@@ -65,6 +65,7 @@ export default {
if (this.menu.icon === 'home') {
return true
}
return false
}
}
}

View File

@@ -8,7 +8,6 @@ import d2LinkBtn from './d2-link-btn'
Vue.component('d2-container', d2Container)
Vue.component('d2-container-frame', d2ContainerFrame)
Vue.component('d2-link-btn', d2LinkBtn)
Vue.component('d2-page-cover', () => import('./d2-page-cover'))
Vue.component('d2-count-up', () => import('./d2-count-up'))
Vue.component('d2-highlight', () => import('./d2-highlight'))
Vue.component('d2-icon', () => import('./d2-icon'))

31
src/i18n.js Normal file
View File

@@ -0,0 +1,31 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import util from '@/libs/util'
Vue.use(VueI18n)
function loadLocaleMessages () {
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
const messages = {}
locales.keys().forEach(key => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
}
})
return messages
}
const messages = loadLocaleMessages()
Vue.prototype.$languages = Object.keys(messages).map(langlage => ({
label: messages[langlage]._name,
value: langlage
}))
export default new VueI18n({
locale: util.cookies.get('lang') || process.env.VUE_APP_I18N_LOCALE,
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE,
messages
})

View File

@@ -1,17 +0,0 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import cn from './lang/cn'
import ja from './lang/ja'
import en from './lang/en'
Vue.use(VueI18n)
export default new VueI18n({
locale: 'cn',
messages: {
cn,
ja,
en
}
})

View File

@@ -1,7 +0,0 @@
export default {
pub: {
pageHeader: {
demo: '示例'
}
}
}

View File

@@ -1,7 +0,0 @@
export default {
pub: {
pageHeader: {
demo: 'Demo'
}
}
}

View File

@@ -1,7 +0,0 @@
export default {
pub: {
pageHeader: {
demo: 'サンプル'
}
}
}

View File

@@ -0,0 +1,19 @@
<template>
<el-dropdown
placement="bottom"
size="small"
@command="command => $i18n.locale = command">
<el-button class="d2-mr btn-text can-hover" type="text">
<d2-icon name="language" style="font-size: 16px;"/>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="(language, index) in $languages"
:key="index"
:command="language.value">
<d2-icon :name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'" class="d2-mr-5"/>
{{ language.label }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>

View File

@@ -60,6 +60,12 @@ export default {
}),
handleChange (value) {
this.sizeSet(value)
this.$notify({
title: '提示',
dangerouslyUseHTMLString: true,
message: '已更新页面内 <b>组件</b> 的 <b>默认尺寸</b><br/>例如按钮大小,<b>非字号</b>',
type: 'success'
})
},
iconName (name) {
return name === this.value ? 'dot-circle-o' : 'circle-o'

View File

@@ -122,7 +122,9 @@ export default {
focus () {
this.input = ''
setTimeout(() => {
if (this.$refs.input) {
this.$refs.input.focus()
}
// 还原
this.searchText = ''
this.results = []
@@ -185,6 +187,7 @@ export default {
<style lang="scss" scoped>
.panel-search {
margin: 20px;
width: 100%;
.panel-search__input-group {
height: 240px;
.panel-search__logo {
@@ -212,6 +215,7 @@ export default {
}
.panel-search__results-group {
overflow: auto;
margin-bottom: -20px;
.panel-search__results-group-inner {
margin: -20px;
}

View File

@@ -31,6 +31,7 @@
<d2-header-fullscreen/>
<d2-header-theme/>
<d2-header-size/>
<d2-header-locales/>
<d2-header-user/>
</div>
</div>
@@ -51,7 +52,7 @@
<div class="d2-theme-container-main" flex-box="1" flex>
<!-- 搜索 -->
<transition name="fade-scale">
<div v-show="searchActive" class="d2-theme-container-main-layer" flex="dir:top">
<div v-if="searchActive" class="d2-theme-container-main-layer" flex>
<d2-panel-search
ref="panelSearch"
@close="searchPanelClose"/>
@@ -59,7 +60,7 @@
</transition>
<!-- 内容 -->
<transition name="fade-scale">
<div v-show="!searchActive" class="d2-theme-container-main-layer" flex="dir:top">
<div v-if="!searchActive" class="d2-theme-container-main-layer" flex="dir:top">
<!-- tab -->
<div class="d2-theme-container-main-header" flex-box="0">
<d2-tabs/>
@@ -85,6 +86,7 @@ import d2MenuSide from './components/menu-side'
import d2MenuHeader from './components/menu-header'
import d2Tabs from './components/tabs'
import d2HeaderFullscreen from './components/header-fullscreen'
import d2HeaderLocales from './components/header-locales'
import d2HeaderSearch from './components/header-search'
import d2HeaderSize from './components/header-size'
import d2HeaderTheme from './components/header-theme'
@@ -102,6 +104,7 @@ export default {
d2MenuHeader,
d2Tabs,
d2HeaderFullscreen,
d2HeaderLocales,
d2HeaderSearch,
d2HeaderSize,
d2HeaderTheme,

View File

@@ -39,14 +39,22 @@ export default {
handleSearchClick () {
this.searchToggle()
if (this.searchActive) {
setTimeout(() => {
if (this.$refs.panelSearch) {
this.$refs.panelSearch.focus()
}
}, 500)
}
},
searchPanelOpen () {
if (!this.searchActive) {
this.searchSet(true)
setTimeout(() => {
if (this.$refs.panelSearch) {
this.$refs.panelSearch.focus()
}
}, 500)
}
},
// 关闭搜索面板
searchPanelClose () {

162
src/locales/en.json Normal file
View File

@@ -0,0 +1,162 @@
{
"_name": "English",
"public": {
"message": {
"error": {
"form": {
"invalid": "Form verification failed, please check"
}
}
},
"notify": {
"special": {
"upload": {
"error": {
"message": "Data upload failed",
"title": "Upload failed"
},
"start": {
"message": "Uploading data, please wait",
"title": "Start upload"
},
"success": {
"message": "Successful data upload",
"title": "Successful upload"
}
}
}
},
"rules": {
"required": "{name} is required"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "Back to home"
}
},
"index": {
"cover": {
"build-time": "Build time",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "Elegant mid-background integration solution",
"title": "D2 Admin"
},
"help": {
"button": "need any help",
"dialog": {
"join": {
"qq": {
"sub-title": "Join 2,000 users and communicate with each other",
"title": "Please use your mobile phone QQ to scan the QR code above"
},
"we": {
"sub-title": "Add author WeChat friends, invite to join WeChat group",
"title": "Please use the mobile phone WeChat scan above the QR code"
}
},
"link": {
"text": {
"doc": "Document",
"issues": "Historical question",
"new-issue": "Ask a question on Github"
}
},
"sub-title": {
"doc": "Here are some references",
"join": "Ask other users or authors"
},
"title": "Help"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/"
},
"text": {
"d2-projects": "Open source organization",
"daily": "Daily",
"doc": "Document",
"ice": "Flying ice",
"juejin": "Nuggets",
"start-kit": "Starter version"
}
},
"we": {
"button": "WeChat Public",
"introduce": "Official public number, mainly push front-end technical articles, framework resources, learning tutorials, and D2 series project update information",
"title": "JS Daily"
}
}
},
"log": {
"notify": {
"more": {
"message": "The full log content has been printed to the console",
"title": "log details"
}
},
"table": {
"empty-text": "No log information yet",
"label": {
"component": "Trigger component",
"message": "Information",
"more": "check the detail information",
"time": "time",
"url": "Trigger page"
}
},
"upload": {
"button": "Upload {number} data"
}
},
"login": {
"footer": {
"button": {
"clause": "Terms",
"help": "Help",
"privacy": "Privacy"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects Open Source Organization",
"copyright": "copyright"
}
},
"form": {
"button": {
"login": "Log In"
},
"label": {
"code": "Verification code",
"password": "Password",
"username": "Username"
},
"placeholder": {
"code": "Verification code",
"password": "Password",
"username": "Username"
}
},
"motto": {
"text": "Time is the most precious treasure of all wealth."
},
"options": {
"forget-password": "Forget password",
"register": "Registered user"
},
"quick-login": {
"dialog": {
"title": "Quickly select users"
},
"toggle-button": {
"text": "Quickly select users (test function)"
}
}
}
}
}
}

162
src/locales/ja.json Normal file
View File

@@ -0,0 +1,162 @@
{
"_name": "日本語",
"public": {
"message": {
"error": {
"form": {
"invalid": "フォームの確認に失敗しました。確認してください"
}
}
},
"notify": {
"special": {
"upload": {
"error": {
"message": "データのアップロードに失敗しました",
"title": "アップロードに失敗しました"
},
"start": {
"message": "データをアップロードしています。しばらくお待ちください",
"title": "アップロードを開始"
},
"success": {
"message": "データのアップロードに成功しました",
"title": "アップロード成功"
}
}
}
},
"rules": {
"required": "を入力してください {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "家に戻る"
}
},
"index": {
"cover": {
"build-time": "構築時間",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "エレガントなミッドバックグラウンド統合ソリューション",
"title": "D2 Admin"
},
"help": {
"button": "助けが必要ですか?",
"dialog": {
"join": {
"qq": {
"sub-title": "2,000人のユーザーに参加してお互いにコミュニケーション",
"title": "上記のQRコードをスキャンするには、携帯電話のQQを使用してください"
},
"we": {
"sub-title": "著者を追加するWeChat友達、WeChatグループに参加するよう招待する",
"title": "携帯電話のWeChatを使用してQRコードをスキャンしてください"
}
},
"link": {
"text": {
"doc": "文書",
"issues": "歴史的な質問",
"new-issue": "Githubで質問する"
}
},
"sub-title": {
"doc": "ここにいくつかの参照があります",
"join": "他のユーザーや作者に尋ねる"
},
"title": "ヘルプ"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/"
},
"text": {
"d2-projects": "オープンソース組織",
"daily": "日刊新聞",
"doc": "文書",
"ice": "飛んでいる氷",
"juejin": "ナゲット",
"start-kit": "スターターバージョン"
}
},
"we": {
"button": "WeChatパブリック番号",
"introduce": "公式の公開番号。主にフロントエンドの技術記事、フレームワークリソース、学習チュートリアル、およびD2シリーズプロジェクトの更新情報をプッシュします。",
"title": "今日のフロントエンド"
}
}
},
"log": {
"notify": {
"more": {
"message": "ログ全体の内容がコンソールに出力されました",
"title": "ログ詳細"
}
},
"table": {
"empty-text": "ログ情報はまだありません",
"label": {
"component": "トリガーコンポーネント",
"message": "情報",
"more": "詳細を見る",
"time": "時間",
"url": "トリガーページ"
}
},
"upload": {
"button": " {number} データをアップロード"
}
},
"login": {
"footer": {
"button": {
"clause": "利用規約",
"help": "ヘルプ",
"privacy": "プライバシー"
},
"copyright": {
"author": "フェアリーエバー",
"content": "2018 D2プロジェクトオープンソース組織",
"copyright": "著作権"
}
},
"form": {
"button": {
"login": "ログイン"
},
"label": {
"code": "確認コード",
"password": "パスワード",
"username": "ユーザー名"
},
"placeholder": {
"code": "確認コード",
"password": "パスワード",
"username": "ユーザー名"
}
},
"motto": {
"text": "時間はすべての富の中で最も貴重な資産です。"
},
"options": {
"forget-password": "パスワードを忘れた",
"register": "登録ユーザー"
},
"quick-login": {
"dialog": {
"title": "すばやくユーザーを選択"
},
"toggle-button": {
"text": "すばやくユーザーを選択(テスト機能)"
}
}
}
}
}
}

162
src/locales/zh-chs.json Normal file
View File

@@ -0,0 +1,162 @@
{
"_name": "简体中文",
"public": {
"message": {
"error": {
"form": {
"invalid": "表单校验失败,请检查"
}
}
},
"notify": {
"special": {
"upload": {
"error": {
"message": "数据上传失败",
"title": "上传失败"
},
"start": {
"message": "正在上传数据,请稍后",
"title": "开始上传"
},
"success": {
"message": "数据上传成功",
"title": "上传成功"
}
}
}
},
"rules": {
"required": "请输入 {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "返回首页"
}
},
"index": {
"cover": {
"build-time": "构建时间",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "优雅的中后台集成方案",
"title": "D2 Admin"
},
"help": {
"button": "需要帮助吗",
"dialog": {
"join": {
"qq": {
"sub-title": "加入 2000 人用户大群共同交流",
"title": "请使用手机 QQ 扫面上方二维码"
},
"we": {
"sub-title": "添加作者微信好友,邀请加入微信群",
"title": "请使用手机微信扫面上方二维码"
}
},
"link": {
"text": {
"doc": "文档",
"issues": "历史提问",
"new-issue": "在 Github 提问"
}
},
"sub-title": {
"doc": "这里有一些参考资料",
"join": "询问其它使用者或作者"
},
"title": "帮助"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/zh/"
},
"text": {
"d2-projects": "开源组织",
"daily": "日报",
"doc": "文档",
"ice": "飞冰",
"juejin": "掘金",
"start-kit": "简化版"
}
},
"we": {
"button": "微信公众号",
"introduce": "官方公众号,主要推送前端技术类文章、框架资源、学习教程,以及 D2 系列项目更新信息",
"title": "今日前端"
}
}
},
"log": {
"notify": {
"more": {
"message": "完整的日志内容已经打印到控制台",
"title": "日志详情"
}
},
"table": {
"empty-text": "暂无日志信息",
"label": {
"component": "触发组件",
"message": "信息",
"more": "查看详细信息",
"time": "时间",
"url": "触发页面"
}
},
"upload": {
"button": "上传 {number} 条数据"
}
},
"login": {
"footer": {
"button": {
"clause": "条款",
"help": "帮助",
"privacy": "隐私"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects 开源组织出品",
"copyright": "Copyright"
}
},
"form": {
"button": {
"login": "登录"
},
"label": {
"code": "验证码",
"password": "密码",
"username": "用户名"
},
"placeholder": {
"code": "验证码",
"password": "密码",
"username": "用户名"
}
},
"motto": {
"text": "时间是一切财富中最宝贵的财富。"
},
"options": {
"forget-password": "忘记密码",
"register": "注册用户"
},
"quick-login": {
"dialog": {
"title": "快速选择用户"
},
"toggle-button": {
"text": "快速选择用户(测试功能)"
}
}
}
}
}
}

162
src/locales/zh-cht.json Normal file
View File

@@ -0,0 +1,162 @@
{
"_name": "繁體中文",
"public": {
"message": {
"error": {
"form": {
"invalid": "表單校驗失敗,請檢查"
}
}
},
"notify": {
"special": {
"upload": {
"error": {
"message": "數據上傳失敗",
"title": "上傳失敗"
},
"start": {
"message": "正在上傳數據,請稍後",
"title": "開始上傳"
},
"success": {
"message": "數據上傳成功",
"title": "上傳成功"
}
}
}
},
"rules": {
"required": "請輸入 {name}"
}
},
"views": {
"system": {
"error": {
"404": {
"back": "返回首頁"
}
},
"index": {
"cover": {
"build-time": "構建時間",
"github-fork-alt": "Fork me on GitHub",
"sub-title": "優雅的中後台集成方案",
"title": "D2 Admin"
},
"help": {
"button": "需要幫助嗎",
"dialog": {
"join": {
"qq": {
"sub-title": "加入 2000 人用戶大群共同交流",
"title": "請使用手機 QQ 掃面上方二維碼"
},
"we": {
"sub-title": "添加作者微信好友,邀請加入微信群",
"title": "請使用手機微信掃面上方二維碼"
}
},
"link": {
"text": {
"doc": "文檔",
"issues": "歷史提問",
"new-issue": "在 Github 提問"
}
},
"sub-title": {
"doc": "這裡有一些參考資料",
"join": "詢問其它使用者或作者"
},
"title": "幫助"
}
},
"page": {
"link": {
"href": {
"doc": "https://doc.d2admin.fairyever.com/zh/"
},
"text": {
"d2-projects": "開源組織",
"daily": "日報",
"doc": "文檔",
"ice": "飛冰",
"juejin": "掘金",
"start-kit": "簡化版"
}
},
"we": {
"button": "微信公眾號",
"introduce": "官方公眾號,主要推送前端技術類文章、框架資源、學習教程,以及 D2 系列項目更新信息",
"title": "今日前端"
}
}
},
"log": {
"notify": {
"more": {
"message": "完整的日誌內容已經打印到控制台",
"title": "日誌詳情"
}
},
"table": {
"empty-text": "暫無日誌信息",
"label": {
"component": "觸發組件",
"message": "信息",
"more": "查看詳細信息",
"time": "時間",
"url": "觸發頁面"
}
},
"upload": {
"button": "上傳 {number} 條數據"
}
},
"login": {
"footer": {
"button": {
"clause": "條款",
"help": "幫助",
"privacy": "隱私"
},
"copyright": {
"author": "FairyEver",
"content": "2018 D2 Projects 開源組織出品",
"copyright": "Copyright"
}
},
"form": {
"button": {
"login": "登錄"
},
"label": {
"code": "驗證碼",
"password": "密碼",
"username": "用戶名"
},
"placeholder": {
"code": "驗證碼",
"password": "密碼",
"username": "用戶名"
}
},
"motto": {
"text": "時間是一切財富中最寶貴的財富。"
},
"options": {
"forget-password": "忘記密碼",
"register": "註冊用戶"
},
"quick-login": {
"dialog": {
"title": "快速選擇用戶"
},
"toggle-button": {
"text": "快速選擇用戶(測試功能)"
}
}
}
}
}
}

View File

@@ -1,12 +1,11 @@
// Vue
import Vue from 'vue'
import i18n from './i18n'
import App from './App'
// 核心插件
import d2Admin from '@/plugin/d2admin'
// store
import store from '@/store/index'
// 多国语
import i18n from './i18n'
// [ 可选组件 ]D2-Crud
import D2Crud from '@d2-projects/d2-crud'

View File

@@ -32,15 +32,6 @@ export default {
{ path: `${pre}export/txt`, title: '文本' }
]
},
{
path: `${pre}i18n`,
title: '多国语',
icon: 'language',
children: [
{ path: `${pre}i18n/demo1`, title: '示例1' },
{ path: `${pre}i18n/demo2`, title: '示例2' }
]
},
{
path: `${pre}better-scroll`,
title: '滚动扩展',

View File

@@ -1,7 +1,7 @@
const userDB = [
{ username: 'admin', password: 'admin', uuid: 'admin-uuid', name: '管理员' },
{ username: 'editor', password: 'editor', uuid: 'editor-uuid', name: '编辑' },
{ username: 'user1', password: 'user1', uuid: 'user1-uuid', name: '用户1' }
{ username: 'admin', password: 'admin', uuid: 'admin-uuid', name: 'Admin' },
{ username: 'editor', password: 'editor', uuid: 'editor-uuid', name: 'Editor' },
{ username: 'user1', password: 'user1', uuid: 'user1-uuid', name: 'User1' }
]
export default [

View File

@@ -18,8 +18,6 @@ export default {
{ path: 'day', name: `${pre}day`, component: _import('demo/plugins/day'), meta: { ...meta, title: '日期计算' } },
{ path: 'export/table', name: `${pre}export-table`, component: _import('demo/plugins/export/table.vue'), meta: { ...meta, title: '导出表格' } },
{ path: 'export/txt', name: `${pre}export-txt`, component: _import('demo/plugins/export/txt.vue'), meta: { ...meta, title: '导出文本' } },
{ path: 'i18n/demo1', name: `${pre}i18n-demo1`, component: _import('demo/plugins/i18n/demo1.vue'), meta: { ...meta, title: '多国语示例 1' } },
{ path: 'i18n/demo2', name: `${pre}i18n-demo2`, component: _import('demo/plugins/i18n/demo2.vue'), meta: { ...meta, title: '多国语示例 2' } },
{ path: 'import/csv', name: `${pre}import-csv`, component: _import('demo/plugins/import/csv.vue'), meta: { ...meta, title: '导入 csv' } },
{ path: 'import/xlsx', name: `${pre}import-xlsx`, component: _import('demo/plugins/import/xlsx.vue'), meta: { ...meta, title: '导入 xlsx' } },
{ path: 'index', name: `${pre}index`, component: _import('demo/plugins/index'), meta: { ...meta, title: '插件首页' } },

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="ghost">
<d2-container type="ghost">
<d2-module-index-banner slot="header" v-bind="banner"/>
<d2-module-index-menu :menu="menu"/>
</d2-container>
@@ -10,7 +10,6 @@ import menu from '@/menu/modules/demo-business'
export default {
data () {
return {
filename: __filename,
menu,
banner: {
title: 'DEMOS',

View File

@@ -1,6 +1,5 @@
<template>
<d2-container
:filename="filename"
type="card"
class="page">
<el-form
@@ -28,11 +27,6 @@ export default {
mixins: [
base
],
data () {
return {
filename: __filename
}
},
// 第一次进入或从其他组件对应路由进入时触发
beforeRouteEnter (to, from, next) {
const id = to.params.id

View File

@@ -1,6 +1,5 @@
<template>
<d2-container
:filename="filename"
type="card"
class="page">
<el-form
@@ -27,11 +26,6 @@ export default {
mixins: [
base
],
data () {
return {
filename: __filename
}
},
// 第一次进入或从其他组件对应路由进入时触发
beforeRouteEnter (to, from, next) {
const id = to.params.id

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="card">
<d2-container type="card">
<d2-crud
v-bind="crud"
@edit="({ index, row }) => goToEditPage('demo-business-issues-142-edit', row.id)"
@@ -22,7 +22,6 @@ import {
export default {
data () {
return {
filename: __filename,
crud: {
columns: [
{ title: '姓名', key: 'name', width: 100 },

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<demo-page-header
slot="header"
@submit="handleSubmit"
@@ -28,7 +28,6 @@ export default {
},
data () {
return {
filename: __filename,
table: [],
loading: false,
page: {

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="ghost">
<d2-container type="ghost">
<d2-module-index-banner slot="header" v-bind="banner"/>
<d2-module-index-menu :menu="menu"/>
</d2-container>
@@ -10,7 +10,6 @@ import menu from '@/menu/modules/demo-charts'
export default {
data () {
return {
filename: __filename,
menu,
banner: {
title: 'CHARTS',

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-bar :data="chartData" v-bind="pubSetting"></ve-bar>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">指定指标维度</template>
<div class="inner">
<ve-bar :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-bar>
@@ -22,7 +22,6 @@ export default {
metrics: ['访问用户']
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">排序条形图</template>
<div class="inner">
<ve-bar :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-bar>
@@ -25,7 +25,6 @@ export default {
}
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">堆叠条形图</template>
<div class="inner">
<ve-bar :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-bar>
@@ -23,7 +23,6 @@ export default {
}
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">纵轴为连续的数值轴</template>
<div class="inner">
<ve-bar :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-bar>
@@ -21,7 +21,6 @@ export default {
yAxisType: 'value'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-candle :data="chartData" v-bind="pubSetting"></ve-candle>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', 'open', 'close', 'lowest', 'highest', 'vol'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">显示 MA VOL</template>
<div class="inner">
<ve-candle :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-candle>
@@ -22,7 +22,6 @@ export default {
showVol: true
}
return {
filename: __filename,
chartData: {
columns: ['日期', 'open', 'close', 'lowest', 'highest', 'vol'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">修改指标名和图例文字</template>
<div class="inner">
<ve-candle :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-candle>
@@ -29,7 +29,6 @@ export default {
showDataZoom: true
}
return {
filename: __filename,
chartData: {
columns: ['日期', 'open', 'close', 'lowest', 'highest', 'vol'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-funnel :data="chartData" v-bind="pubSetting"></ve-funnel>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['状态', '数值'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">金字塔</template>
<div class="inner">
<ve-funnel :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-funnel>
@@ -21,7 +21,6 @@ export default {
ascending: true
}
return {
filename: __filename,
chartData: {
columns: ['状态', '数值'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-gauge :data="chartData" v-bind="pubSetting"></ve-gauge>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['type', 'a', 'b', 'value'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-heatmap :data="chartData" v-bind="pubSetting"></ve-heatmap>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['时间', '地点', '人数'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">地图热力图</template>
<div class="inner">
<ve-heatmap :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-heatmap>
@@ -38,7 +38,6 @@ export default {
}
}
return {
filename: __filename,
chartData: {
columns: ['lat', 'lng', '人数'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-histogram :data="chartData" v-bind="pubSetting"></ve-histogram>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置显示的指标维度</template>
<div class="inner">
<ve-histogram :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-histogram>
@@ -22,7 +22,6 @@ export default {
dimension: ['日期']
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">柱状图+折线图</template>
<div class="inner">
<ve-histogram :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-histogram>
@@ -21,7 +21,6 @@ export default {
showLine: ['下单用户']
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">堆叠柱状图</template>
<div class="inner">
<ve-histogram :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-histogram>
@@ -21,7 +21,6 @@ export default {
stack: { '用户': ['访问用户', '下单用户'] }
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">默认显示柱状图数据</template>
<div class="inner">
<ve-histogram :data="chartData" :extend="extend" v-bind="pubSetting"></ve-histogram>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
extend: {
series: {
label: { show: true, position: 'top' }

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">横轴为连续的数值轴</template>
<div class="inner">
<ve-histogram :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-histogram>
@@ -21,7 +21,6 @@ export default {
xAxisType: 'value'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-line :data="chartData" v-bind="pubSetting"></ve-line>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">横坐标的倾斜</template>
<div class="inner">
<ve-line :data="chartData" :extend="extend" v-bind="pubSetting"></ve-line>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
extend: {
'xAxis.0.axisLabel.rotate': 45
},

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">堆叠面积图</template>
<div class="inner">
<ve-line :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-line>
@@ -22,7 +22,6 @@ export default {
area: true
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">显示指标数值</template>
<div class="inner">
<ve-line :data="chartData" :extend="extend" v-bind="pubSetting"></ve-line>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
extend: {
series: {
label: {

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置别名</template>
<div class="inner">
<ve-line :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-line>
@@ -27,7 +27,6 @@ export default {
}
}
return {
filename: __filename,
chartData: {
columns: ['date', 'PV', 'Order', 'OrderRate'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-map :data="chartData" v-bind="pubSetting" :settings="chartSettings"></ve-map>
@@ -22,7 +22,6 @@ export default {
chartSettings: {
mapOrigin
},
filename: __filename,
chartData: {
columns: ['位置', '税收', '人口', '面积'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置城市</template>
<div class="inner">
<ve-map :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-map>
@@ -23,7 +23,6 @@ export default {
position: 'province/beijing',
mapOrigin
},
filename: __filename,
chartData: {
columns: ['位置', '人口'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置样式</template>
<div class="inner">
<ve-map :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-map>
@@ -30,7 +30,6 @@ export default {
},
zoom: 1.2
},
filename: __filename,
chartData: {
columns: ['位置', '人口'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-pie :data="chartData" v-bind="pubSetting"></ve-pie>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置指标维度</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
@@ -22,7 +22,6 @@ export default {
metrics: '访问用户'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">玫瑰图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
@@ -21,7 +21,6 @@ export default {
roseType: 'radius'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">限制显示条数饼图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
@@ -21,7 +21,6 @@ export default {
limitShowNum: 5
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">多圆饼图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
@@ -24,7 +24,6 @@ export default {
]
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置饼图半径边距</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
@@ -22,7 +22,6 @@ export default {
offsetY: 250
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-radar :data="chartData" v-bind="pubSetting"></ve-radar>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '下单率'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-ring :data="chartData" v-bind="pubSetting"></ve-ring>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">指定指标维度</template>
<div class="inner">
<ve-ring :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-ring>
@@ -22,7 +22,6 @@ export default {
metrics: '访问用户'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">玫瑰图</template>
<div class="inner">
<ve-ring :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-ring>
@@ -21,7 +21,6 @@ export default {
roseType: 'radius'
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">限制显示条数环图</template>
<div class="inner">
<ve-ring :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-ring>
@@ -21,7 +21,6 @@ export default {
limitShowNum: 3
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">设置环图半径</template>
<div class="inner">
<ve-ring :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-ring>
@@ -22,7 +22,6 @@ export default {
offsetY: 250
}
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-sankey :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-sankey>
@@ -28,7 +28,6 @@ export default {
]
}
return {
filename: __filename,
chartData: {
columns: ['页面', '访问量'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">单维度多指标</template>
<div class="inner">
<ve-scatter :data="chartData" v-bind="pubSetting"></ve-scatter>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '年龄'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">双维度多指标</template>
<div class="inner">
<ve-scatter :data="chartData" v-bind="pubSetting"></ve-scatter>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['日期', '访问用户', '下单用户', '年龄'],
rows: {

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">径向树图</template>
<div class="inner">
<ve-tree :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-tree>
@@ -25,7 +25,6 @@ export default {
}
}
return {
filename: __filename,
chartData: {
columns: ['name', 'value'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">一般</template>
<div class="inner">
<ve-waterfall :data="chartData" v-bind="pubSetting"></ve-waterfall>
@@ -18,7 +18,6 @@ export default {
],
data () {
return {
filename: __filename,
chartData: {
columns: ['活动', '时间'],
rows: [

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename"
<d2-container
ref="container"
:type="containerType"
:better-scroll="betterScroll"
@@ -84,7 +84,6 @@ export default {
},
data () {
return {
filename: __filename,
containerType: 'full',
scrollDelay: 10,
scrollTop: 0

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="card" better-scroll>
<d2-container type="card" better-scroll>
<template slot="header">Header</template>
<d2-demo-article/>
<template slot="footer">Footer</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="card">
<d2-container type="card">
<template slot="header">Header</template>
<d2-demo-article/>
<template slot="footer">Footer</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="card">
<d2-container type="card">
<d2-demo-article/>
</d2-container>
</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" better-scroll>
<d2-container better-scroll>
<template slot="header">Header</template>
<d2-demo-article/>
<template slot="footer">Header</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<template slot="header">Header</template>
<d2-demo-article/>
<template slot="footer">Footer</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename">
<d2-container>
<d2-demo-article/>
</d2-container>
</template>

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="ghost" better-scroll>
<d2-container type="ghost" better-scroll>
<template slot="header">Header</template>
<div class="d2-pt d2-pb">
<el-card shadow="never" class="d2-card" style="width: 400px;">

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="ghost">
<d2-container type="ghost">
<template slot="header">Header</template>
<div class="d2-pt d2-pb">
<el-card shadow="never" class="d2-card" style="width: 400px;">

View File

@@ -1,5 +1,5 @@
<template>
<d2-container :filename="filename" type="ghost">
<d2-container type="ghost">
<div class="d2-pt d2-pb">
<el-card shadow="never" class="d2-card" style="width: 400px;">
<d2-demo-article/>

Some files were not shown because too many files have changed in this diff Show More