@yqg/permission 1.0.11-alpha.4 → 1.0.11-alpha.6
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/README.md +2 -2
- package/dist/{apply-modal-DY2YGw0c.js → apply-modal-Bgd3UWf-.js} +4 -5
- package/dist/{checkbox-item-CR9B5tmf.js → checkbox-item-DiIgFuBE.js} +3 -3
- package/dist/{index-BZLdofdQ.js → index-CUS1Jydp.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +47 -47
- package/dist/{yqg-permission-DCP1zkIz.js → yqg-permission-ChMRXqi6.js} +40 -44
- package/dist_/345/211/257/346/234/254/apply-modal-Bgd3UWf-.js +8739 -0
- package/dist_/345/211/257/346/234/254/card.png +0 -0
- package/dist_/345/211/257/346/234/254/checkbox-item-DiIgFuBE.js +4988 -0
- package/dist_/345/211/257/346/234/254/dialog.png +0 -0
- package/dist_/345/211/257/346/234/254/image.png +0 -0
- package/dist_/345/211/257/346/234/254/index-CUS1Jydp.js +6164 -0
- package/dist_/345/211/257/346/234/254/index.js +5 -0
- package/dist_/345/211/257/346/234/254/index.umd.cjs +259 -0
- package/dist_/345/211/257/346/234/254/yqg-permission-ChMRXqi6.js +14944 -0
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/components/apply-modal.vue +1 -2
- package/src/components/yqg-permission.vue +5 -14
- package/src/i18n/zh-CH.ts +2 -2
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -47,9 +47,8 @@
|
|
|
47
47
|
}]">
|
|
48
48
|
<Textarea
|
|
49
49
|
v-model:value.trim="formState.applyReason"
|
|
50
|
-
show-count
|
|
51
50
|
:maxlength="300"
|
|
52
|
-
:placeholder="t('applyReasonPlaceholder')"
|
|
51
|
+
:placeholder="t('applyReasonPlaceholder', {number: 300})"
|
|
53
52
|
:auto-size="{ minRows: 2, maxRows: 5 }">
|
|
54
53
|
</Textarea>
|
|
55
54
|
</FormItem>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
type="primary"
|
|
15
15
|
:tooltip="t('clickToApply')"
|
|
16
16
|
:style="{
|
|
17
|
-
right,
|
|
17
|
+
right: RIGHT_DEFAULT,
|
|
18
18
|
top: currentTop,
|
|
19
19
|
}"
|
|
20
20
|
>
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
DEFAULT: 'default',
|
|
116
116
|
CUSTOM: 'custom',
|
|
117
117
|
};
|
|
118
|
+
const RIGHT_DEFAULT = '10px';
|
|
118
119
|
|
|
119
120
|
// 重置 message 类名,避免被全局样式覆盖
|
|
120
121
|
message.config({prefixCls: 'yqg-permission-message'});
|
|
@@ -144,34 +145,26 @@
|
|
|
144
145
|
type: String,
|
|
145
146
|
default: 'default'
|
|
146
147
|
},
|
|
147
|
-
right: {
|
|
148
|
-
type: String,
|
|
149
|
-
default: '100px'
|
|
150
|
-
},
|
|
151
148
|
top: {
|
|
152
149
|
type: String,
|
|
153
150
|
default: '100px'
|
|
154
151
|
}
|
|
155
152
|
});
|
|
156
153
|
|
|
157
|
-
|
|
158
154
|
const open = ref(false);
|
|
159
155
|
const curApproving = ref<PermissionType>();
|
|
160
156
|
let permissionList = ref<PermissionListType>([]);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
157
|
let curStatus = ref<Record<string, any>>({
|
|
165
158
|
imageUrl: noauthority,
|
|
166
159
|
status: '',
|
|
167
160
|
})
|
|
168
161
|
|
|
169
162
|
const allPermissions = computed(() => {
|
|
163
|
+
permissionList.value = [];
|
|
170
164
|
if (Array.isArray(props.permissions)) {
|
|
171
|
-
return props.permissions.
|
|
165
|
+
return props.permissions.filter((item) => item.trim());
|
|
172
166
|
}
|
|
173
|
-
|
|
174
|
-
return props.permissions?.split(',')?.map((item) => item.trim()) || [];
|
|
167
|
+
return props.permissions?.split(',')?.filter((item) => item.trim()) || [];
|
|
175
168
|
});
|
|
176
169
|
|
|
177
170
|
const businessCode = computed(() => {
|
|
@@ -185,7 +178,6 @@
|
|
|
185
178
|
const arr:PermissionListType = [];
|
|
186
179
|
const flattenData = (list: PermissionListType) => {
|
|
187
180
|
list.forEach((item) => {
|
|
188
|
-
// 去掉名字中第一个.前面的字符串,会有多个.
|
|
189
181
|
item.name = item.name.replace(/^[^.]+\./, '');
|
|
190
182
|
if (item.children) {
|
|
191
183
|
flattenData(item.children);
|
|
@@ -256,7 +248,6 @@
|
|
|
256
248
|
const getPermissions = async () => {
|
|
257
249
|
const { workNumber } = props;
|
|
258
250
|
const permissions = allPermissions.value;
|
|
259
|
-
|
|
260
251
|
if (!permissions?.length || !workNumber) return;
|
|
261
252
|
|
|
262
253
|
const params = {
|
package/src/i18n/zh-CH.ts
CHANGED
|
@@ -3,7 +3,7 @@ export default {
|
|
|
3
3
|
applyPermission: '申请权限',
|
|
4
4
|
applyReason: '申请理由',
|
|
5
5
|
approvalProcess: '审批流程',
|
|
6
|
-
applyReasonPlaceholder: '请尽可能详细描述申请理由',
|
|
6
|
+
applyReasonPlaceholder: '请尽可能详细描述申请理由({number}字以内)',
|
|
7
7
|
cancel: '取消',
|
|
8
8
|
submit: '确定',
|
|
9
9
|
close: '关闭',
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
maxLengthTips: '最多{length}个字符',
|
|
30
30
|
lastDays: '{count}天后到期',
|
|
31
31
|
taday: '今天到期',
|
|
32
|
-
clickToApply: '
|
|
32
|
+
clickToApply: '点击申请权限',
|
|
33
33
|
noPermissionTips: '该菜单下暂无权限点',
|
|
34
34
|
availiables: {
|
|
35
35
|
SEVEN_DAYS: '7天',
|