wlxs-admin-ui 1.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/README.md +5 -0
- package/dist/es/index.es.js +34 -0
- package/dist/style/index.css +1 -0
- package/package.json +39 -0
- package/src/packages/card/index.ts +7 -0
- package/src/packages/card/src/index.vue +23 -0
- package/src/packages/index.ts +28 -0
- package/src/utils/createNamespace.ts +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Vue 3 + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { openBlock as a, createElementBlock as l, createTextVNode as p, renderSlot as i } from "vue";
|
|
2
|
+
const m = (e) => `${c}-${e}`, f = {
|
|
3
|
+
name: m("card")
|
|
4
|
+
}, d = (e, t) => {
|
|
5
|
+
const n = e.__vccOpts || e;
|
|
6
|
+
for (const [o, s] of t)
|
|
7
|
+
n[o] = s;
|
|
8
|
+
return n;
|
|
9
|
+
}, _ = { class: "card" };
|
|
10
|
+
function $(e, t, n, o, s, u) {
|
|
11
|
+
return a(), l("div", _, [
|
|
12
|
+
t[0] || (t[0] = p(" 我是傻子 ", -1)),
|
|
13
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
const r = /* @__PURE__ */ d(f, [["render", $], ["__scopeId", "data-v-74b81ff1"]]);
|
|
17
|
+
r.install = function(e) {
|
|
18
|
+
e.component(r.name, r);
|
|
19
|
+
};
|
|
20
|
+
let c = "w-";
|
|
21
|
+
const v = [r], b = function(e, t = {}) {
|
|
22
|
+
let n = Number(e.version.split(".")[0]) + Number(e.version.split(".")[1]) / 10;
|
|
23
|
+
v.forEach((s) => {
|
|
24
|
+
e.component(s.name, s);
|
|
25
|
+
}), t.namespace && (c = t.namespace);
|
|
26
|
+
const o = {
|
|
27
|
+
namespace: t.namespace || c
|
|
28
|
+
};
|
|
29
|
+
n >= 2 && n <= 2.7 ? e.prototype.$wlxs = o : e.config.globalProperties.$wlxs = o;
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
b as install,
|
|
33
|
+
c as namespace
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.card[data-v-74b81ff1]{width:100%;height:100%;background:#fff;border-radius:4px;box-shadow:0 2px 12px #0000001a;padding:20px}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wlxs-admin-ui",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "rimraf dist && vite build",
|
|
8
|
+
"docs:dev": "vitepress dev docs",
|
|
9
|
+
"docs:build": "vitepress build docs",
|
|
10
|
+
"docs:preview": "vitepress preview docs"
|
|
11
|
+
},
|
|
12
|
+
"main": "./src/packages/index.ts",
|
|
13
|
+
"module": "./dist/es/index.es.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/es/index.es.js",
|
|
17
|
+
"require": "./src/packages/index.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"src"
|
|
23
|
+
],
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"vue": "^2.6.0 || ^3.0.0"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"vue-demi": "^0.14.10"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
32
|
+
"path": "^0.12.7",
|
|
33
|
+
"rimraf": "^5.0.5",
|
|
34
|
+
"sass": "^1.77.8",
|
|
35
|
+
"typescript": "^5.4.0",
|
|
36
|
+
"vite": "^5.0.0",
|
|
37
|
+
"vue": "^3.4.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="card">
|
|
3
|
+
我是傻子
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { createComponentName } from "../../../utils/createNamespace";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: createComponentName("card"),
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
<style lang="scss" scoped>
|
|
15
|
+
.card {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
background: #fff;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
21
|
+
padding: 20px;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import card from "./card"
|
|
2
|
+
|
|
3
|
+
let namespace = 'w-'
|
|
4
|
+
|
|
5
|
+
const components = [card]
|
|
6
|
+
const install = function (Vue: any, options: any = {}) {
|
|
7
|
+
let version = Number(Vue.version.split('.')[0]) + Number(Vue.version.split('.')[1]) / 10;
|
|
8
|
+
components.forEach(component => {
|
|
9
|
+
Vue.component(component.name, component);
|
|
10
|
+
});
|
|
11
|
+
if (options.namespace) {
|
|
12
|
+
namespace = options.namespace
|
|
13
|
+
}
|
|
14
|
+
const $wlxs = {
|
|
15
|
+
namespace: options.namespace || namespace,
|
|
16
|
+
}
|
|
17
|
+
if (version >= 2 && version <= 2.7) {
|
|
18
|
+
Vue.prototype.$wlxs = $wlxs
|
|
19
|
+
} else {
|
|
20
|
+
Vue.config.globalProperties.$wlxs = $wlxs
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
install,
|
|
27
|
+
namespace
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { namespace } from "../packages";
|
|
2
|
+
|
|
3
|
+
const createBEM = (name: string) => {
|
|
4
|
+
return `${namespace}-${name}`;
|
|
5
|
+
};
|
|
6
|
+
const createComponentName = (name: string) => {
|
|
7
|
+
return `${namespace}-${name}`;
|
|
8
|
+
};
|
|
9
|
+
const createClass = (name: string) => {
|
|
10
|
+
return `${namespace}-${name}`
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
createBEM,
|
|
15
|
+
createComponentName,
|
|
16
|
+
createClass
|
|
17
|
+
}
|