Code Monkey home page Code Monkey logo

cool-uni's Introduction

COOL-UNI

让你不用想太多就能开发完功能,6.0 携带 vue3、vite、ts、pinia 等众多新特性细节曝光!!文档地址

更快

  • 启动快:基于 vite,快速的冷启动,不需要等待打包,即时的热模块更新,真正的按需编译。

  • 开发快:eps 模式下,无须手动添加接口请求方法。

更强

内置请求、路由、文件上传、组件通信、缓存等方法及 ui 库和 hooks

<script lang="ts" setup>
	import { useCool, useUi } from "/@/cool";
	const { service, router, mitt, storage, upload } = useCool();
	const ui = useUi();

	// 请求
	service.test.page().then((res) => {
		consoe.log(res);
	});

	// 跳转
	router.push({
		path: "/pages/goods/info",
		// 方式1
		query: {
			id: 1,
		},
		// 方式2
		params: {
			id: 2,
		},
	});

	// ui全局事件
	ui.showLoading();
	ui.showToast();

	// 通信
	mitt.emit("refresh", { page: 1 });
	mitt.on("refresh", (params) => {});

	// 储存
	storage.set("token", "a123huis");

	// 文件上传
	uni.chooseImage({
		count: 1,
		sourceType: ["album", "camera"],
		success(res) {
			upload(res.tempFiles[0]).then((url) => {
				console.log(url);
			});
		},
	});
</script>

更细

全面的代码描述

cool-uni's People

Contributors

apgzs avatar cool-team-official avatar icssoa avatar jqmin19 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.