@94ai/nf-tag 3.1.37 → 3.1.39
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/nf-tag.cjs.js +9 -64
- package/lib/nf-tag.esm-bundler.js +8 -63
- package/package/index.ts +8 -0
- package/package/nf-tag.vue +24 -0
- package/package/style/css.ts +1 -0
- package/package/style/index.ts +1 -0
- package/package.json +3 -3
package/lib/nf-tag.cjs.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vueDemi = require("vue-demi");
|
|
4
|
-
|
|
4
|
+
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
5
|
+
const __sfc_main = vueDemi.defineComponent({
|
|
5
6
|
name: "nf-tag"
|
|
6
7
|
});
|
|
7
8
|
__sfc_main.props = {
|
|
@@ -9,81 +10,25 @@ __sfc_main.props = {
|
|
|
9
10
|
key: "type",
|
|
10
11
|
required: false,
|
|
11
12
|
type: String,
|
|
12
|
-
|
|
13
|
+
default: void 0
|
|
13
14
|
},
|
|
14
15
|
circle: {
|
|
15
16
|
key: "circle",
|
|
16
17
|
required: false,
|
|
17
18
|
type: Boolean,
|
|
18
|
-
|
|
19
|
+
default: true
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
__sfc_main.setup =
|
|
22
|
+
__sfc_main.setup = (__props, __ctx) => {
|
|
22
23
|
return {};
|
|
23
24
|
};
|
|
24
|
-
function normalizeComponent(scriptExports, render2, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
25
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
26
|
-
if (render2) {
|
|
27
|
-
options.render = render2;
|
|
28
|
-
options.staticRenderFns = staticRenderFns;
|
|
29
|
-
options._compiled = true;
|
|
30
|
-
}
|
|
31
|
-
if (functionalTemplate) {
|
|
32
|
-
options.functional = true;
|
|
33
|
-
}
|
|
34
|
-
if (scopeId) {
|
|
35
|
-
options._scopeId = "data-v-" + scopeId;
|
|
36
|
-
}
|
|
37
|
-
var hook;
|
|
38
|
-
if (moduleIdentifier) {
|
|
39
|
-
hook = function(context) {
|
|
40
|
-
context = context || // cached call
|
|
41
|
-
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
42
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
43
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
44
|
-
context = __VUE_SSR_CONTEXT__;
|
|
45
|
-
}
|
|
46
|
-
if (injectStyles) {
|
|
47
|
-
injectStyles.call(this, context);
|
|
48
|
-
}
|
|
49
|
-
if (context && context._registeredComponents) {
|
|
50
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
options._ssrRegister = hook;
|
|
54
|
-
} else if (injectStyles) {
|
|
55
|
-
hook = shadowMode ? function() {
|
|
56
|
-
injectStyles.call(
|
|
57
|
-
this,
|
|
58
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
59
|
-
);
|
|
60
|
-
} : injectStyles;
|
|
61
|
-
}
|
|
62
|
-
if (hook) {
|
|
63
|
-
if (options.functional) {
|
|
64
|
-
options._injectStyles = hook;
|
|
65
|
-
var originalRender = options.render;
|
|
66
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
67
|
-
hook.call(context);
|
|
68
|
-
return originalRender(h, context);
|
|
69
|
-
};
|
|
70
|
-
} else {
|
|
71
|
-
var existing = options.beforeCreate;
|
|
72
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
exports: scriptExports,
|
|
77
|
-
options
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
25
|
var _sfc_render = function render() {
|
|
81
26
|
var _vm = this, _c = _vm._self._c;
|
|
82
27
|
_vm._self._setupProxy;
|
|
83
28
|
return _c("div", {
|
|
84
|
-
|
|
29
|
+
class: ["nf-tag", _vm.type ? `nf-tag--${_vm.type}` : ""],
|
|
85
30
|
on: {
|
|
86
|
-
"click": function
|
|
31
|
+
"click": function($event) {
|
|
87
32
|
return _vm.$emit("click", $event);
|
|
88
33
|
}
|
|
89
34
|
}
|
|
@@ -92,9 +37,9 @@ var _sfc_render = function render() {
|
|
|
92
37
|
}) : _vm._e(), _vm._t("default")], 2);
|
|
93
38
|
};
|
|
94
39
|
var _sfc_staticRenderFns = [];
|
|
95
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
|
40
|
+
var __component__ = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
|
96
41
|
const NfTag = __component__.exports;
|
|
97
|
-
NfTag.install =
|
|
42
|
+
NfTag.install = (app) => {
|
|
98
43
|
app.component("nf-tag", NfTag);
|
|
99
44
|
};
|
|
100
45
|
exports.default = NfTag;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from "vue-demi";
|
|
2
|
-
|
|
2
|
+
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
|
+
const __sfc_main = defineComponent({
|
|
3
4
|
name: "nf-tag"
|
|
4
5
|
});
|
|
5
6
|
__sfc_main.props = {
|
|
@@ -7,81 +8,25 @@ __sfc_main.props = {
|
|
|
7
8
|
key: "type",
|
|
8
9
|
required: false,
|
|
9
10
|
type: String,
|
|
10
|
-
|
|
11
|
+
default: void 0
|
|
11
12
|
},
|
|
12
13
|
circle: {
|
|
13
14
|
key: "circle",
|
|
14
15
|
required: false,
|
|
15
16
|
type: Boolean,
|
|
16
|
-
|
|
17
|
+
default: true
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
|
-
__sfc_main.setup =
|
|
20
|
+
__sfc_main.setup = (__props, __ctx) => {
|
|
20
21
|
return {};
|
|
21
22
|
};
|
|
22
|
-
function normalizeComponent(scriptExports, render2, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
23
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
24
|
-
if (render2) {
|
|
25
|
-
options.render = render2;
|
|
26
|
-
options.staticRenderFns = staticRenderFns;
|
|
27
|
-
options._compiled = true;
|
|
28
|
-
}
|
|
29
|
-
if (functionalTemplate) {
|
|
30
|
-
options.functional = true;
|
|
31
|
-
}
|
|
32
|
-
if (scopeId) {
|
|
33
|
-
options._scopeId = "data-v-" + scopeId;
|
|
34
|
-
}
|
|
35
|
-
var hook;
|
|
36
|
-
if (moduleIdentifier) {
|
|
37
|
-
hook = function(context) {
|
|
38
|
-
context = context || // cached call
|
|
39
|
-
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
40
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
41
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
42
|
-
context = __VUE_SSR_CONTEXT__;
|
|
43
|
-
}
|
|
44
|
-
if (injectStyles) {
|
|
45
|
-
injectStyles.call(this, context);
|
|
46
|
-
}
|
|
47
|
-
if (context && context._registeredComponents) {
|
|
48
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
options._ssrRegister = hook;
|
|
52
|
-
} else if (injectStyles) {
|
|
53
|
-
hook = shadowMode ? function() {
|
|
54
|
-
injectStyles.call(
|
|
55
|
-
this,
|
|
56
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
57
|
-
);
|
|
58
|
-
} : injectStyles;
|
|
59
|
-
}
|
|
60
|
-
if (hook) {
|
|
61
|
-
if (options.functional) {
|
|
62
|
-
options._injectStyles = hook;
|
|
63
|
-
var originalRender = options.render;
|
|
64
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
65
|
-
hook.call(context);
|
|
66
|
-
return originalRender(h, context);
|
|
67
|
-
};
|
|
68
|
-
} else {
|
|
69
|
-
var existing = options.beforeCreate;
|
|
70
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
exports: scriptExports,
|
|
75
|
-
options
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
23
|
var _sfc_render = function render() {
|
|
79
24
|
var _vm = this, _c = _vm._self._c;
|
|
80
25
|
_vm._self._setupProxy;
|
|
81
26
|
return _c("div", {
|
|
82
|
-
|
|
27
|
+
class: ["nf-tag", _vm.type ? `nf-tag--${_vm.type}` : ""],
|
|
83
28
|
on: {
|
|
84
|
-
"click": function
|
|
29
|
+
"click": function($event) {
|
|
85
30
|
return _vm.$emit("click", $event);
|
|
86
31
|
}
|
|
87
32
|
}
|
|
@@ -92,7 +37,7 @@ var _sfc_render = function render() {
|
|
|
92
37
|
var _sfc_staticRenderFns = [];
|
|
93
38
|
var __component__ = /* @__PURE__ */ normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
|
|
94
39
|
const NfTag = __component__.exports;
|
|
95
|
-
NfTag.install =
|
|
40
|
+
NfTag.install = (app) => {
|
|
96
41
|
app.component("nf-tag", NfTag);
|
|
97
42
|
};
|
|
98
43
|
export {
|
package/package/index.ts
ADDED
|
@@ -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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-tag",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.39",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^
|
|
17
|
+
"@94ai/nf-theme-chalk": "^1.0.0",
|
|
18
18
|
"vue-demi": "^0.14.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"types": "lib/index.d.ts",
|
|
31
31
|
"main": "lib/nf-tag.cjs.js",
|
|
32
32
|
"module": "lib/nf-tag.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "2b60696b405feafbbaeed385e5bcf666ceefbf2c"
|
|
34
34
|
}
|