jufubao-forms 1.0.0-beta1 → 1.0.0-beta2

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": "jufubao-forms",
3
- "version": "1.0.0-beta1",
3
+ "version": "1.0.0-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝表单业务插件库",
6
6
  "main": "index.js",
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Qa
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+
9
+ ];
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+
11
+ ].filter(i=>i)
12
+ },
13
+ advanced: [],
14
+ };
@@ -0,0 +1,113 @@
1
+ <template>
2
+ <view
3
+ class="jfb-forms-qa-result"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-forms-qa-result__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-forms-qa-result__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-forms-qa-result__body">
17
+ <view class="qa_box">
18
+ <view>答对提数</view>
19
+ </view>
20
+ </view>
21
+ </view>
22
+ </template>
23
+
24
+ <script>
25
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
26
+ import { jfbRootExec } from "@/utils/xd.event";
27
+ import JfbFormsQaResultMixin from "./JfbFormsQaResultMixin";
28
+ import { getContainerPropsValue } from "@/utils/xd.base";
29
+ import componentsMixins from "@/mixins/componentsMixins";
30
+ import extsMixins from "@/mixins/extsMixins";
31
+ export default {
32
+ name: "JfbFormsQaResult",
33
+ components: {
34
+ XdFontIcon
35
+ },
36
+ mixins: [
37
+ componentsMixins, extsMixins, JfbFormsQaResultMixin
38
+ ],
39
+ data() {
40
+ return {
41
+
42
+ //todo
43
+ }
44
+ },
45
+ watch: {
46
+ container(value, oldValue) {
47
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
48
+ if (this.$configProject['isPreview']) this.init(value)
49
+ },
50
+ },
51
+ created() {
52
+ this.init(this.container);
53
+
54
+ //todo
55
+ },
56
+ methods: {
57
+ onJfbLoad(options) {
58
+
59
+ // jfbRootExec('baiduUserLogin', {
60
+
61
+ // vm: this,// data: {
62
+
63
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
64
+
65
+ // }
66
+
67
+ // }).then().catch()
68
+ },
69
+ /**
70
+ * @description 监听事件变化
71
+ * @param container {object} 业务组件对象自己
72
+ */
73
+ init(container) {
74
+
75
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
76
+
77
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
78
+ },
79
+ onJfbScroll(options) {
80
+ console.log('event.onJfbScroll', options)
81
+ },
82
+ onJfbReachBottom(options) {
83
+ console.log('event.onJfbReachBottom', options)
84
+ },
85
+ onJfbShow(options) {
86
+ console.log('event.onJfbShow', options)
87
+ },
88
+ onJfbHide(options) {
89
+ console.log('event.onJfbHide', options)
90
+ },
91
+ onJfbBack(options) {
92
+ console.log('event.onJfbBack', options)
93
+ },
94
+ onJfbUpdate(...data) {
95
+ console.log('event.onJfbUpdate', data)
96
+ },
97
+ onJfbCustomEvent(options) {
98
+ console.log('event.onJfbReachBottom', options)
99
+ },
100
+ }
101
+ }
102
+
103
+ </script>
104
+
105
+ <style scoped lang="less">
106
+ @import "./JfbFormsQaResultLess.less";
107
+
108
+ .jfb-forms-qa-result {
109
+ &__body{
110
+
111
+ }
112
+ }
113
+ </style>
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-forms-qa-result {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: var(--preview-z-index);
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-forms-qa-result {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-forms-qa-result'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ }