@94ai/nf-confirm 8.3.22 → 9.0.0
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/lib/index.d.ts +70 -56
- package/lib/main.d.ts +2 -2
- package/lib/nf-confirm.cjs.js +13 -4
- package/lib/nf-confirm.esm-bundler.js +13 -4
- package/lib/nf-confirm.vue.d.ts +27 -19
- package/lib/style/css.d.ts +0 -1
- package/lib/style/index.d.ts +0 -1
- package/package/nf-confirm.vue +13 -4
- package/package.json +5 -4
package/lib/index.d.ts
CHANGED
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
import { PluginObject } from 'vue-demi';
|
|
2
|
-
import Main from './main';
|
|
3
|
-
declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{
|
|
4
|
-
visible: boolean;
|
|
5
|
-
width: number;
|
|
6
|
-
title: string;
|
|
7
|
-
message: string;
|
|
8
|
-
type: string;
|
|
9
|
-
customClass: string;
|
|
10
|
-
iconClass: string;
|
|
11
|
-
cancelButtonText:
|
|
12
|
-
confirmButtonText:
|
|
13
|
-
loading: boolean;
|
|
14
|
-
onCancel: null;
|
|
15
|
-
onConfirm: null;
|
|
16
|
-
callback: null;
|
|
17
|
-
dangerouslyUseHTMLString: boolean;
|
|
18
|
-
}, Readonly<import("vue-demi").ExtractPropTypes<{}>>, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{}>>> & import("vue-demi").ShallowUnwrapRef<any> & {
|
|
19
|
-
visible: boolean;
|
|
20
|
-
width: number;
|
|
21
|
-
title: string;
|
|
22
|
-
message: string;
|
|
23
|
-
type: string;
|
|
24
|
-
customClass: string;
|
|
25
|
-
iconClass: string;
|
|
26
|
-
cancelButtonText:
|
|
27
|
-
confirmButtonText:
|
|
28
|
-
loading: boolean;
|
|
29
|
-
onCancel: null;
|
|
30
|
-
onConfirm: null;
|
|
31
|
-
callback: null;
|
|
32
|
-
dangerouslyUseHTMLString: boolean;
|
|
33
|
-
} & import("vue/types/v3-component-options").ExtractComputedReturns<{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
import { PluginObject } from 'vue-demi';
|
|
2
|
+
import Main from './main';
|
|
3
|
+
declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{
|
|
4
|
+
visible: boolean;
|
|
5
|
+
width: number;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
type: string;
|
|
9
|
+
customClass: string;
|
|
10
|
+
iconClass: string;
|
|
11
|
+
cancelButtonText: undefined;
|
|
12
|
+
confirmButtonText: undefined;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
onCancel: null;
|
|
15
|
+
onConfirm: null;
|
|
16
|
+
callback: null;
|
|
17
|
+
dangerouslyUseHTMLString: boolean;
|
|
18
|
+
}, Readonly<import("vue-demi").ExtractPropTypes<{}>>, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{}>>> & import("vue-demi").ShallowUnwrapRef<any> & {
|
|
19
|
+
visible: boolean;
|
|
20
|
+
width: number;
|
|
21
|
+
title: string;
|
|
22
|
+
message: string;
|
|
23
|
+
type: string;
|
|
24
|
+
customClass: string;
|
|
25
|
+
iconClass: string;
|
|
26
|
+
cancelButtonText: undefined;
|
|
27
|
+
confirmButtonText: undefined;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
onCancel: null;
|
|
30
|
+
onConfirm: null;
|
|
31
|
+
callback: null;
|
|
32
|
+
dangerouslyUseHTMLString: boolean;
|
|
33
|
+
} & import("vue/types/v3-component-options").ExtractComputedReturns<import("vue-demi").ComponentComputedOptions & {
|
|
34
|
+
localeText(): {
|
|
35
|
+
cancelButtonText: any;
|
|
36
|
+
confirmButtonText: any;
|
|
37
|
+
};
|
|
38
|
+
typeClass(): string;
|
|
39
|
+
}> & {
|
|
40
|
+
t(path: string, params?: Record<string, any> | undefined): string;
|
|
41
|
+
} & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{}>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{}>>, any, {
|
|
42
|
+
visible: boolean;
|
|
43
|
+
width: number;
|
|
44
|
+
title: string;
|
|
45
|
+
message: string;
|
|
46
|
+
type: string;
|
|
47
|
+
customClass: string;
|
|
48
|
+
iconClass: string;
|
|
49
|
+
cancelButtonText: undefined;
|
|
50
|
+
confirmButtonText: undefined;
|
|
51
|
+
loading: boolean;
|
|
52
|
+
onCancel: null;
|
|
53
|
+
onConfirm: null;
|
|
54
|
+
callback: null;
|
|
55
|
+
dangerouslyUseHTMLString: boolean;
|
|
56
|
+
}, {
|
|
57
|
+
localeText(): {
|
|
58
|
+
cancelButtonText: any;
|
|
59
|
+
confirmButtonText: any;
|
|
60
|
+
};
|
|
61
|
+
typeClass(): string;
|
|
62
|
+
}, {}, {
|
|
63
|
+
methods: {
|
|
64
|
+
t(path: string, params?: Record<string, any> | undefined): string;
|
|
65
|
+
};
|
|
66
|
+
}, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {}> & {
|
|
67
|
+
props: {};
|
|
68
|
+
} & PluginObject<undefined>;
|
|
69
|
+
export default _default;
|
|
70
|
+
export { Main as Confirm };
|
package/lib/main.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Confirm: (options: any) => Promise<unknown> | undefined;
|
|
2
|
-
export default Confirm;
|
|
1
|
+
declare const Confirm: (options: any) => Promise<unknown> | undefined;
|
|
2
|
+
export default Confirm;
|
package/lib/nf-confirm.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const commonUtils = require("@94ai/common-utils");
|
|
3
4
|
const vueDemi = require("vue-demi");
|
|
4
5
|
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
5
6
|
const typeMap = {
|
|
@@ -10,6 +11,7 @@ const typeMap = {
|
|
|
10
11
|
};
|
|
11
12
|
const _sfc_main = vueDemi.defineComponent({
|
|
12
13
|
name: "nf-confirm",
|
|
14
|
+
mixins: [commonUtils.LocaleMixin],
|
|
13
15
|
data() {
|
|
14
16
|
return {
|
|
15
17
|
visible: false,
|
|
@@ -19,8 +21,8 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
19
21
|
type: "",
|
|
20
22
|
customClass: "",
|
|
21
23
|
iconClass: "",
|
|
22
|
-
cancelButtonText:
|
|
23
|
-
confirmButtonText:
|
|
24
|
+
cancelButtonText: void 0,
|
|
25
|
+
confirmButtonText: void 0,
|
|
24
26
|
loading: false,
|
|
25
27
|
onCancel: null,
|
|
26
28
|
onConfirm: null,
|
|
@@ -29,6 +31,13 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
29
31
|
};
|
|
30
32
|
},
|
|
31
33
|
computed: {
|
|
34
|
+
localeText() {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
return {
|
|
37
|
+
cancelButtonText: (_a = this.cancelButtonText) != null ? _a : this.t("nf.common.cancel"),
|
|
38
|
+
confirmButtonText: (_b = this.confirmButtonText) != null ? _b : this.t("nf.common.confirm")
|
|
39
|
+
};
|
|
40
|
+
},
|
|
32
41
|
typeClass() {
|
|
33
42
|
return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : "";
|
|
34
43
|
}
|
|
@@ -102,7 +111,7 @@ var _sfc_render = function render() {
|
|
|
102
111
|
on: {
|
|
103
112
|
"click": _vm.handleCancel
|
|
104
113
|
}
|
|
105
|
-
}, [_vm._v(_vm._s(_vm.cancelButtonText))]), _c("nf-button", {
|
|
114
|
+
}, [_vm._v(_vm._s(_vm.localeText.cancelButtonText))]), _c("nf-button", {
|
|
106
115
|
attrs: {
|
|
107
116
|
"type": "primary",
|
|
108
117
|
"loading": _vm.loading
|
|
@@ -110,7 +119,7 @@ var _sfc_render = function render() {
|
|
|
110
119
|
on: {
|
|
111
120
|
"click": _vm.handleConfirm
|
|
112
121
|
}
|
|
113
|
-
}, [_vm._v(_vm._s(_vm.confirmButtonText))])], 1)])])])], 1);
|
|
122
|
+
}, [_vm._v(_vm._s(_vm.localeText.confirmButtonText))])], 1)])])])], 1);
|
|
114
123
|
};
|
|
115
124
|
var _sfc_staticRenderFns = [];
|
|
116
125
|
var __component__ = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocaleMixin } from "@94ai/common-utils";
|
|
1
2
|
import { defineComponent, Vue2 } from "vue-demi";
|
|
2
3
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
4
|
const typeMap = {
|
|
@@ -8,6 +9,7 @@ const typeMap = {
|
|
|
8
9
|
};
|
|
9
10
|
const _sfc_main = defineComponent({
|
|
10
11
|
name: "nf-confirm",
|
|
12
|
+
mixins: [LocaleMixin],
|
|
11
13
|
data() {
|
|
12
14
|
return {
|
|
13
15
|
visible: false,
|
|
@@ -17,8 +19,8 @@ const _sfc_main = defineComponent({
|
|
|
17
19
|
type: "",
|
|
18
20
|
customClass: "",
|
|
19
21
|
iconClass: "",
|
|
20
|
-
cancelButtonText:
|
|
21
|
-
confirmButtonText:
|
|
22
|
+
cancelButtonText: void 0,
|
|
23
|
+
confirmButtonText: void 0,
|
|
22
24
|
loading: false,
|
|
23
25
|
onCancel: null,
|
|
24
26
|
onConfirm: null,
|
|
@@ -27,6 +29,13 @@ const _sfc_main = defineComponent({
|
|
|
27
29
|
};
|
|
28
30
|
},
|
|
29
31
|
computed: {
|
|
32
|
+
localeText() {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
return {
|
|
35
|
+
cancelButtonText: (_a = this.cancelButtonText) != null ? _a : this.t("nf.common.cancel"),
|
|
36
|
+
confirmButtonText: (_b = this.confirmButtonText) != null ? _b : this.t("nf.common.confirm")
|
|
37
|
+
};
|
|
38
|
+
},
|
|
30
39
|
typeClass() {
|
|
31
40
|
return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : "";
|
|
32
41
|
}
|
|
@@ -100,7 +109,7 @@ var _sfc_render = function render() {
|
|
|
100
109
|
on: {
|
|
101
110
|
"click": _vm.handleCancel
|
|
102
111
|
}
|
|
103
|
-
}, [_vm._v(_vm._s(_vm.cancelButtonText))]), _c("nf-button", {
|
|
112
|
+
}, [_vm._v(_vm._s(_vm.localeText.cancelButtonText))]), _c("nf-button", {
|
|
104
113
|
attrs: {
|
|
105
114
|
"type": "primary",
|
|
106
115
|
"loading": _vm.loading
|
|
@@ -108,7 +117,7 @@ var _sfc_render = function render() {
|
|
|
108
117
|
on: {
|
|
109
118
|
"click": _vm.handleConfirm
|
|
110
119
|
}
|
|
111
|
-
}, [_vm._v(_vm._s(_vm.confirmButtonText))])], 1)])])])], 1);
|
|
120
|
+
}, [_vm._v(_vm._s(_vm.localeText.confirmButtonText))])], 1)])])])], 1);
|
|
112
121
|
};
|
|
113
122
|
var _sfc_staticRenderFns = [];
|
|
114
123
|
var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
package/lib/nf-confirm.vue.d.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
declare var _default: import("vue-demi").DefineComponent<{}, any, {
|
|
2
|
-
visible: boolean;
|
|
3
|
-
width: number;
|
|
4
|
-
title: string;
|
|
5
|
-
message: string;
|
|
6
|
-
type: string;
|
|
7
|
-
customClass: string;
|
|
8
|
-
iconClass: string;
|
|
9
|
-
cancelButtonText:
|
|
10
|
-
confirmButtonText:
|
|
11
|
-
loading: boolean;
|
|
12
|
-
onCancel: null;
|
|
13
|
-
onConfirm: null;
|
|
14
|
-
callback: null;
|
|
15
|
-
dangerouslyUseHTMLString: boolean;
|
|
16
|
-
}, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
declare var _default: import("vue-demi").DefineComponent<{}, any, {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
width: number;
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: string;
|
|
7
|
+
customClass: string;
|
|
8
|
+
iconClass: string;
|
|
9
|
+
cancelButtonText: undefined;
|
|
10
|
+
confirmButtonText: undefined;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
onCancel: null;
|
|
13
|
+
onConfirm: null;
|
|
14
|
+
callback: null;
|
|
15
|
+
dangerouslyUseHTMLString: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
localeText(): {
|
|
18
|
+
cancelButtonText: any;
|
|
19
|
+
confirmButtonText: any;
|
|
20
|
+
};
|
|
21
|
+
typeClass(): string;
|
|
22
|
+
}, {}, {
|
|
23
|
+
methods: {
|
|
24
|
+
t(path: string, params?: Record<string, any> | undefined): string;
|
|
25
|
+
};
|
|
26
|
+
}, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}>;
|
|
27
|
+
export default _default;
|
package/lib/style/css.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/lib/style/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/package/nf-confirm.vue
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<p class="nf-confirm__content" v-if="!dangerouslyUseHTMLString">{{ message }}</p>
|
|
9
9
|
<p class="nf-confirm__content" v-else v-html="message"></p>
|
|
10
10
|
<div class="nf-confirm__btns">
|
|
11
|
-
<nf-button @click="handleCancel">{{ cancelButtonText }}</nf-button>
|
|
12
|
-
<nf-button type="primary" :loading="loading" @click="handleConfirm">{{ confirmButtonText }}</nf-button>
|
|
11
|
+
<nf-button @click="handleCancel">{{ localeText.cancelButtonText }}</nf-button>
|
|
12
|
+
<nf-button type="primary" :loading="loading" @click="handleConfirm">{{ localeText.confirmButtonText }}</nf-button>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
+
import { LocaleMixin } from '@94ai/common-utils'
|
|
22
|
+
|
|
21
23
|
import { defineComponent } from 'vue-demi'
|
|
22
24
|
|
|
23
25
|
const typeMap = {
|
|
@@ -29,6 +31,7 @@ const typeMap = {
|
|
|
29
31
|
|
|
30
32
|
export default defineComponent({
|
|
31
33
|
name: "nf-confirm",
|
|
34
|
+
mixins: [LocaleMixin],
|
|
32
35
|
data() {
|
|
33
36
|
return {
|
|
34
37
|
visible: false,
|
|
@@ -38,8 +41,8 @@ export default defineComponent({
|
|
|
38
41
|
type: '',
|
|
39
42
|
customClass: '',
|
|
40
43
|
iconClass: '',
|
|
41
|
-
cancelButtonText:
|
|
42
|
-
confirmButtonText:
|
|
44
|
+
cancelButtonText: undefined,
|
|
45
|
+
confirmButtonText: undefined,
|
|
43
46
|
loading: false,
|
|
44
47
|
onCancel: null,
|
|
45
48
|
onConfirm: null,
|
|
@@ -48,6 +51,12 @@ export default defineComponent({
|
|
|
48
51
|
}
|
|
49
52
|
},
|
|
50
53
|
computed: {
|
|
54
|
+
localeText() {
|
|
55
|
+
return {
|
|
56
|
+
cancelButtonText: this.cancelButtonText ?? this.t('nf.common.cancel'),
|
|
57
|
+
confirmButtonText: this.confirmButtonText ?? this.t('nf.common.confirm'),
|
|
58
|
+
}
|
|
59
|
+
},
|
|
51
60
|
typeClass() {
|
|
52
61
|
return this.type && typeMap[this.type] ? `el-icon-${ typeMap[this.type] }` : '';
|
|
53
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-confirm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zhongzhenjie <1476686104@qq.com>",
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "http://94ai.
|
|
14
|
+
"url": "http://gitlab.94ai.pro/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/
|
|
17
|
+
"@94ai/common-utils": "^9.0.0",
|
|
18
|
+
"@94ai/nf-theme-chalk": "^9.0.0",
|
|
18
19
|
"vue-demi": "^0.14.5"
|
|
19
20
|
},
|
|
20
21
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +31,5 @@
|
|
|
30
31
|
"types": "lib/index.d.ts",
|
|
31
32
|
"main": "lib/nf-confirm.cjs.js",
|
|
32
33
|
"module": "lib/nf-confirm.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "afe3016f0e42dfb7fedf6cbbe400ec08bf4b8662"
|
|
34
35
|
}
|