xs-common-plugins 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xs-common-plugins",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "private": false,
5
5
  "description": "向上公共代码部分",
6
6
  "author": "祝玲云 <1902733517@qq.com>",
@@ -256,6 +256,11 @@ common.popup = (options) => {
256
256
  document.body.appendChild(div);
257
257
 
258
258
  const dialogComponent = {
259
+ computed:{
260
+ loading() {
261
+ return this.$store.getters?.loading || false;
262
+ }
263
+ },
259
264
  components: {
260
265
  child: component
261
266
  },
@@ -322,7 +327,7 @@ common.popup = (options) => {
322
327
  <el-dialog :title="title" v-el-drag-dialog :visible.sync="visible" :width="width" :before-close="beforeClose" v-bind="dialogCfg" append-to-body>
323
328
  <child ref="child" :srcData="srcData" v-bind="props" @close="close" @cancel="cancel"/>
324
329
  <div v-if="showButton" style="text-align: right;margin-top: 10px">
325
- <el-button size="medium" type="primary" @click="confirm">确认</el-button>
330
+ <el-button size="medium" type="primary" @click="confirm" v-loading="loading">确认</el-button>
326
331
  <el-button size="medium" @click="cancel">取消</el-button>
327
332
  </div>
328
333
  </el-dialog>
@@ -332,6 +337,7 @@ common.popup = (options) => {
332
337
 
333
338
  return new Vue({
334
339
  el: div,
340
+ store,
335
341
  render(h) {
336
342
  return h(dialogComponent, {
337
343
  props: {
@@ -9,5 +9,6 @@ const getters = {
9
9
  menuList: state => state.app.menuList,
10
10
  ossCfg: state => state.oss.ossCfg,
11
11
  dic: state => state.dic.ask,
12
+ loading: state => state.app.requestNum > 0,
12
13
  }
13
14
  export default getters