fix 81427
This commit is contained in:
+321
-317
@@ -1,344 +1,348 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<a-config-provider :locale="locale">
|
||||||
<!-- <template v-for="item in data">
|
<div id="app">
|
||||||
<insert-text :title="item.title" :key="item.title" :list="item.list" />
|
<!-- <template v-for="item in data">
|
||||||
</template> -->
|
<insert-text :title="item.title" :key="item.title" :list="item.list" />
|
||||||
<!-- <div class="app-header">-->
|
</template> -->
|
||||||
<!-- <a-button @click="save" class="app-header-button">保存</a-button>-->
|
<!-- <div class="app-header">-->
|
||||||
<!-- </div>-->
|
<!-- <a-button @click="save" class="app-header-button">保存</a-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- <div class="ant-drawer-index" v-if="isDisplay">-->
|
<!-- <div class="ant-drawer-index" v-if="isDisplay">-->
|
||||||
<!-- 数据保存中;请勿关闭页面 <span class="ant-drawer-text">{{num}}</span>-->
|
<!-- 数据保存中;请勿关闭页面 <span class="ant-drawer-text">{{num}}</span>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<template v-for="item in data">
|
<template v-for="item in data">
|
||||||
<insert-guide-text
|
<insert-guide-text
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
:key="`insert-guide-text${item.title}`"
|
:key="`insert-guide-text${item.title}`"
|
||||||
:list="item.list"
|
:list="item.list"
|
||||||
:separatorText="item.separatorText"
|
:separatorText="item.separatorText"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<a-divider>初始化</a-divider>
|
<a-divider>初始化</a-divider>
|
||||||
<Init/>
|
<Init />
|
||||||
<a-divider>正文</a-divider>
|
<a-divider>正文</a-divider>
|
||||||
<chapterData/>
|
<chapterData />
|
||||||
<first-level-listing/>
|
<first-level-listing />
|
||||||
<SaicFunc/>
|
<SaicFunc />
|
||||||
<!-- <a-divider>正文</a-divider>-->
|
<!-- <a-divider>正文</a-divider>-->
|
||||||
<!-- <contentOne />-->
|
<!-- <contentOne />-->
|
||||||
<!-- <a-divider>列项</a-divider>-->
|
<!-- <a-divider>列项</a-divider>-->
|
||||||
<!-- <a-divider>函数</a-divider>-->
|
<!-- <a-divider>函数</a-divider>-->
|
||||||
<a-divider>表格、图片</a-divider>
|
<a-divider>表格、图片</a-divider>
|
||||||
<SaicTable/>
|
<SaicTable />
|
||||||
<SaicImg/>
|
<SaicImg />
|
||||||
<!-- <a-divider>图</a-divider>-->
|
<!-- <a-divider>图</a-divider>-->
|
||||||
<!-- <SaicImg/>-->
|
<!-- <SaicImg/>-->
|
||||||
<!-- <insert-image />-->
|
<!-- <insert-image />-->
|
||||||
<a-divider>脚注、注、示例</a-divider>
|
<a-divider>脚注、注、示例</a-divider>
|
||||||
<add-footnote/>
|
<add-footnote />
|
||||||
<SaicExample/>
|
<SaicExample />
|
||||||
<!-- <InsertNotes />-->
|
<!-- <InsertNotes />-->
|
||||||
<!-- <a-divider>示例</a-divider>-->
|
<!-- <a-divider>示例</a-divider>-->
|
||||||
<!-- <SaicExample/>-->
|
<!-- <SaicExample/>-->
|
||||||
<!-- <a-divider>上传</a-divider>-->
|
<!-- <a-divider>上传</a-divider>-->
|
||||||
<!-- <SaicFile />-->
|
<!-- <SaicFile />-->
|
||||||
<!-- <a-divider>修订信息</a-divider>-->
|
<!-- <a-divider>修订信息</a-divider>-->
|
||||||
<!-- <RevisInformation />-->
|
<!-- <RevisInformation />-->
|
||||||
<a-divider>附录</a-divider>
|
<a-divider>附录</a-divider>
|
||||||
<Appendix/>
|
<Appendix />
|
||||||
<!-- <insert-table-row />-->
|
<!-- <insert-table-row />-->
|
||||||
<!-- <hello-world />-->
|
<!-- <hello-world />-->
|
||||||
</div>
|
</div>
|
||||||
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import {SEPARATOR_TYPE} from '@/pages/page1/common/utils'
|
import { SEPARATOR_TYPE } from '@/pages/page1/common/utils'
|
||||||
import InsertTableRow from './components/InsertTableRow.vue'
|
import InsertTableRow from './components/InsertTableRow.vue'
|
||||||
import InsertGuideText from './components/InsertGuideText.vue'
|
import InsertGuideText from './components/InsertGuideText.vue'
|
||||||
import FirstLevelListing from './components/FirstLevelListing.vue'
|
import FirstLevelListing from './components/FirstLevelListing.vue'
|
||||||
import AddFootnote from './components/AddFootnote.vue'
|
import AddFootnote from './components/AddFootnote.vue'
|
||||||
import InsertImage from './components/InsertImage.vue'
|
import InsertImage from './components/InsertImage.vue'
|
||||||
import HelloWorld from './components/HelloWorld.vue'
|
import HelloWorld from './components/HelloWorld.vue'
|
||||||
import Init from './saicComponents/Init'
|
import Init from './saicComponents/Init'
|
||||||
import contentOne from './saicComponents/Content'
|
import contentOne from './saicComponents/Content'
|
||||||
import SaicFunc from './saicComponents/SaicFunc'
|
import SaicFunc from './saicComponents/SaicFunc'
|
||||||
import SaicTable from './saicComponents/SaicTable'
|
import SaicTable from './saicComponents/SaicTable'
|
||||||
import SaicImg from './components/InsertImage'
|
import SaicImg from './components/InsertImage'
|
||||||
import InsertNotes from './saicComponents/InsertNotes'
|
import InsertNotes from './saicComponents/InsertNotes'
|
||||||
import SaicExample from './saicComponents/SaicExample'
|
import SaicExample from './saicComponents/SaicExample'
|
||||||
import SaicFile from './saicComponents/SaicFile'
|
import SaicFile from './saicComponents/SaicFile'
|
||||||
import RevisInformation from './saicComponents/RevisInformation'
|
import RevisInformation from './saicComponents/RevisInformation'
|
||||||
import Appendix from './saicComponents/Appendix'
|
import Appendix from './saicComponents/Appendix'
|
||||||
import chapterData from './saicComponents/chapterData'
|
import chapterData from './saicComponents/chapterData'
|
||||||
import Chapter from './saicComponents/Chapter'
|
import Chapter from './saicComponents/Chapter'
|
||||||
import _axios from '@/plugins/axios2'
|
import _axios from '@/plugins/axios2'
|
||||||
|
import zh_CN from 'ant-design-vue/lib/locale/zh_CN'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
InsertTableRow,
|
InsertTableRow,
|
||||||
InsertGuideText,
|
InsertGuideText,
|
||||||
FirstLevelListing,
|
FirstLevelListing,
|
||||||
AddFootnote,
|
AddFootnote,
|
||||||
InsertImage,
|
InsertImage,
|
||||||
HelloWorld,
|
HelloWorld,
|
||||||
Init,
|
Init,
|
||||||
contentOne,
|
contentOne,
|
||||||
SaicFunc,
|
SaicFunc,
|
||||||
SaicTable,
|
SaicTable,
|
||||||
SaicImg,
|
SaicImg,
|
||||||
InsertNotes,
|
InsertNotes,
|
||||||
SaicExample,
|
SaicExample,
|
||||||
SaicFile,
|
SaicFile,
|
||||||
RevisInformation,
|
RevisInformation,
|
||||||
Appendix,
|
Appendix,
|
||||||
chapterData,
|
chapterData,
|
||||||
Chapter
|
Chapter
|
||||||
},
|
},
|
||||||
data() {
|
data () {
|
||||||
let Ps
|
let Ps
|
||||||
|
|
||||||
function updateScroll() {
|
function updateScroll () {
|
||||||
Ps.update()
|
Ps.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// SEPARATOR_TYPE,
|
// SEPARATOR_TYPE,
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
title: '术语和定义',
|
title: '术语和定义',
|
||||||
list: [
|
list: [
|
||||||
'下列术语和定义适用于本文件。',
|
'下列术语和定义适用于本文件。',
|
||||||
'......界定的术语和定义适用于本文件。',
|
'......界定的术语和定义适用于本文件。',
|
||||||
'......界定的以及下列术语和定义适用于本文件。',
|
'......界定的以及下列术语和定义适用于本文件。',
|
||||||
'本文件没有需要界定的术语和定义。'
|
'本文件没有需要界定的术语和定义。'
|
||||||
],
|
],
|
||||||
separatorText: SEPARATOR_TYPE.STRIKETHROUGH
|
separatorText: SEPARATOR_TYPE.STRIKETHROUGH
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '符号、代号和缩略语',
|
title: '符号、代号和缩略语',
|
||||||
list: [
|
list: [
|
||||||
'下列代号适用于本文件。',
|
'下列代号适用于本文件。',
|
||||||
'下列符号适用于本文件。',
|
'下列符号适用于本文件。',
|
||||||
'下列缩略语适用于本文件。',
|
'下列缩略语适用于本文件。',
|
||||||
'下列代号和缩略语适用于本文件。'
|
'下列代号和缩略语适用于本文件。'
|
||||||
],
|
],
|
||||||
separatorText: SEPARATOR_TYPE.COLON
|
separatorText: SEPARATOR_TYPE.COLON
|
||||||
}
|
|
||||||
],
|
|
||||||
isDisplay: false,
|
|
||||||
num: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
window.Asc.plugin.init = function () {
|
|
||||||
Vue.prototype.ctx = this
|
|
||||||
// console.log(this)
|
|
||||||
const container = document.getElementById('app')
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
Ps = new PerfectScrollbar(`#${container.id}`, {})
|
|
||||||
this.callCommand(() => {
|
|
||||||
try {
|
|
||||||
|
|
||||||
var oDocument = Api.GetDocument()
|
|
||||||
const oHeading1Style6 = oDocument.CreateStyle('Normal')
|
|
||||||
const oTextPr7 = oHeading1Style6.GetTextPr()
|
|
||||||
oTextPr7.SetFontFamily('宋体')
|
|
||||||
oTextPr7.SetColor(0, 0, 0)
|
|
||||||
oTextPr7.SetFontSize(21)
|
|
||||||
const oTextPr9 = oHeading1Style6.GetParaPr()
|
|
||||||
oTextPr9.SetSpacingAfter(10)
|
|
||||||
|
|
||||||
var oHeading1Style = oDocument.CreateStyle("Heading 1");
|
|
||||||
const oTextPr = oHeading1Style.GetTextPr();
|
|
||||||
oTextPr.SetFontFamily("黑体");
|
|
||||||
oTextPr.SetFontSize(21)
|
|
||||||
oTextPr.SetColor(0, 0, 0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var oHeading1Style1 = oDocument.CreateStyle("Heading 2");
|
|
||||||
const oTextPr1 = oHeading1Style1.GetTextPr();
|
|
||||||
oTextPr1.SetFontFamily("黑体");
|
|
||||||
oTextPr1.SetFontSize(21)
|
|
||||||
oTextPr1.SetColor(0, 0, 0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var oHeading1Style2 = oDocument.CreateStyle("Heading 3");
|
|
||||||
const oTextPr2 = oHeading1Style2.GetTextPr();
|
|
||||||
oTextPr2.SetFontFamily("黑体");
|
|
||||||
oTextPr2.SetFontSize(21)
|
|
||||||
oTextPr2.SetColor(0, 0, 0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var oHeading1Style3 = oDocument.CreateStyle("Heading 4");
|
|
||||||
const oTextPr3 = oHeading1Style3.GetTextPr();
|
|
||||||
oTextPr3.SetFontFamily("黑体");
|
|
||||||
oTextPr3.SetFontSize(21)
|
|
||||||
// oTextPr3.SetColor(0, 0, 0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var oHeading1Style4 = oDocument.CreateStyle("Heading 5");
|
|
||||||
const oTextPr4 = oHeading1Style4.GetTextPr();
|
|
||||||
oTextPr4.SetFontFamily("黑体");
|
|
||||||
oTextPr4.SetFontSize(21)
|
|
||||||
oTextPr4.SetColor(0, 0, 0);
|
|
||||||
//
|
|
||||||
var oHeading1Style5 = oDocument.CreateStyle("Heading 6");
|
|
||||||
const oTextPr5 = oHeading1Style5.GetTextPr();
|
|
||||||
oTextPr5.SetFontFamily("黑体");
|
|
||||||
oTextPr5.SetFontSize(21)
|
|
||||||
oTextPr5.SetColor(0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
var oNormalStyle = oDocument.GetDefaultStyle('numbering')
|
|
||||||
const oTextPr6 = oNormalStyle.GetTextPr()
|
|
||||||
oTextPr6.SetFontFamily('黑体')
|
|
||||||
|
|
||||||
const oParagraph = Api.CreateParagraph()
|
|
||||||
oParagraph.SetStyle(oNormalStyle)
|
|
||||||
Api.HeadersAndFooters_DifferentOddandEvenPage(true)
|
|
||||||
// Api.HeadersAndFooters_DifferentFirstPage(true)
|
|
||||||
} catch (e) {
|
|
||||||
console.log('init err:', e)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('message', (e) => {
|
|
||||||
// console.log(e)
|
|
||||||
}, false)
|
|
||||||
|
|
||||||
window.Asc.plugin.button = function (id) {
|
|
||||||
// console.log('wx2', id)
|
|
||||||
if (id === -1) this.executeCommand('close', '')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
param2Obj(url) {
|
|
||||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
|
||||||
if (!search) {
|
|
||||||
return {}
|
|
||||||
}
|
}
|
||||||
const obj = {}
|
],
|
||||||
const searchArr = search.split('&')
|
isDisplay: false,
|
||||||
searchArr.forEach(v => {
|
num: 0,
|
||||||
const index = v.indexOf('=')
|
locale: zh_CN
|
||||||
if (index !== -1) {
|
}
|
||||||
const name = v.substring(0, index)
|
},
|
||||||
let val = v.substring(index + 1, v.length)
|
created () {
|
||||||
if (val == 'undefined' || !val) {
|
window.Asc.plugin.init = function () {
|
||||||
val = ''
|
Vue.prototype.ctx = this
|
||||||
}
|
// console.log(this)
|
||||||
obj[name] = val
|
const container = document.getElementById('app')
|
||||||
}
|
// eslint-disable-next-line no-undef
|
||||||
})
|
Ps = new PerfectScrollbar(`#${container.id}`, {})
|
||||||
return obj
|
this.callCommand(() => {
|
||||||
},
|
try {
|
||||||
save() {
|
|
||||||
|
|
||||||
let documentCallbackUrl = window.Asc.plugin.info.documentCallbackUrl
|
var oDocument = Api.GetDocument()
|
||||||
let query = this.param2Obj(documentCallbackUrl)
|
const oHeading1Style6 = oDocument.CreateStyle('Normal')
|
||||||
let formData = (data) => {
|
const oTextPr7 = oHeading1Style6.GetTextPr()
|
||||||
let _formData = new FormData()
|
oTextPr7.SetFontFamily('宋体')
|
||||||
for (let i in data) {
|
oTextPr7.SetColor(0, 0, 0)
|
||||||
_formData.append(i, data[i])
|
oTextPr7.SetFontSize(21)
|
||||||
}
|
const oTextPr9 = oHeading1Style6.GetParaPr()
|
||||||
return _formData
|
oTextPr9.SetSpacingAfter(10)
|
||||||
|
|
||||||
|
var oHeading1Style = oDocument.CreateStyle('Heading 1')
|
||||||
|
const oTextPr = oHeading1Style.GetTextPr()
|
||||||
|
oTextPr.SetFontFamily('黑体')
|
||||||
|
oTextPr.SetFontSize(21)
|
||||||
|
oTextPr.SetColor(0, 0, 0)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
var oHeading1Style1 = oDocument.CreateStyle('Heading 2')
|
||||||
|
const oTextPr1 = oHeading1Style1.GetTextPr()
|
||||||
|
oTextPr1.SetFontFamily('黑体')
|
||||||
|
oTextPr1.SetFontSize(21)
|
||||||
|
oTextPr1.SetColor(0, 0, 0)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
var oHeading1Style2 = oDocument.CreateStyle('Heading 3')
|
||||||
|
const oTextPr2 = oHeading1Style2.GetTextPr()
|
||||||
|
oTextPr2.SetFontFamily('黑体')
|
||||||
|
oTextPr2.SetFontSize(21)
|
||||||
|
oTextPr2.SetColor(0, 0, 0)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
var oHeading1Style3 = oDocument.CreateStyle('Heading 4')
|
||||||
|
const oTextPr3 = oHeading1Style3.GetTextPr()
|
||||||
|
oTextPr3.SetFontFamily('黑体')
|
||||||
|
oTextPr3.SetFontSize(21)
|
||||||
|
// oTextPr3.SetColor(0, 0, 0);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
var oHeading1Style4 = oDocument.CreateStyle('Heading 5')
|
||||||
|
const oTextPr4 = oHeading1Style4.GetTextPr()
|
||||||
|
oTextPr4.SetFontFamily('黑体')
|
||||||
|
oTextPr4.SetFontSize(21)
|
||||||
|
oTextPr4.SetColor(0, 0, 0)
|
||||||
|
//
|
||||||
|
var oHeading1Style5 = oDocument.CreateStyle('Heading 6')
|
||||||
|
const oTextPr5 = oHeading1Style5.GetTextPr()
|
||||||
|
oTextPr5.SetFontFamily('黑体')
|
||||||
|
oTextPr5.SetFontSize(21)
|
||||||
|
oTextPr5.SetColor(0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
|
var oNormalStyle = oDocument.GetDefaultStyle('numbering')
|
||||||
|
const oTextPr6 = oNormalStyle.GetTextPr()
|
||||||
|
oTextPr6.SetFontFamily('黑体')
|
||||||
|
|
||||||
|
const oParagraph = Api.CreateParagraph()
|
||||||
|
oParagraph.SetStyle(oNormalStyle)
|
||||||
|
Api.HeadersAndFooters_DifferentOddandEvenPage(true)
|
||||||
|
// Api.HeadersAndFooters_DifferentFirstPage(true)
|
||||||
|
} catch (e) {
|
||||||
|
console.log('init err:', e)
|
||||||
}
|
}
|
||||||
this.num = 10
|
})
|
||||||
this.isDisplay = true
|
}
|
||||||
_axios({
|
|
||||||
url: 'api/lawss/activiti/recieveFile',
|
window.addEventListener('message', (e) => {
|
||||||
method: 'post',
|
// console.log(e)
|
||||||
data: formData(query)
|
}, false)
|
||||||
}).then(res => {
|
|
||||||
}).catch(e => {
|
window.Asc.plugin.button = function (id) {
|
||||||
})
|
// console.log('wx2', id)
|
||||||
this.setIntervalOne = setInterval(() => {
|
if (id === -1) this.executeCommand('close', '')
|
||||||
this.num--
|
}
|
||||||
if (this.num == 0) {
|
},
|
||||||
clearInterval(this.setIntervalOne)
|
methods: {
|
||||||
this.isDisplay = false
|
param2Obj (url) {
|
||||||
}
|
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||||
}, 1000)
|
if (!search) {
|
||||||
|
return {}
|
||||||
}
|
}
|
||||||
|
const obj = {}
|
||||||
|
const searchArr = search.split('&')
|
||||||
|
searchArr.forEach(v => {
|
||||||
|
const index = v.indexOf('=')
|
||||||
|
if (index !== -1) {
|
||||||
|
const name = v.substring(0, index)
|
||||||
|
let val = v.substring(index + 1, v.length)
|
||||||
|
if (val == 'undefined' || !val) {
|
||||||
|
val = ''
|
||||||
|
}
|
||||||
|
obj[name] = val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return obj
|
||||||
|
},
|
||||||
|
save () {
|
||||||
|
|
||||||
|
let documentCallbackUrl = window.Asc.plugin.info.documentCallbackUrl
|
||||||
|
let query = this.param2Obj(documentCallbackUrl)
|
||||||
|
let formData = (data) => {
|
||||||
|
let _formData = new FormData()
|
||||||
|
for (let i in data) {
|
||||||
|
_formData.append(i, data[i])
|
||||||
|
}
|
||||||
|
return _formData
|
||||||
|
}
|
||||||
|
this.num = 10
|
||||||
|
this.isDisplay = true
|
||||||
|
_axios({
|
||||||
|
url: 'api/lawss/activiti/recieveFile',
|
||||||
|
method: 'post',
|
||||||
|
data: formData(query)
|
||||||
|
}).then(res => {
|
||||||
|
}).catch(e => {
|
||||||
|
})
|
||||||
|
this.setIntervalOne = setInterval(() => {
|
||||||
|
this.num--
|
||||||
|
if (this.num == 0) {
|
||||||
|
clearInterval(this.setIntervalOne)
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
#app {
|
#app {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5 {
|
h1, h2, h3, h4, h5 {
|
||||||
color: rgba(0, 0, 0, .85);
|
color: rgba(0, 0, 0, .85);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC,
|
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC,
|
||||||
Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif,
|
Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif,
|
||||||
Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
||||||
font-variant: tabular-nums;
|
font-variant: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-group {
|
.ant-btn-group {
|
||||||
display: block!important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.ant-drawer-index {
|
.ant-drawer-index {
|
||||||
width: 210px;
|
width: 210px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
background: #000;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-drawer-text {
|
.ant-drawer-text {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #ffff00;
|
color: #ffff00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header {
|
.app-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background: #f1f1f1;
|
background: #f1f1f1;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
border-bottom: 1px #e8e8e8 solid;
|
border-bottom: 1px #e8e8e8 solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header-button {
|
.app-header-button {
|
||||||
background: #66b1ff;
|
background: #66b1ff;
|
||||||
border-color: #66b1ff;
|
border-color: #66b1ff;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -548,11 +548,13 @@ export default {
|
|||||||
beforeUpload (file) {
|
beforeUpload (file) {
|
||||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
this.$message.error('You can only upload JPG file!')
|
this.$message.error('只能上传图片')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2
|
const isLt2M = file.size / 1024 / 1024 < 2
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.$message.error('Image must smaller than 2MB!')
|
this.$message.error('图片大小不能超过2MB')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
return isJpgOrPng && isLt2M
|
return isJpgOrPng && isLt2M
|
||||||
},
|
},
|
||||||
@@ -654,4 +656,11 @@ export default {
|
|||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-upload-select-picture-card {
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user