@94ai/nf-tag 3.1.13

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/.eslintrc.cjs ADDED
@@ -0,0 +1,49 @@
1
+ module.exports = {
2
+ "root": true,
3
+ "env": {
4
+ "node": true
5
+ },
6
+ "extends": [
7
+ "plugin:vue/essential"
8
+ ],
9
+ "parser": "vue-eslint-parser",
10
+ "parserOptions": {
11
+ "parser": "@typescript-eslint/parser",
12
+ "ecmaVersion": 2020,
13
+ "sourceType": "module"
14
+ },
15
+ "rules": {
16
+ "@typescript-eslint/ban-ts-ignore": "off",
17
+ "@typescript-eslint/explicit-function-return-type": "off",
18
+ "@typescript-eslint/no-explicit-any": "off",
19
+ "@typescript-eslint/no-var-requires": "off",
20
+ "@typescript-eslint/no-empty-function": "off",
21
+ "vue/custom-event-name-casing": "off",
22
+ "no-use-before-define": "off",
23
+ "@typescript-eslint/no-use-before-define": "off",
24
+ "@typescript-eslint/ban-ts-comment": "off",
25
+ "@typescript-eslint/ban-types": "off",
26
+ "@typescript-eslint/no-non-null-assertion": "off",
27
+ "@typescript-eslint/explicit-module-boundary-types": "off",
28
+ "@typescript-eslint/no-unused-vars": "off",
29
+ "vue/multi-word-component-names": [
30
+ "error",
31
+ {
32
+ "ignores": [
33
+ "index"
34
+ ]
35
+ }
36
+ ],
37
+ "no-console": "warn",
38
+ "no-debugger": "warn",
39
+ "prettier/prettier": [
40
+ "error",
41
+ {
42
+ "tabWidth": 2,
43
+ "singleQuote": true,
44
+ "semi": false,
45
+ "endOfLine": "auto"
46
+ }
47
+ ]
48
+ }
49
+ }
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # `@94ai/nf-tag`
2
+
3
+ 标签组件
4
+
5
+ ## HomePage
6
+
7
+ 官网地址: https://oss.xccjh.top/common-ui/#/ai-index
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ import NfTag from '@94ai/nf-tag' // or const NfTag = require('@94ai/nf-tag');
13
+
14
+ Vue.use(NfTag)
15
+ ```
@@ -0,0 +1,8 @@
1
+ export {}
2
+
3
+ declare module 'vue' {
4
+ export interface GlobalComponents {
5
+ NfTag: typeof import('@94ai/nf-tag/lib/nf-tag.vue')['default']
6
+
7
+ }
8
+ }
package/lib/index.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ import { PluginObject } from 'vue-demi';
2
+ declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue-demi").ExtractPropTypes<{
3
+ type: {
4
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
5
+ default: undefined;
6
+ };
7
+ circle: {
8
+ type: import("vue-demi").PropType<boolean>;
9
+ default: boolean;
10
+ };
11
+ }>>, Readonly<import("vue-demi").ExtractPropTypes<{
12
+ type: {
13
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
14
+ default: undefined;
15
+ };
16
+ circle: {
17
+ type: import("vue-demi").PropType<boolean>;
18
+ default: boolean;
19
+ };
20
+ }>>, {}, {
21
+ type: "disabled" | "success" | "info" | "warning" | "danger" | "tip";
22
+ circle: boolean;
23
+ }, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{
24
+ type: {
25
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
26
+ default: undefined;
27
+ };
28
+ circle: {
29
+ type: import("vue-demi").PropType<boolean>;
30
+ default: boolean;
31
+ };
32
+ }>>> & import("vue-demi").ShallowUnwrapRef<{}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
33
+ type: {
34
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
35
+ default: undefined;
36
+ };
37
+ circle: {
38
+ type: import("vue-demi").PropType<boolean>;
39
+ default: boolean;
40
+ };
41
+ }>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{
42
+ type: {
43
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
44
+ default: undefined;
45
+ };
46
+ circle: {
47
+ type: import("vue-demi").PropType<boolean>;
48
+ default: boolean;
49
+ };
50
+ }>>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {
51
+ type: "disabled" | "success" | "info" | "warning" | "danger" | "tip";
52
+ circle: boolean;
53
+ }> & {
54
+ props: {
55
+ type: {
56
+ type: import("vue-demi").PropType<"disabled" | "success" | "info" | "warning" | "danger" | "tip">;
57
+ default: undefined;
58
+ };
59
+ circle: {
60
+ type: import("vue-demi").PropType<boolean>;
61
+ default: boolean;
62
+ };
63
+ };
64
+ } & (new () => {
65
+ $scopedSlots: {
66
+ default?(_: {}): any;
67
+ };
68
+ }) & PluginObject<undefined>;
69
+ export default _default;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vueDemi = require("vue-demi");
4
+ const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
5
+ const __sfc_main = vueDemi.defineComponent({
6
+ name: "nf-tag"
7
+ });
8
+ __sfc_main.props = {
9
+ type: {
10
+ key: "type",
11
+ required: false,
12
+ type: String,
13
+ default: void 0
14
+ },
15
+ circle: {
16
+ key: "circle",
17
+ required: false,
18
+ type: Boolean,
19
+ default: true
20
+ }
21
+ };
22
+ __sfc_main.setup = (__props, __ctx) => {
23
+ return {};
24
+ };
25
+ var _sfc_render = function render() {
26
+ var _vm = this, _c = _vm._self._c;
27
+ _vm._self._setupProxy;
28
+ return _c("div", {
29
+ class: ["nf-tag", _vm.type ? `nf-tag--${_vm.type}` : ""],
30
+ on: {
31
+ "click": function($event) {
32
+ return _vm.$emit("click", $event);
33
+ }
34
+ }
35
+ }, [_vm.circle ? _c("i", {
36
+ staticClass: "circle"
37
+ }) : _vm._e(), _vm._t("default")], 2);
38
+ };
39
+ var _sfc_staticRenderFns = [];
40
+ var __component__ = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
41
+ const NfTag = __component__.exports;
42
+ NfTag.install = (app) => {
43
+ app.component("nf-tag", NfTag);
44
+ };
45
+ exports.default = NfTag;
@@ -0,0 +1,45 @@
1
+ import { defineComponent } from "vue-demi";
2
+ import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
3
+ const __sfc_main = defineComponent({
4
+ name: "nf-tag"
5
+ });
6
+ __sfc_main.props = {
7
+ type: {
8
+ key: "type",
9
+ required: false,
10
+ type: String,
11
+ default: void 0
12
+ },
13
+ circle: {
14
+ key: "circle",
15
+ required: false,
16
+ type: Boolean,
17
+ default: true
18
+ }
19
+ };
20
+ __sfc_main.setup = (__props, __ctx) => {
21
+ return {};
22
+ };
23
+ var _sfc_render = function render() {
24
+ var _vm = this, _c = _vm._self._c;
25
+ _vm._self._setupProxy;
26
+ return _c("div", {
27
+ class: ["nf-tag", _vm.type ? `nf-tag--${_vm.type}` : ""],
28
+ on: {
29
+ "click": function($event) {
30
+ return _vm.$emit("click", $event);
31
+ }
32
+ }
33
+ }, [_vm.circle ? _c("i", {
34
+ staticClass: "circle"
35
+ }) : _vm._e(), _vm._t("default")], 2);
36
+ };
37
+ var _sfc_staticRenderFns = [];
38
+ var __component__ = /* @__PURE__ */ normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
39
+ const NfTag = __component__.exports;
40
+ NfTag.install = (app) => {
41
+ app.component("nf-tag", NfTag);
42
+ };
43
+ export {
44
+ NfTag as default
45
+ };
@@ -0,0 +1,41 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ type?: "disabled" | "success" | "info" | "warning" | "danger" | "tip" | undefined;
3
+ circle?: boolean | undefined;
4
+ }>, {
5
+ type: undefined;
6
+ circle: boolean;
7
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
+ type?: "disabled" | "success" | "info" | "warning" | "danger" | "tip" | undefined;
9
+ circle?: boolean | undefined;
10
+ }>, {
11
+ type: undefined;
12
+ circle: boolean;
13
+ }>>>, {
14
+ type: 'disabled' | 'success' | 'info' | 'warning' | 'danger' | 'tip';
15
+ circle: boolean;
16
+ }>, {
17
+ default?(_: {}): any;
18
+ }>;
19
+ export default _default;
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToRuntimeProps<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
29
+ type __VLS_WithDefaults<P, D> = {
30
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
31
+ default: D[K];
32
+ }> : P[K];
33
+ };
34
+ type __VLS_Prettify<T> = {
35
+ [K in keyof T]: T[K];
36
+ } & {};
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $scopedSlots: S;
40
+ };
41
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/css/nf-tag.css'
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/nf-tag.scss'
@@ -0,0 +1,8 @@
1
+ import NfTag from './nf-tag.vue'
2
+ import { Vue2, PluginObject } from 'vue-demi'
3
+
4
+ NfTag.install = (app: typeof Vue2) => {
5
+ app!.component('nf-tag', NfTag)
6
+ }
7
+
8
+ export default NfTag as typeof NfTag & PluginObject<undefined>
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div :class="['nf-tag', type ? `nf-tag--${type}`: '']" @click="$emit('click', $event)">
3
+ <i class="circle" v-if="circle"/>
4
+ <slot />
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts">
9
+ import { defineComponent } from 'vue-demi'
10
+
11
+ export default defineComponent({
12
+ name: "nf-tag",
13
+ })
14
+ </script>
15
+
16
+ <script lang="ts" setup>
17
+ const props = withDefaults(defineProps<{
18
+ type?: 'disabled' |'success' |'info' |'warning' |'danger' |'tip'
19
+ circle?: boolean
20
+ }>(), {
21
+ type: undefined,
22
+ circle: true
23
+ })
24
+ </script>
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/css/nf-tag.css'
@@ -0,0 +1 @@
1
+ import '@94ai/nf-theme-chalk/lib/nf-tag.scss'
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@94ai/nf-tag",
3
+ "version": "3.1.13",
4
+ "description": "> TODO: description",
5
+ "keywords": [],
6
+ "author": "zoujiahe <zoujiahe@94ai.com>",
7
+ "homepage": "https://oss.xccjh.top/common-ui/#/ai-index",
8
+ "license": "ISC",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
+ },
16
+ "dependencies": {
17
+ "@94ai/nf-theme-chalk": "^3.1.13",
18
+ "vue-demi": "^0.14.5"
19
+ },
20
+ "peerDependenciesMeta": {
21
+ "@vue/composition-api": {
22
+ "optional": true
23
+ }
24
+ },
25
+ "peerDependencies": {
26
+ "@vue/composition-api": "^1.0.0-rc.1",
27
+ "element-ui": ">=2.13.2",
28
+ "vue": "^2.0.0 || >=3.0.0"
29
+ },
30
+ "types": "lib/index.d.ts",
31
+ "main": "lib/nf-tag.cjs.js",
32
+ "module": "lib/nf-tag.esm-bundler.js",
33
+ "gitHead": "a8c56183ccc8e979008e2d38bfde2d7d1448654c"
34
+ }
@@ -0,0 +1,8 @@
1
+ export default {
2
+ plugins: {
3
+ // 这个工具可以实现自动添加CSS3前缀
4
+ autoprefixer: {
5
+ overrideBrowserslist: ['last 5 version', '>1%', 'ie >=8']
6
+ },
7
+ },
8
+ }