@zscreate/zhxy-app-component 1.0.257 → 1.0.258

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.
@@ -4,15 +4,15 @@
4
4
  <custom-top :isBack="true">
5
5
  <block slot="backText"></block>
6
6
  </custom-top>
7
- <common_component v-if="name" :name="name" @ok="handleOk" />
7
+ <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" @cancel="handleCancel" />
8
8
  </view>
9
9
  </template>
10
10
  <script>
11
- import common_component from "./common_component.vue";
11
+ import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
12
12
 
13
13
  export default {
14
14
  components: {
15
- common_component
15
+ WorkFlowApp,
16
16
  },
17
17
  name: "common",
18
18
  data() {
@@ -29,6 +29,11 @@ export default {
29
29
 
30
30
  },
31
31
  methods: {
32
+ handleCancel() {
33
+ uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
34
+ delta: 1
35
+ })
36
+ },
32
37
  handleOk(data) {
33
38
  let pages = getCurrentPages(); //获取所有页面栈实例列表
34
39
  let nowPage = pages[pages.length - 1]; //当前页页面实例
@@ -83,7 +83,7 @@
83
83
 
84
84
  <view style="display: flex; justify-content: center; padding: 10rpx" >
85
85
  <button class="uni-button" size="mini" type="primary" @click="handleOk">确认</button>
86
- <button class="uni-button" size="mini" type="primary" style="background-color: red" @click="show = false">取消</button>
86
+ <button class="uni-button" size="mini" type="primary" style="background-color: red" @click="handleCancel">取消</button>
87
87
  </view>
88
88
  </view>
89
89
  </template>
@@ -240,6 +240,9 @@ export default {
240
240
  handleOk() {
241
241
  return this.$emit('ok', this.seletedData)
242
242
  },
243
+ handleCancel() {
244
+ return this.$emit('cancel')
245
+ },
243
246
  // 单选
244
247
  checkboxChange(e, t) {
245
248
  const isCheck = Boolean(Array.isArray(e) ? e[0] : e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.257",
3
+ "version": "1.0.258",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",
@@ -1,51 +0,0 @@
1
-
2
- <template>
3
- <view >
4
- 123
5
- 123
6
- 123
7
- 123
8
- 123
9
- 123
10
- 123
11
- 123
12
- 123
13
- 123
14
- 123
15
- 123
16
- 123
17
- 123
18
- 123
19
- 123
20
- 123
21
- 123
22
- 123
23
- 123
24
- <!-- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />-->
25
- </view>
26
- </template>
27
-
28
- <script>
29
- // import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
30
-
31
- export default {
32
- name: "commonComponent",
33
- // components: {WorkFlowApp},
34
- props: {
35
- name: String,
36
- },
37
- created() {
38
- console.log(this.name)
39
- },
40
- methods: {
41
- handleOk(...args) {
42
- this.$emit('ok', ...args)
43
- }
44
- }
45
- }
46
- </script>
47
-
48
-
49
- <style scoped lang="scss">
50
-
51
- </style>
@@ -1,31 +0,0 @@
1
-
2
- <template>
3
- <view style="width: 100%; height: 100%">
4
- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />
5
- </view>
6
- </template>
7
-
8
- <script>
9
- import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
10
-
11
- export default {
12
- name: "commonComponent",
13
- components: {WorkFlowApp},
14
- props: {
15
- name: String,
16
- },
17
- created() {
18
- console.log(this.name)
19
- },
20
- methods: {
21
- handleOk(...args) {
22
- this.$emit('ok', ...args)
23
- }
24
- }
25
- }
26
- </script>
27
-
28
-
29
- <style scoped lang="scss">
30
-
31
- </style>
@@ -1,29 +0,0 @@
1
- <script>
2
- import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
3
-
4
- export default {
5
- name: "commonComponent",
6
- components: {WorkFlowApp},
7
- props: {
8
- name: String,
9
- },
10
- created() {
11
- debugger
12
- },
13
- methods: {
14
- handleOk(...args) {
15
- this.$emit('ok', ...args)
16
- }
17
- }
18
- }
19
- </script>
20
-
21
- <template>
22
- <view style="width: 100%; height: 100%">
23
- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />
24
- </view>
25
- </template>
26
-
27
- <style scoped lang="scss">
28
-
29
- </style>