[发布] 更新 README.md
This commit is contained in:
parent
119a087cec
commit
edf8b478c0
31
README.md
31
README.md
@ -42,37 +42,16 @@ layui 定义为“经典模块化”,并非是自吹她自身有多优秀,
|
|||||||
获得 layui 后,将其完整地部署到你的静态资源项目目录,你只需要引入下述两个文件:
|
获得 layui 后,将其完整地部署到你的静态资源项目目录,你只需要引入下述两个文件:
|
||||||
|
|
||||||
```
|
```
|
||||||
./layui/css/layui.css
|
npm install @layui/layui-vue
|
||||||
./layui/layui.js
|
|
||||||
```
|
```
|
||||||
|
|
||||||
这是一个基本的入门页面:
|
这是一个基本的入门页面:
|
||||||
|
|
||||||
```html
|
```
|
||||||
<!DOCTYPE html>
|
<template>
|
||||||
<html>
|
<lay-button>普通按钮</lay-button>
|
||||||
<head>
|
</template>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<title>开始使用 layui</title>
|
|
||||||
<link rel="stylesheet" href="../layui/css/layui.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- 你的HTML代码 -->
|
|
||||||
|
|
||||||
<script src="../layui/layui.js"></script>
|
|
||||||
<script>
|
|
||||||
//一般直接写在一个js文件中
|
|
||||||
layui.use(['layer', 'form'], function(){
|
|
||||||
var layer = layui.layer
|
|
||||||
,form = layui.form;
|
|
||||||
|
|
||||||
layer.msg('Hello World');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## [阅读文档](http://www.layui.com/)
|
## [阅读文档](http://www.layui.com/)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
"main": "lib/layui-vue.umd.js",
|
"main": "lib/layui-vue.umd.js",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"./lib/": "./lib/"
|
"./lib/": "./lib/"
|
||||||
},
|
},
|
||||||
"types": "types/index.d.ts",
|
"types": "types/index.d.ts",
|
||||||
"style": "lib/layui-vue.css",
|
"style": "lib/layui.css",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build --emptyOutDir && npm run build:types",
|
"build": "vite build --emptyOutDir && npm run build:types",
|
||||||
|
@ -3,10 +3,8 @@ import { defineConfig } from 'vite'
|
|||||||
import babel from 'rollup-plugin-babel'
|
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 plugins from './docs/src/plugin/common-plugins'
|
||||||
import { getSystemErrorMap } from 'util'
|
|
||||||
|
|
||||||
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, 'docs'),
|
||||||
@ -29,7 +27,7 @@ export default defineConfig({
|
|||||||
const name = id.replace(/^@/, '').split('/')[0]
|
const name = id.replace(/^@/, '').split('/')[0]
|
||||||
return camelize(name)
|
return camelize(name)
|
||||||
},
|
},
|
||||||
assetFileNames: `layui-vue.css`
|
assetFileNames: `layui.css`
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
babel({
|
babel({
|
||||||
|
Loading…
Reference in New Issue
Block a user