commit
39428fcf10
|
@ -161,7 +161,7 @@ cd vue-element-admin
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# 建议不要用 cnpm 安装 会有各种诡异的bug 可以通过如下操作解决 npm 下载速度慢的问题
|
# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||||
npm install --registry=https://registry.npm.taobao.org
|
npm install --registry=https://registry.npm.taobao.org
|
||||||
|
|
||||||
# 启动服务
|
# 启动服务
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true,
|
|
||||||
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
|
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
|
||||||
transformIgnorePatterns: [
|
|
||||||
'node_modules/(?!(babel-jest|jest-vue-preprocessor)/)'
|
|
||||||
],
|
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.vue$': 'vue-jest',
|
'^.+\\.vue$': 'vue-jest',
|
||||||
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
|
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
|
||||||
|
'jest-transform-stub',
|
||||||
'^.+\\.jsx?$': 'babel-jest'
|
'^.+\\.jsx?$': 'babel-jest'
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
"build:stage": "vue-cli-service build --mode staging",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
"test:unit": "vue-cli-service test:unit",
|
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||||
"test:ci": "npm run lint && npm run test:unit",
|
"test:ci": "npm run lint && npm run test:unit",
|
||||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||||
"new": "plop"
|
"new": "plop"
|
||||||
|
|
|
@ -40,14 +40,14 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.height = this.$el.getBoundingClientRect().height
|
this.height = this.$el.getBoundingClientRect().height
|
||||||
window.addEventListener('scroll', this.handleScroll)
|
window.addEventListener('scroll', this.handleScroll)
|
||||||
window.addEventListener('resize', this.handleReize)
|
window.addEventListener('resize', this.handleResize)
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.handleScroll()
|
this.handleScroll()
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
window.removeEventListener('scroll', this.handleScroll)
|
window.removeEventListener('scroll', this.handleScroll)
|
||||||
window.removeEventListener('resize', this.handleReize)
|
window.removeEventListener('resize', this.handleResize)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sticky() {
|
sticky() {
|
||||||
|
@ -81,7 +81,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.handleReset()
|
this.handleReset()
|
||||||
},
|
},
|
||||||
handleReize() {
|
handleResize() {
|
||||||
if (this.isSticky) {
|
if (this.isSticky) {
|
||||||
this.width = this.$el.getBoundingClientRect().width + 'px'
|
this.width = this.$el.getBoundingClientRect().width + 'px'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="{fullscreen:fullscreen}" class="tinymce-container editor-container">
|
<div :class="{fullscreen:fullscreen}" class="tinymce-container" :style="{width:containerWidth}">
|
||||||
<textarea :id="tinymceId" class="tinymce-textarea" />
|
<textarea :id="tinymceId" class="tinymce-textarea" />
|
||||||
<div class="editor-custom-btn-container">
|
<div class="editor-custom-btn-container">
|
||||||
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK" />
|
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK" />
|
||||||
|
@ -38,9 +38,14 @@ export default {
|
||||||
default: 'file edit insert view format table'
|
default: 'file edit insert view format table'
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: Number,
|
type: [Number, String],
|
||||||
required: false,
|
required: false,
|
||||||
default: 360
|
default: 360
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: [Number, String],
|
||||||
|
required: false,
|
||||||
|
default: 'auto'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -58,6 +63,13 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
language() {
|
language() {
|
||||||
return this.languageTypeList[this.$store.getters.language]
|
return this.languageTypeList[this.$store.getters.language]
|
||||||
|
},
|
||||||
|
containerWidth() {
|
||||||
|
const width = this.width
|
||||||
|
if (/^[\d]+(\.[\d]+)?$/.test(width)) { // matches `100`, `'100'`
|
||||||
|
return `${width}px`
|
||||||
|
}
|
||||||
|
return width
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="social-signup-container">
|
<div class="social-signup-container">
|
||||||
<div class="sign-btn" @click="wechatHandleClick('wechat')">
|
<div class="sign-btn" @click="wechatHandleClick('wechat')">
|
||||||
<span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon" /></span> 微信
|
<span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon" /></span>
|
||||||
|
WeChat
|
||||||
</div>
|
</div>
|
||||||
<div class="sign-btn" @click="tencentHandleClick('tencent')">
|
<div class="sign-btn" @click="tencentHandleClick('tencent')">
|
||||||
<span class="qq-svg-container"><svg-icon icon-class="qq" class="icon" /></span> QQ
|
<span class="qq-svg-container"><svg-icon icon-class="qq" class="icon" /></span>
|
||||||
|
QQ
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue