增加新人引导按钮
This commit is contained in:
@@ -17,8 +17,13 @@
|
||||
<a-col class="left">
|
||||
<slot name="title">{{ title }}</slot>
|
||||
</a-col>
|
||||
<a-col v-if="switchFullscreen" class="right" @click="toggleFullscreen">
|
||||
<a-button class="ant-modal-close ant-modal-close-x" ghost type="link" :icon="fullscreenButtonIcon"/>
|
||||
<a-col class="right">
|
||||
<a-tooltip title="新手引导">
|
||||
<a-button v-if="switchHelp" @click="handleHelp" style="right:112px;" class="ant-modal-close ant-modal-close-x"
|
||||
ghost type="link" icon="question-circle"/>
|
||||
</a-tooltip>
|
||||
<a-button v-if="switchFullscreen" @click="toggleFullscreen" class="ant-modal-close ant-modal-close-x"
|
||||
ghost type="link" :icon="fullscreenButtonIcon"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
@@ -39,6 +44,8 @@
|
||||
<script>
|
||||
|
||||
import { getClass, getStyle } from '@/utils/props-util'
|
||||
import { handleIntroJs } from "@/utils/util"
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'JModal',
|
||||
@@ -46,11 +53,18 @@
|
||||
title: String,
|
||||
// 可使用 .sync 修饰符
|
||||
visible: Boolean,
|
||||
// 前缀代号
|
||||
prefixNo: String,
|
||||
// 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符
|
||||
fullscreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否允许展示新手引导(允许后右上角会出现一个按钮)
|
||||
switchHelp: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否允许切换全屏(允许后右上角会出现一个按钮)
|
||||
switchFullscreen: {
|
||||
type: Boolean,
|
||||
@@ -148,6 +162,13 @@
|
||||
this.close()
|
||||
},
|
||||
|
||||
/** 新手引导 */
|
||||
handleHelp() {
|
||||
let element = 'intro_cache_' + this.prefixNo
|
||||
Vue.ls.remove(element)
|
||||
handleIntroJs(this.prefixNo, 1)
|
||||
},
|
||||
|
||||
/** 切换全屏 */
|
||||
toggleFullscreen() {
|
||||
this.innerFullscreen = !this.innerFullscreen
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
:maskClosable="false"
|
||||
:keyboard="false"
|
||||
:forceRender="true"
|
||||
v-bind:prefixNo="prefixNo"
|
||||
switchHelp
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
@@ -60,6 +62,7 @@
|
||||
:rowNumber="false"
|
||||
:rowSelection="true"
|
||||
:actionButton="true"
|
||||
:dragSort="true"
|
||||
@valueChange="onValueChange"
|
||||
@added="onAdded"
|
||||
@deleted="onDeleted">
|
||||
@@ -298,7 +301,7 @@
|
||||
this.addInit(this.prefixNo)
|
||||
this.fileList = []
|
||||
this.$nextTick(() => {
|
||||
handleIntroJs('purchaseIn', 11)
|
||||
handleIntroJs(this.prefixNo, 1)
|
||||
})
|
||||
} else {
|
||||
this.model.operTime = this.model.operTimeStr
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
:maskClosable="false"
|
||||
:keyboard="false"
|
||||
:forceRender="true"
|
||||
v-bind:prefixNo="prefixNo"
|
||||
switchHelp
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
@@ -198,7 +200,7 @@
|
||||
this.addInit(this.prefixNo)
|
||||
this.fileList = []
|
||||
this.$nextTick(() => {
|
||||
handleIntroJs('purchaseOrder', 2)
|
||||
handleIntroJs(this.prefixNo, 1)
|
||||
})
|
||||
} else {
|
||||
this.model.operTime = this.model.operTimeStr
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
:maskClosable="false"
|
||||
:keyboard="false"
|
||||
:forceRender="true"
|
||||
v-bind:prefixNo="prefixNo"
|
||||
switchHelp
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
@@ -204,7 +206,7 @@
|
||||
this.personList.value = ''
|
||||
this.fileList = []
|
||||
this.$nextTick(() => {
|
||||
handleIntroJs('saleOrder', 2)
|
||||
handleIntroJs(this.prefixNo, 1)
|
||||
})
|
||||
} else {
|
||||
this.model.operTime = this.model.operTimeStr
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
:maskClosable="false"
|
||||
:keyboard="false"
|
||||
:forceRender="true"
|
||||
v-bind:prefixNo="prefixNo"
|
||||
switchHelp
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
@@ -303,7 +305,7 @@
|
||||
this.personList.value = ''
|
||||
this.fileList = []
|
||||
this.$nextTick(() => {
|
||||
handleIntroJs('saleOut', 2)
|
||||
handleIntroJs(this.prefixNo, 1)
|
||||
})
|
||||
} else {
|
||||
this.model.operTime = this.model.operTimeStr
|
||||
|
||||
Reference in New Issue
Block a user