@cloudbase/weda-ui 0.2.7 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -4
- package/src/configs/components/container.json +2 -1
- package/src/configs/components/form/richText.json +2 -1
- package/src/configs/components/form/uploader.json +4 -4
- package/src/configs/components/image.json +2 -1
- package/src/configs/components/link.json +2 -1
- package/src/configs/components/richtextview.json +2 -1
- package/src/configs/components/scrollVeiw.json +2 -1
- package/src/configs/components/swiper.json +2 -1
- package/src/configs/components/tabs.json +2 -1
- package/src/configs/components/text.json +2 -1
- package/src/configs/index.js +4 -7
- package/src/mp/components/form/uploader/index.js +15 -8
- package/src/mp/components/form/uploader/index.wxml +1 -1
- package/src/web/components/form/enumSelect/MultipleSelect.jsx +89 -0
- package/src/web/components/form/enumSelect/NormalSelect.jsx +101 -0
- package/src/web/components/form/enumSelect/SelectContainer.jsx +43 -0
- package/src/web/components/form/enumSelect/index.jsx +9 -0
- package/src/web/components/form/enumSelect/props/defaultProps.js +39 -0
- package/src/web/components/form/enumSelect/props/propsTypes.js +50 -0
- package/src/web/components/form/select/region/{cities.json → cities.js} +2 -2
- package/src/web/components/form/select/region/index.js +3 -3
- package/src/web/components/form/select/region/{provinces.json → provinces.js} +2 -2
- package/src/web/components/form/select/region/{regions.json → regions.js} +2 -2
- package/src/web/components/form/switch/index.jsx +1 -0
- package/src/web/components/form/uploader/uploader.h5.jsx +42 -16
- package/src/web/components/form/uploader/uploader.pc.jsx +1 -1
- package/src/web/components/image/image.jsx +0 -1
- package/src/web/components/index.js +1 -1
- package/src/web/components/link/test/__snapshots__/storybook.test.js.snap +754 -0
- package/src/web/components/modal/index.jsx +3 -2
- package/CHANGELOG.md +0 -240
- package/src/.DS_Store +0 -0
- package/src/configs/components/markdown.json +0 -17
- package/src/mp/.gitignore +0 -10
- package/src/mp/components/markdown/index.js +0 -27
- package/src/mp/components/markdown/index.json +0 -6
- package/src/mp/components/markdown/index.wxml +0 -1
- package/src/mp/components/markdown/towxml/audio-player/Audio.js +0 -99
- package/src/mp/components/markdown/towxml/audio-player/audio-player.js +0 -102
- package/src/mp/components/markdown/towxml/audio-player/audio-player.json +0 -5
- package/src/mp/components/markdown/towxml/audio-player/audio-player.wxml +0 -14
- package/src/mp/components/markdown/towxml/audio-player/audio-player.wxss +0 -175
- package/src/mp/components/markdown/towxml/audio-player/loading.svg +0 -1
- package/src/mp/components/markdown/towxml/config.js +0 -285
- package/src/mp/components/markdown/towxml/decode.js +0 -26
- package/src/mp/components/markdown/towxml/decode.json +0 -12
- package/src/mp/components/markdown/towxml/decode.wxml +0 -1
- package/src/mp/components/markdown/towxml/decode.wxss +0 -0
- package/src/mp/components/markdown/towxml/img/img.js +0 -98
- package/src/mp/components/markdown/towxml/img/img.json +0 -3
- package/src/mp/components/markdown/towxml/img/img.wxml +0 -1
- package/src/mp/components/markdown/towxml/img/img.wxss +0 -0
- package/src/mp/components/markdown/towxml/index.js +0 -19
- package/src/mp/components/markdown/towxml/latex/latex.js +0 -53
- package/src/mp/components/markdown/towxml/latex/latex.json +0 -5
- package/src/mp/components/markdown/towxml/latex/latex.wxml +0 -1
- package/src/mp/components/markdown/towxml/latex/latex.wxss +0 -0
- package/src/mp/components/markdown/towxml/parse/highlight/highlight.js +0 -729
- package/src/mp/components/markdown/towxml/parse/highlight/index.js +0 -7
- package/src/mp/components/markdown/towxml/parse/highlight/languages/bash.js +0 -91
- package/src/mp/components/markdown/towxml/parse/highlight/languages/c-like.js +0 -244
- package/src/mp/components/markdown/towxml/parse/highlight/languages/c.js +0 -20
- package/src/mp/components/markdown/towxml/parse/highlight/languages/css.js +0 -138
- package/src/mp/components/markdown/towxml/parse/highlight/languages/dart.js +0 -135
- package/src/mp/components/markdown/towxml/parse/highlight/languages/go.js +0 -57
- package/src/mp/components/markdown/towxml/parse/highlight/languages/htmlbars.js +0 -79
- package/src/mp/components/markdown/towxml/parse/highlight/languages/java.js +0 -126
- package/src/mp/components/markdown/towxml/parse/highlight/languages/javascript.js +0 -263
- package/src/mp/components/markdown/towxml/parse/highlight/languages/json.js +0 -51
- package/src/mp/components/markdown/towxml/parse/highlight/languages/less.js +0 -177
- package/src/mp/components/markdown/towxml/parse/highlight/languages/nginx.js +0 -103
- package/src/mp/components/markdown/towxml/parse/highlight/languages/php.js +0 -152
- package/src/mp/components/markdown/towxml/parse/highlight/languages/python-repl.js +0 -27
- package/src/mp/components/markdown/towxml/parse/highlight/languages/python.js +0 -146
- package/src/mp/components/markdown/towxml/parse/highlight/languages/scss.js +0 -137
- package/src/mp/components/markdown/towxml/parse/highlight/languages/shell.js +0 -23
- package/src/mp/components/markdown/towxml/parse/highlight/languages/typescript.js +0 -198
- package/src/mp/components/markdown/towxml/parse/highlight/languages/xml.js +0 -143
- package/src/mp/components/markdown/towxml/parse/highlight/style/github.wxss +0 -99
- package/src/mp/components/markdown/towxml/parse/highlight/style/monokai.wxss +0 -70
- package/src/mp/components/markdown/towxml/parse/index.js +0 -106
- package/src/mp/components/markdown/towxml/parse/markdown/index.js +0 -53
- package/src/mp/components/markdown/towxml/parse/markdown/markdown.js +0 -5834
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/emoji.js +0 -1773
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/ins.js +0 -120
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/latex.js +0 -193
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/mark.js +0 -120
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/sub.js +0 -95
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/sup.js +0 -95
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/todo.js +0 -220
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/yuml.js +0 -18
- package/src/mp/components/markdown/towxml/parse/parse2/Parser.js +0 -263
- package/src/mp/components/markdown/towxml/parse/parse2/Tokenizer.js +0 -507
- package/src/mp/components/markdown/towxml/parse/parse2/domhandler/index.js +0 -104
- package/src/mp/components/markdown/towxml/parse/parse2/domhandler/node.js +0 -169
- package/src/mp/components/markdown/towxml/parse/parse2/entities/decode.js +0 -54
- package/src/mp/components/markdown/towxml/parse/parse2/entities/decode_codepoint.js +0 -19
- package/src/mp/components/markdown/towxml/parse/parse2/entities/encode.js +0 -54
- package/src/mp/components/markdown/towxml/parse/parse2/entities/index.js +0 -30
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/decode.js +0 -31
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/entities.js +0 -2128
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/legacy.js +0 -109
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/xml.js +0 -2
- package/src/mp/components/markdown/towxml/parse/parse2/index.js +0 -8
- package/src/mp/components/markdown/towxml/style/main.wxss +0 -378
- package/src/mp/components/markdown/towxml/style/theme/dark.wxss +0 -73
- package/src/mp/components/markdown/towxml/style/theme/light.wxss +0 -63
- package/src/mp/components/markdown/towxml/table/table.js +0 -11
- package/src/mp/components/markdown/towxml/table/table.json +0 -6
- package/src/mp/components/markdown/towxml/table/table.wxml +0 -24
- package/src/mp/components/markdown/towxml/table/table.wxss +0 -0
- package/src/mp/components/markdown/towxml/todogroup/todogroup.js +0 -19
- package/src/mp/components/markdown/towxml/todogroup/todogroup.json +0 -6
- package/src/mp/components/markdown/towxml/todogroup/todogroup.wxml +0 -13
- package/src/mp/components/markdown/towxml/todogroup/todogroup.wxss +0 -3
- package/src/mp/components/markdown/towxml/towxml.js +0 -17
- package/src/mp/components/markdown/towxml/towxml.json +0 -6
- package/src/mp/components/markdown/towxml/towxml.wxml +0 -5
- package/src/mp/components/markdown/towxml/towxml.wxss +0 -8
- package/src/mp/components/markdown/towxml/yuml/yuml.js +0 -51
- package/src/mp/components/markdown/towxml/yuml/yuml.json +0 -5
- package/src/mp/components/markdown/towxml/yuml/yuml.wxml +0 -5
- package/src/mp/components/markdown/towxml/yuml/yuml.wxss +0 -0
- package/src/web/.DS_Store +0 -0
- package/src/web/components/markdown/index.jsx +0 -40
- package/src/web/wedatheme/.git +0 -1
- package/src/web/wedatheme/.gitignore +0 -5
- package/src/web/wedatheme/.npmrc +0 -1
- package/src/web/wedatheme/package-lock.json +0 -14335
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<checkbox-group wx:if="{{data.tag === 'todogroup'}}" class="{{data.attr.class}}" bindchange="_change">
|
|
2
|
-
<block wx:if="{{data.child}}" wx:for="{{data.child}}" wx:for-item="item" wx:key="i">
|
|
3
|
-
<label wx:if="{{item.tag}}" class="{{item.attr.class}}">
|
|
4
|
-
<block wx:if="{{item.child}}" wx:for="{{item.child}}" wx:for-item="item" wx:key="i">
|
|
5
|
-
<!--解析选择框-->
|
|
6
|
-
<checkbox wx:if="{{item.tag === 'checkbox'}}" class="{{item.attr.class}}" value="{{item.attr.value}}" data-_e="{{item}}" checked="{{item.attr.checked}}" disabled="{{item.attr.disabled}}"/>
|
|
7
|
-
|
|
8
|
-
<!--解析文字-->
|
|
9
|
-
<decode wx:if="{{item.child}}" nodes="{{item}}"/>
|
|
10
|
-
</block>
|
|
11
|
-
</label>
|
|
12
|
-
</block>
|
|
13
|
-
</checkbox-group>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const config = require('../config');
|
|
2
|
-
Component({
|
|
3
|
-
options: {
|
|
4
|
-
styleIsolation: 'shared',
|
|
5
|
-
},
|
|
6
|
-
properties: {
|
|
7
|
-
data: {
|
|
8
|
-
type: Object,
|
|
9
|
-
value: {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
data: {
|
|
13
|
-
attr: {
|
|
14
|
-
src: '',
|
|
15
|
-
class: '',
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
w: 0,
|
|
19
|
-
h: 0,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
lifetimes: {
|
|
23
|
-
attached() {
|
|
24
|
-
const _ts = this;
|
|
25
|
-
const dataAttr = this.data.data.attr;
|
|
26
|
-
|
|
27
|
-
// 设置公式图片
|
|
28
|
-
_ts.setData({
|
|
29
|
-
attr: {
|
|
30
|
-
src: `${config.yuml.api}=${dataAttr.value}&theme=${global._theme}`,
|
|
31
|
-
class: `${dataAttr.class}`,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
load(e) {
|
|
38
|
-
const _ts = this;
|
|
39
|
-
// 公式图片加载完成则根据其图片大小、类型计算其显示的合适大小
|
|
40
|
-
const scale = 20;
|
|
41
|
-
const w = e.detail.width / scale;
|
|
42
|
-
const h = e.detail.height / scale;
|
|
43
|
-
_ts.setData({
|
|
44
|
-
size: {
|
|
45
|
-
w,
|
|
46
|
-
h,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
|
File without changes
|
package/src/web/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/display-name */
|
|
2
|
-
/* eslint-disable react/prop-types */
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import RawMarkdown from 'react-markdown';
|
|
5
|
-
import { Prism } from 'react-syntax-highlighter';
|
|
6
|
-
|
|
7
|
-
import * as PropTypes from 'prop-types';
|
|
8
|
-
import classNames from '../../utils/classnames';
|
|
9
|
-
|
|
10
|
-
const renderers = {
|
|
11
|
-
code: ({ language, value = '' }) => (
|
|
12
|
-
<Prism language={language}>{value}</Prism>
|
|
13
|
-
),
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default function Markdown({ source = '', className = '', ...props }) {
|
|
17
|
-
const { contenteditable, onInput, onBlur, style, id } = props;
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className={classNames({
|
|
21
|
-
'weda-ui': true,
|
|
22
|
-
[className]: className,
|
|
23
|
-
})}
|
|
24
|
-
id={id}
|
|
25
|
-
style={style}
|
|
26
|
-
contentEditable={contenteditable}
|
|
27
|
-
onInput={onInput}
|
|
28
|
-
onBlur={onBlur}
|
|
29
|
-
>
|
|
30
|
-
<RawMarkdown source={source} renderers={renderers} />
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
Markdown.propTypes = {
|
|
36
|
-
/**
|
|
37
|
-
* markdown 文本内容
|
|
38
|
-
*/
|
|
39
|
-
source: PropTypes.string,
|
|
40
|
-
};
|
package/src/web/wedatheme/.git
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
gitdir: ../../../.git/modules/src/web/wedatheme
|
package/src/web/wedatheme/.npmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
registry=https://mirrors.tencent.com/npm/
|