❗ 重命名 docs 为 example
This commit is contained in:
parent
97788e3a77
commit
4a4ee87b65
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@ -25,14 +25,13 @@
|
|||||||
"layui",
|
"layui",
|
||||||
"vue"
|
"vue"
|
||||||
],
|
],
|
||||||
"author": "layui-vue",
|
"author": "就眠儀式",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.2.22",
|
"vue": "^3.2.22",
|
||||||
"vue-router": "^4.0.12"
|
"vue-router": "^4.0.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^16.11.9",
|
|
||||||
"vue": "^3.2.22",
|
"vue": "^3.2.22",
|
||||||
"vue-router": "^4.0.12"
|
"vue-router": "^4.0.12"
|
||||||
},
|
},
|
||||||
@ -41,6 +40,7 @@
|
|||||||
"@babel/preset-env": "^7.15.8",
|
"@babel/preset-env": "^7.15.8",
|
||||||
"@babel/preset-typescript": "^7.15.0",
|
"@babel/preset-typescript": "^7.15.0",
|
||||||
"@rollup/plugin-babel": "^5.3.0",
|
"@rollup/plugin-babel": "^5.3.0",
|
||||||
|
"@types/node": "^16.11.9",
|
||||||
"@types/markdown-it": "^12.2.3",
|
"@types/markdown-it": "^12.2.3",
|
||||||
"@types/markdown-it-container": "^2.0.4",
|
"@types/markdown-it-container": "^2.0.4",
|
||||||
"@vitejs/plugin-vue": "^1.9.3",
|
"@vitejs/plugin-vue": "^1.9.3",
|
||||||
|
@ -5,7 +5,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from "vue";
|
import { computed, defineProps } from "vue";
|
||||||
|
|
||||||
export interface LayIconProps {
|
export interface LayIconProps {
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
@ -17,8 +17,15 @@ export interface LayIconProps {
|
|||||||
const props = withDefaults(defineProps<LayIconProps>(), {
|
const props = withDefaults(defineProps<LayIconProps>(), {
|
||||||
prefix: "layui-icon",
|
prefix: "layui-icon",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const styles = computed(() => {
|
||||||
|
return {
|
||||||
|
color: props.color,
|
||||||
|
fontSize: props.size,
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<i :class="[prefix, type]" :style="{ color: color, fontSize: size }" />
|
<i :class="[prefix, type]" :style="styles" />
|
||||||
</template>
|
</template>
|
@ -1,14 +1,14 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import babel from '@rollup/plugin-babel'
|
|
||||||
import { name } from './package.json'
|
import { name } from './package.json'
|
||||||
import plugins from './docs/src/plugin/common-plugins'
|
import babel from '@rollup/plugin-babel'
|
||||||
|
import plugins from './example/src/plugin/common-plugins'
|
||||||
|
|
||||||
const camelize = (name: string) =>
|
const camelize = (name: string) =>
|
||||||
name.replace(/(^|-)(\w)/g, (a, b, c) => c.toUpperCase())
|
name.replace(/(^|-)(\w)/g, (a, b, c) => c.toUpperCase())
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
root: path.resolve(__dirname, 'docs'),
|
root: path.resolve(__dirname, 'example'),
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'/@src': path.resolve(__dirname, 'src'),
|
'/@src': path.resolve(__dirname, 'src'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user