Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions rich_text_dir/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
31 changes: 31 additions & 0 deletions rich_text_dir/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*.log*
.cache
.DS_Store
.idea
.vscode
.eslintcache

# npm
node_modules

# test
**/test/coverage

# dist file
es
lib
dist
dist-theme
assets-package
/site
changelog.generated.md
vetur

*.tgz

# lcap files
.lcap
source.zip
manifest
nasl.extension.*
*@*.zip
3 changes: 3 additions & 0 deletions rich_text_dir/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public/*.js
dist-theme
node_modules
6 changes: 6 additions & 0 deletions rich_text_dir/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"printWidth": 150,
"singleQuote": true,
"trailingComma": "es5"
}
21 changes: 21 additions & 0 deletions rich_text_dir/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
],
framework: {
name: '@lcap/storybook-vue-vite',
options: {
builder: {
viteConfigPath: './vite.config.js',
},
},
},
docs: {
autodocs: 'tag',
},
};
export default config;
24 changes: 24 additions & 0 deletions rich_text_dir/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Vue from 'vue';
import * as Components from '@/index';

Object.keys(Components).forEach((key) => {
if (Components[key] && Components[key].name) {
Vue.component(Components[key].name, Components[key]);
} else if (Components[key] && typeof Components[key].install === 'function') {
Vue.use(Components[key]);
}
});

const preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
22 changes: 22 additions & 0 deletions rich_text_dir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 富文本目录

**依赖库设计**

这个依赖库旨在提供一套用于低代码开发的工具集,以简化开发人员的工作流程。它包含了多个组件和逻辑,每个组件和逻辑都提供了特定的功能,使开发过程更加高效。

**主要特性**

渲染富文本内容,根据内容中的标题自动生成目录,支持点击目录和内容滚动的联动。

...

## 使用说明

### 组件(组件名)

- **attrs**
- content: 详情富文本内容
- title: 目录标题
- height: 高度
- sidebarWidth: 目录宽度

15 changes: 15 additions & 0 deletions rich_text_dir/manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Plugin-Version: 1.0.0
Library-Type: Frontend
Metadata-File: nasl.extension.json
Tag: Vue
packages/extension/[email protected]/dist-theme/index.cjs: dist-theme/index.cjs
packages/extension/[email protected]/dist-theme/index.cjs.map: dist-theme/index.cjs.map
packages/extension/[email protected]/dist-theme/index.css: dist-theme/index.css
packages/extension/[email protected]/dist-theme/index.js: dist-theme/index.js
packages/extension/[email protected]/dist-theme/index.js.map: dist-theme/index.js.map
packages/extension/[email protected]/dist-theme/index.mjs: dist-theme/index.mjs
packages/extension/[email protected]/dist-theme/index.mjs.map: dist-theme/index.mjs.map
packages/extension/[email protected]/manifest: manifest
packages/extension/[email protected]/source.zip: source.zip
packages/extension/[email protected]/nasl.extension.d.ts: nasl.extension.d.ts
packages/extension/[email protected]/zip.tgz: zip.tgz
25 changes: 25 additions & 0 deletions rich_text_dir/nasl.extension.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
declare namespace extensions.rich_text_dir.viewComponents {
const ViewComponent: typeof nasl.ui.ViewComponent, ViewComponentOptions: typeof nasl.ui.ViewComponentOptions;
export class RichTextDir extends ViewComponent {
constructor(options?: Partial<RichTextDirOptions>);
}
export class RichTextDirOptions extends ViewComponentOptions {
/**
* 富文本内容
*/
content: nasl.core.String;
/**
* 目录标题
*/
title: nasl.core.String;
/**
* 高度
*/
height: nasl.core.String;
/**
* 目录宽度
*/
sidebarWidth: nasl.core.String;
}
export {};
}
162 changes: 162 additions & 0 deletions rich_text_dir/nasl.extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"name": "rich_text_dir",
"title": "富文本目录",
"description": "富文本目录",
"specVersion": "1.0.0",
"type": "module",
"subType": "extension",
"version": "1.0.7",
"frontends": [
{
"concept": "FrontendLibrary",
"name": "pc",
"type": "pc",
"frameworkKind": "vue2",
"viewComponents": [
{
"concept": "ViewComponentDeclaration",
"group": "",
"name": "RichTextDir",
"kebabName": "rich-text-dir",
"title": "富文本目录",
"description": "富文本目录",
"icon": "",
"tsTypeParams": "",
"props": [
{
"concept": "PropDeclaration",
"group": "主要属性",
"tabKind": "property",
"setter": {
"concept": "InputSetter"
},
"name": "content",
"title": "富文本内容",
"tsType": "nasl.core.String",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "StringLiteral",
"value": ""
},
"playground": []
}
},
{
"concept": "PropDeclaration",
"group": "主要属性",
"tabKind": "property",
"setter": {
"concept": "InputSetter"
},
"name": "title",
"title": "目录标题",
"tsType": "nasl.core.String",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "StringLiteral",
"value": "目录"
},
"playground": []
}
},
{
"concept": "PropDeclaration",
"group": "主要属性",
"tabKind": "property",
"setter": {
"concept": "InputSetter"
},
"name": "height",
"title": "高度",
"tsType": "nasl.core.String",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "StringLiteral",
"value": "500px"
},
"playground": []
}
},
{
"concept": "PropDeclaration",
"group": "主要属性",
"tabKind": "property",
"setter": {
"concept": "InputSetter"
},
"name": "sidebarWidth",
"title": "目录宽度",
"tsType": "nasl.core.String",
"defaultValue": {
"concept": "DefaultValue",
"expression": {
"concept": "StringLiteral",
"value": "240px"
},
"playground": []
}
}
],
"readableProps": [],
"events": [],
"methods": [],
"slots": [],
"children": [],
"blocks": [
{
"concept": "ViewBlockWithImage",
"title": "基本用法",
"description": "",
"code": "<template><rich-text-dir></rich-text-dir></template>",
"screenshot": "",
"drawing": ""
}
],
"themeVariables": [],
"type": "pc",
"ideusage": {
"idetype": "element"
}
}
],
"logics": []
}
],
"externalDependencyMap": {
"npm": [
{
"name": "vue",
"version": "^2.6.0"
}
]
},
"summary": {
"name": "rich_text_dir",
"title": "富文本目录",
"version": "1.0.7",
"description": "富文本目录",
"frontends": [
{
"type": "pc",
"frameworkKind": "vue2",
"viewComponents": [
{
"name": "RichTextDir",
"title": "富文本目录"
}
],
"logics": []
}
]
},
"compilerInfoMap": {
"js": {
"prefix": "extension"
},
"manifest": "{\"nasl\":[\"nasl.extension.json\",\"nasl.extension.d.ts\"],\"runtime\":[\"dist-theme/index.js\",\"dist-theme/index.css\"],\"theme\":[],\"style\":[],\"package\":[\"source.zip\",\"zip.tgz\"],\"i18n\":[],\"modules\":[],\"ide\":[],\"hashMap\":{\"dist-theme/index.js\":\"b4221f2117c64639\",\"nasl.extension.json\":\"754a197d35a79e99\",\"dist-theme/index.css\":\"74fff09d1e6f06af\",\"nasl.extension.d.ts\":\"fad102141d99b939\"}}"
},
"ideVersion": "3.8"
}
Loading