@dcloudio/uni-shared 3.0.0-alpha-3030820220114011 → 3.0.0-alpha-3031220220222002

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.
@@ -104,15 +104,18 @@ const NVUE_BUILT_IN_TAGS = [
104
104
  'timepicker',
105
105
  'marquee',
106
106
  'countdown',
107
+ 'dc-switch',
107
108
  ];
108
109
  const NVUE_U_BUILT_IN_TAGS = [
109
- 'text',
110
- 'image',
111
- 'input',
112
- 'textarea',
113
- 'video',
114
- 'web-view',
115
- 'slider',
110
+ 'u-text',
111
+ 'u-image',
112
+ 'u-input',
113
+ 'u-textarea',
114
+ 'u-video',
115
+ 'u-web-view',
116
+ 'u-slider',
117
+ 'u-ad',
118
+ 'u-ad-draw',
116
119
  ];
117
120
  function isBuiltInComponent(tag) {
118
121
  // h5 平台会被转换为 v-uni-
@@ -149,22 +152,22 @@ const NVUE_CUSTOM_COMPONENTS = [
149
152
  'swiper-item',
150
153
  'swiper',
151
154
  'switch',
152
- 'slider',
155
+ // 'slider',
153
156
  'picker-view',
154
157
  'picker-view-column',
155
158
  ];
156
159
  function isAppNVueNativeTag(tag) {
160
+ if (NVUE_BUILT_IN_TAGS.includes(tag)) {
161
+ return true;
162
+ }
157
163
  if (NVUE_CUSTOM_COMPONENTS.includes(tag)) {
158
164
  return false;
159
165
  }
160
166
  if (isBuiltInComponent(tag)) {
161
167
  return true;
162
168
  }
163
- if (NVUE_BUILT_IN_TAGS.includes(tag)) {
164
- return true;
165
- }
166
169
  // u-text,u-video...
167
- if (NVUE_U_BUILT_IN_TAGS.includes(tag.replace('u-', ''))) {
170
+ if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {
168
171
  return true;
169
172
  }
170
173
  return false;
@@ -349,6 +349,8 @@ export declare interface NVueElement {
349
349
  type: string;
350
350
  ref: string;
351
351
  text?: string;
352
+ styleSheet: Record<string, Record<string, Record<string, unknown>>>;
353
+ classList: string[];
352
354
  parentNode: NVueElement | null;
353
355
  children: Array<NVueElement>;
354
356
  previousSibling: NVueElement | null;
@@ -359,8 +361,10 @@ export declare interface NVueElement {
359
361
  insertAfter: (node: NVueElement, after: NVueElement) => void;
360
362
  setAttr: (key: string, value: any, silent?: boolean) => void;
361
363
  setAttrs: (attrs: Record<string, unknown>, silent?: boolean) => void;
364
+ setClassList: (classList: string[]) => void;
362
365
  setStyle: (key: string, value: any, silent?: boolean) => void;
363
366
  setStyles: (attrs: Record<string, unknown>, silent?: boolean) => void;
367
+ setStyleSheet: (styleSheet: Record<string, Record<string, Record<string, unknown>>>) => void;
364
368
  addEvent: (type: string, handler: Function, args?: Array<any>) => void;
365
369
  removeEvent: (type: string) => void;
366
370
  fireEvent: (type: string) => void;
@@ -100,15 +100,18 @@ const NVUE_BUILT_IN_TAGS = [
100
100
  'timepicker',
101
101
  'marquee',
102
102
  'countdown',
103
+ 'dc-switch',
103
104
  ];
104
105
  const NVUE_U_BUILT_IN_TAGS = [
105
- 'text',
106
- 'image',
107
- 'input',
108
- 'textarea',
109
- 'video',
110
- 'web-view',
111
- 'slider',
106
+ 'u-text',
107
+ 'u-image',
108
+ 'u-input',
109
+ 'u-textarea',
110
+ 'u-video',
111
+ 'u-web-view',
112
+ 'u-slider',
113
+ 'u-ad',
114
+ 'u-ad-draw',
112
115
  ];
113
116
  function isBuiltInComponent(tag) {
114
117
  // h5 平台会被转换为 v-uni-
@@ -145,22 +148,22 @@ const NVUE_CUSTOM_COMPONENTS = [
145
148
  'swiper-item',
146
149
  'swiper',
147
150
  'switch',
148
- 'slider',
151
+ // 'slider',
149
152
  'picker-view',
150
153
  'picker-view-column',
151
154
  ];
152
155
  function isAppNVueNativeTag(tag) {
156
+ if (NVUE_BUILT_IN_TAGS.includes(tag)) {
157
+ return true;
158
+ }
153
159
  if (NVUE_CUSTOM_COMPONENTS.includes(tag)) {
154
160
  return false;
155
161
  }
156
162
  if (isBuiltInComponent(tag)) {
157
163
  return true;
158
164
  }
159
- if (NVUE_BUILT_IN_TAGS.includes(tag)) {
160
- return true;
161
- }
162
165
  // u-text,u-video...
163
- if (NVUE_U_BUILT_IN_TAGS.includes(tag.replace('u-', ''))) {
166
+ if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {
164
167
  return true;
165
168
  }
166
169
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-shared",
3
- "version": "3.0.0-alpha-3030820220114011",
3
+ "version": "3.0.0-alpha-3031220220222002",
4
4
  "description": "@dcloudio/uni-shared",
5
5
  "main": "./dist/uni-shared.cjs.js",
6
6
  "module": "./dist/uni-shared.es.js",
@@ -20,9 +20,9 @@
20
20
  },
21
21
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
22
22
  "devDependencies": {
23
- "@vue/runtime-core": "3.2.30"
23
+ "@vue/runtime-core": "3.2.31"
24
24
  },
25
25
  "dependencies": {
26
- "@vue/shared": "3.2.30"
26
+ "@vue/shared": "3.2.31"
27
27
  }
28
28
  }