Compare commits

...

12 Commits

Author SHA1 Message Date
花裤衩
ec65202cb9 feat: add sandbox 2020-05-04 22:50:16 +08:00
Phạm Ngọc Hòa
a2784dd6ef perf: change default element-ui language to english (#2741) 2020-05-04 21:51:21 +08:00
花裤衩
fc26c3106f fix: compatibility with vetur (#1700) 2020-05-04 21:30:58 +08:00
ntnyq
9580c43a8e fix[element-variables]: missing space in element-variables (#3144) 2020-04-28 18:26:34 +08:00
Aisen
1b8f726529 perf[Tinymce]: editor try to keep these URLs intact (#3141) 2020-04-28 10:10:58 +08:00
花裤衩
d4405464ce fix: use vue-cli default source-map (#3097)
cheap-module-eval-source-map
2020-04-22 10:31:46 +08:00
Alex S
9d8c7edf91 fixed typo (#3091) 2020-04-04 15:53:26 +08:00
花裤衩
6eccffeb2f fix: svg support old broswer (#3085) 2020-03-28 11:16:41 +08:00
花裤衩
f7a9d21109 Update README.zh-CN.md 2020-03-27 12:32:30 +08:00
花裤衩
993a6c72e8 docs: add smallsticker 2020-03-27 11:57:40 +08:00
echofly
9e0435ac85 perf: format component names as PascalCase (#3074)
format: component names should be PascalCase
2020-03-24 10:17:18 +08:00
Aisen60
776f10e197 fix:fixed parseTime bug in ie and safari(#3066)
* /src/utils/index.js parseTime 添加IE浏览器(版本10以下,包括版本10)兼容。

* perf: update

Co-authored-by: aisen60 <aisen60@qq.com>
Co-authored-by: 花裤衩 <panfree23@gmail.com>
2020-03-20 21:24:31 +08:00
12 changed files with 56 additions and 26 deletions

View File

@@ -221,6 +221,10 @@ Detailed changes for each release are documented in the [release notes](https://
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
## 购买贴纸
你也可以通过 购买[官方授权的贴纸](https://smallsticker.com/product/vue-element-admin) 的方式来支持 vue-element-admin - 每售出一张贴纸,本项目将获得 2 元的捐赠。
## Browsers support
Modern browsers and Internet Explorer 10+.

6
sandbox.config.json Normal file
View File

@@ -0,0 +1,6 @@
{
"infiniteLoopProtection": true,
"hardReloadOnChange": false,
"view": "browser",
"template": "node"
}

View File

@@ -1,7 +1,7 @@
<template>
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
<use :href="iconName" />
<use :xlink:href="iconName" />
</svg>
</template>

View File

@@ -147,7 +147,11 @@ export default {
editor.on('FullscreenStateChanged', (e) => {
_this.fullscreen = e.state
})
}
},
// it will try to keep these URLs intact
// https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/
// https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
convert_urls: false
// 整合七牛上传
// images_dataimg_filter(img) {
// setTimeout(() => {

View File

@@ -1,7 +1,5 @@
<template>
<!-- eslint-disable vue/require-component-is -->
<component v-bind="linkProps(to)">
<component :is="type" v-bind="linkProps(to)">
<slot />
</component>
</template>
@@ -16,19 +14,28 @@ export default {
required: true
}
},
computed: {
isExternal() {
return isExternal(this.to)
},
type() {
if (this.isExternal) {
return 'a'
}
return 'router-link'
}
},
methods: {
linkProps(url) {
if (isExternal(url)) {
linkProps(to) {
if (this.isExternal) {
return {
is: 'a',
href: url,
href: to,
target: '_blank',
rel: 'noopener'
}
}
return {
is: 'router-link',
to: url
to: to
}
}
}

View File

@@ -6,6 +6,7 @@ import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
import './styles/element-variables.scss'
import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持,无需额外引入,请删除该依赖
import '@/styles/index.scss' // global css
@@ -33,7 +34,8 @@ if (process.env.NODE_ENV === 'production') {
}
Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size
size: Cookies.get('size') || 'medium', // set element-ui default size
locale: enLang // 如果使用中文,无需设置,请删除
})
// register global utility filters

View File

@@ -6,7 +6,7 @@
/* theme color */
$--color-primary: #1890ff;
$--color-success: #13ce66;
$--color-warning: #FFBA00;
$--color-warning: #ffba00;
$--color-danger: #ff4949;
// $--color-info: #1E1E1E;
@@ -17,10 +17,10 @@ $--button-font-weight: 400;
$--border-color-light: #dfe4ed;
$--border-color-lighter: #e6ebf5;
$--table-border:1px solid#dfe6ec;
$--table-border: 1px solid #dfe6ec;
/* icon font path, required */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
$--font-path: "~element-ui/lib/theme-chalk/fonts";
@import "~element-ui/packages/theme-chalk/src/index";

View File

@@ -17,9 +17,17 @@ export function parseTime(time, cFormat) {
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
if ((typeof time === 'string')) {
if ((/^[0-9]+$/.test(time))) {
// support "1548221490638"
time = parseInt(time)
} else {
// support safari
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
time = time.replace(new RegExp(/-/gm), '/')
}
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}

View File

@@ -70,7 +70,7 @@ export default {
indicator: [
{ name: 'Sales', max: 10000 },
{ name: 'Administration', max: 20000 },
{ name: 'Information Techology', max: 20000 },
{ name: 'Information Technology', max: 20000 },
{ name: 'Customer Support', max: 20000 },
{ name: 'Development', max: 20000 },
{ name: 'Marketing', max: 20000 }

View File

@@ -13,11 +13,11 @@
</template>
<script>
import tabPane from './components/TabPane'
import TabPane from './components/TabPane'
export default {
name: 'Tab',
components: { tabPane },
components: { TabPane },
data() {
return {
tabMapOptions: [

View File

@@ -4,6 +4,11 @@ describe('Utils:parseTime', () => {
it('timestamp', () => {
expect(parseTime(d)).toBe('2018-07-13 17:54:01')
})
it('timestamp string', () => {
expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01')
})
it('ten digits timestamp', () => {
expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01')
})

View File

@@ -80,12 +80,6 @@ module.exports = {
})
.end()
config
// https://webpack.js.org/configuration/devtool/#development
.when(process.env.NODE_ENV === 'development',
config => config.devtool('cheap-source-map')
)
config
.when(process.env.NODE_ENV !== 'development',
config => {