paas-component-library 1.0.99 → 1.1.2

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,7 +1,7 @@
1
1
  {
2
2
  "name": "paas-component-library",
3
3
  "private": false,
4
- "version": "1.0.99",
4
+ "version": "1.1.2",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -48,6 +48,8 @@
48
48
  "./FormDateRange": "./src/components/form/FormDateRange/index.vue",
49
49
  "./FormTree": "./src/components/form/FormTree/index.vue",
50
50
  "./FormTextarea": "./src/components/form/FormTextarea/index.vue",
51
+ "./FormRadio": "./src/components/form/FormRadio/index.vue",
52
+ "./FormCheckbox": "./src/components/form/FormCheckbox/index.vue",
51
53
  "./PaasRadio": "./src/components/PaasRadio/index.vue",
52
54
  "./PaasCheckbox": "./src/components/PaasCheckbox/index.vue",
53
55
  "./PaasTextarea": "./src/components/PaasTextarea/index.vue",
@@ -96,7 +96,7 @@ export default {
96
96
  },
97
97
  labelAlign: {
98
98
  type: String,
99
- default: 'left',
99
+ default: 'right',
100
100
  },
101
101
  colSpan: {
102
102
  type: Number,
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <a-col :span="colSpan ? colSpan : defaultColSpan">
3
+ <a-form-item :label="label" :name="name" :icon="icon"
4
+ :label-col="{ style: { width: !!textWidth ? textWidth : labelWidth } }" :wrapper-col="{ style: { flex: 1 } }">
5
+ <paas-checkbox :model-value="modelValue" @update:model-value="updateValue" :disabled="disabled"
6
+ :options="options" :data="data" v-bind="$attrs" />
7
+ </a-form-item>
8
+ </a-col>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: "FormCheckbox",
14
+ inheritAttrs: false,
15
+ inject: {
16
+ labelWidth: {
17
+ from: 'labelWidth',
18
+ default: '90px'
19
+ },
20
+ defaultColSpan: {
21
+ from: 'defaultColSpan',
22
+ default: 12
23
+ }
24
+ },
25
+ props: {
26
+ label: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ name: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ modelValue: {
35
+ type: Array,
36
+ default: () => []
37
+ },
38
+ options: {
39
+ type: Array,
40
+ default: () => []
41
+ },
42
+ data: {
43
+ type: Array,
44
+ default: () => []
45
+ },
46
+ textWidth: {
47
+ type: String,
48
+ default: ""
49
+ },
50
+ colSpan: { type: Number },
51
+ icon: {
52
+ type: String,
53
+ default: ""
54
+ },
55
+ disabled: {
56
+ type: Boolean,
57
+ default: false
58
+ }
59
+ },
60
+ emits: ["update:modelValue"],
61
+ methods: {
62
+ updateValue(val) {
63
+ this.$emit("update:modelValue", val);
64
+ }
65
+ }
66
+ };
67
+ </script>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <a-col :span="colSpan ? colSpan : defaultColSpan">
3
+ <a-form-item :label="label" :name="name" :icon="icon"
4
+ :label-col="{ style: { width: !!textWidth ? textWidth : labelWidth } }" :wrapper-col="{ style: { flex: 1 } }">
5
+ <paas-radio :model-value="modelValue" @update:model-value="updateValue" :disabled="disabled"
6
+ :options="options" :data="data" :style="style" v-bind="$attrs" />
7
+ </a-form-item>
8
+ </a-col>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: "FormRadio",
14
+ inheritAttrs: false,
15
+ inject: {
16
+ labelWidth: {
17
+ from: 'labelWidth',
18
+ default: '90px'
19
+ },
20
+ defaultColSpan: {
21
+ from: 'defaultColSpan',
22
+ default: 12
23
+ }
24
+ },
25
+ props: {
26
+ label: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ name: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ modelValue: {
35
+ type: [String, Number, Boolean],
36
+ default: ""
37
+ },
38
+ options: {
39
+ type: Array,
40
+ default: () => []
41
+ },
42
+ data: {
43
+ type: Array,
44
+ default: () => []
45
+ },
46
+ textWidth: {
47
+ type: String,
48
+ default: ""
49
+ },
50
+ colSpan: { type: Number },
51
+ icon: {
52
+ type: String,
53
+ default: ""
54
+ },
55
+ disabled: {
56
+ type: Boolean,
57
+ default: false
58
+ },
59
+ style: { type: [String, Object], default: "width: 100%;" }
60
+ },
61
+ emits: ["update:modelValue"],
62
+ methods: {
63
+ updateValue(val) {
64
+ this.$emit("update:modelValue", val);
65
+ }
66
+ }
67
+ };
68
+ </script>
@@ -28,6 +28,8 @@ import FormDateRange from "./form/FormDateRange/index.vue";
28
28
  import FormTree from "./form/FormTree/index.vue";
29
29
  import PaasUpload from "./PaasUpload/index.vue";
30
30
  import FormTextarea from "./form/FormTextarea/index.vue";
31
+ import FormRadio from "./form/FormRadio/index.vue";
32
+ import FormCheckbox from "./form/FormCheckbox/index.vue";
31
33
  import PaasEditor from "./PaasEditor/index.vue";
32
34
  import PaasMdEditor from "./PaasMdEditor/index.vue";
33
35
  import PaasTreePanel from "./PaasTreePanel/index.vue";
@@ -70,6 +72,8 @@ const component = [
70
72
  PaasTreePanel,
71
73
  PaasForm,
72
74
  FormTextarea,
75
+ FormRadio,
76
+ FormCheckbox,
73
77
  PaasIcon,
74
78
  PaasCodeEditor,
75
79
  PaasImageViewer,
@@ -118,6 +122,8 @@ export {
118
122
  PaasTreePanel,
119
123
  PaasForm,
120
124
  FormTextarea,
125
+ FormRadio,
126
+ FormCheckbox,
121
127
  PaasIcon,
122
128
  PaasCodeEditor,
123
129
  PaasImageViewer,