uni-admin

repository·master·Indexed 43 days ago

https://github.com/dcloudio/uni-admin

A serverless management backend template version 3.0.0 built on uni-app and uniCloud. It provides a ready-to-use administrative interface with wide-screen adaptation and identity and access management integrated via uni-id for user accounts, roles, and permissions.

Tokens
30.1K
Snippets
91
Records
132
Agent score
55%

What's inside uni-admin

  1. What is uni-open-bridge-common

    master

    uni-open-bridge-common is an open-source library designed to provide unified management of authentication credentials from third-party platforms (such as WeChat). It handles the acquisition and management of sensitive tokens and keys, including but not limited to:

    • access_token
    • session_key
    • encrypt_key
    • ticket

    This library simplifies the process of interacting with third-party platform APIs by centralizing the credential lifecycle.

  2. Overview of uni-admin

    master

    uni-admin is an open-source management backend project template built on uni-app and uniCloud. It is specifically designed for developers using the uniCloud ecosystem to build their administrative systems.

    Key features include:

    • Wide-screen adaptation: Automatically adapts to PC wide-screens and mobile devices using uni-app's adaptation capabilities.
    • Serverless architecture: Built on uniCloud for cloud-native development.
    • Identity and Access Management: Integrates with uni-id to provide a complete user account, role, and permission system.
  3. Overview of uCharts

    master

    uCharts is a chart library developed based on the canvas API designed for all frontend applications. It allows developers to write a single set of code that runs across multiple platforms, including:

    • Web
    • Mobile OS: iOS and Android (via uni-app / taro)
    • Mini-programs: WeChat, Alipay, Baidu, ByteDance (Toutiao), Feishu, QQ, Kuaishou, DingTalk, Taobao, etc.
    • Quick Apps and other platforms supporting the canvas API.
  4. Understand uni-cloud-s2s for secure server-to-server communication

    master

    The uni-cloud-s2s module enables secure communication between external servers and uniCloud. This allows your own backend infrastructure to interact with uniCloud services in a protected manner.

    For detailed implementation guides, security protocols, and configuration steps, refer to the official documentation: How external servers communicate securely with uniCloud.

  5. Use the uni-datetime-picker component

    master

    The uni-datetime-picker component (component name: uni-datetime-picker, code block: uDatetimePicker) allows users to select dates and times.

    Key features:

    • Supports both timestamp and date string input/output for start and end times.
    • Supports simultaneous selection of date and time.
    • Supports both PC and mobile interfaces.

    Important Breaking Changes (v2.0.0+):

    • The UI has changed significantly to use a calendar-based selection.
    • No longer supports standalone time selection (type="time") or the hide-second property. For standalone time selection, use the native picker component instead.
    • This version is not backward compatible.

    Default Value Rules:

    • If a value is provided, it will be displayed in the picker input box.
    • If no value is provided, the internal initial value defaults to the current local time (Date.now()), but it will not be displayed in the picker input box.
    <u-datetime-picker
      v-model="date"
      :type="type"
      :start="start"
      :end="end"
    ></u-datetime-picker>
  6. Use uni-sass for global styling and layout

    master
    uni-sass is a global styling utility provided by uni-ui. It allows you to perform common page layout operations—such as managing colors, margins, and border radii—using simple class names and sass variables. This reduces the need for writing custom CSS for repetitive layout tasks.
  7. Use uni-data-checkbox for data-driven selection

    master

    The uni-data-checkbox component is a wrapper around the standard checkbox component designed for data-driven selection. It simplifies common tasks by automatically rendering a list of options from a provided data array, supporting both single-choice (radio) and multiple-choice (checkbox) modes.

    Key features include:

    • Data Binding: Automatically renders candidate options based on a bound data property.
    • Form Validation: Fully compatible with uni-forms validation specifications.
    • Multiple Styles: Supports various visual styles including standard checkboxes/radios, button-style layouts, and tag-style layouts.
    • uniCloud Integration: When using DB Schema with enum types, the uniCloud web console's "Auto-generate form" feature will automatically create uni-data-checkbox components with the appropriate data bound.
    <!-- Component Name: uni-data-checkbox -->
    <!-- Code Block: uDataCheckbox -->
  8. Use the uni-icons component

    master

    The uni-icons component is used to display various icons within a uni-app project. In your template, you can use the component via the uIcons tag.

    For detailed API documentation, property definitions, and a full list of available icon names, refer to the official uni-ui documentation.

    <u-icons type="xxx"></u-icons>
  9. Use the uni-data-picker component for cascaded selection

    master

    The uni-data-picker component is a data component designed for cascaded selection (e.g., address selection, category selection). It supports single-column or multi-column cascading with no limit on the number of columns. If columns exceed the screen width, the top tab area becomes horizontally scrollable.

    Key Features:

    • Data Loading: Supports both immediate loading of all data and lazy loading (e.g., loading district data only after a city is selected).
    • Data Sources: Supports local data, cloud-based static JSON data, and uniCloud cloud database data.
    • uniCloud Integration: Can connect directly to uniCloud cloud databases via JQL. When paired with DB Schema, it can automatically generate frontend maintenance pages via schema2code and supports server-side validation.

    Component Details:

    • Component Name: uni-data-picker
    • Code Block Name: uDataPicker
    • Related Components: uni-data-pickerview, uni-load-more.
    <uni-data-picker
      v-model="value"
      :localdata="localData"
    ></uni-data-picker>